GCOV: introduce --json-format.
[official-gcc.git] / gcc / ChangeLog
blob165ae049dba28858585a2353f69aa9f93914cfe0
1 2018-10-29  Martin Liska  <mliska@suse.cz>
3         * Makefile.in: Make dependency to json.o.
4         * doc/gcov.texi: Document new JSON format, remove
5         old intermediate format documentation.
6         * gcov.c (struct function_info): Come up with m_name and
7         m_demangled_name.
8         (function_info::function_info): Initialize it.
9         (function_info::~function_info): Release it.
10         (main): Rename flag_intermediate_format to flag_json_format.
11         (print_usage): Describe --json-format.
12         (process_args): Set flag_json_format.
13         (output_intermediate_line): Remove.
14         (output_intermediate_json_line): Likewise.
15         (get_gcov_intermediate_filename): Return new extension
16         ".gcov.json.gz".
17         (output_intermediate_file): Implement JSON emission.
18         (output_json_intermediate_file): Implement JSON emission.
19         (generate_results): Use ::get_name for function name.
20         Handle JSON output file.
21         (read_graph_file): Use ::get_name instead of cplus_demangle.
22         (read_count_file): Likewise.
23         (solve_flow_graph): Likewise.
24         (add_line_counts): Likewise.
25         (accumulate_line_counts): Use new flag_json_format.
26         (output_function_details): Use ::get_name instead of cplus_demangle.
27         (output_lines): Likewise.
28         * json.cc (test_writing_literals): Add new tests.
29         * json.h (class literal): Add new boolean constructor.
31 2018-10-29  Segher Boessenkool  <segher@kernel.crashing.org>
33         PR rtl-optimization/87701
34         PR rtl-optimization/87780
35         * combine.c (make_more_copies): Rewrite.
37 2018-10-28  Kugan Vivekanandarajah  <kuganv@linaro.org>
39         * doc/generic.texi (ABSU_EXPR): Document.
40         * match.pd (absu(x)*absu(x) -> x*x): Handle.
41         (absu(absu(X)) -> absu(X)): Likewise.
42         (absu(-X) -> absu(X)): Likewise.
43         (absu(X)  where X is nonnegative -> X): Likewise.
45 2018-10-28  Iain Buclaw  <ibuclaw@gdcproject.org>
47         * Makefile.in (tm_d_file_list, tm_d_include_list): New variables.
48         (TM_D_H, D_TARGET_DEF, D_TARGET_H, D_TARGET_OBJS): New variables.
49         (tm_d.h, cs-tm_d.h, default-d.o): New rules.
50         (d/d-target-hooks-def.h, s-d-target-hooks-def-h): New rules.
51         (s-tm-texi): Also check timestamp on d-target.def.
52         (generated_files): Add TM_D_H and d-target-hooks-def.h.
53         (build/genhooks.o): Also depend on D_TARGET_DEF.
54         * config.gcc (tm_d_file, d_target_objs, target_has_targetdm): New
55         variables.
56         * config/aarch64/aarch64-d.c: New file.
57         * config/aarch64/aarch64-linux.h (GNU_USER_TARGET_D_CRITSEC_SIZE):
58         Define.
59         * config/aarch64/aarch64-protos.h (aarch64_d_target_versions): New
60         prototype.
61         * config/aarch64/aarch64.h (TARGET_D_CPU_VERSIONS): Define.
62         * config/aarch64/t-aarch64 (aarch64-d.o): New rule.
63         * config/arm/arm-d.c: New file.
64         * config/arm/arm-protos.h (arm_d_target_versions): New prototype.
65         * config/arm/arm.h (TARGET_D_CPU_VERSIONS): Define.
66         * config/arm/linux-eabi.h (EXTRA_TARGET_D_OS_VERSIONS): Define.
67         * config/arm/t-arm (arm-d.o): New rule.
68         * config/default-d.c: New file.
69         * config/glibc-d.c: New file.
70         * config/gnu.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
71         * config/i386/i386-d.c: New file.
72         * config/i386/i386-protos.h (ix86_d_target_versions): New prototype.
73         * config/i386/i386.h (TARGET_D_CPU_VERSIONS): Define.
74         * config/i386/linux-common.h (EXTRA_TARGET_D_OS_VERSIONS): Define.
75         (GNU_USER_TARGET_D_CRITSEC_SIZE): Define.
76         * config/i386/t-i386 (i386-d.o): New rule.
77         * config/kfreebsd-gnu.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
78         * config/kopensolaris-gnu.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
79         * config/linux-android.h (ANDROID_TARGET_D_OS_VERSIONS): Define.
80         * config/linux.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
81         * config/mips/linux-common.h (EXTRA_TARGET_D_OS_VERSIONS): Define.
82         * config/mips/mips-d.c: New file.
83         * config/mips/mips-protos.h (mips_d_target_versions): New prototype.
84         * config/mips/mips.h (TARGET_D_CPU_VERSIONS): Define.
85         * config/mips/t-mips (mips-d.o): New rule.
86         * config/powerpcspe/linux.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
87         * config/powerpcspe/linux64.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
88         * config/powerpcspe/powerpcspe-d.c: New file.
89         * config/powerpcspe/powerpcspe-protos.h (rs6000_d_target_versions):
90         New prototype.
91         * config/powerpcspe/powerpcspe.c (rs6000_output_function_epilogue):
92         Support GNU D by using 0 as the language type.
93         * config/powerpcspe/powerpcspe.h (TARGET_D_CPU_VERSIONS): Define.
94         * config/powerpcspe/t-powerpcspe (powerpcspe-d.o): New rule.
95         * config/riscv/riscv-d.c: New file.
96         * config/riscv/riscv-protos.h (riscv_d_target_versions): New
97         prototype.
98         * config/riscv/riscv.h (TARGET_D_CPU_VERSIONS): Define.
99         * config/riscv/t-riscv (riscv-d.o): New rule.
100         * config/rs6000/linux.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
101         * config/rs6000/linux64.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
102         * config/rs6000/rs6000-d.c: New file.
103         * config/rs6000/rs6000-protos.h (rs6000_d_target_versions): New
104         prototype.
105         * config/rs6000/rs6000.c (rs6000_output_function_epilogue):
106         Support GNU D by using 0 as the language type.
107         * config/rs6000/rs6000.h (TARGET_D_CPU_VERSIONS): Define.
108         * config/rs6000/t-rs6000 (rs6000-d.o): New rule.
109         * config/s390/s390-d.c: New file.
110         * config/s390/s390-protos.h (s390_d_target_versions): New prototype.
111         * config/s390/s390.h (TARGET_D_CPU_VERSIONS): Define.
112         * config/s390/t-s390 (s390-d.o): New rule.
113         * config/sparc/sparc-d.c: New file.
114         * config/sparc/sparc-protos.h (sparc_d_target_versions): New
115         prototype.
116         * config/sparc/sparc.h (TARGET_D_CPU_VERSIONS): Define.
117         * config/sparc/t-sparc (sparc-d.o): New rule.
118         * config/t-glibc (glibc-d.o): New rule.
119         * configure: Regenerated.
120         * configure.ac (tm_d_file): New variable.
121         (tm_d_file_list, tm_d_include_list, d_target_objs): Add substitutes.
122         * doc/contrib.texi (Contributors): Add self for the D frontend.
123         * doc/frontends.texi (G++ and GCC): Mention D as a supported language.
124         * doc/install.texi (Configuration): Mention libphobos as an option for
125         --enable-shared.  Mention d as an option for --enable-languages.
126         (Testing): Mention check-d as a target.
127         * doc/invoke.texi (Overall Options): Mention .d, .dd, and .di as file
128         name suffixes.  Mention d as a -x option.
129         * doc/sourcebuild.texi (Top Level): Mention libphobos.
130         * doc/standards.texi (Standards): Add section on D language.
131         * doc/tm.texi: Regenerated.
132         * doc/tm.texi.in: Add @node for D language and ABI, and @hook for
133         TARGET_CPU_VERSIONS, TARGET_D_OS_VERSIONS, and TARGET_D_CRITSEC_SIZE.
134         * dwarf2out.c (is_dlang): New function.
135         (gen_compile_unit_die): Use DW_LANG_D for D.
136         (declare_in_namespace): Return module die for D, instead of adding
137         extra declarations into the namespace.
138         (gen_namespace_die): Generate DW_TAG_module for D.
139         (gen_decl_die): Handle CONST_DECLSs for D.
140         (dwarf2out_decl): Likewise.
141         (prune_unused_types_walk_local_classes): Handle DW_tag_interface_type.
142         (prune_unused_types_walk): Handle DW_tag_interface_type same as other
143         kinds of aggregates.
144         * gcc.c (default_compilers): Add entries for .d, .dd and .di.
145         * genhooks.c: Include d/d-target.def.
147 2018-10-28  Iain Sandoe  <iain@sandoe.co.uk>
149         PR target/85669
150         * config/rs6000/darwin.h (STACK_BOUNDARY): New.
151         (RS6000_STARTING_FRAME_OFFSET): Adjust to preserve 16byte alignment.
152         (STACK_DYNAMIC_OFFSET): Likewise.
154 2018-10-27  Sandra Loosemore  <sandra@codesourcery.com>
156         PR target/80024
157         * config/nios2/nios2.c (nios2_valid_target_attribute_rec): Fix
158         error message.
160 2018-10-26  Tulio Magno Quites Machado Filho  <tuliom@linux.ibm.com>
162         * doc/extend.texi (PowerPC builtins): Fix __builtin_unpack_ibm128
163         return type and other typos.
165 2018-10-26  Aaron Sawdey  <acsawdey@linux.ibm.com>
167         * config/rs6000/rs6000-string.c (expand_strncmp_gpr_sequence): Change to
168         a shorter sequence with fewer branches.
169         (emit_final_str_compare_gpr): Ditto.
171 2018-10-26  Paul A. Clarke  <pc@us.ibm.com>
173         * config/rs6000/tmmintrin.h: New file.
174         * config.gcc (powerpc*-*-*): Add tmmintrin.h to extra_headers.
176 2018-10-26  Paul A. Clarke  <pc@us.ibm.com>
178         * config/rs6000/mmintrin.h: Enable 32bit compilation.
179         * config/rs6000/xmmintrin.h: Likewise.
181 2018-10-26  Paul A. Clarke  <pc@us.ibm.com>
183         * config/rs6000/xmmintrin.h (_mm_extract_pi16): Fix for big-endian.
185 2018-10-26  Richard Biener  <rguenther@suse.de>
187         * tree-vect-slp.c (vect_mark_slp_stmts): Add visited hash_set
188         and wrapper.
189         (vect_mark_slp_stmts_relevant): Likewise.
190         (vect_detect_hybrid_slp_stmts): Likewise.
191         (vect_bb_slp_scalar_cost): Likewise.
192         (vect_remove_slp_scalar_calls): Likewise.
194 2018-10-26  Jan Hubicka  <jh@suse.cz>
196         * ipa-devirt.c (odr_subtypes_equivalent_p): Fix recursion.
197         (warn_types_mismatch): Fix walk of DECL_NAME.
198         (odr_types_equivalent_p): Fix overactive assert.
200 2018-10-26  Richard Biener  <rguenther@suse.de>
202         PR tree-optimization/87105
203         * tree-vectorizer.h (_slp_tree::refcnt): New member.
204         * tree-vect-slp.c (vect_free_slp_tree): Decrement and honor
205         refcnt.
206         (vect_create_new_slp_node): Initialize refcnt to one.
207         (bst_traits): Move.
208         (scalar_stmts_set_t, bst_fail): Remove.
209         (vect_build_slp_tree_2): Add bst_map argument and adjust calls.
210         (vect_build_slp_tree): Add bst_map argument and lookup
211         already created SLP nodes.
212         (vect_print_slp_tree): Handle a SLP graph, print SLP node
213         addresses.
214         (vect_slp_rearrange_stmts): Handle a SLP graph.
215         (vect_analyze_slp_instance): Adjust and free SLP nodes from
216         the CSE map.  Fix indenting.
217         (vect_schedule_slp_instance): Add short-cut.
219 2018-10-26  Martin Liska  <mliska@suse.cz>
221         PR testsuite/86158
222         * ipa-prop.c (struct ipa_vr_ggc_hash_traits): Hash with
223         addr_expr and not with pointers.
225 2018-10-26  Jan Hubicka  <jh@suse.cz>
227         * tree.c (free_lang_data_in_type): Only check main variants.
228         * ipa-devirt.c (warn_odr): Make static.
229         (types_same_for_odr): Drop strict variant.
230         (types_odr_comparable): Likewise.
231         (odr_or_derived_type_p): Look for main variants.
232         (odr_name_hasher::equal): Cleanup comment.
233         (odr_subtypes_equivalent): Add warn and warned arguments; check main
234         variants.
235         (type_variants_equivalent_p): break out from ...
236         (odr_types_equivalent): ... here; go for main variants where needed.
237         (warn_odr): ... here; turn static.
238         (warn_types_mismatch): Compare mangled names of main variants.
239         * ipa-utils.h (types_odr_comparable): Drop strict parameter.
240         (type_with_linkage_p): Sanity check that we look at main variant.
241         * lto.c (lto_read_decls): Only consider main variant to be ODR type.
242         * tree.h (types_same_for_odr): Drop strict argument.
244 2018-10-26  Richard Biener  <rguenther@suse.de>
246         PR tree-optimization/87746
247         * tree-vect-data-refs.c (vect_update_misalignment_for_peel):
248         Simplify and fix WRT strided store groups with size not
249         equal to step in element count.
250         (vect_analyze_group_access_1): Dump the whole group.
252 2018-10-25  Carl Love  <cel@us.ibm.com>
254         * config/rs6000/rs6000-c.c (P9V_BUILTIN_VEC_VSCEDPGT,
255         P9V_BUILTIN_VEC_VSCEDPLT, P9V_BUILTIN_VEC_VSCEDPEQ,
256         P9V_BUILTIN_VEC_VSCEDPUO): Rename base overloaded name.  Add quad
257         precicion entry for each overloaded builtin.
258         * config/rs6000/rs6000-builtin.def (VSCEDPGT, VSCEDPLT, VSCEDPEQ,
259         VSCEDPUO): Rename overloaded name.
260         (VSCEDPGT, VSCEQPGT, VSCEDPLT, VSCEQPLT, VSCEDPEQ, VSCEQPEQ,
261         VSCEDPUO, VSCEQPUO): Add defitions for overloaded builtins.
262         * config/rs6000/vsx.md (xscmpexpqp_<code>_<mode>): Add
263         define_expand for xscmpexqp instruction.
264         (*xscmpexpqp): Add define_insn for the xscmpexqp instruction.
266 2018-10-25  Bill Schmidt  <wschmidt@linux.ibm.com>
267             Jinsong Ji <jji@us.ibm.com>
269         * config/rs6000/emmintrin.h (_mm_slli_epi16): Replace deprecated
270         function with vec_sl.
271         (_mm_slli_epi32): Likewise.
272         (_mm_slli_epi64): Likewise.
273         (_mm_srai_epi16): Replace deprecated function with vec_sra.
274         (_mm_srai_epi32): Likewise.
275         (_mm_srli_epi16): Replace deprecated function with vec_sr.
276         (_mm_srli_epi32): Likewise.
277         (_mm_srli_epi64): Likewise.
278         (_mm_sll_epi16): Replace deprecated function with vec_sl.
279         (_mm_sll_epi32): Likewise.
280         (_mm_sll_epi64): Likewise.
281         (_mm_sra_epi16): Replace deprecated function with vec_sra.
282         (_mm_sra_epi32): Likewise.
283         (_mm_srl_epi16): Replace deprecated function with vec_sr.
284         (_mm_srl_epi32): Likewise.
285         (_mm_srl_epi64): Likewise.
287 2018-10-25  Bill Schmidt  <wschmidt@linux.ibm.com>
288             Jinsong Ji <jji@us.ibm.com>
290         * gcc/config/rs6000/emmintrin.h (_mm_sll_epi16): Replace
291         comparison operators with vec_cmp* for compatibility due to
292         unfortunate history; clean up formatting and use types more
293         appropriately.
294         (_mm_sll_epi32): Likewise.
295         (_mm_sll_epi64): Likewise.
296         (_mm_srl_epi16): Likewise.
297         (_mm_srl_epi32): Likewise.
298         (_mm_srl_epi64): Likewise.
300 2018-10-25  Bill Schmidt  <wschmidt@linux.ibm.com>
301             Jinsong Ji <jji@us.ibm.com>
303         * config/rs6000/emmintrin.h (_mm_sll_epi64): Remove wrong cast.
304         * config/rs6000/xmmintrin.h (_mm_min_ps): Change m's type to
305         __vector __bool int.  Use vec_cmpgt in preference to deprecated
306         function vec_vcmpgtfp.
307         (_mm_max_ps): Likewise.
309 2018-10-25  Jeff Law  <law@redhat.com>
311         * config/rl78/rl78.c (insn_ok_now): Always re-recognize the insn
312         if returning false.
314 2018-10-25  Martin Sebor  <msebor@redhat.com>
316         * doc/extend.texi (aligned): Expand attribute description.
317         (Alignment): Rename section.  Discuss function arguments.
319 2018-10-25  Jan Hubicka  <jh@suse.cz>
321         * ipa-devirt.c (main_odr_variant): Remove.
322         (hash_odr_name, types_same_for_odr, types_odr_comparable,
323         odr_name_hasher::equal, odr_subtypes_equivalent_p):
324         Drop use of main_odr_variant.
325         (add_type_duplicate): Silence confused warnings on integer types.
326         (get_odr_type): Always look for main variant.
327         (register_odr_type): Simplify.
329 2018-10-25  Richard Biener  <rguenther@suse.de>
331         * tree-vect-data-refs.c (vect_analyze_data_ref_accesses):
332         Initialize ng to silence error with release checking bootstrap.
334 2018-10-25  Richard Biener  <rguenther@suse.de>
336         * tree-if-conv.c: Include tree-ssa-sccvn.h.
337         (tree_if_conversion): Run CSE on the if-converted loop body.
339 2018-10-25  Ilya Leoshkevich  <iii@linux.ibm.com>
341         * config/s390/constraints.md (ZL): New constraint.
342         * config/s390/s390.c (legitimate_pic_operand_p): Accept LARL
343         operands.
344         * config/s390/s390.md (movdi_larl): Remove.
345         (movdi_64): Add the LARL alternative.
347 2018-10-25  Ilya Leoshkevich  <iii@linux.ibm.com>
349         PR bootstrap/87747
350         * rtl.c (RTX_CODE_HWINT_P_1): New helper macro.
351         (RTX_CODE_HWINT_P): New macro.
352         (rtx_code_size): Use RTX_CODE_HWINT_P ().
354 2018-10-25  Jan Hubicka  <jh@suse.cz>
356         * ipa-devirt.c (odr_types_equivalent_p): Do not ICE if one of types
357         is anonymous.
359 2018-10-25  Richard Biener  <rguenther@suse.de>
361         PR tree-optimization/87665
362         PR tree-optimization/87745
363         * tree-vectorizer.h (get_earlier_stmt): Remove.
364         (get_later_stmt): Pick up UID from the original non-pattern stmt.
366 2018-10-25  Sam Tebbs  <sam.tebbs@arm.com>
368         * options.texi (Deprecated): Move list to Var section.
370 2018-10-24  Bill Schmidt  <wschmidt@linux.ibm.com>
371             Jinsong Ji <jji@us.ibm.com>
373         * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Change deprecated
374         __vector long to __vector long long.
375         (_mm_cvtpd_ps): Likewise.
376         (_mm_cvttpd_epi32): Likewise.
377         (_mm_cvtpi32_pd): Likewise.
378         (_mm_unpackhi_epi64): Likewise.
379         (_mm_unpacklo_epi64): Likewise.
381 2018-10-24  Segher Boessenkool  <segher@kernel.crashing.org>
383         PR rtl-optimization/87720
384         * combine.c (make_more_copies): Skip if the dest is pc_rtx.
386 2018-10-24  Alexandre Oliva <aoliva@redhat.com>
388         * gimple-ssa-isolate-paths.c
389         (find_implicit_erroneous_behavior): Do not change code if the
390         pass is running for warnings only.
391         (find_explicit_erroneous_behavior): Likewise.
393 2018-10-24  Michael Meissner  <meissner@linux.ibm.com>
395         * config/rs6000/rs6000.c (TARGET_MANGLE_DECL_ASSEMBLER_NAME):
396         Define as rs6000_mangle_decl_assembler_name.
397         (rs6000_mangle_decl_assembler_name): If the user switched from IBM
398         long double to IEEE long double, switch the names of the long
399         double built-in functions to be <func>f128 instead of <func>l.
401 2018-10-24  Martin Sebor  <msebor@redhat.com>
403         * doc/extend.texi (nonnull): List no-argument form.  Reference
404         -fno-delete-null-pointer-checks and -fisolate-erroneous-paths-attribute.
406 2018-10-24  Richard Biener  <rguenther@suse.de>
408         * tree-ssa-sccvn.c (do_rpo_vn): Free rpo_state.
410 2018-10-24  Martin Liska  <mliska@suse.cz>
412         PR tree-optimization/84436
413         * tree-switch-conversion.c (switch_conversion::contains_same_values_p):
414         Remove.
415         (switch_conversion::contains_linear_function_p): New.
416         (switch_conversion::build_one_array): Support linear
417         transformation on input.
418         * tree-switch-conversion.h (struct switch_conversion): Add
419         contains_linear_function_p declaration.
421 2018-10-24  Richard Biener  <rguenther@suse.de>
423         * varasm.c (const_hash_1): Return hash of ADDR_EXPR
424         if its argument is CONSTANT_CLASS_P.
426 2018-10-11  Jan Hubicka  <hubicka@ucw.cz>
428         * ipa-utils.h (type_with_linkage_p): No longer check for TYPE_STUB_DECL;
429         it is wrong for forward declarations.
431 2018-10-24  Ilya Leoshkevich  <iii@linux.ibm.com>
433         * config/s390/s390.c (s390_check_qrst_address): Add the missing
434         SYMBOL_REF_P () check.
436 2018-10-24  Richard Biener  <rguenther@suse.de>
438         PR tree-optimization/87105
439         * tree-vect-data-refs.c (vect_analyze_group_access_1): Adjust
440         dump classification.
441         (vect_analyze_data_ref_accesses): Handle duplicate loads and
442         stores by splitting the affected group after the fact.
443         * tree-vect-slp.c (vect_build_slp_tree_2): Dump when we
444         fail the SLP build because of size constraints.
446 2018-10-24  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
448         * configure.ac (gcc_cv_ld_aligned_shf_merge): New test.
449         * configure: Regenerate.
450         * config.in: Regenerate.
451         * varasm.c (mergeable_string_section): Use readonly_data_section
452         if linker doesn't support SHF_MERGE with alignment > 8.
453         (mergeable_constant_section): Likewise.
455 2018-10-24  Richard Biener  <rguenther@suse.de>
457         PR tree-optimization/84013
458         * tree-ssa-structalias.c (struct msdi_data): New struct for
459         marshalling data to walk_stmt_load_store_ops.
460         (maybe_set_dependence_info): Refactor as callback for
461         walk_stmt_load_store_ops.
462         (compute_dependence_clique): Set restrict info on all stmt kinds.
464 2018-10-24  Martin Liska  <mliska@suse.cz>
466         * cgraph.c (cgraph_node::dump):
467         Remove reduntant dumps and make tp_first_run dump more compact.
469 2018-10-24  Richard Biener  <rguenther@suse.de>
471         PR tree-optimization/87665
472         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Adjust
473         to reflect reality.
475 2018-10-12  Jeff Law  <law@redhat.com>
477         * config/h8300/h8300.c (h8300_expand_prologue): Fix stm generation
478         for H8/S.
480 2018-10-23  Richard Biener  <rguenther@suse.de>
482         * tree-vrp.c (add_assert_info): Guard dump_printf with
483         dump_enabled_p.
484         * gimple-ssa-evrp-analyze.c
485         (evrp_range_analyzer::record_ranges_from_incoming_edge):
486         Use value_range::ignore_equivs_equal_p.
488 2018-10-23  Richard Biener  <rguenther@suse.de>
490         PR tree-optimization/87105
491         PR tree-optimization/87608
492         * passes.def (pass_all_early_optimizations): Add early phi-opt
493         after dce.
494         * tree-ssa-phiopt.c (value_replacement): Ignore NOPs and predicts in
495         addition to debug stmts.
496         (tree_ssa_phiopt_worker): Add early_p argument, do only min/max
497         and abs replacement early.
498         * tree-cfg.c (gimple_empty_block_p): Likewise.
500 2018-10-23  Richard Earnshaw  <rearnsha@arm.com>
502         PR target/86383
503         * config.gcc (arm*-*-netbsdelf*): Default to StrongARM if no CPU
504         specified to configure.
505         (arm*-*-*): Use ARM7TDMI as the target CPU if no default provided.
507 2018-10-23  Richard Biener  <rguenther@suse.de>
509         PR tree-optimization/87700
510         * tree-ssa-copy.c (set_copy_of_val): Fix change detection logic.
512 2018-10-23  Jakub Jelinek  <jakub@redhat.com>
514         PR target/87674
515         * config/i386/avx512vlintrin.h (_mm_mask_mullo_epi32): Change type of
516         second argument from __mmask16 to __mmask8.
517         * config/i386/avx512vlbwintrin.h (_mm_mask_packus_epi32,
518         _mm_mask_packs_epi32): Likewise.
519         * config/i386/avx512pfintrin.h (_mm512_mask_prefetch_i64scatter_ps):
520         Likewise.
521         (_mm512_mask_prefetch_i64scatter_pd): Likewise.  Formatting fix.
523 2018-10-23  Richard Biener  <rguenther@suse.de>
525         * tree-vect-stmts.c (vect_analyze_stmt): Fix typo in comment.
527 2018-10-23  Richard Biener  <rguenther@suse.de>
529         PR tree-optimization/86144
530         * tree-vect-stmts.c (vect_analyze_stmt): Prefer -mveclibabi
531         over simd attribute.
533 2018-10-23  Richard Biener  <rguenther@suse.de>
535         PR tree-optimization/87693
536         * tree-ssa-threadedge.c (thread_around_empty_blocks): Handle
537         the case we do not find the taken edge.
539 2018-10-22  Bill Schmidt  <wschmidt@linux.ibm.com>
540             Jinsong Ji  <jji@us.ibm.com>
542         * config/rs6000/emmintrin.h (_MM_SHUFFLE2): Comment cleanup.
543         (_mm_store_pd): Use unaligned vector type for pointer cast.
544         (_mm_maskmoveu_si128): Likewise.
545         * config/rs6000/xmmintrin.h (__m128_u): New typedef.
546         (_mm_store_ps): Use unaligned vector type for pointer cast.
548 2018-10-22  Paul Koning  <ni1d@arrl.net>
550         * symtab.c (symtab_node::increase_alignment): Correct max
551         alignment check.
553 2018-10-22  Yury Gribov  <tetra2005@gmail.com>
555         PR tree-optimization/87633
556         * match.pd: Do not generate unordered integer comparisons.
558 2018-10-22  Segher Boessenkool  <segher@kernel.crashing.org>
560         PR rtl-optimization/87600
561         * combine.c: Add include of expr.h.
562         (cant_combine_insn_p): Do not combine moves from any hard non-fixed
563         register to a pseudo.
564         (make_more_copies): New function, add a copy to a new pseudo after
565         the moves from hard registers into pseudos.
566         (rest_of_handle_combine): Declare rebuild_jump_labels_after_combine
567         later.  Call make_more_copies.
569 2018-10-22  Andrew Stubbs  <ams@codesourcery.com>
571         * lra-constraints.c (process_alt_operands): New local array,
572         matching_early_clobber.  Check matching_early_clobber before
573         decrementing reject, and set matching_early_clobber after.
575 2018-10-22  Segher Boessenkool  <segher@kernel.crashing.org>
577         PR target/87598
578         * config/rs6000/rs6000.c (print_operand_address): For unexpected RTL
579         call output_addr_const and hope for the best.
581 2018-10-22  Richard Biener  <rguenther@suse.de>
583         * gimple-ssa-evrp-analyze.c
584         (evrp_range_analyzer::record_ranges_from_incoming_edge): Be
585         smarter about what ranges to use.
586         * tree-vrp.c (add_assert_info): Dump here.
587         (register_edge_assert_for_2): Instead of here at multiple but
588         not all places.
590         * gcc.dg/tree-ssa/evrp12.c: New testcase.
591         * gcc.dg/predict-6.c: Adjust.
592         * gcc.dg/tree-ssa/vrp33.c: Disable EVRP.
593         * gcc.dg/tree-ssa/vrp02.c: Likewise.
594         * gcc.dg/tree-ssa/cunroll-9.c: Likewise.
596 2018-10-22  Steven Bosscher <steven@gcc.gnu.org>
597         Richard Biener  <rguenther@suse.de>
599         * bitmap.h: Update data structure documentation, including a
600         description of bitmap views as either linked-lists or splay trees.
601         (struct bitmap_element_def): Update comments for splay tree bitmaps.
602         (struct bitmap_head_def): Likewise.
603         (bitmap_list_view, bitmap_tree_view): New prototypes.
604         (bitmap_initialize_stat): Initialize a bitmap_head's indx and
605         tree_form fields.
606         (bmp_iter_set_init): Assert the iterated bitmaps are in list form.
607         (bmp_iter_and_init, bmp_iter_and_compl_init): Likewise.
608         * bitmap.c (bitmap_elem_to_freelist): Unregister overhead of a
609         released bitmap element here.
610         (bitmap_element_free): Remove.
611         (bitmap_elt_clear_from): Work on splay tree bitmaps.
612         (bitmap_list_link_element): Renamed from bitmap_element_link.  Move
613         this function similar ones such that linked-list bitmap implementation
614         functions are grouped.
615         (bitmap_list_unlink_element): Renamed from bitmap_element_unlink,
616         and moved for grouping.
617         (bitmap_list_insert_element_after): Renamed from
618         bitmap_elt_insert_after, and moved for grouping.
619         (bitmap_list_find_element): New function spliced from bitmap_find_bit.
620         (bitmap_tree_link_left, bitmap_tree_link_right,
621         bitmap_tree_rotate_left, bitmap_tree_rotate_right, bitmap_tree_splay,
622         bitmap_tree_link_element, bitmap_tree_unlink_element,
623         bitmap_tree_find_element): New functions for splay-tree bitmap
624         implementation.
625         (bitmap_element_link, bitmap_element_unlink, bitmap_elt_insert_after):
626         Renamed and moved, see above entries.
627         (bitmap_tree_listify_from): New function to convert part of a splay
628         tree bitmap to a linked-list bitmap.
629         (bitmap_list_view): Convert a splay tree bitmap to linked-list form.
630         (bitmap_tree_view): Convert a linked-list bitmap to splay tree form.
631         (bitmap_find_bit): Remove.
632         (bitmap_clear, bitmap_clear_bit, bitmap_set_bit,
633         bitmap_single_bit_set_p, bitmap_first_set_bit, bitmap_last_set_bit):
634         Handle splay tree bitmaps.
635         (bitmap_copy, bitmap_count_bits, bitmap_and, bitmap_and_into,
636         bitmap_elt_copy, bitmap_and_compl, bitmap_and_compl_into,
637         bitmap_compl_and_into, bitmap_elt_ior, bitmap_ior, bitmap_ior_into,
638         bitmap_xor, bitmap_xor_into, bitmap_equal_p, bitmap_intersect_p,
639         bitmap_intersect_compl_p, bitmap_ior_and_compl,
640         bitmap_ior_and_compl_into, bitmap_set_range, bitmap_clear_range,
641         bitmap_hash): Reject trying to act on splay tree bitmaps.  Make
642         corresponding changes to use linked-list specific bitmap_element
643         manipulation functions as applicable for efficiency.
644         (bitmap_tree_to_vec): New function.
645         (debug_bitmap_elt_file): New function split out from ...
646         (debug_bitmap_file): ... here.  Handle splay tree bitmaps.
647         (bitmap_print): Likewise.
649         PR tree-optimization/63155
650         * tree-ssa-propagate.c (ssa_prop_init): Use tree-view for the
651         SSA edge worklists.
652         * tree-ssa-coalesce.c (coalesce_ssa_name): Populate used_in_copies
653         in tree-view.
655 2018-10-22  Martin Liska  <mliska@suse.cz>
657         PR tree-optimization/87686
658         Revert
659         2018-08-29  Martin Liska  <mliska@suse.cz>
661         * tree-switch-conversion.c (switch_conversion::expand):
662         Strenghten assumption about gswitch statements.
664 2018-10-22  Martin Liska  <mliska@suse.cz>
666         * ipa-icf.c (sem_item::compare_attributes): Remove.
667         (sem_item::compare_referenced_symbol_properties): Use
668         attribute_list_equal instead.
669         (sem_function::equals_wpa): Likewise.
670         * ipa-icf.h: Remove compare_attributes.
672 2018-10-22  Richard Biener  <rguenther@suse.de>
674         PR middle-end/87682
675         * mem-stats.h (mem_usage::operator==): Fix pasto.
677 2018-10-22  Richard Biener  <rguenther@suse.de>
679         PR tree-optimization/87640
680         * tree-vrp.c (set_value_range_with_overflow): Decompose
681         incomplete result.
682         (extract_range_from_binary_expr_1): Adjust.
684 2018-10-22  Martin Jambor  <mjambor@suse.cz>
686         * tree-eh.h (stmt_could_throw_p): Add function parameter.
687         (stmt_can_throw_external): Likewise.
688         (stmt_can_throw_internal): Likewise.
689         * tree-eh.c (lower_eh_constructs_2): Pass cfun to stmt_could_throw_p.
690         (lower_eh_constructs_2): Likewise.
691         (stmt_could_throw_p): Add fun parameter, use it instead of cfun.
692         (stmt_can_throw_external): Likewise.
693         (stmt_can_throw_internal): Likewise.
694         (maybe_clean_eh_stmt_fn): Pass cfun to stmt_could_throw_p.
695         (maybe_clean_or_replace_eh_stmt): Pass cfun to stmt_could_throw_p.
696         (maybe_duplicate_eh_stmt_fn): Pass new_fun to stmt_could_throw_p.
697         (maybe_duplicate_eh_stmt): Pass cfun to stmt_could_throw_p.
698         (pass_lower_eh_dispatch::execute): Pass cfun to
699         stmt_can_throw_external.
700         (cleanup_empty_eh): Likewise.
701         (verify_eh_edges): Pass cfun to stmt_could_throw_p.
702         * cgraph.c (cgraph_edge::set_call_stmt): Pass a function to
703         stmt_can_throw_external instead of pushing it to cfun.
704         (symbol_table::create_edge): Likewise.
705         * gimple-fold.c (fold_builtin_atomic_compare_exchange): Pass cfun to
706         stmt_can_throw_internal.
707         * gimple-ssa-evrp.c (evrp_dom_walker::before_dom_children): Pass cfun
708         to stmt_could_throw_p.
709         * gimple-ssa-store-merging.c (handled_load): Pass cfun to
710         stmt_can_throw_internal.
711         (pass_store_merging::execute): Likewise.
712         * gimple-ssa-strength-reduction.c
713         (find_candidates_dom_walker::before_dom_children): Pass cfun to
714         stmt_could_throw_p.
715         * gimplify-me.c (gimple_regimplify_operands): Pass cfun to
716         stmt_can_throw_internal.
717         * ipa-pure-const.c (check_call): Pass cfun to stmt_could_throw_p and
718         to stmt_can_throw_external.
719         (check_stmt): Pass cfun to stmt_could_throw_p.
720         (check_stmt): Pass cfun to stmt_can_throw_external.
721         (pass_nothrow::execute): Likewise.
722         * trans-mem.c (expand_call_tm): Pass cfun to stmt_can_throw_internal.
723         * tree-cfg.c (is_ctrl_altering_stmt): Pass cfun to
724         stmt_can_throw_internal.
725         (verify_gimple_in_cfg): Pass cfun to stmt_could_throw_p.
726         (stmt_can_terminate_bb_p): Pass cfun to stmt_can_throw_external.
727         (gimple_purge_dead_eh_edges): Pass cfun to stmt_can_throw_internal.
728         * tree-complex.c (expand_complex_libcall): Pass cfun to
729         stmt_could_throw_p and to stmt_can_throw_internal.
730         (expand_complex_multiplication): Pass cfun to stmt_can_throw_internal.
731         * tree-inline.c (copy_edges_for_bb): Likewise.
732         (maybe_move_debug_stmts_to_successors): Likewise.
733         * tree-outof-ssa.c (ssa_is_replaceable_p): Pass cfun to
734         stmt_could_throw_p.
735         * tree-parloops.c (oacc_entry_exit_ok_1): Likewise.
736         * tree-sra.c (scan_function): Pass cfun to stmt_can_throw_external.
737         * tree-ssa-alias.c (stmt_kills_ref_p): Pass cfun to
738         stmt_can_throw_internal.
739         * tree-ssa-ccp.c (optimize_atomic_bit_test_and): Likewise.
740         * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Pass cfun to
741         stmt_could_throw_p.
742         (mark_aliased_reaching_defs_necessary_1): Pass cfun to
743         stmt_can_throw_internal.
744         * tree-ssa-forwprop.c (pass_forwprop::execute): Likewise.
745         * tree-ssa-loop-im.c (movement_possibility): Pass cfun to
746         stmt_could_throw_p.
747         * tree-ssa-loop-ivopts.c (find_givs_in_stmt_scev): Likewise.
748         (add_autoinc_candidates): Pass cfun to stmt_can_throw_internal.
749         * tree-ssa-math-opts.c (pass_cse_reciprocals::execute): Likewise.
750         (convert_mult_to_fma_1): Likewise.
751         (convert_to_divmod): Likewise.
752         * tree-ssa-phiprop.c (propagate_with_phi): Likewise.
753         * tree-ssa-pre.c (compute_avail): Pass cfun to stmt_could_throw_p.
754         * tree-ssa-propagate.c
755         (substitute_and_fold_dom_walker::before_dom_children): Likewise.
756         * tree-ssa-reassoc.c (suitable_cond_bb): Likewise.
757         (maybe_optimize_range_tests): Likewise.
758         (linearize_expr_tree): Likewise.
759         (reassociate_bb): Likewise.
760         * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
761         * tree-ssa-scopedtables.c (hashable_expr_equal_p): Likewise.
762         * tree-ssa-strlen.c (adjust_last_stmt): Likewise.
763         (handle_char_store): Likewise.
764         * tree-vect-data-refs.c (vect_find_stmt_data_reference): Pass cfun to
765         stmt_can_throw_internal.
766         * tree-vect-patterns.c (check_bool_pattern): Pass cfun to
767         stmt_could_throw_p.
768         * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
769         (vectorizable_call): Pass cfun to stmt_can_throw_internal.
770         (vectorizable_simd_clone_call): Likewise.
771         * value-prof.c (gimple_ic): Pass cfun to stmt_could_throw_p.
772         (gimple_stringop_fixed_value): Likewise.
774 2018-10-22  Ilya Leoshkevich  <iii@linux.ibm.com>
776         * config/s390/s390.c (s390_loadrelative_operand_p): Accept
777         literal pool references.
778         (s390_check_qrst_address): Adapt to the new behavior of
779         s390_loadrelative_operand_p ().
781 2018-10-22  H.J. Lu  <hongjiu.lu@intel.com>
783         PR target/72782
784         * config/i386/sse.md (*andnot<mode>3_bcst): New.
786 2018-10-22  H.J. Lu  <hongjiu.lu@intel.com>
788         PR target/72782
789         * config/i386/sse.md (*<code><mode>3_bcst): New.
791 2018-10-22  H.J. Lu  <hongjiu.lu@intel.com>
793         PR target/72782
794         * config/i386/sse.md (avx512bcst): Updated for V4SI, V2DI, V8SI,
795         V4DI, V16SI and V8DI.
796         (*sub<mode>3<mask_name>_bcst): New.
797         (*add<mode>3<mask_name>_bcst): Likewise.
799 2018-10-21  Bill Schmidt  <wschmidt@linux.ibm.com>
800             Jinsong Ji  <jji@us.ibm.com>
802         * config/rs6000/emmintrin.h (_mm_movemask_pd): Replace __vector
803         __m64 with __vector unsigned long long for compatibility.
804         (_mm_movemask_epi8): Likewise.
805         * config/rs6000/xmmintrin.h (_mm_cvtps_pi32): Likewise.
806         (_mm_cvttps_pi32): Likewise.
807         (_mm_cvtpi32_ps): Likewise.
808         (_mm_cvtps_pi16): Likewise.
809         (_mm_loadh_pi): Likewise.
810         (_mm_storeh_pi): Likewise.
811         (_mm_movehl_ps): Likewise.
812         (_mm_movelh_ps): Likewise.
813         (_mm_loadl_pi): Likewise.
814         (_mm_storel_pi): Likewise.
815         (_mm_movemask_ps): Likewise.
816         (_mm_shuffle_pi16): Likewise.
818 2018-10-21  H.J. Lu  <hongjiu.lu@intel.com>
820         PR target/72782
821         * config/i386/avx512fintrin.h (_mm512_fnmsub_round_pd): Use
822         __builtin_ia32_vfnmsubpd512_mask.
823         (_mm512_mask_fnmsub_round_pd): Likewise.
824         (_mm512_fnmsub_pd): Likewise.
825         (_mm512_mask_fnmsub_pd): Likewise.
826         (_mm512_maskz_fnmsub_round_pd): Use
827         __builtin_ia32_vfnmsubpd512_maskz.
828         (_mm512_maskz_fnmsub_pd): Likewise.
829         (_mm512_fnmsub_round_ps): Use __builtin_ia32_vfnmsubps512_mask.
830         (_mm512_mask_fnmsub_round_ps): Likewise.
831         (_mm512_fnmsub_ps): Likewise.
832         (_mm512_mask_fnmsub_ps): Likewise.
833         (_mm512_maskz_fnmsub_round_ps): Use
834         __builtin_ia32_vfnmsubps512_maskz.
835         (_mm512_maskz_fnmsub_ps): Likewise.
836         * config/i386/avx512vlintrin.h (_mm256_mask_fnmsub_pd): Use
837         __builtin_ia32_vfnmsubpd256_mask.
838         (_mm256_maskz_fnmsub_pd): Use __builtin_ia32_vfnmsubpd256_maskz.
839         (_mm_mask_fnmsub_pd): Use __builtin_ia32_vfmaddpd128_mask
840         (_mm_maskz_fnmsub_pd): Use __builtin_ia32_vfnmsubpd128_maskz.
841         (_mm256_mask_fnmsub_ps): Use __builtin_ia32_vfnmsubps256_mask.
842         (_mm256_mask_fnmsub_ps): Use __builtin_ia32_vfnmsubps256_mask.
843         (_mm256_maskz_fnmsub_ps): Use __builtin_ia32_vfnmsubps256_maskz.
844         (_mm_mask_fnmsub_ps): Use __builtin_ia32_vfnmsubps128_mask.
845         (_mm_maskz_fnmsub_ps): Use __builtin_ia32_vfnmsubps128_maskz.
846         * config/i386/fmaintrin.h (_mm_fnmsub_pd): Use
847         __builtin_ia32_vfnmsubpd.
848         (_mm256_fnmsub_pd): Use __builtin_ia32_vfnmsubpd256.
849         (_mm_fnmsub_ps): Use __builtin_ia32_vfnmsubps.
850         (_mm256_fnmsub_ps): Use __builtin_ia32_vfnmsubps256.
851         (_mm_fnmsub_sd): Use __builtin_ia32_vfnmsubsd3.
852         (_mm_fnmsub_ss): Use __builtin_ia32_vfnmsubss3.
853         * config/i386/i386-builtin.def: Add
854         __builtin_ia32_vfnmsubpd256_mask,
855         __builtin_ia32_vfnmsubpd256_maskz,
856         __builtin_ia32_vfnmsubpd128_mask,
857         __builtin_ia32_vfnmsubpd128_maskz,
858         __builtin_ia32_vfnmsubps256_mask,
859         __builtin_ia32_vfnmsubps256_maskz,
860         __builtin_ia32_vfnmsubps128_mask,
861         __builtin_ia32_vfnmsubps128_maskz,
862         __builtin_ia32_vfnmsubpd512_mask,
863         __builtin_ia32_vfnmsubpd512_maskz,
864         __builtin_ia32_vfnmsubps512_mask,
865         __builtin_ia32_vfnmsubps512_maskz, __builtin_ia32_vfnmsubss3,
866         __builtin_ia32_vfnmsubsd3, __builtin_ia32_vfnmsubps,
867         __builtin_ia32_vfnmsubpd, __builtin_ia32_vfnmsubps256 and.
868         __builtin_ia32_vfnmsubpd256.
869         * config/i386/sse.md (fma4i_fnmsub_<mode>): New.
870         (<avx512>_fnmsub_<mode>_maskz<round_expand_name>): Likewise.
871         (*<sd_mask_codefor>fma_fnmsub_<mode><sd_maskz_name>_bcst_1):
872         Likewise.
873         (*<sd_mask_codefor>fma_fnmsub_<mode><sd_maskz_name>_bcst_2):
874         Likewise.
875         (*<sd_mask_codefor>fma_fnmsub_<mode><sd_maskz_name>_bcst_3):
876         Likewise.
877         (fmai_vmfnmsub_<mode><round_name>): Likewise.
879 2018-10-21  H.J. Lu  <hongjiu.lu@intel.com>
881         PR target/72782
882         * config/i386/avx512fintrin.h (_mm512_fnmadd_round_pd): Use
883         __builtin_ia32_vfnmaddpd512_mask.
884         (_mm512_mask_fnmadd_round_pd): Likewise.
885         (_mm512_fnmadd_pd): Likewise.
886         (_mm512_mask_fnmadd_pd): Likewise.
887         (_mm512_maskz_fnmadd_round_pd): Use
888         __builtin_ia32_vfnmaddpd512_maskz.
889         (_mm512_maskz_fnmadd_pd): Likewise.
890         (_mm512_fnmadd_round_ps): Use __builtin_ia32_vfnmaddps512_mask.
891         (_mm512_mask_fnmadd_round_ps): Likewise.
892         (_mm512_fnmadd_ps): Likewise.
893         (_mm512_mask_fnmadd_ps): Likewise.
894         (_mm512_maskz_fnmadd_round_ps): Use
895         __builtin_ia32_vfnmaddps512_maskz.
896         (_mm512_maskz_fnmadd_ps): Likewise.
897         * config/i386/avx512vlintrin.h (_mm256_mask_fnmadd_pd): Use
898         __builtin_ia32_vfnmaddpd256_mask.
899         (_mm256_maskz_fnmadd_pd): Use __builtin_ia32_vfnmaddpd256_maskz.
900         (_mm_mask_fnmadd_pd): Use __builtin_ia32_vfmaddpd128_mask
901         (_mm_maskz_fnmadd_pd): Use __builtin_ia32_vfnmaddpd128_maskz.
902         (_mm256_mask_fnmadd_ps): Use __builtin_ia32_vfnmaddps256_mask.
903         (_mm256_mask_fnmadd_ps): Use __builtin_ia32_vfnmaddps256_mask.
904         (_mm256_maskz_fnmadd_ps): Use __builtin_ia32_vfnmaddps256_maskz.
905         (_mm_mask_fnmadd_ps): Use __builtin_ia32_vfnmaddps128_mask.
906         (_mm_maskz_fnmadd_ps): Use __builtin_ia32_vfnmaddps128_maskz.
907         * config/i386/fmaintrin.h (_mm_fnmadd_pd): Use
908         __builtin_ia32_vfnmaddpd.
909         (_mm256_fnmadd_pd): Use __builtin_ia32_vfnmaddpd256.
910         (_mm_fnmadd_ps): Use __builtin_ia32_vfnmaddps.
911         (_mm256_fnmadd_ps): Use __builtin_ia32_vfnmaddps256.
912         (_mm_fnmadd_sd): Use __builtin_ia32_vfnmaddsd3.
913         (_mm_fnmadd_ss): Use __builtin_ia32_vfnmaddss3.
914         * config/i386/i386-builtin.def: Add
915         __builtin_ia32_vfnmaddpd256_mask,
916         __builtin_ia32_vfnmaddpd256_maskz,
917         __builtin_ia32_vfnmaddpd128_mask,
918         __builtin_ia32_vfnmaddpd128_maskz,
919         __builtin_ia32_vfnmaddps256_mask,
920         __builtin_ia32_vfnmaddps256_maskz,
921         __builtin_ia32_vfnmaddps128_mask,
922         __builtin_ia32_vfnmaddps128_maskz,
923         __builtin_ia32_vfnmaddpd512_mask,
924         __builtin_ia32_vfnmaddpd512_maskz,
925         __builtin_ia32_vfnmaddps512_mask,
926         __builtin_ia32_vfnmaddps512_maskz, __builtin_ia32_vfnmaddss3,
927         __builtin_ia32_vfnmaddsd3, __builtin_ia32_vfnmaddps,
928         __builtin_ia32_vfnmaddpd, __builtin_ia32_vfnmaddps256 and.
929         __builtin_ia32_vfnmaddpd256.
930         * config/i386/sse.md (fma4i_fnmadd_<mode>): New.
931         (<avx512>_fnmadd_<mode>_maskz<round_expand_name>): Likewise.
932         (*<sd_mask_codefor>fma_fnmadd_<mode><sd_maskz_name>_bcst_1):
933         Likewise.
934         (*<sd_mask_codefor>fma_fnmadd_<mode><sd_maskz_name>_bcst_2):
935         Likewise.
936         (*<sd_mask_codefor>fma_fnmadd_<mode><sd_maskz_name>_bcst_3):
937         Likewise.
938         (fmai_vmfnmadd_<mode><round_name>): Likewise.
940 2018-10-21  H.J. Lu  <hongjiu.lu@intel.com>
942         PR target/72782
943         * config/i386/avx512fintrin.h (_mm512_fmsub_round_pd): Use
944         __builtin_ia32_vfmsubpd512_mask.
945         (_mm512_mask_fmsub_round_pd): Likewise.
946         (_mm512_fmsub_pd): Likewise.
947         (_mm512_mask_fmsub_pd): Likewise.
948         (_mm512_maskz_fmsub_round_pd): Use
949         __builtin_ia32_vfmsubpd512_maskz.
950         (_mm512_maskz_fmsub_pd): Likewise.
951         (_mm512_fmsub_round_ps): Use __builtin_ia32_vfmsubps512_mask.
952         (_mm512_mask_fmsub_round_ps): Likewise.
953         (_mm512_fmsub_ps): Likewise.
954         (_mm512_mask_fmsub_ps): Likewise.
955         (_mm512_maskz_fmsub_round_ps): Use
956         __builtin_ia32_vfmsubps512_maskz.
957         (_mm512_maskz_fmsub_ps): Likewise.
958         * config/i386/avx512vlintrin.h (_mm256_mask_fmsub_pd): Use
959         __builtin_ia32_vfmsubpd256_mask.
960         (_mm256_maskz_fmsub_pd): Use __builtin_ia32_vfmsubpd256_maskz.
961         (_mm_mask_fmsub_pd): Use __builtin_ia32_vfmaddpd128_mask
962         (_mm_maskz_fmsub_pd): Use __builtin_ia32_vfmsubpd128_maskz.
963         (_mm256_mask_fmsub_ps): Use __builtin_ia32_vfmsubps256_mask.
964         (_mm256_mask_fmsub_ps): Use __builtin_ia32_vfmsubps256_mask.
965         (_mm256_maskz_fmsub_ps): Use __builtin_ia32_vfmsubps256_maskz.
966         (_mm_mask_fmsub_ps): Use __builtin_ia32_vfmsubps128_mask.
967         (_mm_maskz_fmsub_ps): Use __builtin_ia32_vfmsubps128_maskz.
968         * config/i386/fmaintrin.h (_mm_fmsub_pd): Use
969         __builtin_ia32_vfmsubpd.
970         (_mm256_fmsub_pd): Use __builtin_ia32_vfmsubpd256.
971         (_mm_fmsub_ps): Use __builtin_ia32_vfmsubps.
972         (_mm256_fmsub_ps): Use __builtin_ia32_vfmsubps256.
973         (_mm_fmsub_sd): Use __builtin_ia32_vfmsubsd3.
974         (_mm_fmsub_ss): Use __builtin_ia32_vfmsubss3.
975         * config/i386/i386-builtin.def: Add
976         __builtin_ia32_vfmsubpd256_mask,
977         __builtin_ia32_vfmsubpd256_maskz,
978         __builtin_ia32_vfmsubpd128_mask,
979         __builtin_ia32_vfmsubpd128_maskz,
980         __builtin_ia32_vfmsubps256_mask,
981         __builtin_ia32_vfmsubps256_maskz,
982         __builtin_ia32_vfmsubps128_mask,
983         __builtin_ia32_vfmsubps128_maskz,
984         __builtin_ia32_vfmsubpd512_mask,
985         __builtin_ia32_vfmsubpd512_maskz,
986         __builtin_ia32_vfmsubps512_mask,
987         __builtin_ia32_vfmsubps512_maskz, __builtin_ia32_vfmsubss3,
988         __builtin_ia32_vfmsubsd3, __builtin_ia32_vfmsubps,
989         __builtin_ia32_vfmsubpd, __builtin_ia32_vfmsubps256 and.
990         __builtin_ia32_vfmsubpd256.
991         * config/i386/sse.md (fma4i_fmsub_<mode>): New.
992         (<avx512>_fmsub_<mode>_maskz<round_expand_name>): Likewise.
993         (*<sd_mask_codefor>fma_fmsub_<mode><sd_maskz_name>_bcst_1):
994         Likewise.
995         (*<sd_mask_codefor>fma_fmsub_<mode><sd_maskz_name>_bcst_2):
996         Likewise.
997         (*<sd_mask_codefor>fma_fmsub_<mode><sd_maskz_name>_bcst_3):
998         Likewise.
999         (fmai_vmfmsub_<mode><round_name>): Likewise.
1001 2018-10-21  H.J. Lu  <hongjiu.lu@intel.com>
1003         * config/i386/sse.md (*<plusminus_insn><mode>3<mask_name>_bcst_1):
1004         Remove plus.  Renamed to ...
1005         (*sub<mode>3<mask_name>_bcst): This.
1006         (*add<mode>3<mask_name>_bcst_2): Renamede to ...
1007         (*add<mode>3<mask_name>_bcst): This.
1009 2018-10-21  H.J. Lu  <hongjiu.lu@intel.com>
1011         PR target/72782
1012         * config/i386/sse.md (*mul<mode>3<mask_name>_bcst): New.
1014 2018-10-21  H.J. Lu  <hongjiu.lu@intel.com>
1016         PR target/87662
1017         * i386/avx512vlintrin.h (_mm256_or_epi32): New.
1018         (_mm_or_epi32): Likewise.
1019         (_mm256_xor_epi32): Likewise.
1020         (_mm_xor_epi32): Likewise.
1021         (_mm256_or_epi64): Likewise.
1022         (_mm_or_epi64): Likewise.
1023         (_mm256_xor_epi64): Likewise.
1024         (_mm_xor_epi64): Likewise.
1026 2018-10-20  H.J. Lu  <hongjiu.lu@intel.com>
1028         PR target/72782
1029         * config/i386/sse.md (*<avx512>_div<mode>3<mask_name>_bcst): New.
1031 2018-10-20  Jakub Jelinek  <jakub@redhat.com>
1033         PR middle-end/87647
1034         * varasm.c (decode_addr_const): Handle COMPOUND_LITERAL_EXPR.
1036 2018-10-20  Andreas Schwab  <schwab@linux-m68k.org>
1038         * doc/ux.texi: Move @section directly after @node.
1040 2018-10-19  Jakub Jelinek  <jakub@redhat.com>
1042         PR middle-end/85488
1043         PR middle-end/87649
1044         * omp-low.c (check_omp_nesting_restrictions): Diagnose ordered without
1045         depend closely nested inside of loop with ordered clause with
1046         a parameter.
1048 2018-10-19  David Malcolm  <dmalcolm@redhat.com>
1050         * Makefile.in (TEXI_GCCINT_FILES): Add ux.texi.
1051         * doc/gccint.texi: Include ux.texi and use it in top-level menu.
1052         * doc/ux.texi: New file.
1054 2018-10-19  Segher Boessenkool  <segher@kernel.crashing.org>
1056         * config/rs6000/rs6000.h (REG_ALLOC_ORDER): Move 68 (that is, CR0) to
1057         be the first CR field allocated.
1059 2018-10-19  Richard Biener  <rguenther@suse.de>
1061         PR target/87657
1062         * config/i386/i386.c (ix86_builtin_vectorization_cost): Use
1063         TYPE_VECTOR_SUBPARTS and avoid relying on vector mode.
1065 2018-10-19  H.J. Lu  <hongjiu.lu@intel.com>
1067         PR target/72782
1068         * config/i386/sse.md
1069         (*<plusminus_insn><mode>3<mask_name>_bcst_1): New.
1070         (*add<mode>3<mask_name>_bcst_2): Likewise.
1072 2018-10-19  H.J. Lu  <hongjiu.lu@intel.com>
1074         * config/i386/sse.md
1075         (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_1):
1076         Replace nonimmediate_operand with register_operand.
1077         (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_2):
1078         Likewise.
1079         (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_3):
1080         Likewise.
1082 2018-10-19  Ilya Leoshkevich  <iii@linux.ibm.com>
1084         PR rtl-optimization/87596
1085         * lra-constraints.c (spill_hard_reg_in_range): Use INSN_P () +
1086         lra_get_insn_recog_data () instead of lra_insn_recog_data[]
1087         for instructions in FROM..TO range.
1089 2018-10-19  Eric Botcazou  <ebotcazou@adacore.com>
1091         * cfgexpand.c (expand_one_var): Use specific wording in error message
1092         for non-local frame variables.
1093         * stor-layout.c (layout_decl): Do not issue a warning for them.
1095 2018-10-19  Robin Dapp  <rdapp@linux.ibm.com>
1097         * haifa-sched.c (priority): Add force_recompute parameter.
1098         (apply_replacement): Call priority () with force_recompute = true.
1099         (restore_pattern): Likewise.
1101 2018-10-18  H.J. Lu  <hongjiu.lu@intel.com>
1103         * simplify-rtx.c (simplify_subreg): Limit mask of vec_merge to
1104         HOST_BITS_PER_WIDE_INT.
1105         (test_vector_ops_duplicate): Likewise.
1107 2018-10-18  H.J. Lu  <hongjiu.lu@intel.com>
1109         PR target/72782
1110         * config/i386/sse.md (VF_AVX512): New.
1111         (avx512bcst): Likewise.
1112         (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_1):
1113         Likewise.
1114         (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_2):
1115         Likewise.
1116         (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_3):
1117         Likewise.
1119 2018-10-18  Jonathan Wakely  <jwakely@redhat.com>
1121         * doc/invoke.texi (-dumpversion): Improve grammar.
1122         (-dumpfullversion): Make more consistent with -dumpversion.
1124 2018-10-18  Uros Bizjak  <ubizjak@gmail.com>
1126         * config/i386/i386.c (ix86_emit_fp_unordered_jump):
1127         Set JUMP_LABEL to the jump insn.
1128         (ix86_emit_i387_log1p): Use ix86_expand_branch to expand branch.
1129         Predict emitted jump and add label to jump insn.
1131 2018-10-18  David Malcolm  <dmalcolm@redhat.com>
1133         PR tree-optimization/87562
1134         * input.c (get_substring_ranges_for_loc): Use
1135         LRK_SPELLING_LOCATION rather than LRK_MACRO_EXPANSION_POINT when
1136         getting the linemap for the endpoint.  Verify that it's either
1137         in the same linemap as the start point's spelling location, or
1138         at least in the same file.
1140 2018-10-18  Richard Biener  <rguenther@suse.de>
1142         * config/i386/i386.c (ix86_builtin_vectorization_cost): Do not
1143         feed width-specific load/store costs through ix86_vec_cost.
1144         * config/i386/x86-tune-costs.h (athlon_cost): Adjust.
1145         (k8_cost): Likewise.
1146         (bdver_cost): Likewise.
1147         (znver1_cost): Likewise.
1148         (btver1_cost): Likewise.
1149         (btver2_cost): Likewise.
1151 2018-10-18  H.J. Lu  <hongjiu.lu@intel.com>
1153         * simplify-rtx.c (simplify_subreg): Call simplify_gen_subreg
1154         to simplify subreg of vec_merge.
1156 2018-10-18  Richard Biener  <rguenther@suse.de>
1158         * config/i386/i386.c: Fix costing of vector FMA.
1160 2018-10-18  Richard Biener  <rguenther@suse.de>
1162         * config/i386/i386.c (ix86_vec_cost): Remove !parallel path
1163         and argument.
1164         (ix86_builtin_vectorization_cost): For vec_construct properly
1165         cost insertion into SSE regs.
1166         (...): Adjust calls to ix86_vec_cost.
1168 2018-10-18  Richard Biener  <rguenther@suse.de>
1170         PR middle-end/87087
1171         Revert
1172         2018-02-07  Richard Biener  <rguenther@suse.de>
1174         PR tree-optimization/84204
1175         * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
1176         this place.
1178 2018-10-18  H.J. Lu  <hongjiu.lu@intel.com>
1180         PR target/87537
1181         * simplify-rtx.c (simplify_subreg): Simplify subreg of vec_merge
1182         of vec_duplicate.
1183         (test_vector_ops_duplicate): Add test for a scalar subreg of a
1184         VEC_MERGE of a VEC_DUPLICATE.
1186 2018-10-17  Joseph Myers  <joseph@codesourcery.com>
1188         * doc/cpp.texi (__STDC_VERSION__): Document C2X handling.
1189         * doc/invoke.texi (-std=c2x, -std=gnu2x): Document new options.
1190         * doc/standards.texi (C Language): Document C2X.
1191         * dwarf2out.c (highest_c_language), config/rl78/rl78.c
1192         (rl78_option_override): Handle "GNU C2X" language name.
1194 2018-10-17  Joseph Myers  <joseph@codesourcery.com>
1196         * doc/invoke.texi (-std=c17), doc/standards.texi (C Language):
1197         Document C17 as published in 2018.
1199 2018-10-17  Eric Botcazou  <ebotcazou@adacore.com>
1201         PR middle-end/87623
1202         * fold-const.c (fold_truth_andor_1): If the right side is not constant,
1203         bail out if both sides do not have the same storage order.
1205 2018-10-17  Aldy Hernandez  <aldyh@redhat.com>
1207         * bitmap.c (bitmap_head::dump): New.
1208         * bitmap.h (bitmap_head): Add dump().
1209         * gimple-ssa-evrp-analyze.c
1210         (evrp_range_analyzer::try_find_new_range): Adjust for value_range API.
1211         (evrp_range_analyzer::set_ssa_range_info): Same.
1212         (evrp_range_analyzer::record_ranges_from_phis): Same.
1213         (evrp_range_analyzer::record_ranges_from_stmt): Same.
1214         * gimple-ssa-evrp.c (evrp_dom_walker::before_dom_children): Same.
1215         * gimple-ssa-sprintf.c (get_int_range): Same.
1216         (format_integer): Same.
1217         (sprintf_dom_walker::handle_gimple_call): Same.
1218         * ipa-cp.c (ipcp_vr_lattice::meet_with_1): Same.
1219         (ipcp_vr_lattice::top_p): Same.
1220         (ipcp_vr_lattice::bottom_p): Same.
1221         (ipcp_vr_lattice::set_to_bottom): Same.
1222         (ipa_vr_operation_and_type_effects): Same.
1223         (propagate_vr_across_jump_function): Same.
1224         (ipcp_store_vr_results): Same.
1225         * ipa-prop.c (struct ipa_vr_ggc_hash_traits): Same.
1226         (ipa_print_node_jump_functions_for_edge): Same.
1227         (ipa_get_value_range): Same.
1228         (ipa_compute_jump_functions_for_edge): Same.
1229         (ipa_write_jump_function): Same.
1230         * tree-ssa-dom.c (simplify_stmt_for_jump_threading): Same.
1231         * tree-ssa-threadedge.c (record_temporary_equivalences_from_phis):
1232         Same.
1233         * vr-values.c (set_value_range_to_nonnegative): Same.
1234         (set_value_range_to_truthvalue): Same.
1235         (vr_values::get_value_range): Same.
1236         (vr_values::set_defs_to_varying): Same.
1237         (vr_values::update_value_range): Same.
1238         (symbolic_range_based_on_p): Same.
1239         (vr_values::op_with_boolean_value_range_p): Same.
1240         (vr_values::extract_range_for_var_from_comparison_expr): Same.
1241         (vr_values::extract_range_from_ssa_name): Same.
1242         (vr_values::extract_range_from_binary_expr): Same.
1243         (vr_values::extract_range_from_unary_expr): Same.
1244         (vr_values::extract_range_from_cond_expr): Same.
1245         (vr_values::extract_range_from_comparison): Same.
1246         (vr_values::check_for_binary_op_overflow): Same.
1247         (vr_values::extract_range_basic): Same.
1248         (vr_values::extract_range_from_assignment): Same.
1249         (compare_ranges): Same.
1250         (compare_range_with_value): Same.
1251         (vr_values::adjust_range_with_scev): Same.
1252         (vrp_valueize): Same.
1253         (vrp_valueize_1): Same.
1254         (vr_values::get_vr_for_comparison): Same.
1255         (vr_values::compare_name_with_value): Same.
1256         (vr_values::compare_names): Same.
1257         (vr_values::vrp_evaluate_conditional): Same.
1258         (find_case_label_ranges): Same.
1259         (vr_values::vrp_visit_switch_stmt): Same.
1260         (vr_values::extract_range_from_phi_node): Same.
1261         (vr_values::simplify_div_or_mod_using_ranges): Same.
1262         (vr_values::simplify_bit_ops_using_ranges): Same.
1263         (test_for_singularity): Same.
1264         (range_fits_type_p): Same.
1265         (vr_values::simplify_cond_using_ranges_1): Same.
1266         (vr_values::simplify_switch_using_ranges): Same.
1267         (vr_values::simplify_float_conversion_using_ranges): Same.
1268         (vr_values::two_valued_val_range_p): Same.
1269         (vr_values::add_equivalence): Move to value_range::equiv_add.
1270         * vr-values.h (vr_values::add_equivalence): Remove.
1271         (VR_INITIALIZER): Remove.
1272         * tree-vrp.c (value_range::set): New.
1273         (value_range::equiv_add): New.
1274         (value_range::value_range): New.
1275         (value_range::deep_copy): New.
1276         (value_range::check): New.
1277         (value_range::equal_p): New.
1278         (value_range::ignore_equivs_equal_p): New.
1279         (value_range::operator==): New.
1280         (value_range::operator!=): New.
1281         (value_range::symbolic_p): New.
1282         (value_range::numeric_p): New.
1283         (value_range::set_undefined): New.
1284         (value_range::set_varying): New.
1285         (value_range::may_contain_p): New.
1286         (value_range::equiv_clear): New.
1287         (value_range::singleton_p): New.
1288         (value_range::intersect): New.
1289         (value_range::dump): New.
1290         (value_range::set_and_canonicalize): New.
1291         (set_value_range): Adjust for value_range API.
1292         (set_value_range_to_undefined): Same.
1293         (set_value_range_to_varying): Same.
1294         (set_and_canonicalize_value_range): Same.
1295         (set_value_range_to_nonnull): Same.
1296         (set_value_range_to_null): Same.
1297         (range_is_null): Same.
1298         (range_is_nonnull): Same.
1299         (range_int_cst_p): Same.
1300         (range_int_cst_singleton_p): Same.
1301         (symbolic_range_p): Same.
1302         (range_includes_zero_p): Same.
1303         (value_range_constant_singleton): Same.
1304         (vrp_set_zero_nonzero_bits): Same.
1305         (ranges_from_anti_range): Same.
1306         (extract_range_into_wide_ints): Same.
1307         (extract_range_from_multiplicative_op): Same.
1308         (set_value_range_with_overflow): Same.
1309         (extract_range_from_binary_expr_1): Same.
1310         (extract_range_from_unary_expr): Same.
1311         (dump_value_range): Same.
1312         (debug_value_range): Same.
1313         (vrp_prop::check_array_ref): Same.
1314         (vrp_prop::check_mem_ref): Same.
1315         (vrp_prop::vrp_initialize): Same.
1316         (vrp_prop::visit_stmt): Same.
1317         (intersect_ranges): Same.
1318         (vrp_prop::visit_phi): Same.
1319         (vrp_prop::vrp_finalize): Same.
1320         (determine_value_range_1): Same.
1321         (determine_value_range): Same.
1322         (vrp_intersect_ranges_1): Rename to...
1323         (vrp_intersect_1): this.
1324         (vrp_intersect_ranges): Rename to...
1325         (value_range::intersect_helper): ...this.
1326         (vrp_meet_1): Rename to...
1327         (value_range::union_helper): ...this.
1328         (vrp_meet): Rename to...
1329         (value_range::union_): ...this.
1330         (copy_value_range): Remove.
1331         * tree-vrp.h (struct value_range): Rewrite into a proper class.
1332         (value_range::vrtype): New.
1333         (value_range::type): New.
1334         (value_range::equiv): New.
1335         (value_range::min): New.
1336         (value_range::max): New.
1337         (value_range::varying_p): New.
1338         (value_range::undefined_p): New.
1339         (value_range::null_p): New.
1340         (value_range::equiv_add): New.
1341         (copy_value_range): Remove.
1343 2018-10-17  David Malcolm  <dmalcolm@redhat.com>
1345         * Makefile.in (SELFTEST_TARGETS): New.
1346         (selftest) Change from s-selftest-c to $(SELFTEST_TARGETS).
1347         (C_SELFTEST_FLAGS, C_SELFTEST_DEPS, s-selftest-c, selftest-c-gdb)
1348         (selftest-gdb, selftest-c-valgrind, selftest-valgrind): Move to
1349         c/Make-lang.in.
1350         (CPP_SELFTEST_FLAGS, CPP_SELFTEST_DEPS, s-selftest-c++)
1351         (selftest-c++-gdb, selftest-c++-valgrind): Move to
1352         cp/Make-lang.in.
1353         * configure: Regenerate.
1354         * configure.ac (selftest_languages): New.
1356 2018-10-17  Aldy Hernandez  <aldyh@redhat.com>
1358         * tree-vrp.c (extract_range_from_multiplicative_op): Remove
1359         overflow wraps argument.
1360         (extract_range_from_binary_expr_1): Do not pass overflow wraps to
1361         wide_int_range_multiplicative_op.
1362         * wide-int-range.cc (wide_int_range_mult_wrapping): Remove
1363         overflow wraps argument.
1364         (wide_int_range_multiplicative_op): Same.
1365         (wide_int_range_lshift): Same.
1366         (wide_int_range_div): Same.
1367         * wide-int-range.h (wide_int_range_multiplicative_op): Same.
1368         (wide_int_range_lshift): Same.
1369         (wide_int_range_div): Same.
1371 2018-10-17  Aldy Hernandez  <aldyh@redhat.com>
1373         * wide-int-range.h (wide_int_range_shift_undefined_p): Adjust to
1374         use sign as argument.
1375         * tree-vrp.c (extract_range_from_binary_expr_1): Pass sign to
1376         wide_int_range_shift_undefined_p.
1378 2018-10-16  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
1380         * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>):
1381         Rename to...
1382         (@despeculate_copy<ALLI_TI:mode>): ... This.
1383         * config/aarch64/aarch64.c (aarch64_speculation_safe_value): Remove
1384         switch statement.
1386 2018-10-16  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1388         * config.gcc: Obsolete *-*-solaris2.10*.
1389         * doc/install.texi (Specific, *-*-solaris2*): Document it.
1391 2018-10-12  Jeff Law  <law@redhat.com>
1393         * config/ft32/ft32.md (ft32_general_movsrc_operand): Disable
1394         reg + sym +- const_int addressing modes.
1396 2018-10-15  David Malcolm  <dmalcolm@redhat.com>
1398         * common.opt (fdiagnostics-minimum-margin-width=): New option.
1399         * diagnostic-show-locus.c (layout::layout): Apply the minimum
1400         margin width.
1401         (layout::start_annotation_line): Only print up to 3 of the
1402         margin character, to avoid touching the left-hand side.
1403         (selftest::test_diagnostic_show_locus_fixit_lines): Update for
1404         minimum margin width, as set by test_diagnostic_context's ctor.
1405         (selftest::test_fixit_insert_containing_newline): Likewise.
1406         (selftest::test_fixit_insert_containing_newline_2): Likewise.
1407         (selftest::test_line_numbers_multiline_range): Clear
1408         dc.min_margin_width.
1409         * diagnostic.c (diagnostic_initialize): Initialize
1410         min_margin_width.
1411         * diagnostic.h (struct diagnostic_context): Add field
1412         "min_margin_width".
1413         * doc/invoke.texi: Add -fdiagnostics-minimum-margin-width=.
1414         * opts.c (common_handle_option): Handle
1415         OPT_fdiagnostics_minimum_margin_width_.
1416         * selftest-diagnostic.c
1417         (selftest::test_diagnostic_context::test_diagnostic_context):
1418         Initialize min_margin_width to 6.
1419         * toplev.c (general_init): Initialize global_dc->min_margin_width.
1421 2018-10-15  David Malcolm  <dmalcolm@redhat.com>
1423         * gcc-rich-location.h (gcc_rich_location::add_location_if_nearby):
1424         Fix usage of "error_at_rich_loc" in the comment.
1426 2018-10-15  Renlin Li  <renlin.li@arm.com>
1428         PR target/87563
1429         * tree-vectorizer.c (try_vectorize_loop_1): Don't use
1430         if-conversioned loop when it contains ifn with types not
1431         supported by backend.
1432         * internal-fn.c (expand_direct_optab_fn): Add an assert.
1433         (direct_internal_fn_supported_p): New helper function.
1434         * internal-fn.h (direct_internal_fn_supported_p): Declare.
1436 2018-10-15  Jakub Jelinek  <jakub@redhat.com>
1438         PR target/87572
1439         * common/config/i386/i386-common.c (OPTION_MASK_ISA_AVX512F_UNSET):
1440         Remove OPTION_MASK_ISA_AVX5124FMAPS_UNSET and
1441         OPTION_MASK_ISA_AVX5124VNNIW_UNSET.
1443 2018-10-15  Bin Cheng  <bin.cheng@linux.alibaba.com>
1445         PR tree-optimization/87022
1446         * tree-loop-distribution.c (pg_add_dependence_edges): Check all
1447         bits in dist vector rather than the first one.
1449 2018-10-15  Richard Biener  <rguenther@suse.de>
1451         PR middle-end/87610
1452         * tree-ssa-structalias.c (struct vls_data): Add escaped_p member.
1453         (visit_loadstore): When a used restrict tag escaped verify that
1454         the points-to solution of "other" pointers do not include
1455         escaped.
1456         (compute_dependence_clique): If a used restrict tag escaped
1457         communicated that down to visit_loadstore.
1459 2018-10-15  Andreas Krebbel  <krebbel@linux.ibm.com>
1461         * config/s390/s390.c (s390_expand_vec_init): Force vector element
1462         into reg if it isn't a general operand.
1464 2018-10-14  H.J. Lu  <hongjiu.lu@intel.com>
1466         PR target/87599
1467         * config/i386/sse.md (*vec_dupv2di): Add register source to
1468         movddup.
1470 2018-10-14  H.J. Lu  <hongjiu.lu@intel.com>
1472         PR target/87572
1473         * common/config/i386/i386-common.c (OPTION_MASK_ISA_AVX512F_UNSET):
1474         Add OPTION_MASK_ISA_AVX512IFMA_UNSET,
1475         OPTION_MASK_ISA_AVX5124FMAPS_UNSET and
1476         OPTION_MASK_ISA_AVX5124VNNIW_UNSET.
1478 2018-10-13  Eric Botcazou  <ebotcazou@adacore.com>
1480         * dwarf2cfi.c (struct dw_trace_info): Add args_size_defined_for_eh.
1481         (notice_args_size): Set it in the current trace if no insn that can
1482         throw internally has been seen yet.
1483         (connect_traces): When connecting args_size between traces, allow the
1484         incoming values not to match if there is an insn setting it before the
1485         first insn that can throw internally; in that case, force the creation
1486         of a CFI note on this latter insn.
1488 2018-10-13  Jonathan Wakely  <jwakely@redhat.com>
1490         * opt-problem.h (opt_wrapper): Use template-argument-list when naming
1491         the base class, because using the injected-class-name was not clearly
1492         specified until DR 176.
1494 2018-10-12  Paul Koning  <ni1d@arrl.net>
1496         * config/pdp11/pdp11.md (doloop_end): New expander.
1497         (doloop_end_insn): renamed from "doloop_end".
1498         (addqi3): New pattern.
1499         (subqi3): New pattern.
1500         * config/pdp11/predicates.md (incdec_operand): New predicate.
1502 2018-10-12  Yury Gribov  <tetra2005@gmail.com>
1504         PR middle-end/81376
1505         * real.c (format_helper::can_represent_integral_type_p): New function
1506         * real.h (format_helper::can_represent_integral_type_p): Ditto.
1507         * match.pd: New pattern.
1509 2018-10-12  Alexandre Oliva <oliva@adacore.com>
1511         * configure.ac: Introduce --enable-large-address-aware
1512         to define MINGW_DEFAULT_LARGE_ADDR_AWARE.
1513         * doc/install.texi: Document it.
1514         * configure, config.in: Rebuilt.
1515         * config/i386/mingw32.h (LINK_SPEC_LARGE_ADDR_AWARE): Define,
1516         based on MINGW_DEFAULT_LARGE_ADDR_AWARE.
1517         (LINK_SPEC): Insert it.
1518         * config/i386/mingw-264.h: Likewise.
1520         * cygming.h (HAVE_GAS_ALIGNED_COMM): Fallback-define.
1522 2018-10-12  Peter Bergner  <bergner@linux.ibm.com>
1524         PR rtl-optimization/87600
1525         * ira-lives (non_conflicting_reg_copy_p): Disable for non LRA targets.
1527 2018-10-12  Paul Koning  <ni1d@arrl.net>
1529         * doc/md.texi (doloop_end): Document that the pattern code may
1530         need to check operand mode.
1532 2018-10-12  Wilco Dijkstra  <wdijkstr@arm.com>
1534         * config/aarch64/aarch64.md (zero_extendsidi2_aarch64): Add alternatives
1535         to zero-extend between int and floating-point registers.
1536         (load_pair_zero_extendsidi2_aarch64): Add alternative for zero-extended
1537         ldp into floating-point registers.  Add type and arch attributes.
1538         (zero_extend<SHORT:mode><GPI:mode>2_aarch64): Add arch attribute.
1539         Use f_loads for type attribute.
1541 2018-10-11  Martin Sebor  <msebor@redhat.com>
1543         * doc/extend.texi (attribute packed): Correct typos.
1545 2018-10-11  Martin Sebor  <msebor@redhat.com>
1547         * doc/extend.texi (attribute flatten): Mention interaction with
1548         noinline.
1550 2018-10-11  Jan Hubicka  <hubicka@ucw.cz>
1552         PR target/87156
1553         * cgraphclones.c (cgraph_node::create_version_clone_with_body):
1554         Set new_decl virtual flag to zero.
1556 2018-10-11  Martin Sebor  <msebor@redhat.com>
1558         PR middle-end/87593
1559         * doc/extend.texi (attribute format_arg): Discuss using multiple
1560         attributes on a single function.
1562 2018-10-11  Giuliano Belinassi  <giuliano.belinassi@usp.br>
1564         PR tree-optimization/86829
1565         * match.pd (sin (atan (x))): New simplification rules.
1566         (cos (atan (x))): Likewise.
1567         * real.c (build_sinatan_real): New function.
1568         * real.h (build_sinatan_real): Prototype.
1570 2018-10-11  Will Schmidt <will_schmidt@vnet.ibm.com>
1572         * config/rs6000/rs6000.c (map_to_integral_tree_type): New helper
1573         function.
1574         (fold_mergeeo_helper): New helper function.
1575         (rs6000_gimple_fold_builtin): Add hooks for vec_mergee and vec_mergeo
1576         intrinsics.  Correct some whitespace indentation issues.
1578 2018-10-11  Wilco Dijkstra  <wdijkstr@arm.com>
1580         PR target/87511
1581         * config/aarch64/aarch64.c (aarch64_mask_and_shift_for_ubfiz_p):
1582         Use HOST_WIDE_INT_1U for shift.
1584 2018-10-11  Doug Rupp  <rupp@adacore.com>
1585             Olivier Hainque  <hainque@adacore.com>
1587         * config/rs6000/vxworks.h (VXWORKS_RELAX_LINK_SPEC): New macro.
1588         Pass --relax to the linker for RTPs.
1589         (LINK_SPEC): Append VXWORKS_RELAX_LINK_SPEC.
1591 2018-10-11  Andrew Stubbs  <ams@codesourcery.com>
1592             Jan Hubicka  <jh@suse.cz>
1593             Martin Jambor  <mjambor@suse.cz>
1595         * print-rtl.c (print_rtx_operand_codes_E_and_V): Print how many times
1596         the same elements are repeated rather than printing all of them.
1597         * read-rtl.c (rtx_reader::read_rtx_operand): Recognize and expand
1598         "repeated" elements.
1599         * read-rtl-function.c (test_loading_repeat): New function.
1600         (read_rtl_function_c_tests): Call test_loading_repeat.
1601         * rtl-tests.c (test_dumping_repeat): New function.
1602         (rtl_tests_c_tests): Call test_dumping_repeat.
1604 2018-10-11  Richard Biener  <rguenther@suse.de>
1606         * config/i386/x86-tune-costs.h (bdver?_memcpy, bdver?_memset,
1607         bdver?_cost): Unify to ...
1608         (bdver_memcpy, bdver_memset, bdver_cost): ... this.
1609         * config/i386/i386.c (processor_cost_table): Adjust.
1611 2018-10-10  Eric Botcazou  <ebotcazou@adacore.com>
1613         PR middle-end/87574
1614         * cgraphunit.c (cgraph_node::expand_thunk): Force DECL_IGNORED_P on
1615         the thunk when expanding to GIMPLE.
1617 2018-10-10  Bernd Edlinger  <bernd.edlinger@hotmail.de>
1619         * varasm.c (mergeable_string_section): Don't try to move zero-length
1620         strings to the merge section.
1622 2018-10-10  Uros Bizjak  <ubizjak@gmail.com>
1624         PR target/87573
1625         * config/i386/mmx.md (const_vector 0 -> mem splitter): New splitter.
1627 2018-10-10  Jakub Jelinek  <jakub@redhat.com>
1629         PR target/87550
1630         * config/i386/i386-builtin.def (IX86_BUILTIN_RDPMC): Move from args set
1631         to special_args set.
1633 2018-10-10  Richard Biener  <rguenther@suse.de>
1635         * config/i386/sse.md (reduc_plus_scal_v8df, reduc_plus_scal_v4df,
1636         reduc_plus_scal_v2df, reduc_plus_scal_v16sf, reduc_plus_scal_v8sf,
1637         reduc_plus_scal_v4sf): Merge into pattern reducing to half width
1638         and recursing and pattern terminating the recursion on SSE
1639         vector width using ix86_expand_reduc.
1640         (reduc_sminmax_scal_<mode>): Split into part reducing to half
1641         width and recursing and SSE2 vector variant doing the final
1642         reduction with ix86_expand_reduc.
1643         (reduc_uminmax_scal_<mode>): Likewise for the AVX512 variants
1644         with terminating the recursion at AVX level, splitting that
1645         to SSE there.
1647 2018-10-09  David Malcolm  <dmalcolm@redhat.com>
1649         * genmatch.c (error_cb): Rename to...
1650         (diagnostic_cb): ...this, converting int params to enums.
1651         (fatal_at): Update for renaming.
1652         (warning_at): Likewise.
1653         (main): Likewise.
1654         * input.c (selftest::ebcdic_execution_charset::apply):
1655         Update for renaming of...
1656         (selftest::ebcdic_execution_charset::on_error): ...this, renaming
1657         to...
1658         (selftest::ebcdic_execution_charset::on_diagnostic): ...this,
1659         converting level and reason to enums.
1660         (class selftest::lexer_error_sink): Rename to...
1661         (class selftest::lexer_test_options): ...this, renaming field
1662         "m_errors" to "m_diagnostics".
1663         (selftest::lexer_test_options::apply): Update for renaming of...
1664         (selftest::lexer_test_options::on_error): ...this, renaming to...
1665         (selftest::lexer_test_options::on_diagnostic): ...this
1666         converting level and reason to enums.
1667         (selftest::test_lexer_string_locations_raw_string_unterminated):
1668         Update for renamings.
1669         * opth-gen.awk (struct cpp_reason_option_codes_t): Use enum for
1670         "reason".
1672 2018-10-09  Paul A. Clarke  <pc@us.ibm.com>
1674         * config.gcc (powerpc*-*-*): Add pmmintrin.h to extra_headers.
1675         * config/rs6000/pmmintrin.h: New file.
1677 2018-10-09  Eric Botcazou  <ebotcazou@adacore.com>
1679         PR tree-optimization/86659
1680         * gimple-match.h (gimple_match_op constructors): Initialize reverse.
1682 2018-10-09  Richard Biener  <rguenther@suse.de>
1684         PR tree-optimization/63155
1685         * tree-ssa-structalias.c: Include tree-ssa.h.
1686         (get_constraint_for_ssa_var): For undefs return nothing_id.
1687         (find_func_aliases): Cleanup PHI handling.
1689 2018-10-09  Richard Biener  <rguenther@suse.de>
1691         * tree-vectorizer.c (dump_stmt_cost): Fix cut&paste missing
1692         replacements.
1694 2018-10-09  Martin Liska  <mliska@suse.cz>
1696         * asan.c (asan_emit_stack_protection): If a stack variable
1697         is located in a same file as current function, then emit
1698         line info into variable definition string.
1700 2018-10-08  Eric Botcazou  <ebotcazou@adacore.com>
1702         * print-rtl.c (rtx_writer::print_rtx_operand_code_i): Print column
1703         information.
1705 2018-10-08  Eric Botcazou  <ebotcazou@adacore.com>
1707         * cgraphunit.c (cgraph_node::expand_thunk): Do not force DECL_IGNORED_P
1708         on the thunk.
1710 2018-10-08  Eric Botcazou  <ebotcazou@adacore.com>
1712         PR tree-optimization/86659
1713         * gimple-match.h (struct gimple_match_op): Add reverse field.
1714         (gimple_match_op::set_op): New overloaded method.
1715         * gimple-match-head.c (maybe_build_generic_op) <BIT_FIELD_REF>: Set
1716         the REF_REVERSE_STORAGE_ORDER flag on the value.
1717         (gimple_simplify) <GIMPLE_ASSIGN>: For BIT_FIELD_REF, propagate the
1718         REF_REVERSE_STORAGE_ORDER flag and avoid simplifying if it is set.
1719         
1720 2018-10-08  Richard Sandiford  <richard.sandiford@arm.com>
1722         PR middle-end/63155
1723         * gimple-ssa-backprop.c (backprop::intersect_uses): Use
1724         FOR_EACH_IMM_USE_FAST instead of FOR_EACH_IMM_USE_STMT.
1726 2018-10-08  H.J. Lu  <hongjiu.lu@intel.com>
1728         PR target/87517
1729         * config/i386/avx512fintrin.h (_mm512_mask_fmaddsub_round_pd):
1730         Defined with __builtin_ia32_vfmaddsubpd512_mask.
1732 2018-10-08  Richard Biener  <rguenther@suse.de>
1734         * config/i386/x86-tune-costs.h (znver1_cost): Make AVX256 vector loads
1735         cost the same as AVX128 ones.
1737 2018-10-08  Paul Koning  <ni1d@arrl.net>
1739         * config/pdp11/pdp11-protos.h (output_block_move): Remove.
1740         (expand_block_move): New function.
1741         * config/pdp11/pdp11.c (output_block_move): Remove.
1742         (expand_block_move): New function.
1743         * config/pdp11/pdp11.h (MOVE_RATIO): New definition.
1744         * config/pdp11/pdp11.md (movmemhi): Use expand_block_move.
1745         (*movmemhi1): Remove.
1747 2018-10-08  Robin Dapp  <rdapp@linux.ibm.com>
1749         * config/s390/2827.md: Increase latencies for some FP instructions.
1751 2018-10-08  Richard Biener  <rguenther@suse.de>
1753         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
1754         Open a dump scope.
1755         * tree-vectorizer.c (dump_stmt_cost): Add cost param and dump it.
1756         * tree-vectorizer.h (dump_stmt_cost): Adjust.
1757         (add_stmt_cost): Dump return value of the hook.
1759 2018-10-08  Richard Biener  <rguenther@suse.de>
1761         PR tree-optimization/63155
1762         * tree-ssa-propagate.c (add_ssa_edge): Do cheap check first.
1763         (ssa_propagation_engine::ssa_propagate): Remove redundant
1764         bitmap bit clearing.
1766 2018-10-05  Peter Bergner  <bergner@linux.ibm.com>
1768         PR rtl-optimization/86939
1769         PR rtl-optimization/87479
1770         * ira.h (non_conflicting_reg_copy_p): New prototype.
1771         * ira-lives.c (ignore_reg_for_conflicts): New static variable.
1772         (make_hard_regno_dead): Don't add conflicts for register
1773         ignore_reg_for_conflicts.
1774         (make_object_dead): Likewise.
1775         (non_conflicting_reg_copy_p): New function.
1776         (process_bb_node_lives): Set ignore_reg_for_conflicts for copies.
1777         Remove special conflict handling of REAL_PIC_OFFSET_TABLE_REGNUM.
1778         * lra-lives.c (ignore_reg_for_conflicts): New static variable.
1779         (make_hard_regno_dead): Don't add conflicts for register
1780         ignore_reg_for_conflicts.  Remove special conflict handling of
1781         REAL_PIC_OFFSET_TABLE_REGNUM.  Remove now unused argument
1782         check_pic_pseudo_p and update callers.
1783         (mark_pseudo_dead): Don't add conflicts for register
1784         ignore_reg_for_conflicts.
1785         (process_bb_lives): Set ignore_reg_for_conflicts for copies.
1787 2018-10-05  Andrew Waterman  <andrew@sifive.com>
1788             Jim Wilson  <jimw@sifive.com>
1790         * config/riscv/riscv.md (f<quiet_pattern>_quiet<ANYF:mode><X:mode>4):
1791         Add define_expand.  Add ! HONOR_SNANS check to current pattern.  Add
1792         new pattern using HONOR_SNANS that emits one extra instruction.
1794 2018-10-05  Segher Boessenkool  <segher@kernel.crashing.org>
1796         * config/rs6000/rs6000.md (unnamed mfcr scc_comparison_operator
1797         patterns): Merge SI and DI patterns to a GPR pattern.
1798         (unnamed define_insn and define_split for record form of that): Merge
1799         to a single define_insn_and_split pattern.
1801 2018-10-05  David Malcolm  <dmalcolm@redhat.com>
1803         PR c++/56856
1804         * input.c (expand_location_to_spelling_point): Add param "aspect"
1805         and use rather than hardcoding LOCATION_ASPECT_CARET.
1806         (get_substring_ranges_for_loc): Handle the case of a single token
1807         within a macro expansion.
1808         * input.h (expand_location_to_spelling_point): Add "aspect" param,
1809         defaulting to LOCATION_ASPECT_CARET.
1811 2018-10-05  Paul Koning  <ni1d@arrl.net>
1813         * config/pdp11/pdp11.c (TARGET_CXX_GUARD_TYPE): Define.
1814         (TARGET_CXX_CLASS_DATA_ALWAYS_COMDAT): Define.
1815         (TARGET_CXX_LIBRARY_RTTI_COMDAT): Define.
1816         (pdp11_guard_type): New function.
1818 2018-10-05  Paul Koning  <ni1d@arrl.net>
1820         * config/pdp11/pdp11.h (FLOAT_TYPE_SIZE): Always 32.
1821         * config/pdp11/pdp11.opt (mfloat32): Remove.
1822         (mfloat64): Remove.
1823         * doc/invoke.texi (pdp11 -mfloat32): Remove:
1824         (pdp11 -mfloat64): Remove.
1826 2018-10-05  Uros Bizjak  <ubizjak@gmail.com>
1828         * config/i386/i386.md (*cmpxf_cc_i387): Remove pattern.
1829         (*cmp<mode>_cc_i387): Ditto.
1830         (*cmpu<mode>_cc_i387): Ditto.
1831         (*cmp<X87MODEF:mode>_<SWI24:mode>_cc_i387): Ditto.
1832         * config/i386/i386.c (ix86_expand_fp_compare): Remove
1833         "scratch" argument.
1834         <case IX86_FPCMP_SAHF>: Do not generate pattern with HImode clobber.
1835         Emit x86_sahf_1 pattern.
1836         (ix86_expand_compare): Update call to ix86_expand_fp_compare.
1837         (ix86_expand_carry_flag_compare): Ditto.
1839 2018-10-05  Uros Bizjak  <ubizjak@gmail.com>
1841         * config/i386/i386.md (*cmpxf_i387): Change operand 2 predicate
1842         to reg_or_0_operand.  Add "C" constraint.
1843         (*cmpxf_cc_i387): Ditto.
1844         (*cmp<mode>_i387): Change operand 2 predicate
1845         to nonimm_or_0_operand.  Add "C" constraint.
1846         (*cmp<mode>_cc_i387): Ditto.
1847         (*cmp<mode>_0_i387): Remove insn pattern.
1848         (*cmp<mode>_0_cc_i387): Ditto.
1850 2018-10-05  Uros Bizjak  <ubizjak@gmail.com>
1852         * config/i386/constraints.md ("C"): Do not depend on TARGET_SSE.
1853         * config/i386/predicates.md (nonimm_or_0_operand): Rename
1854         from vector_move_operand.  Update all uses.
1856 2018-10-05  Martin Sebor  <msebor@redhat.com>
1858         PR tree-optimization/87490
1859         * builtins.c (expand_builtin_strnlen): Handle a null data.decl
1860         consistently.
1862 2018-10-05  Richard Biener  <rguenther@suse.de>
1864         PR tree-optimization/63155
1865         * tree-ssa-ccp.c (ccp_propagate::visit_phi): Avoid excess
1866         vertical space in dumpfiles.
1867         * tree-ssa-propagate.h
1868         (ssa_propagation_engine::process_ssa_edge_worklist): Remove.
1869         * tree-ssa-propagate.c (cfg_blocks_back): New global.
1870         (ssa_edge_worklist_back): Likewise.
1871         (curr_order): Likewise.
1872         (cfg_blocks_get): Remove abstraction.
1873         (cfg_blocks_add): Likewise.
1874         (cfg_blocks_empty_p): Likewise.
1875         (add_ssa_edge): Add to current or next worklist based on
1876         RPO index.
1877         (add_control_edge): Likewise.
1878         (ssa_propagation_engine::process_ssa_edge_worklist): Fold
1879         into ...
1880         (ssa_propagation_engine::ssa_propagate): ... here.  Unify
1881         iteration from CFG and SSA edge worklist so we process
1882         everything in RPO order, prioritizing forward progress
1883         over iteration.
1884         (ssa_prop_init): Allocate new worklists, do not dump
1885         immediate uses.
1886         (ssa_prop_fini): Free new worklists.
1888 2018-10-05  Richard Biener  <rguenther@suse.de>
1890         * tree-core.h (tree_block::abstract_flag): Remove.
1891         (tree_block::block_num): Make full 32bits.
1892         * tree.def (BLOCK): Remove docs about BLOCK_ABSTRACT.
1893         * tree.h (BLOCK_ABSTRACT): Remove.
1894         * dwarf2out.c (gen_lexical_block_die): Remove dead code
1895         resulting from BLOCK_ABSTRACT being always false.
1896         (gen_inlined_subroutine_die): Likewise.
1897         (gen_block_die): Likewise.
1898         * tree.c (block_ultimate_origin): Likewise.
1899         * tree-pretty-print.c (dump_block_node): Remove code dealing
1900         with BLOCK_ABSTRACT.
1901         * tree-ssa-live.c (dump_scope_block): Likewise.
1902         * tree-streamer-in.c (unpack_ts_block_value_fields): Likewise.
1903         * tree-streamer-out.c (pack_ts_block_value_fields): Likewise.
1905 2018-10-05   Richard Biener  <rguenther@suse.de>
1907         * config/i386/i386.c (ix86_add_stmt_cost): When scalar cost
1908         is asked for initialize mode to the component mode of the
1909         vector type.
1911 2018-10-05  H.J. Lu  <hongjiu.lu@intel.com>
1913         PR target/87522
1914         * config/i386/gnu-user.h (ASM_SPEC): Don't pass -msse2avx to
1915         assembler for -mavx.
1916         * config/i386/gnu-user64.h (ASM_SPEC): Likewise.
1918 2018-10-05  Segher Boessenkool  <segher@kernel.crashing.org>
1920         PR target/87509
1921         * config/rs6000/rs6000-builtin.def (RS6000_BUILTIN_SET_FPSCR_DRN): Use
1922         RS6000_BTM_DFP.
1923         * config/rs6000/rs6000.md (rs6000_set_fpscr_rn): Require the operand
1924         to be DImode.  When using mffscrn, force the operand to a register.
1926 2018-10-04  Uros Bizjak  <ubizjak@gmail.com>
1928         * config/i386/i386.md (*fop_<X87MODEF:mode>_2_i387): Macroize insn
1929         from *fop_<MODEF:mode>_2_i387 and *fop_xf_2_i387 using
1930         X87MODEF mode iterator.
1931         (*fop_<X87MODEF:mode>_3_i387): Macroize insn from
1932         *fop_<MODEF:mode>_3_i387 and *fop_xf_3_i387 using
1933         X87MODEF mode iterator.
1935 2018-10-04  Vinay Kumar  <vinay.kumar@blackfigtech.com>
1937         * doc/invoke.texi (-Wno-prio-ctor-dtor): Document new warning
1938         -Wno-prio-ctor-dtor.
1940 2018-10-04  David Malcolm  <dmalcolm@redhat.com>
1942         * Makefile.in (OBJS): Add opt-problem.o.
1943         * dump-context.h: Include "selftest.h.
1944         (selftest::temp_dump_context): New forward decl.
1945         (class dump_context): Make friend of class
1946         selftest::temp_dump_context.
1947         (dump_context::dump_loc_immediate): New decl.
1948         (class dump_pretty_printer): Move here from dumpfile.c.
1949         (class temp_dump_context): Move to namespace selftest.
1950         (temp_dump_context::temp_dump_context): Add param
1951         "forcibly_enable_dumping".
1952         (selftest::verify_dumped_text):
1953         (ASSERT_DUMPED_TEXT_EQ): Move here from dumpfile.c.
1954         (selftest::verify_item):
1955         (ASSERT_IS_TEXT): Move here from dumpfile.c.
1956         (ASSERT_IS_TREE): Likewise.
1957         (ASSERT_IS_GIMPLE): Likewise.
1958         * dumpfile.c (dump_context::dump_loc): Move immediate dumping
1959         to...
1960         (dump_context::dump_loc_immediate): ...this new function.
1961         (class dump_pretty_printer): Move to dump-context.h.
1962         (dump_switch_p_1): Don't enable MSG_PRIORITY_REEMITTED.
1963         (opt_info_switch_p_1): Enable MSG_PRIORITY_REEMITTED.
1964         (temp_dump_context::temp_dump_context): Move to "selftest"
1965         namespace.  Add param "forcibly_enable_dumping", and use it to
1966         conditionalize the use of m_pp;
1967         (selftest::verify_dumped_text): Make non-static.
1968         (ASSERT_DUMPED_TEXT_EQ): Move to dump-context.h.
1969         (selftest::verify_item): Make non-static.
1970         (ASSERT_IS_TEXT): Move to dump-context.h.
1971         (ASSERT_IS_TREE): Likewise.
1972         (ASSERT_IS_GIMPLE): Likewise.
1973         (selftest::test_capture_of_dump_calls): Pass "true" for new
1974         param of temp_dump_context.
1975         * dumpfile.h (enum dump_flag): Add MSG_PRIORITY_REEMITTED, adding
1976         it to MSG_ALL_PRIORITIES.  Update values of TDF_COMPARE_DEBUG and
1977         TDF_COMPARE_DEBUG.
1978         * opt-problem.cc: New file.
1979         * opt-problem.h: New file.
1980         * optinfo-emit-json.cc
1981         (selftest::test_building_json_from_dump_calls): Pass "true" for
1982         new param of temp_dump_context.
1983         * optinfo.cc (optinfo_kind_to_dump_flag): New function.
1984         (optinfo::emit_for_opt_problem): New function.
1985         (optinfo::emit): Clarity which emit_item is used.
1986         * optinfo.h (optinfo::get_dump_location): New accessor.
1987         (optinfo::emit_for_opt_problem): New decl.
1988         (optinfo::emit): Make const.
1989         * selftest-run-tests.c (selftest::run_tests): Call
1990         selftest::opt_problem_cc_tests.
1991         * selftest.h (selftest::opt_problem_cc_tests): New decl.
1992         * tree-data-ref.c (dr_analyze_innermost): Convert return type from
1993         bool to opt_result, converting fprintf messages to
1994         opt_result::failure_at calls.  Add "stmt" param for use by the
1995         failure_at calls.
1996         (create_data_ref): Pass "stmt" to the dr_analyze_innermost call.
1997         (runtime_alias_check_p): Convert return type from bool to
1998         opt_result, converting dump_printf calls to
1999         opt_result::failure_at, using the statement DDR_A for their
2000         location.
2001         (find_data_references_in_stmt): Convert return type from bool to
2002         opt_result, converting "return false" to opt_result::failure_at
2003         with a new message.
2004         * tree-data-ref.h: Include "opt-problem.h".
2005         (dr_analyze_innermost): Convert return type from bool to opt_result,
2006         and add a const gimple * param.
2007         (find_data_references_in_stmt): Convert return type from bool to
2008         opt_result.
2009         (runtime_alias_check_p): Likewise.
2010         * tree-predcom.c (find_looparound_phi): Pass "init_stmt" to
2011         dr_analyze_innermost.
2012         * tree-vect-data-refs.c (vect_mark_for_runtime_alias_test):
2013         Convert return type from bool to opt_result, adding a message for
2014         the PARAM_VECT_MAX_VERSION_FOR_ALIAS_CHECKS zero case.
2015         (vect_analyze_data_ref_dependence): Convert return type from bool
2016         to opt_result.  Change sense of return type from "false"
2017         effectively meaning "no problems" to "false" meaning a problem,
2018         so that "return false" becomes "return opt_result::success".
2019         Convert "return true" calls to opt_result::failure_at, using
2020         the location of statement A rather than vect_location.
2021         (vect_analyze_data_ref_dependences): Convert return type from bool
2022         to opt_result.
2023         (verify_data_ref_alignment): Likewise, converting dump_printf_loc
2024         calls to opt_result::failure_at, using the stmt location rather
2025         than vect_location.
2026         (vect_verify_datarefs_alignment): Convert return type from bool
2027         to opt_result.
2028         (vect_enhance_data_refs_alignment): Likewise.  Split local "stat"
2029         into multiple more-tightly-scoped copies.
2030         (vect_analyze_data_refs_alignment): Convert return type from bool
2031         to opt_result.
2032         (vect_analyze_data_ref_accesses): Likewise, converting a
2033         "return false" to a "return opt_result::failure_at", adding a
2034         new message.
2035         (vect_prune_runtime_alias_test_list): Convert return type from
2036         bool to opt_result, converting dump_printf_loc to
2037         opt_result::failure_at.  Add a %G to show the pertinent statement,
2038         and use the stmt's location rather than vect_location.
2039         (vect_find_stmt_data_reference): Convert return type from
2040         bool to opt_result, converting dump_printf_loc to
2041         opt_result::failure_at, using stmt's location.
2042         (vect_analyze_data_refs):  Convert return type from bool to
2043         opt_result.  Convert "return false" to "return
2044         opt_result::failure_at", adding messages as needed.
2045         * tree-vect-loop.c (vect_determine_vf_for_stmt_1): Convert return
2046         type from bool to opt_result.
2047         (vect_determine_vf_for_stmt): Likewise.
2048         (vect_determine_vectorization_factor): Likewise, converting
2049         dump_printf_loc to opt_result::failure_at, using location of phi
2050         rather than vect_location.
2051         (vect_analyze_loop_form_1): Convert return type from bool to
2052         opt_result, converting dump_printf_loc calls, retaining the use of
2053         vect_location.
2054         (vect_analyze_loop_form): Convert return type from loop_vec_info
2055         to opt_loop_vec_info.
2056         (vect_analyze_loop_operations): Convert return type from bool to
2057         opt_result, converting dump_printf_loc calls, using the location
2058         of phi/stmt rather than vect_location where available.  Convert
2059         various "return false" to "return opt_result::failure_at" with
2060         "unsupported phi" messages.
2061         (vect_get_datarefs_in_loop): Convert return type from bool to
2062         opt_result.  Add a message for the
2063         PARAM_LOOP_MAX_DATAREFS_FOR_DATADEPS failure.
2064         (vect_analyze_loop_2): Convert return type from bool to
2065         opt_result.  Ensure "ok" is set to a opt_result::failure_at before
2066         each "goto again;", adding new messages where needed.
2067         Add "unsupported grouped {store|load}" messages.
2068         (vect_analyze_loop): Convert return type from loop_vec_info to
2069         opt_loop_vec_info.
2070         * tree-vect-slp.c (vect_analyze_slp): Convert return type from
2071         bool to opt_result.
2072         * tree-vect-stmts.c (process_use): Likewise, converting
2073         dump_printf_loc call and using stmt location, rather than
2074         vect_location.
2075         (vect_mark_stmts_to_be_vectorized): Likeise.
2076         (vect_analyze_stmt): Likewise, adding a %G.
2077         (vect_get_vector_types_for_stmt): Convert return type from bool to
2078         opt_result, converting dump_printf_loc calls and using stmt
2079         location, rather than vect_location.
2080         (vect_get_mask_type_for_stmt): Convert return type from tree to
2081         opt_tree, converting dump_printf_loc calls and using stmt location.
2082         * tree-vectorizer.c: Include "opt-problem.h.
2083         (try_vectorize_loop_1): Flag "Analyzing loop at" dump message as
2084         MSG_PRIORITY_INTERNALS.  Convert local "loop_vinfo" from
2085         loop_vec_info to opt_loop_vec_info.  If if fails, and dumping is
2086         enabled, use it to report at the top level "couldn't vectorize
2087         loop" followed by the problem.
2088         * tree-vectorizer.h (opt_loop_vec_info): New typedef.
2089         (vect_mark_stmts_to_be_vectorized): Convert return type from bool
2090         to opt_result.
2091         (vect_analyze_stmt): Likewise.
2092         (vect_get_vector_types_for_stmt): Likewise.
2093         (tree vect_get_mask_type_for_stmt): Likewise.
2094         (vect_analyze_data_ref_dependences): Likewise.
2095         (vect_enhance_data_refs_alignment): Likewise.
2096         (vect_analyze_data_refs_alignment): Likewise.
2097         (vect_verify_datarefs_alignment): Likewise.
2098         (vect_analyze_data_ref_accesses): Likewise.
2099         (vect_prune_runtime_alias_test_list): Likewise.
2100         (vect_find_stmt_data_reference): Likewise.
2101         (vect_analyze_data_refs): Likewise.
2102         (vect_analyze_loop): Convert return type from loop_vec_info to
2103         opt_loop_vec_info.
2104         (vect_analyze_loop_form): Likewise.
2105         (vect_analyze_slp): Convert return type from bool to opt_result.
2107 2018-10-04  David Malcolm  <dmalcolm@redhat.com>
2109         * doc/invoke.texi (-fopt-info): Document new "internals"
2110         sub-option.
2111         * dump-context.h (dump_context::apply_dump_filter_p): New decl.
2112         * dumpfile.c (dump_options): Update for renaming of MSG_ALL to
2113         MSG_ALL_KINDS.
2114         (optinfo_verbosity_options): Add "internals".
2115         (kind_as_string): Update for renaming of MSG_ALL to MSG_ALL_KINDS.
2116         (dump_context::apply_dump_filter_p): New member function.
2117         (dump_context::dump_loc): Use apply_dump_filter_p rather than
2118         explicitly masking the dump_kind.
2119         (dump_context::begin_scope): Increment the scope depth first.  Use
2120         apply_dump_filter_p rather than explicitly masking the dump_kind.
2121         (dump_context::emit_item): Use apply_dump_filter_p rather than
2122         explicitly masking the dump_kind.
2123         (dump_dec): Likewise.
2124         (dump_hex): Likewise.
2125         (dump_switch_p_1): Default to MSG_ALL_PRIORITIES.
2126         (opt_info_switch_p_1): Default to MSG_PRIORITY_USER_FACING.
2127         (opt_info_switch_p): Update handling of default
2128         MSG_OPTIMIZED_LOCATIONS to cope with default of
2129         MSG_PRIORITY_USER_FACING.
2130         (dump_basic_block): Use apply_dump_filter_p rather than explicitly
2131         masking the dump_kind.
2132         (selftest::test_capture_of_dump_calls): Update test_dump_context
2133         instances to use MSG_ALL_KINDS | MSG_PRIORITY_USER_FACING rather
2134         than MSG_ALL.  Generalize scope test to be run at all four
2135         combinations of with/without MSG_PRIORITY_USER_FACING and
2136         MSG_PRIORITY_INTERNALS, adding examples of explicit priority
2137         for each of the two values.
2138         * dumpfile.h (enum dump_flag): Add comment about the MSG_* flags.
2139         Rename MSG_ALL to MSG_ALL_KINDS.  Add MSG_PRIORITY_USER_FACING,
2140         MSG_PRIORITY_INTERNALS, and MSG_ALL_PRIORITIES, updating the
2141         values for TDF_COMPARE_DEBUG and TDF_ALL_VALUES.
2142         (AUTO_DUMP_SCOPE): Add a note to the comment about the interaction
2143         with MSG_PRIORITY_*.
2144         * tree-vect-loop-manip.c (vect_loop_versioning): Mark versioning
2145         dump messages as MSG_PRIORITY_USER_FACING.
2146         * tree-vectorizer.h (DUMP_VECT_SCOPE): Add a note to the comment
2147         about the interaction with MSG_PRIORITY_*.
2149 2018-10-04  Bernd Edlinger  <bernd.edlinger@hotmail.de>
2151         * varasm.c (output_constant): Add new parameter merge_strings.
2152         Make strings properly zero terminated in merge string sections.
2153         (mergeable_string_section): Don't fail if the last char is non-zero.
2154         (assemble_variable_contents): Handle merge string sections.
2155         (assemble_variable): Likewise.
2156         (assemble_constant_contents): Likewise.
2157         (output_constant_def_contents): Likewise.
2158         (output_constructor_array_range,
2159         output_constructor_regular_field): Adjust call to output_constant.
2160         (output_object_block): Adjust call to assemble_constant_contents
2161         and assemble_variable_contents.
2163 2018-10-04  Martin Liska  <mliska@suse.cz>
2165         PR c/87483
2166         * cgraphunit.c (process_function_and_variable_attributes):
2167         Warn about a function with alias attribute and a body.
2169 2018-10-04  Martin Liska  <mliska@suse.cz>
2171         PR ipa/82625
2172         * multiple_target.c (redirect_to_specific_clone): New function.
2173         (ipa_target_clone): Use it.
2174         * tree-inline.c: Fix comment.
2176 2018-10-04  David Malcolm  <dmalcolm@redhat.com>
2178         * dumpfile.c (gcc::dump_manager::dump_manager): Initialize new
2179         fields.
2180         (gcc::dump_manager::~dump_manager): Free m_optinfo_filename.
2181         (gcc::dump_manager::register_pass): New member function, adapted
2182         from loop body in gcc::pass_manager::register_pass, adding a
2183         call to update_dfi_for_opt_info.
2184         (gcc::dump_manager::opt_info_enable_passes): Store the
2185         -fopt-info options into the new fields.  Move the loop
2186         bodies into...
2187         (gcc::dump_manager::update_dfi_for_opt_info): ...this new member
2188         function.
2189         * dumpfile.h (struct opt_pass): New forward decl.
2190         (gcc::dump_manager::register_pass): New decl.
2191         (gcc::dump_manager::update_dfi_for_opt_info): New decl.
2192         (class gcc::dump_manager): Add fields "m_optgroup_flags",
2193         "m_optinfo_flags", and "m_optinfo_filename".
2194         * passes.c (gcc::pass_manager::register_pass): Move all of the
2195         dump-handling code to gcc::dump_manager::register_pass.
2197 2018-10-04  Peter Bergner  <bergner@linux.ibm.com>
2199         PR rtl-optimization/87466
2200         * target.def (setjmp_preserves_nonvolatile_regs_p): New target hook.
2201         * doc/tm.texi.in (TARGET_SETJMP_PRESERVES_NONVOLATILE_REGS_P): New hook.
2202         * doc/tm.texi: Regenerate.
2203         * ira-lives.c (process_bb_node_lives): Use the new target hook.
2204         * lra-lives.c (process_bb_lives): Likewise.
2205         * config/rs6000/rs6000.c (TARGET_SETJMP_PRESERVES_NONVOLATILE_REGS_P):
2206         Define.
2208 2018-10-04  Tamar Christina  <tamar.christina@arm.com>
2210         * params.c (add_params): Fix initialization.
2212 2018-10-04  Martin Liska  <mliska@suse.cz>
2214         PR gcov-profile/84107
2215         * tree-profile.c (init_ic_make_global_vars):
2216         Remove ic_void_ptr_var and ic_gcov_type_ptr_var.
2217         Come up with new ic_tuple* variables.  Emit
2218         __gcov_indirect_call{,_topn} variables.
2219         (gimple_gen_ic_profiler): Access the variable
2220         and emit gimple.
2221         (gimple_gen_ic_func_profiler): Access
2222         __gcov_indirect_call.callee field.
2223         (gimple_init_gcov_profiler): Use ptr_type_node.
2224         * value-prof.c (gimple_ic): Use ptr_type_node.
2226 2018-10-04  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
2228         PR tree-optimization/85787
2229         * ipa-pure-const.c (malloc_candidate_p_1): Move most of malloc_candidate_p
2230         into this function and add support for detecting multiple phis.
2231         (DUMP_AND_RETURN): Move from malloc_candidate_p into top-level macro.
2233 2018-10-04  Martin Liska  <mliska@suse.cz>
2235         PR ipa/87491
2236         * ipa-inline.c (inline_to_all_callers_1):
2237         Call ultimate_alias_target for node being inlined.
2239 2018-10-03  Jeff Law  <law@redhat.com>
2241         * gimple-ssa-sprintf.c (format_string): Do not hardcode size of
2242         target's wchar_t.
2243         * tree.c (get_typenode_from_name): Moved from fortran/trans-types.c.
2244         * tree.h (get_typenode_from_name): Prototype.
2246 2018-10-03  Uros Bizjak  <ubizjak@gmail.com>
2248         * config/i386/i386.md (*cmp<X87MODEF:mode>_<SWI24:mode>_i387):
2249         Change operand 2 predicate to nonimmediate_operand.
2250         (*cmp<X87MODEF:mode>_<SWI24:mode>_cc_i387): Ditto.
2252 2018-10-03  Martin Sebor  <msebor@redhat.com>
2253             Jeff Law  <law@redhat.com>
2255         * gimple-ssa-sprintf.c (struct fmtresult): Add new member and
2256         initialize it.
2257         (get_string_length): Detect unterminated arrays.
2258         (format_string): Same.
2259         (format_directive): Warn about unterminated arrays.
2260         (handle_gimple_call): Mark statements with no_warning as needed.
2262 2018-10-03  Jim Wilson  <jimw@sifive.com>
2264         * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): For ABI_ILP32E,
2265         also define __riscv_abi_rve.  Delete trailing white space.
2267 2018-10-03  Paul Koning  <ni1d@arrl.net>
2269         Enable LRA register allocator for PDP11.
2270         * config/pdp11/constraints.md (Q): Use define_memory_constraint.
2271         (R): Likewise.
2272         (D): Likewise.
2273         * config/pdp11/pdp11.c (pdp11_lra_p): New function.
2274         * config/pdp11/pdp11.opt (-mlra): New option.
2275         * doc/invoke.texi (PDP-11 Options): Document -mlra.
2277 2018-10-03  Uros Bizjak  <ubizjak@gmail.com>
2279         * config/i386/i386.md (*<absneg:code>extendsfdf2): Remove.
2280         (*<absneg:code>extend<mode>xf2): Ditto.
2282 2018-10-03  Aldy Hernandez  <aldyh@redhat.com>
2284         PR tree-optimization/87415
2285         * tree-vrp.c (set_value_range_with_overflow): Special case one bit
2286         precision fields.
2288 2018-10-02  Jeff Law  <law@redhat.com>
2290         * gimple-fold.c (get_range_strlen): Only set *nonstr when
2291         an unterminated string is discovered.  Bubble up range
2292         even for unterminated strings.
2293         (gimple_fold_builtin_strlen): Do not fold if get_range_strlen
2294         indicates the string was not terminated via NONSTR.
2296 2018-10-03  Aldy Hernandez  <aldyh@redhat.com>
2298         * tree-vrp.c (extract_range_from_unary_expr): Special case all
2299         pointer conversions.
2300         Do not do anything special for anti-ranges.
2302 2018-10-03  Jérôme Lambourg  <lambourg@adacore.com>
2304         * config/arm/vxworks.h (ARM_TARGET2_DWARF_FORMAT): Adjust to
2305         DW_EH_PE_pcrel | DW_EH_PE_indirect for RTPs.
2307 2018-10-03  Martin Liska  <mliska@suse.cz>
2309         PR gcov-profile/86109
2310         * coverage.c (coverage_begin_function): Do not
2311         mark lambdas as artificial.
2312         * tree-core.h (struct GTY): Remove tm_clone_flag
2313         and introduce new lambda_function.
2314         * tree.h (DECL_LAMBDA_FUNCTION): New macro.
2316 2018-10-02  Aaron Sawdey  <acsawdey@linux.ibm.com>
2318         PR target/87474
2319         * config/rs6000/rs6000-string.c (expand_strn_compare): Check that both
2320         P8_VECTOR and VSX are enabled.
2322 2018-10-02  Andreas Krebbel  <krebbel@linux.ibm.com>
2324         * config/s390/driver-native.c (s390_host_detect_local_cpu): Add
2325         0x3907 as CPU model number.
2327 2018-10-02  Andreas Krebbel  <krebbel@linux.ibm.com>
2329         * common/config/s390/s390-common.c: Rename PF_ARCH12 to PF_Z14.
2330         * config/s390/s390.h (enum processor_flags): Rename PF_ARCH12 to
2331         PF_Z14.  Rename TARGET_CPU_ARCH12 to TARGET_CPU_Z14,
2332         TARGET_CPU_ARCH12_P to TARGET_CPU_Z14_P, TARGET_ARCH12 to
2333         TARGET_Z14, and TARGET_ARCH12_P to TARGET_Z14_P.
2334         * config/s390/s390.md: Likewise. Rename also the cpu attribute
2335         value from arch12 to z14.
2337 2018-10-02  Uros Bizjak  <ubizjak@gmail.com>
2339         * config/i386/i386.md (fxam<mode>2_i387_with_temp): Remove.
2340         (isinfxf2): Ditto.
2341         (isinf<mode>2): Ditto.
2343 2018-10-02  Uros Bizjak  <ubizjak@gmail.com>
2345         * config/i386/i386.c (ix86_emit_i387_round): Extend op1 to XFmode
2346         before emitting fxam.  Perform calculations in XFmode.
2348 2018-10-02  Marc Glisse  <marc.glisse@inria.fr>
2350         * match.pd (((X /[ex] A) +- B) * A): New transformation.
2352 2018-10-02  Marc Glisse  <marc.glisse@inria.fr>
2354         PR middle-end/87319
2355         * fold-const.c (fold_plusminus_mult_expr): Handle complex and vectors.
2356         * tree.c (signed_or_unsigned_type_for): Handle complex.
2358 2018-10-02  Jeff Law  <law@redhat.com>
2360         * gimple-fold.c (get_range_strlen): Remove dead code.
2362 2018-10-02  Martin Sebor  <msebor@redhat.com>
2363             Jeff Law  <law@redhat.com>
2365         * builtins.c (unterminated_array): Add new arguments.
2366         If argument is not terminated, bubble up size and exact
2367         state to callers.
2368         (expand_builtin_strnlen): Detect, avoid expanding
2369         and diagnose unterminated arrays.
2370         (c_strlen): Fill in offset of start of unterminated strings.
2371         * builtins.h (unterminated_array): Update prototype.
2373 2018-10-02  Richard Biener  <rguenther@suse.de>
2375         * config/i386/sse.md (reduc_plus_scal_v4df): Avoid the use
2376         of haddv4df, first reduce to SSE width and exploit the fact
2377         that we only need element zero with the reduction result.
2378         (reduc_plus_scal_v2df): Likewise.
2380 2018-10-02  Eric Botcazou  <ebotcazou@adacore.com>
2382         * dojump.h (do_jump): Delete.
2383         (do_jump_1): Likewise.
2384         (split_comparison): Move around.
2385         * dojump.c (do_jump): Make static.
2386         (do_jump_1): Likewise.
2387         (jumpifnot): Move around.
2388         (jumpifnot_1): Likewise.
2389         (jumpif): Likewise.
2390         (jumpif_1): Likewise.
2391         * expr.c (expand_expr_real_1): Call jumpif[not] instead of do_jump.
2393 2018-10-02  Eric Botcazou  <ebotcazou@adacore.com>
2395         * reorg.c (make_return_insns): Use emit_copy_of_insn_after for the
2396         insns in the delay slot and add_insn_after for the jump insn.
2398 2018-10-02  Richard Biener  <rguenther@suse.de>
2400         * tree-inline.c (expand_call_inline): Use the location of
2401         the callee declaration for the inline-entry marker.
2402         * final.c (notice_source_line): Remove special-casing of
2403         NOTE_INSN_INLINE_ENTRY.
2405 2018-10-01  Carl Love  <cel@us.ibm.com>
2407         PR 69431
2408         * config/rs6000/rs6000-builtin.def (__builtin_mffsl): New.
2409         (__builtin_mtfsb0): New.
2410         (__builtin_mtfsb1): New.
2411         ( __builtin_set_fpscr_rn): New.
2412         (__builtin_set_fpscr_drn): New.
2413         * config/rs6000/rs6000.c (rs6000_expand_mtfsb_builtin): Add.
2414         (rs6000_expand_set_fpscr_rn_builtin): Add.
2415         (rs6000_expand_set_fpscr_drn_builtin): Add.
2416         (rs6000_expand_builtin): Add case statement entries for
2417         RS6000_BUILTIN_MTFSB0, RS6000_BUILTIN_MTFSB1,
2418         RS6000_BUILTIN_SET_FPSCR_RN, RS6000_BUILTIN_SET_FPSCR_DRN,
2419         RS6000_BUILTIN_MFFSL.
2420         (rs6000_init_builtins): Add ftype initialization and def_builtin
2421         calls for __builtin_mffsl, __builtin_mtfsb0, __builtin_mtfsb1,
2422         __builtin_set_fpscr_rn, __builtin_set_fpscr_drn.
2423         * config/rs6000.md (rs6000_mtfsb0, rs6000_mtfsb1, rs6000_mffscrn,
2424         rs6000_mffscdrn): Add define_insn.
2425         (rs6000_set_fpscr_rn, rs6000_set_fpscr_drn): Add define_expand.
2426         * doc/extend.texi: Add documentation for the builtins.
2428 2018-10-01  Richard Biener  <rguenther@suse.de>
2430         PR tree-optimization/87465
2431         * tree-ssa-loop-ivcanon.c (tree_estimate_loop_size): Fix typo
2432         causing branch miscounts.
2434 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
2436         * common/config/aarch64/aarch64-common.c (TARGET_OPTION_DEFAULT_PARAM,
2437         aarch64_option_default_param):  New.
2438         (params.h): Include.
2439         (TARGET_OPTION_VALIDATE_PARAM, aarch64_option_validate_param): New.
2440         * config/aarch64/aarch64.c (aarch64_override_options_internal): Simplify
2441         stack-clash protection validation code.
2443 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
2445         * params.c (validate_param): New.
2446         (add_params): Use it.
2447         (set_param_value): Refactor param validation into validate_param.
2448         (diagnostic.h): Include.
2449         * diagnostic.h (diagnostic_ready_p): New.
2451 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
2453         * params.c (set_param_value):
2454         Add index of parameter being validated.
2455         * common/common-target.def (option_validate_param): New.
2456         * common/common-targhooks.h (default_option_validate_param): New.
2457         * common/common-targhooks.c (default_option_validate_param): New.
2458         * doc/tm.texi.in (TARGET_OPTION_VALIDATE_PARAM): New.
2459         * doc/tm.texi: Regenerate.
2461 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
2463         PR target/86486
2464         * config/aarch64/aarch64.c (aarch64_override_options_internal):
2465         Add validation for stack-clash parameters and set defaults.
2467 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
2469         PR target/86486
2470         * configure.ac: Add stack-clash-protection-guard-size.
2471         * doc/install.texi: Document it.
2472         * config.in (DEFAULT_STK_CLASH_GUARD_SIZE): New.
2473         * params.def: Update comment for guard-size.
2474         (PARAM_STACK_CLASH_PROTECTION_GUARD_SIZE,
2475         PARAM_STACK_CLASH_PROTECTION_PROBE_INTERVAL): Update description.
2476         * configure: Regenerate.
2478 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
2480         PR target/86486
2481         * config/aarch64/aarch64.h (STACK_CLASH_MIN_BYTES_OUTGOING_ARGS,
2482         STACK_DYNAMIC_OFFSET): New.
2483         * config/aarch64/aarch64.c (aarch64_layout_frame):
2484         Update outgoing args size.
2485         (aarch64_stack_clash_protection_alloca_probe_range,
2486         TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE): New.
2488 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
2490         PR target/86486
2491         * explow.c (anti_adjust_stack_and_probe_stack_clash): Support custom
2492         probe ranges.
2493         * target.def (stack_clash_protection_alloca_probe_range): New.
2494         (stack_clash_protection_final_dynamic_probe): Remove.
2495         * targhooks.h (default_stack_clash_protection_alloca_probe_range) New.
2496         (default_stack_clash_protection_final_dynamic_probe): Remove.
2497         * targhooks.c: Likewise.
2498         * doc/tm.texi.in (TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE): New.
2499         (TARGET_STACK_CLASH_PROTECTION_FINAL_DYNAMIC_PROBE): Remove.
2500         * doc/tm.texi: Regenerate.
2502 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
2504         PR target/86486
2505         * config/aarch64/aarch64-protos.h (aarch64_output_probe_sve_stack_clash): New.
2506         * config/aarch64/aarch64.c (aarch64_output_probe_sve_stack_clash,
2507         aarch64_clamp_to_uimm12_shift): New.
2508         (aarch64_allocate_and_probe_stack_space): Add SVE specific section.
2509         * config/aarch64/aarch64.md (probe_sve_stack_clash): New.
2511 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
2513         PR target/86486
2514         * config/aarch64/aarch64.c (aarch64_layout_frame): Add assert.
2516 2018-10-01  Jeff Law  <law@redhat.com>
2517             Richard Sandiford <richard.sandiford@linaro.org>
2518             Tamar Christina  <tamar.christina@arm.com>
2520         PR target/86486
2521         * config/aarch64/aarch64.md
2522         (probe_stack_range): Add k (SP) constraint.
2523         * config/aarch64/aarch64.h (STACK_CLASH_CALLER_GUARD,
2524         STACK_CLASH_MAX_UNROLL_PAGES): New.
2525         * config/aarch64/aarch64.c (aarch64_output_probe_stack_range): Emit
2526         stack probes for stack clash.
2527         (aarch64_allocate_and_probe_stack_space): New.
2528         (aarch64_expand_prologue): Use it.
2529         (aarch64_expand_epilogue): Likewise and update IP regs re-use criteria.
2530         (aarch64_sub_sp): Add emit_move_imm optional param.
2532 2018-10-01  MCC CS <deswurstes@users.noreply.github.com>
2534         PR tree-optimization/87261
2535         * match.pd: Remove trailing whitespace.
2536         Add (x & y) | ~(x | y) -> ~(x ^ y),
2537         (~x | y) ^ (x ^ y) -> x | ~y and (x ^ y) | ~(x | y) -> ~(x & y)
2539 2018-10-01  Claudiu Zissulescu  <claziss@synopsys.com>
2541         * config/arc/arc.md (*add_n): Clean up pattern, update instruction
2542         constraints.
2543         (ashlsi3_insn): Update instruction constraints.
2544         (ashrsi3_insn): Likewise.
2545         (rotrsi3): Likewise.
2546         (add_shift): Likewise.
2547         * config/arc/constraints.md (Csz): New 32 bit constraint. It
2548         avoids placing in the limm field small constants which, otherwise,
2549         could end into a small instruction.
2551 2018-10-01  Claudiu Zissulescu  <claziss@synopsys.com>
2553         * config/arc/arc.md (maddsidi4_split): Don't use dmac if the
2554         destination register is not odd-even.
2555         (umaddsidi4_split): Likewise.
2557 2018-10-01  Richard Biener  <rguenther@suse.de>
2559         * tree-inline.c (expand_call_inline): Store origin of fn
2560         in BLOCK_ABSTRACT_ORIGIN for the inline BLOCK.
2561         * tree.c (block_ultimate_origin): Simplify and do some
2562         checking.
2564 2018-09-30  Uros Bizjak  <ubizjak@gmail.com>
2566         * config/i386/mmx.md (EMMS): New int iterator.
2567         (emms): New int attribute.
2568         (mmx_<emms>): Macroize insn from *mmx_emms and *mmx_femms using
2569         EMMS int iterator.  Explicitly declare clobbers.
2570         (mmx_emms): Remove expander.
2571         (mmx_femms): Ditto.
2572         * config/i386/predicates.md (emms_operation): Remove predicate.
2573         (vzeroall_pattern): New predicate.
2574         (vzeroupper_pattern): Rename from vzeroupper_operation.
2575         * config/i386/i386.c (ix86_avx_u128_mode_after): Use
2576         vzeroupper_pattern and vzeroall_pattern predicates.
2578 2018-09-30  Peter Bergner  <bergner@linux.ibm.com>
2580         PR rtl-optimization/86939
2581         * ira-lives.c (make_hard_regno_born): Rename from this...
2582         (make_hard_regno_live): ... to this.  Remove update to conflict
2583         information.  Update function comment.
2584         (make_hard_regno_dead): Add conflict information update.  Update
2585         function comment.
2586         (make_object_born): Rename from this...
2587         (make_object_live): ... to this.  Remove update to conflict information.
2588         Update function comment.
2589         (make_object_dead):  Add conflict information update.  Update function
2590         comment.
2591         (mark_pseudo_regno_live): Call make_object_live.
2592         (mark_pseudo_regno_subword_live): Likewise.
2593         (mark_hard_reg_dead): Update function comment.
2594         (mark_hard_reg_live): Call make_hard_regno_live.
2595         (process_bb_node_lives): Likewise.
2596         * lra-lives.c (make_hard_regno_born): Rename from this...
2597         (make_hard_regno_live): ... to this.  Remove update to conflict
2598         information.  Remove now uneeded check_pic_pseudo_p argument.
2599         Update function comment.
2600         (make_hard_regno_dead): Add check_pic_pseudo_p argument and add update
2601         to conflict information.  Update function comment.
2602         (mark_pseudo_live): Remove update to conflict information.  Update
2603         function comment.
2604         (mark_pseudo_dead): Add conflict information update.
2605         (mark_regno_live): Call make_hard_regno_live.
2606         (mark_regno_dead): Call make_hard_regno_dead with new arguement.
2607         (process_bb_lives): Call make_hard_regno_live and make_hard_regno_dead.
2609 2018-09-29  H.J. Lu  <hongjiu.lu@intel.com>
2611         PR target/87370
2612         * config/i386/i386.c (construct_container): Use TImode for
2613         BLKmode values in 2 integer registers.
2615 2018-09-29  Jeff Law  <law@redhat.com>
2617         * builtins.c (unterminated_array): Pass in c_strlen_data * to
2618         c_strlen rather than just a tree *.
2619         (c_strlen): Change NONSTR argument to a c_strlen_data pointer.
2620         Update recursive calls appropriately.  If caller did not provide a
2621         suitable data pointer, create a local one.  When a non-terminated
2622         string is discovered, bubble up information about the string via the
2623         c_strlen_data object.
2624         * builtins.h (c_strlen): Update prototype.
2625         (c_strlen_data): New structure.
2626         * gimple-fold.c (get_range_strlen): Update calls to c_strlen.
2627         For a type 2 call, if c_strlen indicates a non-terminated string
2628         use the length of the non-terminated string.
2629         (gimple_fold_builtin_stpcpy): Update calls to c_strlen.
2631 2018-09-29  Jakub Jelinek  <jakub@redhat.com>
2633         PR target/87467
2634         * config/i386/avx512fintrin.h (_mm512_abs_pd, _mm512_mask_abs_pd): Use
2635         __m512d type for __A argument rather than __m512.
2637 2018-09-28  John David Anglin  <danglin@gcc.gnu.org>
2639         * match.pd (simple_comparison): Don't optimize if either operand is
2640         a function pointer when target needs function pointer canonicalization.
2642 2018-09-28  Segher Boessenkool  <segher@kernel.crashing.org>
2644         * config/rs6000/driver-rs6000.c (asm_names): Adjust the entries for
2645         power5 .. power9 to remove indirection.
2646         * config/rs6000/rs6000.h (ASM_CPU_POWER5_SPEC, ASM_CPU_POWER6_SPEC,
2647         ASM_CPU_POWER7_SPEC, ASM_CPU_POWER8_SPEC, ASM_CPU_POWER9_SPEC,
2648         ASM_CPU_476_SPEC): Delete.
2649         (ASM_CPU_SPEC): Adjust.
2650         (EXTRA_SPECS): Delete asm_cpu_power5, asm_cpu_power6, asm_cpu_power7,
2651         asm_cpu_power8, asm_cpu_power9, asm_cpu_476.
2653 2018-09-28  Segher Boessenkool  <segher@kernel.crashing.org>
2655         * config.in: Delete HAVE_AS_DCI.
2656         * config/powerpcspe/powerpcspe.h: Treat HAVE_AS_DCI as always true.
2657         * config/rs6000/rs6000.h: Ditto.
2658         * configure.ac: Delete HAVE_AS_DCI.
2659         * configure: Regenerate.
2661 2018-09-28  Segher Boessenkool  <segher@kernel.crashing.org>
2663         * config.in (HAVE_AS_LWSYNC): Delete.
2664         * config/powerpcspe/powerpcspe.h (TARGET_LWSYNC_INSTRUCTION): Delete.
2665         * config/powerpcspe/sync.md (*lwsync): Always generate lwsync, never
2666         do it as a .long .
2667         * config/rs6000/rs6000.h (TARGET_LWSYNC_INSTRUCTION): Delete.
2668         * config/rs6000/sync.md (*lwsync): Always generate lwsync, never do it
2669         as a .long .
2670         * configure.ac: Delete HAVE_AS_LWSYNC.
2671         * configure: Regenerate.
2673 2018-09-28  Eric Botcazou  <ebotcazou@adacore.com>
2674             Pierre-Marie de Rodat  <derodat@adacore.com>
2676         * calls.c (expand_call): Try to do a tail call for thunks at -O0 too.
2677         * cgraph.h (struct cgraph_thunk_info): Add indirect_offset.
2678         (cgraph_node::create_thunk): Add indirect_offset parameter.
2679         (thunk_adjust): Likewise.
2680         * cgraph.c (cgraph_node::create_thunk): Add indirect_offset parameter
2681         and initialize the corresponding field with it.
2682         (cgraph_node::dump): Dump indirect_offset field.
2683         * cgraphclones.c (duplicate_thunk_for_node): Deal with indirect_offset.
2684         * cgraphunit.c (cgraph_node::analyze): Be prepared for external thunks.
2685         (thunk_adjust): Add indirect_offset parameter and deal with it.
2686         (cgraph_node::expand_thunk): Deal with the indirect_offset field and
2687         pass it to thunk_adjust.  Do not call the target hook if it's non-zero
2688         or if the thunk is external or local.  Fix formatting.  Do not chain
2689         the RESULT_DECL to BLOCK_VARS.  Pass the static chain to the target,
2690         if any, in the GIMPLE representation.
2691         * ipa-icf.c (sem_function::equals_wpa): Deal with indirect_offset.
2692         * lto-cgraph.c (lto_output_node): Write indirect_offset field.
2693         (input_node): Read indirect_offset field.
2694         * tree-inline.c (expand_call_inline): Pass indirect_offset field in the
2695         call to thunk_adjust.
2696         * tree-nested.c (struct nesting_info): Add thunk_p field.
2697         (create_nesting_tree): Set it.
2698         (convert_all_function_calls): Copy static chain from targets to thunks.
2699         (finalize_nesting_tree_1): Return early for thunks.
2700         (unnest_nesting_tree_1): Do not finalize thunks.
2701         (gimplify_all_functions): Do not gimplify thunks.
2703 2018-09-28  David Malcolm  <dmalcolm@redhat.com>
2705         * opt-suggestions.c (option_proposer::build_option_suggestions):
2706         Release "option_values".
2708 2018-09-28  David Malcolm  <dmalcolm@redhat.com>
2710         * coverage.c (get_coverage_counts): Convert problem-reporting dump
2711         messages from MSG_OPTIMIZED_LOCATIONS to MSG_MISSED_OPTIMIZATION.
2712         * dumpfile.c (kind_as_string): New function.
2713         (dump_loc): Rather than a hardcoded prefix of "note: ", use
2714         kind_as_string to vary the prefix based on dump_kind.
2715         (selftest::test_capture_of_dump_calls): Update for above.
2717 2018-09-28  Uros Bizjak  <ubizjak@gmail.com>
2719         * config/i386/i386.h (SSE_REGNO): Fix check for FIRST_REX_SSE_REG.
2720         (GET_SSE_REGNO): Rename from SSE_REGNO.  Update all uses for rename.
2722 2018-09-28  Uros Bizjak  <ubizjak@gmail.com>
2724         * config/i386/i386.h (CC_REGNO): Remove FPSR_REG.
2725         * config/i386/i386.c (ix86_fixed_condition_code_regs): Use
2726         INVALID_REGNUM instead of FPSR_REG.
2727         (ix86_md_asm_adjust): Do not clobber FPSR_REG.
2728         * config/i386/i386.md: Update comment of FP compares.
2729         (fldenv): Do not clobber FPSR_REG.
2731 2018-09-28  Richard Biener  <rguenther@suse.de>
2733         * tree.h (BLOCK_ORIGIN): New.
2734         * omp-expand.c (grid_expand_target_grid_body): Assign
2735         BLOCK_ORIGIN to BLOCK_ABSTRACT_ORIGIN.
2736         * tree-inline.c (remap_block): Likewise.
2737         * auto-profile.c (get_function_decl_from_block): Simplify
2738         by eliding the BLOCK_ABSTRACT_ORIGIN chasing.
2739         * langhooks.c (lhd_print_error_function): Likewise.
2740         * optinfo-emit-json.cc (optrecord_json_writer::inlining_chain_to):
2741         Likewise.
2742         * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
2743         * tree.c (block_nonartificial_location): Likewise.
2744         (block_ultimate_origin): Likewise.
2745         * tree-pretty-print.c (percent_K_format): Likewise.  Remove
2746         no longer needed LTO case.
2748 2018-09-28  Andrew Stubbs  <ams@codesourcery.com>
2749             Jan Hubicka  <jh@suse.cz>
2750             Martin Jambor  <mjambor@suse.cz>
2752         * simplify-rtx.c (simplify_merge_mask): New function.
2753         (simplify_ternary_operation): Use it, also see if VEC_MERGEs with the
2754         same masks are used in op1 or op2.
2755         (test_vec_merge): New function.
2756         (test_vector_ops): Call test_vec_merge.
2758 2018-09-28  Eric Botcazou  <ebotcazou@adacore.com>
2760         * config/sparc/sparc-protos.h (sparc_branch_cost): Declare.
2761         * config/sparc/sparc.h (BRANCH_COST): Call sparc_branch_cost.
2762         * config/sparc/sparc.c (struct processor_costs): Add branch_cost field.
2763         (cypress_costs): Set it.
2764         (supersparc_costs): Likewise.
2765         (hypersparc_costs): Likewise.
2766         (leon_cost): Likewise.
2767         (leon3_costs): Likewise.
2768         (sparclet_costs): Likewise.
2769         (ultrasparc_costs): Likewise.
2770         (ultrasparc_costs): Likewise.
2771         (niagara_costs): Likewise.
2772         (niagara2_costs): Likewise.
2773         (niagara3_costs): Likewise.
2774         (niagara4_costs): Likewise.
2775         (niagara7_costs): Likewise.
2776         (m8_costs): Likewise.
2777         (TARGET_CAN_FOLLOW_JUMP): Define.
2778         (pass_work_around_errata::gate): Minor tweak.
2779         (sparc_option_override): Remove MASK_FSMULD mask for V7 processors.
2780         Do not set both MASK_VIS4 and MASK_VIS4B for M8 processor.
2781         Automaitcally clear MASK_FSMULD mask for V7 processors.
2782         (sparc_can_follow_jump): New static function.
2783         (output_ubranch): Deal with CROSSING_JUMP_P.
2784         (sparc_use_sched_lookahead): Rewrite using switch statement.
2785         (sparc_issue_rate): Reorder.
2786         (sparc_branch_cost): New function.
2788 2018-09-27  Martin Sebor  <msebor@redhat.com>
2790         * tree.h (tree_to_shwi): Add attribute nonnull and pure.
2791         (tree_to_poly_int64, tree_to_uhwi, tree_to_poly_uint64): Same.
2792         (int_fits_type_p): Same.
2794 2018-09-27  Uros Bizjak  <ubizjak@gmail.com>
2796         * config/i386/i386.md (FPCR_REG): Remove.
2797         (UNSPEC_FLDCW): Remove.
2798         (x86_fnstcw_1): Use (const_int 0) instead of FPCR_REG.
2799         (x86_fldcw_1): Remove insn pattern.
2800         (fnstenv): Do not clobber FPCR_REG.
2801         (fldenv): Ditto.
2802         * config/i386/i386.h (FIXED_REGISTERS) Remove fpsr register.
2803         (CALL_USED_REGISTERS): Ditto.
2804         (REG_ALLOC_ORDER): Ditto.
2805         (REG_CLASS_CONTENTS): Ditto.
2806         (HI_REGISTER_NAMES): Ditto.
2807         (ADDITIONAL_REGISTER_NAMES): Use defines instead
2808         of numerical constants.
2809         * config/i386/i386.c (regclass_map): Remove fpsr register.
2810         (dbx_register_map): Ditto.
2811         (dbx64_register_map): Ditto.
2812         (svr4_dbx_register_map): Ditto.
2813         (print_reg): Do not handle FPCR_REG.
2815 2018-09-27  Segher Boessenkool  <segher@kernel.crashing.org>
2817         PR target/87149
2818         * config.in (HAVE_AS_CMPB, HAVE_AS_DFP, HAVE_AS_FPRND, HAVE_AS_MFPGPR,
2819         HAVE_AS_POPCNTB, HAVE_AS_POPCNTD, HAVE_AS_POWER8, HAVE_AS_POWER9):
2820         Delete, always treat as true.
2821         * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
2822         Ditto.  Simplify remaining code.
2823         * config/powerpcspe/powerpcspe.h: Ditto.
2824         * config/rs6000/rs6000.c (rs6000_option_override_internal): Ditto.
2825         Simplify remaining code.
2826         (rs6000_expand_builtin): Ditto.
2827         * config/rs6000/rs6000.h: Ditto.
2828         * configure.ac: Ditto.
2829         * configure: Regenerate.
2831 2018-09-27  Martin Liska  <mliska@suse.cz>
2833         * coverage.c (get_coverage_counts): Revert the formatting
2834         of missing profile opt info.
2836 2018-09-27  Richard Biener  <rguenther@suse.de>
2838         PR debug/37801
2839         PR debug/87440
2840         * dwarf2out.c (set_block_origin_self): Do not mark outermost
2841         block as we do not output that.
2842         (gen_inlined_subroutine_die): Elide the originally outermost
2843         block, matching what we do for concrete instances.
2844         (decls_for_scope): Add parameter specifying whether to recurse
2845         to subblocks.
2847 2018-09-27  Andrew Stubbs  <ams@codesourcery.com>
2848             Tom de Vries  <tom@codesourcery.com>
2850         PR 82089
2852         * expmed.c (emit_cstore): Fix handling of result_mode == BImode and
2853         STORE_FLAG_VALUE == 1.
2855 2018-09-27  Andreas Krebbel  <krebbel@linux.ibm.com>
2857         * config/s390/s390.md (PPA_TX_ABORT, PPA_OOO_BARRIER): New
2858         constant definitions.
2859         ("tx_assist"): Replace magic number with PPA_TX_ABORT.
2860         ("*ppa"): Enable pattern also for -march=zEC12 -mno-htm.
2861         ("speculation_barrier"): New expander definition.
2863 2018-09-26  Indu Bhagat  <indu.bhagat@oracle.com>
2865         PR gcov-profile/86957
2866         * common.opt: New warning option -Wmissing-profile.
2867         * coverage.c (get_coverage_counts): Add warning for missing .gcda file.
2868         * doc/invoke.texi: Document -Wmissing-profile.
2870 2018-09-26  Jim Wilson  <jimw@sifive.com>
2872         * config/riscv/riscv.md (subsi3_extended2): Add J constraint.
2873         (negdi2, negsi2, negsi2_extended, negsi2_extended2): New.
2875 2018-09-26  Martin Sebor  <msebor@redhat.com>
2877         * tree.c (zerop): Change return type to bool.
2878         (integer_zerop, integer_onep, integer_each_onep): Same.
2879         (integer_all_onesp, integer_minus_onep, integer_pow2p): Same.
2880         (integer_nonzerop, integer_truep, tree_ctz, real_zerop): Same.
2881         (real_onep, real_minus_onep, chain_index): Same.
2882         (print_type_hash_statistics, type_list_equal): Same.
2883         * tree.h (zerop): Same.
2884         (zerop, integer_zerop, integer_onep, integer_each_onep): Same.
2885         (integer_all_onesp, integer_minus_onep, integer_pow2p): Same.
2886         (integer_nonzerop, integer_truep, tree_ctz, real_zerop): Same.
2887         (real_onep, real_minus_onep, chain_index): Same.
2888         (print_type_hash_statistics, type_list_equal): Same.
2890 2018-09-26  Jim Wilson  <jimw@sifive.com>
2892         * config/riscv/riscv.h (FUNCTION_ARG_REGNO_P): Fix comment.
2894 2018-09-26  Jakub Jelinek  <jakub@redhat.com>
2896         PR target/87414
2897         * config/i386/i386.c: Include debug.h and dwarf2out.h.
2898         (output_indirect_thunk): Emit DW_CFA_def_cfa_offset after the
2899         call.
2901 2018-09-25  Andrew Stubbs  <ams@codesourcery.com>
2903         * builtins.c (get_builtin_sync_mem): Force address mode conversion.
2905 2018-09-26  Uros Bizjak  <ubizjak@gmail.com>
2907         * config/i386/i386.h (enum reg_class): Remove FP_TOP_SSE_REGS
2908         and FP_SECOND_SSE_REGS.
2909         (REG_CLASS_NAMES): Ditto.
2910         (REG_CLASS_CONTENTS): Ditto.
2911         * config/i386/i386.c (ix86_preferred_reload_class) Do not handle
2912         FP_TOP_SSE_REGS and FP_SECOND_SSE_REGS classes.
2913         (ix86_preferred_output_reload_class): Ditto.
2914         * config/i386/i386.md (fix_trunc<mode>_i387_fisttp): Change "=&1f"
2915         clobber constraint to "=&f".
2916         (fix_truncdi_i387): Ditto.
2917         (lrintxfdi2): Ditto.
2918         (fistdi2_<rounding>): Ditto.
2919         (fpremxf4_i387): Change "=u" constraint to "=f".
2920         (fprem1xf4_i387): Ditto.
2921         (sincosxf3): Ditto.
2922         (fptanxf4_i387): Ditto.
2923         (fxtractxf3_i387): Ditto.
2924         (fscalexf4_i387): Ditto.
2925         (atan2xf3): Change "u" constraint to "f".
2926         (fyl2xxf3_i387): Ditto.
2927         (fyl2xp1xf3_i387): Ditto.
2929 2018-09-26  Uros Bizjak  <ubizjak@gmail.com>
2931         PR target/87439
2932         * config/i386/i386.h (NUM_MODES_FOR_MODE_SWITCHING): Update
2933         for removed I387_MASK_PM entity.
2936 2018-09-26  Jeff Law  <law@redhat.com>
2937         Revert
2938         2018-09-26  Alexey Neyman  <stilor@att.net>
2940         * graphite.h: Include <isl/id.h> and <isl/space.h>; these
2941         headers are no longer pulled in by <isl/val.h>.
2943 2018-09-26  Richard Biener  <rguenther@suse.de>
2945         PR debug/87443
2946         * dwarf2out.c (gen_lexical_block_die): Do not equate inline
2947         or concrete instance DIE to the tree.  Create abstract origin
2948         attributes also for concrete instances.
2950 2018-09-26  Alexey Neyman  <stilor@att.net>
2952         * graphite.h: Include <isl/id.h> and <isl/space.h>; these
2953         headers are no longer pulled in by <isl/val.h>.
2955 2018-09-26  Matthew Malcomson  <matthew.malcomson@arm.com>
2957         * config/arm/arm.c (arm_split_compare_and_swap, arm_split_atomic_op):
2958         Use new helper functions.
2959         * config/arm/sync.md (atomic_load<mode>, atomic_store<mode>):
2960         Use new helper functions.
2961         * config/arm/aarch-common-protos.h (aarch_mm_needs_acquire,
2962         aarch_mm_needs_release): New declarations.
2963         * config/arm/aarch-common.c (aarch_mm_needs_acquire,
2964         aarch_mm_needs_release): New.
2966 2018-09-26  Eric Botcazou  <ebotcazou@adacore.com>
2968         * config/arm/arm.c (arm_reorg): Skip Thumb reorg pass for thunks.
2969         (arm32_output_mi_thunk): Deal with long calls.
2971 2018-09-26  Richard Biener  <rguenther@suse.de>
2973         PR debug/87428
2974         PR debug/87362
2975         * tree-inline.c (expand_call_inline): When the location
2976         of the call is UNKNOWN_LOCATION use DECL_SOURCE_LOCATION
2977         or BUILTINS_LOCATION for the BLOCK_SOURCE_LOCATION of
2978         the inserted BLOCK to make inlined_function_outer_scope_p
2979         recognize it.
2980         * dwarf2out.c (add_call_src_coords_attributes): Do not add
2981         coords for reserved locations.
2983 2018-09-25  Segher Boessenkool  <segher@kernel.crashing.org>
2985         * config/rs6000/rs6000.md (*movcc_internal1): Use set_attr_alternative.
2986         (*call_indirect_nonlocal_sysv<mode>): Ditto.
2987         (*call_value_indirect_nonlocal_sysv<mode>): Ditto.
2988         (*sibcall_nonlocal_sysv<mode>): Ditto.
2989         (*sibcall_value_nonlocal_sysv<mode>): Ditto.
2990         (<bd>_<mode>): Ditto.
2991         (<bd>tf_<mode>): Ditto.
2993 2018-09-25  Segher Boessenkool  <segher@kernel.crashing.org>
2995         * config/rs6000/altivec.md (*altivec_mov<mode>): Write the output
2996         control string as a list of templates instead of as C code.
2997         (*altivec_movti): Ditto.
2998         * config/rs6000/darwin.md (movdf_low_di): Ditto.
3000 2018-09-25  Jim Wilson  <jimw@sifive.com>
3002         * config/riscv/riscv.c (riscv_split_symbol): Mark auipc label as weak
3003         when target symbol is weak.
3005 2018-09-25  Bernd Edlinger  <bernd.edlinger@hotmail.de>
3007         PR c/87387
3008         * builtins.c (unterminated_array): Simplify.
3009         * expr.c (string_constant): Handle SSA_NAME.  Add more exceptions
3010         where pointer arithmetic is safe.
3012 2018-09-25  Segher Boessenkool  <segher@kernel.crashing.org>
3014         PR target/86987
3015         * config/rs6000/altivec.md (altivec_vspltb): Use
3016         const_0_to_15_operand instead of u5bit_cint_operand.
3017         (*altivec_vspltb_internal): Ditto.
3018         (altivec_vspltb_direct): Ditto.
3019         (altivec_vsplth): Use const_0_to_7_operand instead of
3020         u5bit_cint_operand.
3021         (*altivec_vsplth_internal): Ditto.
3022         (altivec_vsplth_direct): Ditto.
3023         (altivec_vspltw): Use const_0_to_3_operand instead of
3024         u5bit_cint_operand.
3025         (*altivec_vspltw_internal): Ditto.
3026         (altivec_vspltw_direct): Ditto.
3027         (altivec_vspltsf): Ditto.
3028         (*altivec_vspltsf_internal): Ditto.
3029         * config/rs6000/rs6000.c (rs6000_expand_binop_builtin): Handle the
3030         various splats with the proper size immediate.  Reorder the various
3031         cases by ascending size of immediate, and put all such together.
3033 2018-09-25  Richard Biener  <rguenther@suse.de>
3035         PR debug/83941
3036         * dwarf2out.c (add_AT_external_die_ref): Remove now redundant
3037         GC-ification.
3038         (maybe_create_die_with_external_ref): Do not create
3039         DW_TAG_imported_unit here.
3040         (add_abstract_origin_attribute): Handle external BLOCK refs.
3041         (dwarf2out_abstract_function): Simplify LTO case.
3042         (dwarf2out_early_finish): Create DW_TAG_imported_unit explicitely
3043         rather than using maybe_create_die_with_external_ref.
3045 2018-09-25  Uros Bizjak  <ubizjak@gmail.com>
3047         PR target/71278
3048         * config/i386/i386.md (frndintxf2_mask_pm): Remove.
3049         (frndintxf2_mask_pm_i387): Ditto.
3050         (nearbyintxf2): Rewrite expander pattern to match rintxf2.
3051         Enable for !flag_trapping_math.
3052         (nearbyint<mode>2): Enable x87 modes for !flag_trapping_math.
3053         Enable SSE modes for TARGET_SSE4_1 and expand them with round insn.
3054         Change operand 1 predicate to nonimmediate_operand.
3055         (attr "i387_cw"): Remove mask_pm.
3056         * config/i386/i386.h (enum ix86_stack_slot): Remove SLOT_CW_MASK_PM.
3057         (enum ix86_entity): Remove I387_MASK_PM.
3058         * config/i386/i386.c (ix86_i387_mode_needed): Do not
3059         handle I387_MASK_PM.
3060         (ix86_mode_needed): Ditto.
3061         (ix86_mode_after): Ditto.
3062         (ix86_mode_entry): Ditto.
3063         (ix86_mode_exit): Ditto.
3064         (emit_i387_cw_initialization): Do not handle I387_CW_MASK_PM.
3066 2018-09-25  Jakub Jelinek  <jakub@redhat.com>
3068         * vr-values.c (vr_values::vr_values): Initialize to_remove_edges and
3069         to_update_switch_stmts to vNULL instead of calling create on them
3070         immediately.
3072 2018-09-25  Richard Biener  <rguenther@suse.de>
3074         PR tree-optimization/87402
3075         * tree-ssa-sccvn.c (SSA_VISITED): Remove unused function.
3076         (visit_phi): Re-instantiate handling of supposed to be VARYING
3077         but non-VARYING backedge value.
3079 2018-09-25  Richard Biener  <rguenther@suse.de>
3081         PR debug/83941
3082         * dwarf2out.c (struct sym_off_pair): New.
3083         (external_die_map): New global.
3084         (lookup_decl_die): When in LTO create DIEs lazily from the
3085         external_die_map.
3086         (lookup_block_die): New function, create DIEs lazily in LTO.
3087         (equate_block_to_die): New function.
3088         (dwarf2out_die_ref_for_decl): During WPA get the association
3089         from the external DIE map.
3090         (dwarf2out_register_external_die): Record mapping into the
3091         external DIE map.
3092         (maybe_create_die_with_external_ref): New function split out from
3093         DIE generation part of old dwarf2out_register_external_die.
3094         (add_abstract_origin_attribute): Do not return the DIE.  When
3095         in LTO reference externals directly.
3096         (dwarf2out_abstract_function): When in LTO ignore calls for
3097         decls with external DIEs (already present abstract instances).
3098         (gen_call_site_die): Adjust.
3099         (add_high_low_attributes): Likewise.
3100         (gen_lexical_block_die): Likewise.
3101         (gen_inlined_subroutine_die): Likewie.
3102         (gen_block_die): Likewise.
3103         (dwarf2out_inline_entry): Likewise.
3104         (dwarf2out_early_finish): In LTRANS phase create DW_TAG_imported_unit
3105         DIEs.
3107 2018-09-25  Martin Liska  <mliska@suse.cz>
3109         * ipa-fnsummary.c (estimate_node_size_and_time): Scale by two
3110         integers and not by a float value.
3112 2018-09-25  Martin Liska  <mliska@suse.cz>
3114         PR fortran/87394
3115         * dbgcnt.c (dbg_cnt_process_single_pair): Return false
3116         instead of NULL.
3117         * dumpfile.c (dump_enable_all): Remove extra parenthesis.
3118         * gcov-tool.c: Declare the function with ATTRIBUTE_NORETURN.
3119         * godump.c (go_format_type): Remove extra parenthesis.
3121 2018-09-25  Martin Liska  <mliska@suse.cz>
3123         * alias.c (set_dest_equal_p): Remove unused function.
3124         * config/i386/i386.c (def_builtin_pure2): Likewise.
3125         * diagnostic-show-locus.c (class layout): Remove
3126         unused field.
3127         (layout::layout): Likewise here.
3128         * dump-context.h (class temp_dump_context): Likewise.
3129         * dwarf2out.c (add_AT_fde_ref): Remove unused function.
3130         (add_AT_loclistsptr): Likewise.
3131         (add_AT_offset): Likewise.
3132         (get_AT_hi_pc): Likewise.
3133         (is_comdat_die): Likewise.
3134         (type_is_enum): Likewise.
3135         (ceiling): Likewise.
3136         (add_AT_vms_delta): Likewise.
3137         (is_class_die): Likewise.
3138         * edit-context.c (class line_event): Remove unused field.
3139         * graphite-sese-to-poly.c (tree_int_to_gmp): Remove
3140         unused function.
3141         * ipa-cp.c (ipa_get_vr_lat): Likewise.
3142         * lra-constraints.c (ok_for_index_p_nonstrict): Likewise.
3143         (ok_for_base_p_nonstrict): Likewise.
3144         * tree-chrec.c (is_not_constant_evolution): Likewise.
3145         (chrec_fold_poly_cst): Likewise.
3146         * tree-if-conv.c (has_pred_critical_p): Likewise.
3147         * tree-ssa-coalesce.c (print_exprs): Likewise.
3148         * tree-ssa-pre.c (bitmap_set_contains_expr): Likewise.
3149         * tree-ssa-uninit.c (is_and_or_or_p): Likewise.
3150         * tree-vrp.c (value_ranges_intersect_p): Likewise.
3151         (value_range_nonnegative_p): Likewise.
3153 2018-09-25  Martin Liska  <mliska@suse.cz>
3155         * config/powerpcspe/powerpcspe.c (rs6000_output_function_epilogue):
3156         Do not handle "GNU Pascal".
3157         * config/rs6000/rs6000.c (rs6000_output_function_epilogue):
3158         Likewise.
3159         * config/sparc/sparc.c (sparc_pass_by_reference): Remove Pascal
3160         from documentation. Likewise.
3161         * dbxout.c (dbxout_range_type): Likewise.
3162         * doc/cpp.texi: Likewise.
3163         * doc/extend.texi: Likewise.
3164         * doc/frontends.texi: Likewise.
3165         * doc/invoke.texi: Remove Pascal entry.
3166         * tree.def (CLEANUP_POINT_EXPR): Likewise.
3167         * doc/rtl.texi (MODE_FUNCTION): Remove not used entry.
3169 2018-09-25  Martin Liska  <mliska@suse.cz>
3171         PR middle-end/86078
3172         * doc/invoke.texi: Document all parameters and remove default
3173         of the parameters.
3175 2018-09-25  Ilya Leoshkevich  <iii@linux.ibm.com>
3177         PR bootstrap/87417
3178         * rtl.c (rtx_code_size): Take into account that EQ_ATTR_ALT
3179         contains HOST_WIDE_INTs when computing its size.
3181 2018-09-24  Jim Wilson  <jimw@sifive.com>
3183         PR target/87391
3184         * config/riscv/riscv.h (STACK_BOUNDARY): Test riscv_abi == ABI_ILP32E
3185         not TARGET_RVE.
3186         (ABI_STACK_BOUNDARY, MAX_ARGS_IN_REGISTERS): Likewise.
3188 2018-09-24  Andrew Pinski  <apinski@marvell.com>
3190         *  config/aarch64/aarch64.c (aarch_macro_fusion_pair_p): Don't
3191         access prev before checking it for NULLness in the
3192         AARCH64_FUSE_CMP_BRANCH case.
3194 2018-09-24  H.J. Lu  <hongjiu.lu@intel.com>
3196         PR target/82699
3197         * config/i386/i386.c (rest_of_insert_endbranch): Set
3198         endbr_queued_at_entrance to true and don't insert ENDBR if
3199         x86_function_profiler will be called.
3200         (x86_function_profiler): Insert ENDBR if endbr_queued_at_entrance
3201         is true.
3202         * config/i386/i386.h (machine_function): Add
3203         endbr_queued_at_entrance.
3205 2018-09-24  Ilya Leoshkevich  <iii@linux.ibm.com>
3207         * genattrtab.c (mk_attr_alt): Use alternative_mask.
3208         (attr_rtx_1): Adjust caching to match the new EQ_ATTR_ALT field
3209         types.
3210         (check_attr_test): Use alternative_mask.
3211         (get_attr_value): Likewise.
3212         (compute_alternative_mask): Use alternative_mask and XWINT.
3213         (make_alternative_compare): Use alternative_mask.
3214         (attr_alt_subset_p): Use XWINT.
3215         (attr_alt_subset_of_compl_p): Likewise.
3216         (attr_alt_intersection): Use alternative_mask and XWINT.
3217         (attr_alt_union): Likewise.
3218         (attr_alt_complement): Use HOST_WIDE_INT and XWINT.
3219         (mk_attr_alt): Use alternative_mask and HOST_WIDE_INT.
3220         (simplify_test_exp): Use alternative_mask and XWINT.
3221         (write_test_expr): Use alternative_mask and XWINT, adjust bit
3222         number calculation to support 64 bits.  Generate code that
3223         checks 64-bit masks.
3224         (main): Use alternative_mask.
3225         * rtl.def (EQ_ATTR_ALT): Change field types from ii to ww.
3227 2018-09-24  Ilya Leoshkevich  <iii@linux.ibm.com>
3229         PR target/80080
3230         * config/s390/s390.c (s390_emit_epilogue): Do not use PARALLEL
3231         RETURN+USE when returning via %r14.
3233 2018-09-24  Martin Liska  <mliska@suse.cz>
3235         * gcov.c (output_lines): Print colorization legend
3236         for both flag_use_colors and flag_use_hotness_colors.
3237         Reword the help.
3239 2018-09-24  Martin Liska  <mliska@suse.cz>
3241         * coverage.c (get_coverage_counts): Use warning_at
3242         with current_function_decl location. Use %qD in warning
3243         message.
3245 2018-09-24  Martin Liska  <mliska@suse.cz>
3247         * memory-block.h (memory_block_pool::release): Annotate with
3248         valgrind that the memory is not accessible.
3250 2018-09-24  Martin Liska  <mliska@suse.cz>
3252         PR sanitizer/85774
3253         * asan.c: Make asan_handled_variables extern.
3254         * asan.h: Likewise.
3255         * cfgexpand.c (expand_stack_vars): Make sure
3256         a representative is unpoison if another
3257         variable in the partition is handled by
3258         use-after-scope sanitization.
3260 2018-09-24  Richard Biener  <rguenther@suse.de>
3262         PR tree-optimization/63155
3263         * tree-ssa-propagate.c (add_ssa_edge): Avoid adding PHIs to
3264         the worklist when the edge of the respective argument isn't
3265         executable.
3267 2018-09-23   Uros Bizjak  <ubizjak@gmail.com>
3269         * config/i386/i386.h (enum reg_class): Rename MASK_REGS to
3270         ALL_MASK_REGS and MASK_EVEX_REGS to MASK_REGS.
3271         (MASK_CLASS_P): Update for rename.
3272         (MAYBE_MASK_CLASS_P): Ditto.
3273         (REG_CLASS_NAMES): Update.
3274         (REG_CLASS_CONTENT): Update.
3275         * config/i386/i386.c (regclass_map): Update for MASK_REG
3276         and ALL_MASK_REGS rename.
3277         * config/i386/constraints.md (Yk): Update for rename.
3278         (k): Ditto.
3280 2018-09-23   Uros Bizjak  <ubizjak@gmail.com>
3282         * config/i386/i386.h (enum reg_class): Remove
3283         EVEX_SSE_REGS and MOD4_SSE_REGS.
3284         (REG_CLASS_NAMES): Update.
3285         (REG_CLASS_CONTENT): Update.
3286         * config/i386/i386.c (regclass_map): Declare AVX-512 SSE
3287         registers as ALL_SSE_REGS.
3288         (ix86_additional_allocno_class_p): Remove.
3289         (TARGET_ADDITIONAL_ALLOCNO_CLASS_P): Remove.
3290         (ix86_register_priority): Lower priority of EVEX SSE registers.
3291         Use IN_RANGE macro where appropriate.
3292         (ix86_hard_regno_mode_ok): Merge AVX-5124FMAPS and
3293         AVX-5124VNNIW checks.
3294         (ix86_modes_tieable_p): Tie 512-bit SSE modes.
3295         * config/i386/sse.md (avx5124fmaddps_4fmaddps)
3296         (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddps_maskz)
3297         (avx5124fmaddps_4fmaddss, avx5124fmaddps_4fmaddss_mask)
3298         (avx5124fmaddps_4fmaddss_maskz, avx5124fmaddps_4fnmaddps)
3299         (avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddps_maskz)
3300         (avx5124fmaddps_4fnmaddss, avx5124fmaddps_4fnmaddss_mask)
3301         (avx5124fmaddps_4fnmaddss_maskz, avx5124vnniw_vp4dpwssd)
3302         (avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssd_maskz)
3303         (avx5124vnniw_vp4dpwssds, avx5124vnniw_vp4dpwssds_mask)
3304         (avx5124vnniw_vp4dpwssds_maskz): Use "v" instead of "Yh" constraint.
3305         * config/i386/constraints.md (Yh): Remove.
3307 2018-09-23   Uros Bizjak  <ubizjak@gmail.com>
3309         * config/i386/i386.c (regclass_map): Declare integer REX registers
3310         as GENERAL_REGS.
3312 2018-09-23  Gerald Pfeifer  <gerald@pfeifer.com>
3314         * doc/service.texi (Service): Switch the fsf.org link to https.
3316 2018-09-22  Chung-Ju Wu  <jasonwucj@gmail.com>
3318         PR target/86798
3319         * config/nds32/nds32.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3320         Define to speculation_safe_value_not_needed.
3322 2018-09-21  Florian Weimer  <fweimer@redhat.com>
3324         PR middle-end/81035
3325         * doc/extend.texi (Common Function Attributes): Mention that
3326         noreturn suppresses tail call optimization.
3328 2018-09-21  Jeff Law  <law@redhat.com>
3330         * gimple-ssa-evrp.c (evrp_dom_walker::cleanup): Call
3331         vr_values::cleanup_edges_and_switches.
3332         * tree-vrp.c (to_remove_edges, to_update_switch_stmts): Moved into
3333         vr_values class.
3334         (identify_jump_threads): Remove EDGE_IGNORE handling.
3335         (execute_vrp): Move handling of to_remove_edges and
3336         to_update_switch_stmts into vr_values class member functions.
3337         * tree-vrp.h (switch_update, to_remove_edges): Remove declarations.
3338         (to_update_switch_stmts): Likewise.
3339         * vr-values.c: Include cfghooks.h.
3340         (vr_values::vr_values): Initialize to_remove_edges and
3341         to_update_switch_stmts.
3342         (vr_values::~vr_values): Verify to_remove_edges and
3343         to_update_switch_stmts are empty.
3344         (vr_values::simplify_switch_using_ranges): Set EDGE_IGNORE as needed.
3345         (vr_values::cleanup_edges_and_switches): New member function.
3346         * vr-values.h (vr_values): Add cleanup_edges_and_switches member
3347         function.  Add new data members.
3349 2018-09-21  David Malcolm  <dmalcolm@redhat.com>
3351         PR tree-optimization/87309
3352         * dumpfile.c (dump_context::begin_scope): Filter the dump_loc
3353         calls with pflags and alt_flags.
3354         (selftest::test_capture_of_dump_calls): Add test of interaction of
3355         MSG_OPTIMIZED_LOCATIONS with AUTO_DUMP_SCOPE.
3357 2018-09-21  Olivier Hainque  <hainque@adacore.com>
3359         * config.gcc: Factorize and comment inclusion of vxworks-dummy.h.
3361 2018-09-21  Olivier Hainque  <hainque@adacore.com>
3363         * config/vxworks.h (CLEAR_INSN_CACHE): #define to 1.
3365 2018-09-21  Olivier Hainque  <hainque@adacore.com>
3367         * config/vxworks.h (VXWORKS_LIBGCC_SPEC): Remove -lc_internal.
3368         Merge block comment with the one ahead of VXWORKS_LIBS_RTP. Then:
3369         (VXWORKS_LIBS_RTP): Minor reordering.
3371 2018-09-21  Olivier Hainque  <hainque@adacore.com>
3373         * config/vxworks.h (STARTFILE_PREFIX_SPEC): Define.
3374         (VXWORKS_LIBS_DIR_RTP): Remove definition and use.
3376 2018-09-21  Olivier Hainque  <hainque@adacore.com>
3378         * config/vxworks.h (SIZE_TYPE): Account for TARGET_VXWORKS64.
3379         (PTRDIFF_TYPE): Likewise.
3381 2018-09-21  Olivier Hainque  <hainque@adacore.com>
3383         * config.gcc: Enforce def of TARGET_VXWORKS64 to 1 from
3384         triplet, similar to support for VxWorks7.
3385         * config/vxworks-dummy.h: Provide a default definition
3386         of TARGET_VXWORKS64 to 0.
3388 2018-09-21  Olivier Hainque  <hainque@adacore.com>
3390         * config/vxworks.h (TARGET_VXWORKS7): Move default definition ...
3391         * config/vxworks-dummy.h: here.
3393 2018-09-21  Olivier Hainque  <hainque@adacore.com>
3395         * config.gcc: Prepend vxworks-dummy.h to tm_file for powerpc*
3397 2018-09-21  Shaokun Zhang  <zhangshaokun@hisilicon.com>
3398             Bo Zhou  <zbo.zhou@hisilicon.com>
3400         * config/aarch64/aarch64-cores.def (tsv110): New CPU.
3401         * config/aarch64/aarch64-tune.md: Regenerated.
3402         * doc/invoke.texi (AArch64 Options/-mtune): Add "tsv110".
3403         * config/aarch64/aarch64.c (tsv110_tunings): New tuning table.
3404         * config/aarch64/aarch64-cost-tables.h: Add "tsv110" extra costs.
3406 2018-09-21  Andrew Stubbs  <ams@codesourcery.com>
3407             Julian Brown  <julian@codesourcery.com>
3409         * builtins.c (get_builtin_sync_mem): Handle address spaces.
3411 2018-09-21  Eric Botcazou  <ebotcazou@adacore.com>
3413         * config/rs6000/rs6000.c (rs6000_function_ok_for_sibcall): Return false
3414         if the call takes a static chain.
3416 2018-09-21  Martin Liska  <mliska@suse.cz>
3418         * auto-profile.c (autofdo_source_profile::read): Do not
3419         set sum_all.
3420         (read_profile): Do not add working sets.
3421         (read_autofdo_file): Remove sum_all.
3422         (afdo_callsite_hot_enough_for_early_inline): Remove const
3423         qualifier.
3424         * coverage.c (struct counts_entry): Remove gcov_summary.
3425         (read_counts_file): Read new GCOV_TAG_OBJECT_SUMMARY,
3426         do not support GCOV_TAG_PROGRAM_SUMMARY.
3427         (get_coverage_counts): Remove summary and expected
3428         arguments.
3429         * coverage.h (get_coverage_counts): Likewise.
3430         * doc/gcov-dump.texi: Remove -w option.
3431         * gcov-dump.c (dump_working_sets): Remove.
3432         (main): Do not support '-w' option.
3433         (print_usage): Likewise.
3434         (tag_summary): Likewise.
3435         * gcov-io.c (gcov_write_summary): Do not dump
3436         histogram.
3437         (gcov_read_summary): Likewise.
3438         (gcov_histo_index): Remove.
3439         (gcov_histogram_merge): Likewise.
3440         (compute_working_sets): Likewise.
3441         * gcov-io.h (GCOV_TAG_OBJECT_SUMMARY): Mark
3442         it not obsolete.
3443         (GCOV_TAG_PROGRAM_SUMMARY): Mark it obsolete.
3444         (GCOV_TAG_SUMMARY_LENGTH): Adjust.
3445         (GCOV_HISTOGRAM_SIZE): Remove.
3446         (GCOV_HISTOGRAM_BITVECTOR_SIZE): Likewise.
3447         (struct gcov_summary): Simplify rapidly just
3448         to runs and sum_max fields.
3449         (gcov_histo_index): Remove.
3450         (NUM_GCOV_WORKING_SETS): Likewise.
3451         (compute_working_sets): Likewise.
3452         * gcov-tool.c (print_overlap_usage_message): Remove
3453         trailing empty line.
3454         * gcov.c (read_count_file): Read GCOV_TAG_OBJECT_SUMMARY.
3455         (output_lines): Remove program related line.
3456         * ipa-profile.c (ipa_profile): Do not consider GCOV histogram.
3457         * lto-cgraph.c (output_profile_summary): Do not stream GCOV
3458         histogram.
3459         (input_profile_summary): Do not read it.
3460         (merge_profile_summaries): And do not merge it.
3461         (input_symtab): Do not call removed function.
3462         * modulo-sched.c (sms_schedule): Do not print sum_max.
3463         * params.def (HOT_BB_COUNT_FRACTION): Reincarnate param that was
3464         removed when histogram method was invented.
3465         (HOT_BB_COUNT_WS_PERMILLE): Mention that it's used only in LTO
3466         mode.
3467         * postreload-gcse.c (eliminate_partially_redundant_load): Fix
3468         GCOV coding style.
3469         * predict.c (get_hot_bb_threshold): Use HOT_BB_COUNT_FRACTION
3470         and dump selected value.
3471         * profile.c (add_working_set): Remove.
3472         (get_working_sets): Likewise.
3473         (find_working_set): Likewise.
3474         (get_exec_counts): Do not work with working sets.
3475         (read_profile_edge_counts): Do not inform as sum_max is removed.
3476         (compute_branch_probabilities): Likewise.
3477         (compute_value_histograms): Remove argument for call of
3478         get_coverage_counts.
3479         * profile.h: Do not make gcov_summary const.
3481 2018-09-21  Monk Chiang  <sh.chiang04@gmail.com>
3483         * config.gcc (nds32*-*-*): Set TARGET_DEFAULT_TLSDESC_TRAMPOLINE=0.
3485 2018-09-21  Eric Botcazou  <ebotcazou@adacore.com>
3487         PR tree-optimization/86990
3488         * gimple-ssa-store-merging.c (imm_store_chain_info:coalesce_immediate):
3489         Check that the entire merged store group is made of constants only for
3490         overlapping stores.
3492 2018-09-20  Allan Sandfeld Jensen  <allan.jensen@qt.io>
3494         * gcc.c (LINK_COMMAND_SPEC): Handle -r like -nostdlib.
3495         (VTABLE_VERIFICATION_SPEC): Likewise.
3496         (SANITIZER_EARLY_SPEC): Likewise.
3497         (SANITIZER_SPEC): Likewise.
3498         * config/darwin.h (LINK_COMMAND_SPEC): Likewise.
3499         * doc/invoke.texi (Link Options): Document -r.
3501 2018-09-20  Richard Biener <rguenther@suse.de>
3503         PR middle-end/87054
3504         * gimplify.c (gimplify_expr): Retain alignment of
3505         addressable lvalue in dereference.
3507 2018-09-20  Alexandre Oliva <aoliva@redhat.com>
3509         PR bootstrap/87013
3510         * configure.ac: Check for .loc is_stmt support.
3511         * configure, config.in: Rebuilt.
3512         * dwarf2out.c (dwarf2out_source_line): Skip is_stmt
3513         if not supported.
3515 2018-09-20  Segher Boessenkool  <segher@kernel.crashing.org>
3517         * config/rs6000/rs6000.opt (misel=no, misel=yes): Delete.
3518         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -misel=yes and
3519         -misel=no.
3521 2018-09-20  Segher Boessenkool  <segher@kernel.crashing.org>
3523         * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
3524         VECTOR_OTHER.
3525         * config/rs6000/rs6000.c (rs6000_debug_vector_unit): Delete
3526         case VECTOR_OTHER.
3528 2018-09-20  Marek Polacek  <polacek@redhat.com>
3530         * doc/invoke.texi: Add -Wno-init-list-lifetime to C++ Language Options.
3532 2018-09-20  Richard Sandiford  <richard.sandiford@arm.com>
3534         PR tree-optimization/87288
3535         * tree-vect-loop.c (vect_analyze_loop_2): Take PEELING_FOR_GAPS
3536         into account when determining PEELING_FOR_NITERS.
3538 2018-09-20  Richard Sandiford  <richard.sandiford@arm.com>
3540         PR tree-optimization/86877
3541         * tree-vect-loop.c (vect_analyze_loop_2): Call
3542         vect_verify_datarefs_alignment.
3544 2018-09-19  Marek Polacek  <polacek@redhat.com>
3546         * doc/invoke.texi: Document -Wclass-conversion.
3548 2018-09-19  John David Anglin  <danglin@gcc.gnu.org>
3550         * config/pa/pa.c (pa_adjust_priority): Delete.
3551         (TARGET_SCHED_ADJUST_PRIORITY): Delete define.
3553         * config/pa/pa.md (atomic_storeqi): Restore deleted expander.
3554         (atomic_storehi): Likewise.
3555         (atomic_storesi): Likewise.
3556         (atomic_loaddi): Restore compare and swap exchange loop code.
3558 2018-09-19  Segher Boessenkool  <segher@kernel.crashing.org>
3560         PR rtl-optimization/86902
3561         * combine.c (try_combine): When changing the CC mode used, don't change
3562         an unrelated mode in other_insn to that new CC mode.
3564 2018-09-19  David Malcolm  <dmalcolm@redhat.com>
3566         * tree-data-ref.c (runtime_alias_check_p): Use formatted printing
3567         with %T in place of calls to dump_generic_expr.
3568         (prune_runtime_alias_test_list): Likewise.
3569         (create_runtime_alias_checks): Likewise.
3570         * tree-vect-data-refs.c (vect_check_nonzero_value): Likewise.
3571         (vect_analyze_data_ref_dependence): Likewise.
3572         (vect_slp_analyze_data_ref_dependence): Likewise.
3573         (vect_record_base_alignment): Likewise.  Use %G in place of call
3574         to dump_gimple_stmt.
3575         (vect_compute_data_ref_alignment): Likewise.
3576         (verify_data_ref_alignment): Likewise.
3577         (vect_find_same_alignment_drs): Likewise.
3578         (vect_analyze_group_access_1): Likewise.
3579         (vect_analyze_data_ref_accesses): Likewise.
3580         (dependence_distance_ge_vf): Likewise.
3581         (dump_lower_bound): Likewise.
3582         (vect_prune_runtime_alias_test_list): Likewise.
3583         (vect_find_stmt_data_reference): Likewise.
3584         (vect_analyze_data_refs): Likewise.
3585         (vect_create_addr_base_for_vector_ref): Likewise.
3586         (vect_create_data_ref_ptr): Likewise.
3587         * tree-vect-loop-manip.c (vect_set_loop_condition): Likewise.
3588         (vect_can_advance_ivs_p): Likewise.
3589         (vect_update_ivs_after_vectorizer): Likewise.
3590         (vect_gen_prolog_loop_niters): Likewise.
3591         (vect_prepare_for_masked_peels): Likewise.
3592         * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
3593         (vect_determine_vectorization_factor): Likewise.
3594         (vect_is_simple_iv_evolution): Likewise.
3595         (vect_analyze_scalar_cycles_1): Likewise.
3596         (vect_analyze_loop_operations): Likewise.
3597         (report_vect_op): Likewise.
3598         (vect_is_slp_reduction): Likewise.
3599         (check_reduction_path): Likewise.
3600         (vect_is_simple_reduction): Likewise.
3601         (vect_create_epilog_for_reduction): Likewise.
3602         (vect_finalize_reduction:): Likewise.
3603         (vectorizable_induction): Likewise.
3604         (vect_transform_loop_stmt): Likewise.
3605         (vect_transform_loop): Likewise.
3606         (optimize_mask_stores): Likewise.
3607         * tree-vect-patterns.c (vect_pattern_detected): Likewise.
3608         (vect_split_statement): Likewise.
3609         (vect_recog_over_widening_pattern): Likewise.
3610         (vect_recog_average_pattern): Likewise.
3611         (vect_determine_min_output_precision_1): Likewise.
3612         (vect_determine_precisions_from_range): Likewise.
3613         (vect_determine_precisions_from_users): Likewise.
3614         (vect_mark_pattern_stmts): Likewise.
3615         (vect_pattern_recog_1): Likewise.
3616         * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
3617         (vect_record_max_nunits): Likewise.
3618         (vect_build_slp_tree_1): Likewise.
3619         (vect_build_slp_tree_2): Likewise.
3620         (vect_print_slp_tree): Likewise.
3621         (vect_analyze_slp_instance): Likewise.
3622         (vect_detect_hybrid_slp_stmts): Likewise.
3623         (vect_detect_hybrid_slp_1): Likewise.
3624         (vect_slp_analyze_operations): Likewise.
3625         (vect_slp_analyze_bb_1): Likewise.
3626         (vect_transform_slp_perm_load): Likewise.
3627         (vect_schedule_slp_instance): Likewise.
3628         * tree-vect-stmts.c (vect_mark_relevant): Likewise.
3629         (vect_mark_stmts_to_be_vectorized): Likewise.
3630         (vect_init_vector_1): Likewise.
3631         (vect_get_vec_def_for_operand): Likewise.
3632         (vect_finish_stmt_generation_1): Likewise.
3633         (vect_check_load_store_mask): Likewise.
3634         (vectorizable_call): Likewise.
3635         (vectorizable_conversion): Likewise.
3636         (vectorizable_operation): Likewise.
3637         (vectorizable_load): Likewise.
3638         (vect_analyze_stmt): Likewise.
3639         (vect_is_simple_use): Likewise.
3640         (vect_get_vector_types_for_stmt): Likewise.
3641         (vect_get_mask_type_for_stmt): Likewise.
3642         * tree-vectorizer.c (increase_alignment): Likewise.
3644 2018-09-19  Andrew Stubbs  <ams@codesourcery.com>
3646         * doc/rtl.texi: Adjust vec_select description.
3647         * simplify-rtx.c (simplify_binary_operation_1): Allow VEC_SELECT to use
3648         non-constant selectors.
3650 2018-09-19  Matthew Malcomson  <matthew.malcomson@arm.com>
3652         * config/aarch64/aarch64-protos.h
3653         (aarch64_offset_9bit_signed_unscaled_p): New declaration.
3654         * config/aarch64/aarch64.md (arches): New "rcpc8_4" attribute value.
3655         (arch_enabled): Add check for "rcpc8_4" attribute value of "arch".
3656         * config/aarch64/aarch64.h (AARCH64_FL_RCPC8_4): New bitfield.
3657         (AARCH64_FL_FOR_ARCH8_4): Include AARCH64_FL_RCPC8_4.
3658         (AARCH64_FL_PROFILE): Move index so flags are ordered.
3659         (AARCH64_ISA_RCPC8_4): New flag.
3660         * config/aarch64/aarch64.c (offset_9bit_signed_unscaled_p): Renamed
3661         to aarch64_offset_9bit_signed_unscaled_p.
3662         * config/aarch64/atomics.md (atomic_store<mode>): Allow offset
3663         and use stlur.
3664         * config/aarch64/constraints.md (Ust): New constraint.
3665         * config/aarch64/predicates.md.
3666         (aarch64_9bit_offset_memory_operand): New predicate.
3667         (aarch64_rcpc_memory_operand): New predicate.
3669 2018-09-19  Eric Botcazou  <ebotcazou@adacore.com>
3671         PR rtl-optimization/87361
3672         * rtlanal.c (nonzero_bits1): Revert accidental change.
3674 2018-09-19  Richard Biener  <rguenther@suse.de>
3676         PR tree-optimization/87349
3677         PR tree-optimization/87342
3678         * tree-ssa-sccvn.c (do_rpo_vn): Iterate max_rpo computation.
3680 2018-09-18  Marek Polacek  <polacek@redhat.com>
3682         P1064R0 - Allowing Virtual Function Calls in Constant Expressions
3683         * gimple-fold.c (gimple_get_virt_method_for_vtable): Adjust assert.
3685 2018-09-18  Segher Boessenkool  <segher@kernel.crashing.org>
3687         * config/rs6000/rs6000.md: Remove old "Cygnus sibcall" comment.
3689 2018-09-18  Segher Boessenkool  <segher@kernel.crashing.org>
3691         PR rtl-optimization/86882
3692         * rtlanal.c (reg_overlap_mentioned_p): Handle CLOBBER.
3694 2018-09-18  Uros Bizjak  <ubizjak@gmail.com>
3696         * config/i386/i386.md (*<code>extend<mode>xf2): Macroize insn from
3697         *<code>extendsfxf2 and *<code>extenddfxf2 using MODEF mode iterator.
3699 2018-09-18  Jonathan Wakely  <jwakely@redhat.com>
3701         PR other/87353
3702         * doc/invoke.texi (Link Options): Fix formatting and grammar.
3704 2018-09-18  Richard Biener  <rguenther@suse.de>
3706         PR middle-end/63155
3707         * tree-ssa-coalesce.c (tree_int_map_hasher): Remove.
3708         (compute_samebase_partition_bases): Likewise.
3709         (coalesce_ssa_name): Always use compute_optimized_partition_bases.
3710         (gimple_can_coalesce_p): Simplify.
3712 2018-09-18  Hans-Peter Nilsson  <hp@bitrange.com>
3714         Handle a library implementation of ffs calling __builtin_ffs.
3715         * config/mmix/mmix.c (TARGET_INIT_LIBFUNCS): Override with...
3716         (mmix_init_libfuncs): New function: make __builtin_ffs expand
3717         to __ffsdi2.
3719 2018-09-17  David Malcolm  <dmalcolm@redhat.com>
3721         * diagnostic-show-locus.c (class layout_range): Add field
3722         "m_original_idx".
3723         (layout_range::layout_range): Add "original_idx" param and use it
3724         to initialize new field.
3725         (make_range): Use 0 for original_idx.
3726         (layout::layout): Pass in index to calls to
3727         maybe_add_location_range.
3728         (layout::maybe_add_location_range): Add param "original_idx" and
3729         pass it on to layout_range.
3730         (layout::print_any_labels): Pass on range->m_original_idx to
3731         get_text call.
3732         (gcc_rich_location::add_location_if_nearby): Use 0 for
3733         original_idx.
3734         * gcc-rich-location.h (text_range_label::get_text): Update for new
3735         param.
3736         (range_label_for_type_mismatch::get_text): Likewise.
3738 2018-09-17  Uros Bizjak  <ubizjak@gmail.com>
3740         * config/i386/i386.c (ix86_emit_i387_log1p): Emit fldln2 earlier.
3742 2018-09-17  David Malcolm  <dmalcolm@redhat.com>
3744         * gimple-ssa-sprintf.c (fmtwarn): Update for introduction of
3745         format_string_diagnostic_t.
3746         (fmtwarn_n): Likewise.
3747         * substring-locations.c
3748         (format_string_diagnostic_t::format_string_diagnostic_t) New ctor.
3749         (format_warning_n_va): Convert to...
3750         (format_string_diagnostic_t::emit_warning_n_va): ...this.
3751         (format_warning_va): Convert to...
3752         (format_string_diagnostic_t::emit_warning_va): ...this.
3753         (format_warning_at_substring): Convert to...
3754         (format_string_diagnostic_t::emit_warning): ...this.
3755         (format_warning_at_substring_n): Convert to...
3756         (format_string_diagnostic_t::emit_warning_n): ...this.
3757         * substring-locations.h (class format_string_diagnostic_t): New
3758         class.
3759         (format_warning_va): Convert to
3760         format_string_diagnostic_t::emit_warning_va.
3761         (format_warning_n_va): Convert to
3762         format_string_diagnostic_t::emit_warning_n_va.
3763         (format_warning_at_substring): Convert to
3764         format_string_diagnostic_t::emit_warning.
3765         (format_warning_at_substring_n): Convert to
3766         format_string_diagnostic_t::emit_warning_n.
3768 2018-09-17  Cesar Philippidis  <cesar@codesourcery.com>
3769             Bernd Schmidt <bernds_cb1@t-online.de>
3771         * config/nvptx/nvptx.md (atomic_fetch_<logic><mode>): Enable with
3772         SImode args.
3774 2018-09-17  Uros Bizjak  <ubizjak@gmail.com>
3776         * config/i386/i386.md (truncxf<mode>2_i387_noop_unspec): Change
3777         operand 0 predicate to nonimmediate operand.
3778         (rint<mode>2_frndint): Remove insn pattern.
3779         (rint<mode>2): Change operand 1 predicate to general_operand.
3780         Extend operand 1 to XFmode and generate rintxf2 insn.
3781         (frndintxf2_<rounding>): Rename from frndint<mode>2_<rounding>.
3782         Do not use X87MODEF mode macro.
3783         (frndintxf2_<rounding>_i387): Rename from
3784         frndint<mode>2_<rounding>_i387.  Do not use X87MODEF mode macro.
3785         (<rounding_insn><mode>2): For non-SSE modes, extend operand 1
3786         to XFmode and generate significandxf3 insn.
3788 2018-09-17  Richard Biener  <rguenther@suse.de>
3790         PR tree-optimization/87328
3791         * tree-ssa-sccvn.c (process_bb): Remove assertion about not
3792         visiting unexecutable backedges when not iterating.
3793         (do_rpo_vn): Mark all edges not executable even when not
3794         iterating.
3796 2018-09-17  Martin Jambor  <mjambor@suse.cz>
3798         PR c/63886
3799         * doc/invoke.texi (Warning Options): Likewise.
3801 2018-09-17  Richard Biener  <rguenther@suse.de>
3803         PR tree-optimization/87301
3804         * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_cleanup): Properly
3805         clean EH info from leftover copy assignments.
3807 2018-09-17  Martin Liska  <mliska@suse.cz>
3809         PR gcov-profile/85871
3810         * gcov.c (output_intermediate_file): Fix out of bounds
3811         access.
3813 2018-09-17  Vineet Gupta  <vgupta@synopsys.com>
3815         * config/arc/arc.c: Object attributes for core4 not reflected
3816         correctly.
3817         * config/arc/arc.h: Don't restrict DBNZ to core3 (core4 includes
3818         core3).
3820 2018-09-17  Alexey Brodkin  <abrodkin@synopsys.com>
3822         * config/arc/linux.h (LINK_EH_SPEC): Add missing space.
3824 2018-09-17  Martin Liska  <mliska@suse.cz>
3826         * doc/gcov.texi: Document new option --use-hotness-colors.
3827         * gcov.c (struct source_info): Declare new field.
3828         (source_info::source_info): Set default for maximum_count.
3829         (print_usage): Add new -q option.
3830         (process_args): Process it.
3831         (accumulate_line_info): Save src->maximum_count.
3832         (output_line_beginning): Make color line number if
3833         flag_use_hotness_colors is set.
3834         (output_line_details): Pass default argument value.
3835         (output_lines): Pass src->maximum_count.
3837 2018-09-17  Martin Liska  <mliska@suse.cz>
3839         * common/config/i386/i386-common.c (ix86_get_valid_option_values):
3840         Use processor_names table.
3841         * config/i386/i386.c (ix86_default_align): Use
3842         processor_cost_table for alignment values.
3843         (ix86_option_override_internal): Use processor_names.
3844         (ix86_function_specific_print): Likewise.
3845         * config/i386/i386.h (struct processor_costs):
3846         Add alignment values.
3847         (struct ptt): Remove and replace with const char *.
3848         * config/i386/x86-tune-costs.h (struct processor_costs):
3849         Declare default alignments for all costs.
3851 2018-09-17  Aldy Hernandez  <aldyh@redhat.com>
3853         * tree-vrp.c (extract_range_from_unary_expr): Do not special case
3854         symbolics or VR_VARYING ranges for ABS_EXPR.
3855         * wide-int-range.cc (wide_int_range_abs): Return positive numbers
3856         when range will wrap.
3858 2018-09-15  Eric Botcazou  <ebotcazou@adacore.com>
3860         PR middle-end/86864
3861         * cfgexpand.c (expand_gimple_basic_block): Be prepared for a BARRIER
3862         before and after a JUMP_TABLE_DATA.
3864 2018-09-14  John David Anglin  <danglin@gcc.gnu.org>
3866         PR middle-end/87188
3867         * dojump.c (do_compare_and_jump): Canonicalize function pointers
3868         when one operand is a function pointer.  Use POINTER_TYPE_P and
3869         FUNC_OR_METHOD_TYPE_P.
3870         * expr.c (do_store_flag): Use POINTER_TYPE_P and FUNC_OR_METHOD_TYPE_P.
3871         * fold-const.c (build_range_check): Likewise.
3872         * match.pd (simple_comparison): Likewise.
3874 2018-09-14  David Malcolm  <dmalcolm@redhat.com>
3876         PR c/82967
3877         * spellcheck.c (get_edit_distance_cutoff): New function.
3878         (selftest::test_edit_distance_unit_test_oneway): Rename to...
3879         (selftest::test_get_edit_distance_one_way): ...this.
3880         (selftest::test_get_edit_distance_unit): Rename to...
3881         (selftest::test_get_edit_distance_both_ways): ...this.
3882         (selftest::test_edit_distances): Move tests to this new function,
3883         and test some more pairs of strings.  Update for above renaming.
3884         (selftest::get_old_cutoff): New function.
3885         (selftest::test_get_edit_distance_cutoff): New function.
3886         (selftest::assert_suggested_for): New function.
3887         (ASSERT_SUGGESTED_FOR): New macro.
3888         (selftest::assert_not_suggested_for): New function.
3889         (ASSERT_NOT_SUGGESTED_FOR): New macro.
3890         (selftest::test_suggestions): New function.
3891         (selftest::spellcheck_c_tests): Move test_get_edit_distance_unit
3892         tests to selftest::test_edit_distances and call it.  Add calls to
3893         selftest::test_get_edit_distance_cutoff and
3894         selftest::test_suggestions.
3895         * spellcheck.h (get_edit_distance_cutoff): New function declaration.
3896         (best_match::consider): Replace hard-coded cutoff calculation with
3897         a call to...
3898         (best_match::get_cutoff): New declaration.
3899         (best_match::get_best_meaningful_candidate): Likewise.
3901 2018-09-14  Bernd Edlinger  <bernd.edlinger@hotmail.de>
3903         * builtins.c (fold_builtin_strlen): Remove TODO comment.
3905 2018-09-14  Bernd Edlinger  <bernd.edlinger@hotmail.de>
3907         revert:
3908         2018-07-30  Bernd Edlinger  <bernd.edlinger@hotmail.de>
3910         * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
3911         terminated string literal.
3913 2018-09-14  Martin Sebor  <msebor@redhat.com>
3915         * builtins.c (unterminated_array): Handle ARRAY_REF.
3916         (expand_builtin_stpcpy_1): Detect unterminated char arrays.
3917         * builtins.h (unterminated_array): Declare extern.
3918         * gimple-fold.c (gimple_fold_builtin_stpcpy): Detect unterminated
3919         arrays.
3920         (gimple_fold_builtin_sprintf): Propagate NO_WARNING to transformed
3921         calls.
3923 2018-09-14  Martin Sebor  <msebor@redhat.com>
3924             Jeff Law  <law@redhat.com>
3926         * builtins.c (unterminated_array): New.
3927         (expand_builtin_strcpy): Adjust.
3928         (expand_builtin_strcpy_args): Detect unterminated arrays.
3929         * gimple-fold.c (get_maxval_strlen): Add argument.  Detect
3930         unterminated arrays.
3931         * gimple-fold.h (get_maxval_strlen): Add argument.
3932         (gimple_fold_builtin_strcpy): Detec unterminated arrays.
3934         * gimple-fold.c (get_range_strlen): Add argument.
3935         (get_maxval_strlen): Adjust.
3936         * gimple-fold.h (get_range_strlen): Add argument.
3938 2018-09-14  Wei Xiao  <wei3.xiao@intel.com>
3940         * config/i386/movdirintrin.h: Fix copyright year.
3942 2018-09-14  Uros Bizjak  <ubizjak@gmail.com>
3944         * reg-stack.c: Include regs.h.
3945         (replace_reg): Assert that mode is MODE_FLOAT or MODE_COMPLEX_FLOAT.
3946         (emit_pop_insn): Default pop insn mode to the reg_raw_mode of
3947         FIRST_STACK_REG, not DFmode.
3948         (emit_swap_insn): Default swap insn mode to the reg_raw_mode of
3949         FIRST_STACK_REG, not XFmode.  Explicitly construct swap RTX.
3950         (change stack): Default register mode to the reg_raw_mode of
3951         FIRST_STACK_REG, not DFmode.
3952         * config/i386/i386.md (*swap<mode>): Remove insn pattern.
3953         (*swapxf): Rename from swapxf.
3955 2018-09-14  Carl Love  <cel@us.ibm.com>
3957         * config/rs6000/emmintrin.h: Add _MM_SHUFFLE2.
3958         * config/rs6000/xmmintrin.h: Add _MM_SHUFFLE.
3960 2018-09-14  Segher Boessenkool  <segher@kernel.crashing.org>
3962         PR target/87224
3963         * config/rs6000/rs6000.md (*mov<mode>_hardfloat64): Add Z to the Y
3964         alternatives.
3966 2018-09-14  Sam Tebbs  <sam.tebbs@arm.com>
3968         PR target/85628
3969         * config/aarch64/aarch64.md (*aarch64_bfxilsi_uxtw): Define.
3971 2018-09-14  Jason Merrill  <jason@redhat.com>
3973         Fix --enable-gather-detailed-mem-stats.
3974         * hash-table.c (hash_table_usage): Change from variable to function.
3975         * hash-table.h: Adjust.
3976         * Makefile.in: Add missing dependencies on hash-table.h.
3978 2018-09-14  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
3980         PR tree-optimization/87259
3981         PR lto/87283
3982         (pass_cse_reciprocals::execute): Run optimize_recip_sqrt after
3983         execute_cse_reciprocals_1 has tried transforming.
3985 2018-09-14  Aldy Hernandez  <aldyh@redhat.com>
3987         * tree-vrp.c (extract_range_from_binary_expr_1): Normalize
3988         VR_VARYING for PLUS/MINUS_EXPR.
3990 2018-09-14  Ilya Leoshkevich  <iii@linux.ibm.com>
3992         * config/s390/s390-passes.def (INSERT_PASS_BEFORE): Improve
3993         formatting.
3995 2018-09-14  Richard Biener  <rguenther@suse.de>
3997         PR middle-end/63155
3998         * tree-ssa-coalesce.c (ssa_conflicts_merge): Remove conflict
3999         bits for the merged partition.
4001 2018-09-13  Martin Sebor  <msebor@redhat.com>
4002             Bernd Edlinger  <bernd.edlinger@hotmail.de>
4004         * builtins.h (c_srlen): Add argument.
4005         * builtins.c (warn_string_no_nul): New function.
4006         (c_strlen): Add argument and use it.  Update recursive calls.
4007         Pass DECL argument to string_constant to get info on non
4008         terminated strings.  Update *NONSTR as needed.
4009         (fold_builtin_strlen): Add argument to calls to c_strlen.
4010         Warn for unterminated arrays.
4011         (warn_string_no_null): Add prototype.
4012         * expr.c (string_constant): Update arguments.  Update recursive
4013         calls appropriately.  Detect missing NUL terminator and outermost
4014         declaration its missing in.
4015         Improve checks for arrays with nonzero lower bound or elements
4016         that are not a single byte.  Simplify offset computation.
4017         Simplify checks for non-NUL terminated strings.
4018         * gimple-fold.c (get_range_strlen): Add argument to c_strlen call.
4019         * gimple-ssa-sprintf.c (get_string_length): Remove unnecessary code.
4021 2018-09-13  Bernd Edlinger  <bernd.edlinger@hotmail.de>
4023         * builtins.c (c_strlen): Handle not zero terminated STRING_CSTs
4024         correctly.
4025         * fold-const.c (c_getstr): Fix function comment.  Remove unused third
4026         argument.  Fix range checks.
4027         * fold-const.h (c_getstr): Adjust protoype.
4028         * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid folding when
4029         string is constant but contains no NUL byte.
4031         * expr.c (string_constant): Adjust function comment.
4032         Remove bogus check for zero termination.
4034         * fold-const.c (c_getstr): Clamp STRING_LENGTH to STRING_SIZE.
4036         * varasm.c (compare_constant): Compare type size of STRING_CSTs.
4037         (get_constant_size): Don't make STRING_CSTs larger than they are.
4038         (check_string_literal): New check function for STRING_CSTs.
4039         (output_constant): Use it.
4041 2018-09-13  Eric Botcazou  <ebotcazou@adacore.com>
4043         PR target/86812
4044         * config/visium/visium.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define.
4046 2018-09-13  Richard Biener  <rguenther@suse.de>
4048         PR tree-optimization/87263
4049         * tree-ssa-sccvn.c (visit_phi): Revert some earlier changes.
4050         (struct unwind_state): Add max_rpo field.
4051         (do_rpo_vn): Allow up-to-date loop state to be used when not iterating.
4052         Compute max_rpo, the max RPO number a block can be backwards reached
4053         from.  Re-write non-iterating mode to a RPO ordered worklist approach,
4054         separating it from the iterating mode.
4056 2018-09-13  Vlad Lazar  <vlad.lazar@arm.com>
4058         * haifa-sched.c (rank_for_schedule): Schedule by INSN_COST.
4059         (rfs_decision): New scheduling decision.
4061 2018-09-13  Richard Biener  <rguenther@suse.de>
4063         PR bootstrap/87134
4064         * tree-ssa-sccvn.c (vn_nary_op_insert_into): Fix assert.
4065         (vn_nary_op_insert_pieces_predicated): Do not write useless
4066         valid_dominated_by_p entry outside of the allocated storage.
4068 2018-09-13  Omar Sandoval  <osandov@osandov.com>
4069             Tom de Vries  <tdevries@suse.de>
4071         PR debug/86985
4072         * dwarf2out.c (is_c): New function.
4073         (add_subscript_info): Add DW_AT_count of 0 for C zero-length arrays.
4075 2018-09-13  Sam Tebbs  <sam.tebbs@arm.com>
4077         PR target/85628
4078         * config/aarch64/aarch64.md (*aarch64_bfxil):
4079         Define.
4080         * config/aarch64/constraints.md (Ulc): Define.
4081         * config/aarch64/aarch64-protos.h (aarch64_high_bits_all_ones_p):
4082         Define.
4083         * config/aarch64/aarch64.c (aarch64_high_bits_all_ones_p):
4084         New function.
4086 2018-09-13  Vlad Lazar  <vlad.lazar@arm.com>
4088         * config/aarch64/aarch64.h (TARGET_COMPUTE_FRAME_LAYOUT): Define.
4089         * config/aarch64/aarch64.c (aarch64_expand_prologue): Remove
4090         aarch64_layout_frame call.
4091         (aarch64_expand_epilogue): Likewise.
4092         (aarch64_initial_elimination_offset): Likewise.
4093         (aarch64_get_separate_components): Likewise.
4094         (aarch64_use_return_insn_p): Likewise.
4095         (aarch64_layout_frame): Remove unneeded check.
4097 2018-09-13  Jakub Jelinek  <jakub@redhat.com>
4099         * configure.ac: Only append
4100         " : (reconfigured) $TOPLEVEL_CONFIGURE_ARGUMENTS" to
4101         gcc_config_arguments if it was never reconfigured or last reconfigure
4102         was with different arguments.
4103         * configure: Regenerated.
4105 2018-09-13  Jakub Jelinek  <jakub@redhat.com>
4106             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
4108         PR middle-end/87290
4109         * expr.c (maybe_optimize_pow2p_mod_cmp): New function.
4110         (maybe_optimize_mod_cmp): Use it if integer_pow2p treeop1.
4112 2018-09-13  Jakub Jelinek  <jakub@redhat.com>
4114         PR tree-optimization/87287
4115         * fold-const.c (fold_binary_loc) <case EQ_EXPR>: Move signed modulo
4116         X % C == 0 to X % (unsigned) C == 0 optimization to ...
4117         * match.pd (X % C == 0): ... here.  New optimization.
4119 2018-09-12  Jakub Jelinek  <jakub@redhat.com>
4121         PR middle-end/82853
4122         * expr.h (maybe_optimize_mod_cmp): Declare.
4123         * expr.c (mod_inv): New function.
4124         (maybe_optimize_mod_cmp): New function.
4125         (do_store_flag): Use it.
4126         * cfgexpand.c (expand_gimple_cond): Likewise.
4128 2018-09-09  Cesar Philippidis  <cesar@codesourcery.com>
4129             Julian Brown  <julian@codesourcery.com>
4131         PR middle-end/86336
4132         * gimplify.c (gimplify_scan_omp_clauses): Set
4133         target_firstprivatize_array_bases in OpenACC parallel and kernels
4134         region contexts.  Remove GOMP_MAP_FIRSTPRIVATE_REFERENCE clauses from
4135         OpenACC data regions.
4137 2018-09-12  Uros Bizjak  <ubizjak@gmail.com>
4139         * config/i386/i386.md (sqrt_extend<mode>xf3_i387): Remove.
4140         (sqrt<mode>2): Extend operand 1 to XFmode and generate sqrtxf3 insn.
4142 2018-09-12  Richard Biener  <rguenther@suse.de>
4144         PR tree-optimization/87280
4145         * tree-ssa-sccvn.c (process_bb): Handle the case of executable
4146         edge but unreachable target.
4147         (do_rpo_vn): For conservatively handling a PHI only mark
4148         the backedge executable but not the block reachable.
4150 2018-09-12  Richard Biener  <rguenther@suse.de>
4152         PR tree-optimization/87266
4153         * tree-ssa-sccvn.c (do_rpo_vn): Always iterate to not yet
4154         visited blocks.
4156 2018-09-12  Andreas Krebbel  <krebbel@linux.ibm.com>
4158         * config/s390/s390.md (PFPO_RND_MODE_DFP, PFPO_RND_MODE_BFP): New
4159         constants.
4160         ("trunc<BFP:mode><DFP_ALL:mode>2")
4161         ("trunc<DFP_ALL:mode><BFP:mode>2")
4162         ("extend<BFP:mode><DFP_ALL:mode>2")
4163         ("extend<DFP_ALL:mode><BFP:mode>2"): Set proper rounding mode
4164         according to the target operand type.
4166 2018-09-12  Jakub Jelinek  <jakub@redhat.com>
4167             Andreas Krebbel  <krebbel@linux.ibm.com>
4169         PR tree-optimization/86844
4170         * gimple-ssa-store-merging.c
4171         (imm_store_chain_info::coalesce_immediate): For overlapping stores, if
4172         there are any overlapping stores in between them, make sure they are
4173         also coalesced or we give up completely.
4175 2018-09-12  Jakub Jelinek  <jakub@redhat.com>
4177         PR middle-end/87248
4178         * fold-const.c (fold_ternary_loc) <case COND_EXPR>: Verify also that
4179         BIT_AND_EXPR's second operand is a power of two.  Formatting fix.
4181 2018-09-12  Tom de Vries  <tdevries@suse.de>
4183         * common.opt (gdescribe-dies): Add option.
4184         * dwarf2out.c (add_name_and_src_coords_attributes): Add description
4185         attribute for artifical and nameless decls.
4186         (dwarf2out_register_external_die): Add description attribute to
4187         external reference die.
4188         (add_desc_attribute): New functions.
4189         (gen_subprogram_die): Add description attribute to
4190         DW_TAG_call_site_parameter.
4191         * tree-pretty-print.c (print_generic_expr_to_str): New function.
4192         * tree-pretty-print.h (print_generic_expr_to_str): Declare.
4193         * doc/invoke.texi (@item Debugging Options): Add -gdescribe-dies and
4194         -gno-describe-dies.
4195         (@item -gdescribe-dies): Add.
4197 2018-09-12  Aldy Hernandez  <aldyh@redhat.com>
4199         * tree-vrp.c (vrp_shift_undefined_p): Remove.
4200         (extract_range_from_binary_expr_1: Call
4201         wide_int_range_shift_undefined_p instead of vrp_shift_undefined_p.
4202         * wide-int-range.h (wide_int_range_shift_undefined_p): Do not
4203         depend on sign.
4205 2018-09-12  Aldy Hernandez  <aldyh@redhat.com>
4207         * gimple-ssa-warn-alloca.c
4208         (alloca_type_and_limit::alloca_type_and_limit): Initialize limit
4209         field for ALLOCA_BOUND_*_LARGE.
4211 2018-09-11  Nathan Sidwell  <nathan@acm.org>
4213         * gcc.c (load_specs, execute, run_attempt): Use %qs not '%s'.
4215 2018-09-11  Uros Bizjak  <ubizjak@gmail.com>
4217         * reg-stack.c (subst_asm_stack_regs): Call replace_reg also
4218         for clobbers.  Remove obsolete comment.
4220 2018-09-11  Uros Bizjak  <ubizjak@gmail.com>
4222         * config/i386/i386.md (define_attr "type"): Remove mpxmov, mpxmk,
4223         mpxchk, mpxld and mpxst types.
4224         (define_attr length_immediate): Remove all processing of mpx types.
4225         (define_attr prefix_0f): Ditto.
4226         (define_attr memory): Ditto.
4228 2018-09-11  Uros Bizjak  <ubizjak@gmail.com>
4230         * config/i386/i386.md (fyl2x_extend<mode>xf3_i387): Remove.
4231         (log<mode>2): Change operand 1 predicate to general_operand.
4232         Extend operand 1 to XFmode and generate logxf3 insn.
4233         (log10<mode>2): Change operand 1 predicate to general_operand.
4234         Extend operand 1 to XFmode and generate log10xf3 insn.
4235         (log2<mode>2): Change operand 1 predicate to general_operand.
4236         Extend operand 1 to XFmode and generate log2xf3 insn.
4237         (fyl2xp1_extend<mode>xf3_i387): Remove.
4238         (log1p<mode>2): Change operand 1 predicate to general_operand.
4239         Extend operand 1 to XFmode and generate log1pxf3 insn.
4240         (fxtract_extend<mode>xf3_i387): Remove.
4241         (logb<mode>2): Change operand 1 predicate to general_operand.
4242         Extend operand 1 to XFmode and generate logbxf3 insn.
4243         (ilogb<mode>2): Change operand 1 predicate to general_operand.
4244         Extend operand 1 to XFmode and generate fxtractxf3_i387 insn.
4245         (significand<mode>2): Change operand 1 predicate to general_operand.
4246         Extend operand 1 to XFmode and generate significandxf3 insn.
4248 2018-09-11  Nathan Sidwell  <nathan@acm.org>
4250         * gcc.c (perror_with_name, pfatal_with_name): Delete.
4251         (load_specs): Use fatal_error.
4252         (DELETE_IF_ORDINARY, process_command): Use error.
4253         (execute, run_attempt): Use fatal_error.
4255 2018-09-11  Andrew Stubbs  <ams@codesourcery.com>
4257         * diagnostic-core.h (sorry_at): New prototype.
4258         * diagnostic.c (sorry_at): New function.
4260 2018-09-11  Aldy Hernandez  <aldyh@redhat.com>
4262         * tree-vrp.c (extract_range_from_binary_expr_1): Treat all divisions
4263         by zero as VR_UNDEFINED.
4265 2018-09-10  Uros Bizjak  <ubizjak@gmail.com>
4267         * config/i386/i386.md (<sincos>xf2): Rename from *<sincos>xf2_i387.
4268         (*<sincos>_extend<mode>xf2_i387): Remove insn pattern.
4269         (<sincos>mode2): New expander.
4270         (sincos_extend<mode>xf3_i387): Remove insn pattern.
4271         (sincos -> sin, cos splitters): Remove splitter patterns.
4272         (sincos<mode>3): Change operand 2 predicate to general_operand.
4273         Extend operand 2 to XFmode and generate sincosxf3 insn.
4274         (fptanxf4_i387): Change mode of operands 0 and 3 to SFmode.
4275         Change operand 3 predicate to const1_operand.
4276         (fptan_extend<mode>xf4_i387): Remove insn pattern.
4277         (tanxf2): Update operands in the call to fptanxf4_i387.
4278         (tan<mode>2): Change operand 1 predicate to general_operand.
4279         Extend operand 1 to XFmode and generate tanxf3 insn.
4280         (atan2xf3): Rename from *fpatanxf3_i387.
4281         (fpatan_extend<mode>xf3_i387): Remove insn pattern.
4282         (atan2xf3): Remove expander.
4283         (atan2<mode<3):  Change operand 1 and 2 predicates to general_operand.
4284         Extend operands 1 and 2 to XFmode and generate atan2xf3 insn.
4285         (atan<mode>2): Change operand 1 predicate to general_operand.
4286         Extend operand 1 to XFmode and generate atanxf3 insn.
4288 2018-09-10  Uros Bizjak  <ubizjak@gmail.com>
4290         * config/i386/i386.md (x87/SSE constant load splitter): Use
4291         memory_operand instead of nonimmediate_operand for input operand
4292         predicate.
4294 2018-09-09  Uros Bizjak  <ubizjak@gmail.com>
4296         * config/i386/i386.md (float partial SSE register stall splitter): Move
4297         splitter near its instruction pattern.
4298         (float_extend partial SSE register stall splitter): Ditto.
4299         (float_truncate partial SSE register stall splitter): Ditto.
4301 2018-09-09  Hans-Peter Nilsson  <hp@bitrange.com>
4303         PR target/86794
4304         * config/mmix/mmix.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
4305         to speculation_safe_value_not_needed.
4307         PR target/85666
4308         * config/mmix/mmix.c (mmix_assemble_integer): Handle byte-size
4309         non-CONST_INT rtx:es using assemble_integer_with_op ".byte".
4310         (MMIX_CFUN_NEEDS_SAVED_EH_RETURN_ADDRESS): Don't call
4311         leaf_function_p, instead use has_hard_reg_initial_val.
4313 2018-09-09  Nathan Sidwell  <nathan@acm.org>
4315         * gcc.h (pfatal_with_name): Don't declare here.
4316         * gcc.c (pfatal_with_name): Make static.
4318 2018-09-09  Xianmiao Qu  <xianmiao_qu@c-sky.com>
4320         * config/csky/csky.md (*cskyv2_adddi3, *cskyv2_subdi3): Add
4321         earlyclobber.
4323 2018-09-08  John David Anglin  <danglin@gcc.gnu.org>
4325         PR rtl-optimization/85458
4326         * sel-sched.c (sel_target_adjust_priority): Allow backend adjust
4327         priority hook to reduce the priority of EXPR.
4329 2018-09-07  Uros Bizjak  <ubizjak@gmail.com>
4331         * config/i386/i386.md (float<SWI48x:mode><MODEF:mode>2) Enable
4332         DImode for x87 on 32bit targets.  Conditionally disable x87 modes
4333         with X87_ENABLE_FLOAT.  Remove preparation code.
4334         (*float<SWI48:mode><MODEF:mode>2): Rename from
4335         *float<SWI48:mode><MODEF:mode>2_mixed.  Handle x87, SSE and mixed
4336         math using "enabled" attribute.
4337         (*floatdi<MODEF:mode>2_i387): Rename from
4338         *float<SWI48x:mode><MODEF:mode>2_i387.  Handle only DImode and
4339         enable for 32bit targets only.
4340         (floatdi<X87MODEF:mode>2_i387_with_xmm pre-reload splitter): New
4341         splitter.
4342         (floatdi<X87MODEF:mode>2_i387_with_xmm): Use register_operand
4343         as operand 1 predicate.  Rewrite as define_insn_and_split.
4344         (floatdi<X87MODEF:mode>2_i387_with_xmm memory input splitter): Remove.
4346 2018-09-06  Uros Bizjak  <ubizjak@gmail.com>
4348         * reg-stack.c (get_true_reg) <case FLOAT_TRUNCATE>: Reorder
4349         to fallthru to FLOAT case.
4351 2018-09-06  Will Schmidt  <will_schmidt@vnet.ibm.com>
4353         PR target/86731
4354         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Update logic
4355         around folding of vec_sl to handle out of range shift values.
4357 2018-09-06  Uros Bizjak  <ubizjak@gmail.com>
4359         * config/i386/i386.md (fix_trunc<mode>_fisttp_i387_1): Remove.
4360         Update callers to gen_fix_trunc<mode>_i387_fisttp
4361         (fix_trunc<mode>_i387_fisttp): Change operand 0 predicate to
4362         nonimmediate_operand.
4363         (fix_trunc<mode>_i387_fisttp_with_temp): Remove insn pattern
4364         and corresponding splitters.
4365         (*fix_trunc<mode>_i387_1): Always expand with fix_trunc<mode>_i387.
4366         (fix_truncdi_i387): Change operand 0 predicate to nonimmediate_operand.
4367         (fix_truncdi_i387_with_temp): Remove insn pattern
4368         and corresponding splitters.
4369         (fix_trunc<mode>_i387): Change operand 0 predicate to
4370         nonimmediate_operand.
4371         (fix_trunc<mode>_i387_with_temp): Remove insn pattern
4372         and corresponding splitters.
4373         (*fistdi2_1): Remove.
4374         (fistdi2): Ditto.
4375         (fistdi2_with_temp): Remove insn pattern and corresponding splitters.
4376         (lrintxfdi2): Remove expander.  Reimplement as define_insn.
4377         (*fist<mode>2_1): Remove.
4378         (fist<mode>2): Ditto.
4379         (fist<mode>2_with_temp): Remove insn pattern and corresponding
4380         splitters.
4381         (lrintxf<mode>2): Remove expander.  Reimplement as define_insn.
4382         (*fist<mode>2_<rounding>_1): Always expand with fist<mode>2_<rounding>.
4383         (fistdi2_<rounding>): Change operand 0 predicate to
4384         nonimmediate_operand.
4385         (fistdi2_<rounding>_with_temp): Remove insn pattern
4386         and corresponding splitters.
4387         (fist<mode>2_<rounding>): Change operand 0 predicate to
4388         nonimmediate_operand.
4389         (fist<mode>2_<rounding>_with_temp): Remove insn pattern
4390         and corresponding splitters.
4392         (*fixuns_trunc<mode>si2_avx512f_zext): Depend on TARGET_SSE_MATH.
4394 2018-09-06  Bernd Edlinger  <bernd.edlinger@hotmail.de>
4396         * varasm.c (output_constructor_regular_field): Check TYPE_SIZE_UNIT of
4397         the init value.
4399 2018-09-06  Will Schmidt  <will_schmidt@vnet.ibm.com>
4401         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support for
4402         early gimple folding of vec_splat().
4403         * tree-vect-generic.c: Remove static from tree_vec_extract() definition.
4404         * gimple-fold.h: Add an extern define for tree_vec_extract().
4406 2018-09-06  Will Schmidt  <will_schmidt@vnet.ibm.com>
4408         * config/rs6000/rs6000.c (fold_mergehl_helper): Add types_compatible_p
4409         wrappers around TREE_TYPE comparisons.
4411 2018-09-06  Ilya Leoshkevich  <iii@linux.ibm.com>
4413         PR target/80080
4414         * config/s390/predicates.md: Add nonsym_memory_operand.
4415         * config/s390/s390.c (s390_legitimize_cs_operand): If operand
4416         contains a SYMBOL_REF, load it into an intermediate pseudo.
4417         (s390_emit_compare_and_swap): Legitimize operand.
4418         * config/s390/s390.md: Use the new nonsym_memory_operand
4419         with UNSPECV_CAS patterns.
4421 2018-09-06  Ilya Leoshkevich  <iii@linux.ibm.com>
4423         PR target/80080
4424         * config/s390/s390-passes.def: New file.
4425         * config/s390/s390-protos.h (class rtl_opt_pass): Add forward
4426         declaration.
4427         (make_pass_s390_early_mach): Add declaration.
4428         * config/s390/s390.c (make_pass_s390_early_mach):
4429         (s390_option_override): Remove dynamic registration.
4430         * config/s390/t-s390: Add s390-passes.def.
4432 2018-09-06  Ilya Leoshkevich  <iii@linux.ibm.com>
4434         * config/s390/s390.c (s390_decompose_constant_pool_ref):
4435         Remove UNSPEC_LTREL_BASE check.
4436         (annotate_constant_pool_refs): Likewise.
4437         (find_constant_pool_ref): Likewise.
4438         (find_ltrel_base): Removed.
4439         (replace_ltrel_base): Removed.
4440         (s390_mainpool_finish): Remove replace_ltrel_base call.
4441         (s390_chunkify_start): Remove pending LTREL_BASE logic.
4442         (s390_chunkify_finish): Remove replace_ltrel_base call.
4443         * config/s390/s390.md: Remove UNSPEC_LTREL_BASE.
4445 2018-09-06  Hans-Peter Nilsson  <hp@axis.com>
4447         PR target/86779
4448         * config/cris/cris.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
4449         to speculation_safe_value_not_needed.
4451 2018-09-05  Cesar Philippidis  <cesar@codesourcery.com>
4452             Bernd Schmidt  <bernds_cb1@t-online.de>
4454         * config/nvptx/nvptx-opts.h: New file.
4455         * config/nvptx/nvptx.c (nvptx_file_start): Print the correct .target.
4456         * config/nvptx/nvptx.h: Include "nvptx-opts.h".
4457         (ASM_SPEC): Define.
4458         (TARGET_SM35): New macro.
4459         * config/nvptx/nvptx.md (atomic_fetch_<logic><mode>): Enable with the
4460         correct predicate.
4461         * config/nvptx/nvptx.opt (ptx_isa, sm_30, sm_35): New enum and its
4462         values.
4463         (misa=): New option.
4464         * doc/invoke.texi (Nvidia PTX Options): Document -misa.
4466 2018-09-05  Uros Bizjak  <ubizjak@gmail.com>
4468         * config/i386/i386.md (truncdfsf2): Remove expander.
4469         (truncdfsf2_with_temp): Ditto.
4470         (truncxf<mode>2): Ditto.
4471         (*truncdfsf_fast_mixed): Remove insn pattern.
4472         (*truncdfsf_fast_i387): Ditto.
4473         (*truncdfsf_mixed): Ditto.
4474         (*truncdfsf_i387): Ditto.
4475         (*truncdfsf2_i387_1): Ditto.
4476         (*truncxfsf2_mixed): Ditto.
4477         (*truncxfdf2_mixed): Ditto.
4478         (*truncxf<mode>2_i387_noop): Ditto. Update callers
4479         to call gen_truncxf<mode>2 instead.
4480         (*truncxf<mode>2_i387): Remove.
4481         (reg->reg splitters): Remove splitter pattern.
4482         (reg->mem splitters): Ditto.
4484         (truncdfsf2): New insn pattern.
4485         (truncxf<mode>2): Ditto.
4487 2018-09-05  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
4489         * tree-ssa-math-opts.c (is_mult_by): New function.
4490         (is_square_of): Use the above.
4491         (optimize_recip_sqrt): New function.
4492         (pass_cse_reciprocals::execute): Use the above.
4494 2018-09-05  Richard Biener  <rguenther@suse.de>
4496         PR bootstrap/87134
4497         * tree-ssa-sccvn.c (rpo_elim::eliminate_push_avail): Make sure
4498         to zero-init the emplaced vec.
4500 2018-09-05  Martin Liska  <mliska@suse.cz>
4502         PR tree-optimization/87205
4503         * tree-switch-conversion.c (pass_lower_switch::execute):
4504         Group cases for switch statements.
4506 2018-09-05  Richard Biener  <rguenther@suse.de>
4508         PR tree-optimization/87217
4509         * tree-ssa-sccvn.c (vuse_valueize): New.
4510         (vn_reference_lookup_pieces): Use it.
4511         (vn_reference_lookup): Likewise.
4513 2018-09-05  Nathan Sidwell  <nathan@acm.org>
4515         PR c++/87137
4516         * stor-layout.c (place_field): Scan forwards to check last
4517         bitfield when ms_bitfield_placement is in effect.
4519 2018-09-05  Richard Biener  <rguenther@suse.de>
4521         PR bootstrap/87225
4522         * tree-vect-stmts.c (vectorizable_simd_clone_call): Fix bogus
4523         return.
4525 2018-09-05  Siddhesh Poyarekar  <siddhesh@sourceware.org>
4526             Kugan Vivekanandarajah  <kugan.vivekanandarajah@linaro.org>
4528         * config/aarch64/falkor-tag-collision-avoidance.c: New file.
4529         * config.gcc (extra_objs): Build it.
4530         * config/aarch64/t-aarch64 (falkor-tag-collision-avoidance.o):
4531         Likewise.
4532         * config/aarch64/aarch64-passes.def
4533         (pass_tag_collision_avoidance): New pass.
4534         * config/aarch64/aarch64.c (qdf24xx_tunings): Add
4535         AARCH64_EXTRA_TUNE_RENAME_LOAD_REGS to tuning_flags.
4536         (aarch64_classify_address): Remove static qualifier.
4537         (aarch64_address_info, aarch64_address_type): Move to...
4538         * config/aarch64/aarch64-protos.h: ... here.
4539         (make_pass_tag_collision_avoidance): New function.
4540         * config/aarch64/aarch64-tuning-flags.def (rename_load_regs):
4541         New tuning flag.
4543 2018-09-05  Martin Liska  <mliska@suse.cz>
4545         * doc/gcov.texi: Update documentation of humar
4546         readable mode.
4547         * gcov.c (format_count): Print one decimal place, it provides
4548         more fine number of situations like '1G' vs. '1.4G'.
4550 2018-09-05  Martin Liska  <mliska@suse.cz>
4552         PR target/87164
4553         * config/rs6000/rs6000.opt: Mark the option as Deprecated.
4554         * optc-gen.awk: Allow 'Var' for Deprecated options in order
4555         to generate a MASK value.
4557 2018-09-04  H.J. Lu  <hongjiu.lu@intel.com>
4559         PR debug/86593
4560         * dwarf2out.c (based_loc_descr): Allow hard frame pointer even
4561         if frame pointer isn't used.
4562         (compute_frame_pointer_to_fb_displacement): Likewise.
4564 2018-09-04  Jakub Jelinek  <jakub@redhat.com>
4566         PR target/87198
4567         * common/config/i386/i386-common.c (OPTION_MASK_ISA_XSAVEOPT_SET,
4568         OPTION_MASK_ISA_XSAVES_SET, OPTION_MASK_ISA_XSAVEC_SET): Use
4569         OPTION_MASK_ISA_XSAVE_SET instead of OPTION_MASK_ISA_XSAVE.
4570         (OPTION_MASK_ISA_XSAVE_UNSET): Add OPTION_MASK_ISA_XSAVES_UNSET
4571         and OPTION_MASK_ISA_XSAVEC_UNSET.
4573 2018-09-04  Max Filippov  <jcmvbkbc@gmail.com>
4575         * config/xtensa/xtensa.c (xtensa_expand_atomic): Reorder AND and
4576         XOR operations in NAND case.
4578 2018-09-04  Aldy Hernandez  <aldyh@redhat.com>
4580         * wide-int-range.cc (wide_int_range_convert): New.
4581         * wide-int-range.h (wide_int_range_convert): New.
4582         * tree-vrp.c (extract_range_from_unary_expr): Abstract wide int
4583         code into wide_int_range_convert.
4584         (extract_range_into_wide_ints): Do not munge anti range constants
4585         into the entire domain.  Just return the range back.
4587 2018-09-04  Martin Liska  <mliska@suse.cz>
4589         * genmatch.c (output_line_directive): Add new argument
4590         fnargs.
4591         (dt_simplify::gen_1): Encapsulate dump within __builtin_expect.
4593 2018-09-04  Jonathan Wakely  <jwakely@redhat.com>
4595         * doc/invoke.texi (Option Summary): Add whitespace.
4597         * doc/invoke.texi (Option Summary): Add -Waligned-new.
4599 2018-09-04  Richard Biener  <rguenther@suse.de>
4601         PR tree-optimization/87211
4602         * tree-ssa-sccvn.c (visit_phi): When value-numbering to a
4603         backedge value we're supposed to treat as VARYING also number
4604         the PHI to VARYING in case it got a different value-number already.
4606 2018-09-04  Aldy Hernandez  <aldyh@redhat.com>
4608         * tree-vrp.c (vrp_can_optimize_bit_op): Remove.
4609         (extract_range_from_binary_expr_1): Do not call
4610         vrp_can_optimize_bit_op.
4611         * wide-int-range.cc (wide_int_range_can_optimize_bit_op): Make
4612         static.
4613         (wide_int_range_get_mask_and_bounds): New.
4614         (wide_int_range_optimize_bit_op): New.
4615         (wide_int_range_bit_ior): Call wide_int_range_optimize_bit_op.
4616         (wide_int_range_bit_and): Same.
4617         * wide-int-range.h (wide_int_range_can_optimize_bit_op): Remove.
4618         (wide_int_range_optimize_bit_op): New.
4619         (wide_int_range_get_mask_and_bounds): New.
4621 2018-09-04  Richard Biener  <rguenther@suse.de>
4623         PR tree-optimization/87176
4624         * tree-ssa-sccvn.c (visit_phi): Remove redundant allsame
4625         variable.  When value-numbering a virtual PHI node make sure
4626         to not value-number to the backedge value.
4628 2018-09-04  Jonathan Wakely  <jwakely@redhat.com>
4630         * doc/extend.texi (Long Long, Hex Floats): Document support for
4631         long long and hex floats in more recent versions of ISO C++.
4633 2018-09-03  Richard Biener  <rguenther@suse.de>
4635         PR tree-optimization/87177
4636         * tree-ssa-sccvn.c (vuse_ssa_val): Revert previous change, keep
4637         cleanup.
4639 2018-09-03  Alexander Monakov  <amonakov@ispras.ru>
4641         * bb-reorder.c (edge_order): Convert to C-qsort-style
4642         tri-state comparator.
4643         (reorder_basic_blocks_simple): Change std::stable_sort to
4644         gcc_stablesort.
4646 2018-09-03  Alexander Monakov  <amonakov@ispras.ru>
4648         * tree-loop-distribution.c (offset_cmp): Convert to C-qsort-style
4649         tri-state comparator.
4650         (fuse_memset_builtins): Change std::stable_sort to gcc_stablesort.
4652 2018-09-03  Alexander Monakov  <amonakov@ispras.ru>
4654         * sort.cc (struct sort_ctx): New field 'nlim'.  Use it...
4655         (mergesort): ... here as maximum count for using netsort.
4656         (gcc_qsort): Set nlim to 3 if stable sort is requested.
4657         (gcc_stablesort): New.
4658         * system.h (gcc_stablesort): Declare.
4660 2018-09-03  Alexander Monakov  <amonakov@ispras.ru>
4662         * sort.cc (gcc_qsort) [CHECKING_P]: Call qsort_chk.
4663         * system.h (qsort): Always redirect to gcc_qsort.  Update comment.
4664         * vec.c (qsort_chk): Do not call gcc_qsort.  Update comment.
4666 2018-09-03  Segher Boessenkool  <segher@kernel.crashing.org>
4668         * config/rs6000/rs6000.md (*mov<mode>_hardfloat32): Remove %U from the
4669         lxsdx and stxsdx alternatives.
4670         (*mov<mode>_hardfloat64): Ditto.
4671         * config/rs6000/vsx.md (*vsx_extract_<mode>_store): Ditto.
4673 2018-09-03  Richard Biener  <rguenther@suse.de>
4675         PR tree-optimization/87200
4676         * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Valueize a
4677         simplify result.
4679 2018-09-03  Martin Liska  <mliska@suse.cz>
4681         PR tree-optimization/87201
4682         * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
4683         Fix parenthesis in an expression.
4685 2018-09-03  Richard Biener  <rguenther@suse.de>
4687         PR tree-optimization/87197
4688         * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Mark the new def
4689         visited.  CSE the VN_INFO hashtable lookup.
4691         PR tree-optimization/87169
4692         * tree-ssa-sccvn.c (do_rpo_vn): When marking loops for not
4693         iterating make sure there's no extra backedges from irreducible
4694         regions feeding the header.  Mark the destination block
4695         executable.
4697 2018-09-03  Martin Liska  <mliska@suse.cz>
4699         PR driver/83193
4700         * common/common-target.def: Add TARGET_GET_VALID_OPTION_VALUES.
4701         * common/common-targhooks.c (default_get_valid_option_values):
4702         New function.
4703         * common/common-targhooks.h (default_get_valid_option_values):
4704         Likewise.
4705         * common/config/i386/i386-common.c: Move processor_target_table
4706         from i386.c.
4707         (ix86_get_valid_option_values): New function.
4708         (TARGET_GET_VALID_OPTION_VALUES): New macro.
4709         * config/i386/i386.c (struct ptt): Move to i386-common.c.
4710         (PTA_*): Move all defined masks into i386-common.c.
4711         (ix86_function_specific_restore): Use new processor_cost_table.
4712         * config/i386/i386.h (struct ptt): Moved from i386.c.
4713         (struct pta): Likewise.
4714         * doc/tm.texi: Document new TARGET_GET_VALID_OPTION_VALUES.
4715         * doc/tm.texi.in: Likewise.
4716         * opt-suggestions.c (option_proposer::suggest_option):
4717         Pass prefix to build_option_suggestions.
4718         (option_proposer::get_completions): Likewise.
4719         (option_proposer::build_option_suggestions): Use the new target
4720         hook.
4721         * opts.c (struct option_help_tuple): New struct.
4722         (print_filtered_help): Use the new target hook.
4724 2018-09-03  Martin Liska  <mliska@suse.cz>
4726         PR middle-end/59521
4727         * predict.c (set_even_probabilities): Add likely_edges
4728         argument and handle cases where we have precisely one
4729         likely edge.
4730         (combine_predictions_for_bb): Catch also likely_edges.
4731         (tree_predict_by_opcode): Handle gswitch statements.
4732         * tree-cfg.h (find_case_label_for_value): New declaration.
4733         (find_taken_edge_switch_expr): Likewise.
4734         * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
4735         Find pivot in decision tree based on probabily, not by number of
4736         nodes.
4738 2018-09-02  Gerald Pfeifer  <gerald@pfeifer.com>
4740         * doc/standards.texi (Standards): Update Objective-C reference.
4742 2018-09-01  Gerald Pfeifer  <gerald@pfeifer.com>
4744         * doc/install.texi (Prerequisites): Update link for MPC.
4746 2018-09-01  Michael Matz  <matz@suse.de>
4748         PR tree-optimization/87074
4749         * gimple-loop-jam.c (unroll_jam_possible_p): Check loop exit
4750         PHIs for outer-loop uses.
4752 2018-09-01  Gerald Pfeifer  <gerald@pfeifer.com>
4754         * doc/generic.texi (OpenMP): Adjust link to openmp.org.
4755         * doc/invoke.texi (C Dialect Options): Ditto.
4757 2018-09-01  Gerald Pfeifer  <gerald@pfeifer.com>
4759         * doc/install.texi (Prerequisites): Adjust link mpfr.org.
4761 2018-08-31  Richard Biener  <rguenther@suse.de>
4763         PR tree-optimization/87168
4764         * tree-ssa-sccvn.c (SSA_VAL): Add visited output parameter.
4765         (rpo_elim::eliminate_avail): When OP was not visited it must
4766         be available.
4768 2018-08-31  David Malcolm  <dmalcolm@redhat.com>
4770         * tree-vrp.c (copy_value_range): Convert param "from" from
4771         "value_range *" to "const value_range *".
4772         (range_is_null): Likewise for param "vr".
4773         (range_int_cst_p): Likewise.
4774         (range_int_cst_singleton_p): Likewise.
4775         (symbolic_range_p): Likewise.
4776         (value_ranges_intersect_p): Likewise for both params.
4777         (value_range_nonnegative_p): Likewise for param "vr".
4778         (value_range_constant_singleton): Likewise.
4779         (vrp_set_zero_nonzero_bits): Likewise for param "ar".
4780         (extract_range_into_wide_ints): Likewise for param "vr".
4781         (extract_range_from_multiplicative_op): Likewise for params "vr0"
4782         and "vr1".
4783         (vrp_can_optimize_bit_op): Likewise.
4784         (extract_range_from_binary_expr_1): Likewise for params "vr0_" and
4785         "vr1_".
4786         (extract_range_from_unary_expr): Likewise.
4787         (debug_value_range): Likewise for param "vr".
4788         (value_range::dump): Add "const" qualifier.
4789         (vrp_prop::check_array_ref): Convert local "vr" from
4790         "value_range *" to "const value_range *".
4791         (vrp_prop::check_mem_ref): Likewise.
4792         (vrp_prop::visit_stmt): Likewise for local "old_vr".
4793         (vrp_intersect_ranges_1): Likewise for param "vr_1".
4794         (vrp_intersect_ranges): Likewise.
4795         (simplify_stmt_for_jump_threading): Likewise for local "vr".
4796         (vrp_prop::vrp_finalize): Likewise.
4797         * tree-vrp.h (value_range::dump): Add "const" qualifier.
4798         (vrp_intersect_ranges): Add "const" qualifier to params as above.
4799         (extract_range_from_unary_expr): Likewise.
4800         (value_range_constant_singleton): Likewise.
4801         (symbolic_range_p): Likewise.
4802         (copy_value_range): Likewise.
4803         (extract_range_from_binary_expr_1): Likewise.
4804         (range_int_cst_p): Likewise.
4805         (vrp_set_zero_nonzero_bits): Likewise.
4806         (range_int_cst_singleton_p): Likewise.
4808 2018-08-31  Vlad Lazar  <vlad.lazar@arm.com>
4810         * config/aarch64/arm_neon.h (vabsd_s64): New.
4811         (vnegd_s64): Likewise.
4813 2018-08-31  Martin Jambor  <mjambor@suse.cz>
4815         * ipa-cp.c (estimate_local_effects): Replace wrong MAX with MIN.
4817 2018-08-31  Martin Liska  <mliska@suse.cz>
4819         * ipa-icf.c (sem_item::add_type): Use
4820         sem_item::m_type_hash_cache.
4821         * ipa-icf.h: Move the cache from sem_item_optimizer
4822         to sem_item.
4824 2018-08-31  Nathan Sidwell  <nathan@acm.org>
4826         * doc/extend.texi (Backwards Compatibility): Remove implicit
4827         extern C leeway of () being (...).
4829 2018-08-31  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
4831         * ipa-inline.c (can_inline_edge_by_limits_p): Fix typos in comment.
4833 2018-08-31  Segher Boessenkool  <segher@kernel.crashing.org>
4835         PR target/86684
4836         PR target/87149
4837         * config/rs6000/rs6000.md (lround<mode>di2): Gate on TARGET_FPRND.
4839 2018-08-31  Jakub Jelinek  <jakub@redhat.com>
4841         PR middle-end/87138
4842         * expmed.c (expand_mult_const): Use immed_wide_int_const instead of
4843         gen_int_mode.  Formatting fixes.
4845 2018-08-30  Sandra Loosemore  <sandra@codesourcery.com>
4847         * target.def (custom_function_descriptors): Improve documentation.
4848         * doc/tm.texi.in (Trampolines): Expand discussion of function
4849         descriptors and move TARGET_CUSTOM_FUNCTION_DESCRIPTORS to the
4850         beginning of the section.
4851         * doc/tm.texi: Regenerated.
4853 2018-08-30  Jose E. Marchesi  <jose.marchesi@oracle.com>
4855         * cfg.h (class auto_edge_flag): Spell out the template-id of the
4856         base class in the initializer list.  This is a workaround for
4857         building with older GCC.
4858         (class auto_bb_flag): Likewise.
4860 2018-08-30  Aaron Sawdey  <acsawdey@linux.ibm.com>
4862         * config/rs6000/altivec.md (altivec_eq<mode>): Remove star.
4863         (altivec_vcmpequ<VI_char>_p): Remove star.
4864         * config/rs6000/rs6000-string.c (do_load_for_compare): Support
4865         vector load modes.
4866         (expand_strncmp_vec_sequence): New function.
4867         (emit_final_str_compare_vec): New function.
4868         (expand_strn_compare): Add support for vector strncmp.
4869         * config/rs6000/rs6000.opt (-mstring-compare-inline-limit): Change
4870         length specification to bytes.
4871         * config/rs6000/vsx.md (vsx_ld_elemrev_v16qi_internal): Remove star.
4872         (vcmpnezb_p): New pattern.
4873         * doc/invoke.texi (RS/6000 and PowerPC Options): Update documentation
4874         for option -mstring-compare-inline-limit.
4876 2018-08-30  Thiago Macieira  <thiago.macieira@intel.com>
4878         * config/i386/i386.c (PTA_WESTMERE): Remove PTA_AES.
4879         (PTA_SKYLAKE): Add PTA_AES.
4880         (PTA_GOLDMONT): Likewise.
4882 2018-08-29  Jan Hubicka  <jh@suse.cz>
4884         PR lto/86517
4885         * lto-opts.c (lto_write_options): Always stream PIC/PIE mode.
4886         * lto-wrapper.c (merge_and_complain): Fix merging of PIC/PIE.
4888 2018-08-29  Jan Hubicka  <jh@suse.cz>
4890         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not follow
4891         TYPE_STUB_DECL.
4892         (hash_tree): Do not visit TYPE_STUB_DECL.
4893         * tree-streamer-out.c (write_ts_type_common_tree_pointers): Do not
4894         stream TYPE_STUB_DECL.
4895         * tree-streamer-in.c (lto_input_ts_type_common_tree_pointers): Likewise.
4896         * ipa-utils.h (type_with_linkage_p): Do not rely on TYPE_STUB_DECL
4897         after free_lang_data.
4898         (type_in_anonymous_namespace_p): Likewise.
4900 2018-08-29  Jan Hubicka  <jh@suse.cz>
4902         * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
4903         comment that it has to be even number.
4904         (class sreal): Change m_sig type to int32_t.
4905         * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
4906         int64_t for temporary calculations.
4907         (sreal_verify_basics): Drop one bit from minimum and maximum.
4909 2018-08-30  Richard Biener  <rguenther@suse.de>
4911         PR tree-optimization/87147
4912         * tree-ssa-sccvn.c (SSA_VISITED): New function.
4913         (visit_phi): When the degenerate result is from the backedge and
4914         we didn't visit its definition yet drop to VARYING.
4915         (do_rpo_vn): Properly mark blocks with incoming backedges as executable.
4917 2018-08-29  Jan Hubicka  <jh@suse.cz>
4919         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not walk
4920         DECL_VINDEX.
4921         (hash_tree): Likewise.
4923 2018-08-29  Jan Hubicka  <jh@suse.cz>
4925         * tree.c (find_decls_types_r): Walk also TYPE_NEXT_PTR_TO
4926         and TYPE_NEXT_REF_TO.
4928 2018-08-29  Jan Hubicka  <jh@suse.cz>
4930         * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
4931         comment that it has to be even number.
4932         (class sreal): Change m_sig type to int32_t.
4933         * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
4934         int64_t for temporary calculations.
4935         (sreal_verify_basics): Drop one bit from minimum and maximum.
4937 2018-08-30  Tamar Christina  <tamar.christina@arm.com>
4939         * config/aarch64/aarch64.c (aarch64_expand_movmem): Set TImode max.
4941 2018-08-30  Vlad Lazar  <vlad.lazar@arm.com>
4943         PR middle-end/86995
4944         * expmed.c (canonicalize_comparison): Use wi::sub instead of wi::add
4945         if to_add is negative.
4947 2018-08-29  Bernd Edlinger  <bernd.edlinger@hotmail.de>
4949         PR middle-end/87053
4950         * builtins.c (c_strlen): Improve range checks.
4952 2018-08-29  Martin Sebor  <msebor@redhat.com>
4953             Jeff Law  <law@redhat.com>
4955         PR tree-optimization/86714
4956         PR tree-optimization/86711
4957         * builtins.c (c_strlen): Add arguments to call to string_constant.
4958         * expr.c (string_constant): Add argument.  Detect missing nul
4959         terminator and outermost declaration it's missing in.
4960         * expr.h (string_constant): Add argument.
4961         * fold-const.c (read_from_constant_string): Add arguments to call to
4962         string_constant.
4963         (c_getstr): Likewise.
4964         * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
4965         to string_constant.
4966         * tree-ssa-strlen.c (get_stridx): Likewise.
4968 2018-08-29  Jan Hubicka  <jh@suse.cz>
4970         * tree-streamer-in.c (lto_input_ts_function_decl_tree_pointers):
4971         Do not stream DECL_VINDEX.
4972         * tree-streamer-out.c (write_ts_function_decl_tree_pointers): Likewise.
4973         * tree.c (free_lang_data_in_decl): Clear DECL_VINDEX.
4974         (decl_function_context): Use DECL_VIRTUAL_P rather than DECL_VINDEX.
4976 2018-08-29  Richard Biener  <rguenther@suse.de>
4978         * tree-ssa-sccvn.c (vuse_ssa_val): Return NULL for unvisited
4979         virtual operands that are not default defs to honor region
4980         boundaries.
4981         (rpo_vn_valueize): Remove ineffective code here.
4983 2018-08-29  Richard Biener  <rguenther@suse.de>
4985         PR tree-optimization/87132
4986         * tree-ssa-alias.c (get_continuation_for_phi): Do not translate
4987         when skipping defs reachable over backedges.
4989 2018-08-29  Richard Biener  <rguenther@suse.de>
4991         * tree-core.h: Document use of deprecated_flag in SSA_NAME.
4992         * tree.h (SSA_NAME_POINTS_TO_READONLY_MEMORY): Define.
4993         * tree-into-ssa.c (pass_build_ssa::execute): Initialize
4994         function parameters SSA_NAME_POINTS_TO_READONLY_MEMORY from fnspec.
4995         * tree-ssa-sccvn.c (const_parms, init_const_parms): Remove.
4996         (vn_reference_lookup_3): Remove use of const_parms.
4997         (free_rpo_vn): Do not free const_parms.
4998         (do_rpo_vn): Do not call init_const_parms.
4999         * tree-ssa-alias.c (refs_may_alias_p_1): Honor
5000         SSA_NAME_POINTS_TO_READONLY_MEMORY.
5001         (call_may_clobber_ref_p_1): Likewise.
5003 2018-08-29  Alexander Monakov  <amonakov@ispras.ru>
5005         PR other/86726
5006         * invoke.texi (Optimization Options): List -ftree-scev-cprop.
5007         (-O): Ditto.
5008         (-ftree-scev-cprop): Document.
5010 2018-08-29  Jan Hubicka  <jh@suse.cz>
5012         * sreal.h (normalize, normalize_up, normalize_down): Add new_sig/new_exp
5013         parameters.
5014         (sreal constructor): Update.
5015         * sreal.c (sreal:operator+, sreal:operator-, sreal:operator*,
5016         sreal:operator/): Update.
5018 2018-08-29  Martin Liska  <mliska@suse.cz>
5020         * tree-switch-conversion.c (switch_conversion::expand):
5021         Strenghten assumption about gswitch statements.
5023 2018-08-29  Richard Biener  <rguenther@suse.de>
5025         PR tree-optimization/87117
5026         * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_stmt): Only
5027         re-value-number released SSA VDEFs.
5029 2018-08-29  Richard Biener  <rguenther@suse.de>
5031         PR tree-optimization/87126
5032         * tree-ssa-sccvn.c (vn_reference_insert): Remove assert.
5034 2018-08-28  Jim Wilson  <jimw@sifive.com>
5036         * config/riscv/pic.md: Rewrite.
5037         * config/riscv/riscv.c (riscv_address_insns): Return cost of 3 for
5038         invalid address.
5039         * config/riscv/riscv.md (ZERO_EXTEND_LOAD): Delete.
5040         (SOFTF, default_load, softload, softstore): New.
5042 2018-08-28  Jeff Law  <law@redhat.com>
5044         * fold-const.c (fold_binary_loc): Remove recently added assert.
5046 2018-08-28  Joern Rennecke  <joern.rennecke@riscy-ip.com>
5048         * genpreds.c (write_predicate_subfunction): Also add ATTRIBUTE_UNUSED
5049         to OP parmeter of generated function.
5051 2018-08-28  MCC CS  <deswurstes@users.noreply.github.com>
5053         PR tree-optimization/87009
5054         * match.pd: Add boolean optimizations.
5056 2018-08-28  Martin Sebor  <msebor@redhat.com>
5058         PR middle-end/86631
5059         * calls.c (alloc_max_size): Treat HOST_WIDE_INT special.
5060         * gimple-ssa-warn-alloca.c (adjusted_warn_limit): New function.
5061         (pass_walloca::gate): Use it.
5062         (alloca_call_type): Same.
5063         (pass_walloca::execute): Same.
5064         * stor-layout.c (layout_decl): Treat HOST_WIDE_INT special.
5066 2018-08-28  David Malcolm  <dmalcolm@redhat.com>
5068         * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): Change version check on
5069         GCC_VERSION for usage of "__gcc_dump_printf__" format from
5070         >= 3005 to >= 9000.
5072 2018-08-28  Richard Biener  <rguenther@suse.de>
5074         PR tree-optimization/87124
5075         * tree-ssa-sccvn.c (vn_lookup_simplify_result): Guard against
5076         constants before looking up avail.
5078 2018-08-28  Jakub Jelinek  <jakub@redhat.com>
5080         PR middle-end/87099
5081         * calls.c (maybe_warn_nonstring_arg): Punt early if
5082         warn_stringop_overflow is zero.  Don't call get_range_strlen
5083         on 3rd argument, keep iterating until lenrng[1] is INTEGER_CST.
5084         Swap comparison operands to have constants on rhs.  Only use
5085         lenrng[1] if non-NULL and INTEGER_CST.  Don't uselessly
5086         increment lenrng[0].
5088 2018-08-28  Richard Sandiford  <richard.sandiford@arm.com>
5090         * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Fix unguarded
5091         use of tree_to_shwi.  Remove duplicated test for the size being
5092         a whole number of bytes.
5094 2018-08-28  Richard Biener  <rguenther@suse.de>
5096         PR tree-optimization/87117
5097         * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_cleanup):
5098         Handle removed stmt without LHS (GIMPLE_NOP).
5100 2018-08-28  Richard Biener  <rguenther@suse.de>
5102         PR tree-optimization/87117
5103         * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Exclude
5104         void which is is_gimple_reg_type by checking for COMPLETE_TYPE_P.
5106 2018-08-28  Richard Biener  <rguenther@suse.de>
5108         PR tree-optimization/87117
5109         * tree-ssa-pre.c (compute_avail): Do not make expressions
5110         with predicated values available.
5111         (get_expr_value_id): Assert we do not run into predicated value
5112         expressions.
5114 2018-08-28  Richard Biener  <rguenther@suse.de>
5116         PR tree-optimization/87117
5117         * tree-ssa-operands.c (add_stmt_operand): STRING_CST may
5118         get virtual operands.
5119         (get_expr_operands): Handle STRING_CST like other decls.
5121 2018-08-28  Martin Liska  <mliska@suse.cz>
5123         * tree.h: Update documentation of fndecl_built_in_p
5124         functions.
5127 2018-08-27  Jeff Law  <law@redhat.com>
5128         PR tree-optimization/87110
5129         * tree-ssa-dse.c (compute_trims): Handle non-constant
5130         TYPE_SIZE_UNIT.
5132 2018-08-27  Martin Sebor  <msebor@redhat.com>
5134         PR tree-optimization/86914
5135         * tree-ssa-strlen.c (maybe_set_strlen_range): Avoid MEM_REF.
5137 2018-08-27  Martin Sebor  <msebor@redhat.com>
5139         PR tree-optimization/87112
5140         * builtins.c (expand_builtin_strnlen): Convert c_strlen result to
5141         the type of the bound argument.
5143 2018-08-27  Jeff Law  <law@redhat.com>
5145         * tree-ssa-dse.c (compute_trims): Handle case where the reference's
5146         type does not have a TYPE_SIZE_UNIT.
5148 2018-08-27  Steve Ellcey  <sellcey@cavium.com>
5150         * config/aarch64/aarch64-speculation.cc: Replace include of cfg.h
5151         with include of backend.h.
5153 2018-08-27  Richard Biener  <rguenther@suse.de>
5155         PR tree-optimization/86927
5156         * tree-vect-loop.c (vect_create_epilog_for_reduction): Properly
5157         use const cond reduction code.
5159 2018-08-27  Alexander Monakov  <amonakov@ispras.ru>
5161         PR tree-optimization/85758
5162         * match.pd ((X & Y) ^ Y): Add :s qualifier to inner expression.
5164 2018-08-27  David Malcolm  <dmalcolm@redhat.com>
5166         PR c++/87091
5167         * diagnostic-show-locus.c (class layout_range): Update for
5168         conversion of show_caret_p to a tri-state.
5169         (layout_range::layout_range): Likewise.
5170         (make_range): Likewise.
5171         (layout::maybe_add_location_range): Likewise.
5172         (layout::should_print_annotation_line_p): Don't show annotation
5173         lines for ranges that are SHOW_LINES_WITHOUT_RANGE.
5174         (layout::get_state_at_point): Update for conversion of
5175         show_caret_p to a tri-state.  Bail out early for
5176         SHOW_LINES_WITHOUT_RANGE, so that such ranges don't affect
5177         underlining or source colorization.
5178         (gcc_rich_location::add_location_if_nearby): Update for conversion
5179         of show_caret_p to a tri-state.
5180         (selftest::test_one_liner_multiple_carets_and_ranges): Likewise.
5181         (selftest::test_one_liner_fixit_replace_equal_secondary_range):
5182         Likewise.
5183         (selftest::test_one_liner_labels): Likewise.
5184         * gcc-rich-location.c (gcc_rich_location::add_expr): Update for
5185         conversion of show_caret_p to a tri-state.
5186         * pretty-print.c (text_info::set_location): Likewise.
5187         * pretty-print.h (text_info::set_location): Likewise.
5188         * substring-locations.c (format_warning_n_va): Likewise.
5189         * tree-diagnostic.c (default_tree_printer): Likewise.
5190         * tree-pretty-print.c (newline_and_indent): Likewise.
5192 2018-08-27  David Malcolm  <dmalcolm@redhat.com>
5194         PR c++/87091
5195         * diagnostic-show-locus.c (get_line_span_for_fixit_hint): Show the
5196         line above for line-insertion fix-it hints.
5197         (selftest::test_fixit_insert_containing_newline): Update the
5198         expected results, and add a test with line-numbering enabled.
5200 2018-08-27  Martin Liska  <mliska@suse.cz>
5202         PR sanitizer/86962
5203         * sanopt.c (sanitize_rewrite_addressable_params): Ignore
5204         params with DECL_HAS_VALUE_EXPR_P.
5206 2018-08-27  Martin Liska  <mliska@suse.cz>
5208         * config/i386/i386.c (ix86_expand_set_or_movmem): Dump
5209         selected expansion strategy.
5211 2018-08-27  Martin Liska  <mliska@suse.cz>
5213         * builtins.h (is_builtin_fn): Remove and fndecl_built_in_p.
5214         * builtins.c (is_builtin_fn): Likewise.
5215         * attribs.c (diag_attr_exclusions): Use new function
5216         fndecl_built_in_p and remove check for FUNCTION_DECL if
5217         possible.
5218         (builtin_mathfn_code): Likewise.
5219         (fold_builtin_expect): Likewise.
5220         (fold_call_expr): Likewise.
5221         (fold_builtin_call_array): Likewise.
5222         (fold_call_stmt): Likewise.
5223         (set_builtin_user_assembler_name): Likewise.
5224         (is_simple_builtin): Likewise.
5225         * calls.c (gimple_alloca_call_p): Likewise.
5226         (maybe_warn_nonstring_arg): Likewise.
5227         * cfgexpand.c (expand_call_stmt): Likewise.
5228         * cgraph.c (cgraph_update_edges_for_call_stmt_node): Likewise.
5229         (cgraph_edge::verify_corresponds_to_fndecl): Likewise.
5230         (cgraph_node::verify_node): Likewise.
5231         * cgraphclones.c (build_function_decl_skip_args): Likewise.
5232         (cgraph_node::create_clone): Likewise.
5233         * config/arm/arm.c (arm_insert_attributes): Likewise.
5234         * config/i386/i386.c (ix86_gimple_fold_builtin): Likewise.
5235         * dse.c (scan_insn): Likewise.
5236         * expr.c (expand_expr_real_1): Likewise.
5237         * fold-const.c (operand_equal_p): Likewise.
5238         (fold_binary_loc): Likewise.
5239         * gimple-fold.c (gimple_fold_stmt_to_constant_1): Likewise.
5240         * gimple-low.c (lower_stmt): Likewise.
5241         * gimple-pretty-print.c (dump_gimple_call): Likewise.
5242         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
5243         Likewise.
5244         * gimple.c (gimple_build_call_from_tree): Likewise.
5245         (gimple_call_builtin_p): Likewise.
5246         (gimple_call_combined_fn): Likewise.
5247         * gimplify.c (gimplify_call_expr): Likewise.
5248         (gimple_boolify): Likewise.
5249         (gimplify_modify_expr): Likewise.
5250         (gimplify_addr_expr): Likewise.
5251         * hsa-gen.c (gen_hsa_insns_for_call): Likewise.
5252         * ipa-cp.c (determine_versionability): Likewise.
5253         * ipa-fnsummary.c (compute_fn_summary): Likewise.
5254         * ipa-param-manipulation.c (ipa_modify_formal_parameters): Likewise.
5255         * ipa-split.c (visit_bb): Likewise.
5256         (split_function): Likewise.
5257         * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
5258         * lto-cgraph.c (input_node): Likewise.
5259         * lto-streamer-out.c (write_symbol): Likewise.
5260         * omp-low.c (setjmp_or_longjmp_p): Likewise.
5261         (lower_omp_1): Likewise.
5262         * predict.c (strip_predict_hints): Likewise.
5263         * print-tree.c (print_node): Likewise.
5264         * symtab.c (symtab_node::output_to_lto_symbol_table_p): Likewise.
5265         * trans-mem.c (is_tm_irrevocable): Likewise.
5266         (is_tm_load): Likewise.
5267         (is_tm_simple_load): Likewise.
5268         (is_tm_store): Likewise.
5269         (is_tm_simple_store): Likewise.
5270         (is_tm_abort): Likewise.
5271         (tm_region_init_1): Likewise.
5272         * tree-call-cdce.c (gen_shrink_wrap_conditions): Likewise.
5273         * tree-cfg.c (verify_gimple_call): Likewise.
5274         (move_stmt_r): Likewise.
5275         (stmt_can_terminate_bb_p): Likewise.
5276         * tree-eh.c (lower_eh_constructs_2): Likewise.
5277         * tree-if-conv.c (if_convertible_stmt_p): Likewise.
5278         * tree-inline.c (remap_gimple_stmt): Likewise.
5279         (copy_bb): Likewise.
5280         (estimate_num_insns): Likewise.
5281         (fold_marked_statements): Likewise.
5282         * tree-sra.c (scan_function): Likewise.
5283         * tree-ssa-ccp.c (surely_varying_stmt_p): Likewise.
5284         (optimize_stack_restore): Likewise.
5285         (pass_fold_builtins::execute): Likewise.
5286         * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Likewise.
5287         (mark_all_reaching_defs_necessary_1): Likewise.
5288         * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Likewise.
5289         * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
5290         (pass_forwprop::execute): Likewise.
5291         * tree-ssa-loop-im.c (stmt_cost): Likewise.
5292         * tree-ssa-math-opts.c (pass_cse_reciprocals::execute): Likewise.
5293         * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Likewise.
5294         * tree-ssa-strlen.c (get_string_length): Likewise.
5295         * tree-ssa-structalias.c (handle_lhs_call): Likewise.
5296         (find_func_aliases_for_call): Likewise.
5297         * tree-ssa-ter.c (find_replaceable_in_bb): Likewise.
5298         * tree-stdarg.c (optimize_va_list_gpr_fpr_size): Likewise.
5299         * tree-tailcall.c (find_tail_calls): Likewise.
5300         * tree.c (need_assembler_name_p): Likewise.
5301         (free_lang_data_in_decl): Likewise.
5302         (get_call_combined_fn): Likewise.
5303         * ubsan.c (is_ubsan_builtin_p): Likewise.
5304         * varasm.c (incorporeal_function_p): Likewise.
5305         * tree.h (DECL_BUILT_IN): Remove and replace with
5306         fndecl_built_in_p.
5307         (DECL_BUILT_IN_P): Transfort to fndecl_built_in_p.
5308         (fndecl_built_in_p): New.
5310 2018-08-27  Martin Liska  <mliska@suse.cz>
5312         PR tree-optimization/86847
5313         * tree-switch-conversion.c (switch_decision_tree::dump_case_nodes):
5314         Dump also subtree probability.
5315         (switch_decision_tree::do_jump_if_equal): New function.
5316         (switch_decision_tree::emit_case_nodes): Handle special
5317         situations in balanced tree that can be emitted much simpler.
5318         Fix calculation of probabilities that happen in tree expansion.
5319         * tree-switch-conversion.h (struct cluster): Add
5320         is_single_value_p.
5321         (struct simple_cluster): Likewise.
5322         (struct case_tree_node): Add new function has_child.
5323         (do_jump_if_equal): New.
5325 2018-08-27  Martin Liska  <mliska@suse.cz>
5327         * tree-switch-conversion.c (bit_test_cluster::find_bit_tests):
5328         Add new argument to bit_test_cluster constructor.
5329         (bit_test_cluster::emit): Set bits really number of values
5330         handlel by a test.
5331         (bit_test_cluster::hoist_edge_and_branch_if_true): Add
5332         probability argument.
5333         * tree-switch-conversion.h (struct bit_test_cluster):
5334         Add m_handles_entire_switch.
5336 2018-08-27  Martin Liska  <mliska@suse.cz>
5338         PR tree-optimization/86702
5339         * tree-switch-conversion.c (jump_table_cluster::emit):
5340         Make probabilities even for values in jump table
5341         according to number of cases handled.
5342         (switch_decision_tree::compute_cases_per_edge): Pass
5343         argument to reset_out_edges_aux function.
5344         (switch_decision_tree::analyze_switch_statement): Likewise.
5345         * tree-switch-conversion.h (switch_decision_tree::reset_out_edges_aux):
5346         Make it static.
5348 2018-08-27  Martin Liska  <mliska@suse.cz>
5350         * cfgexpand.c (expand_asm_stmt): Use label_to_block and pass
5351         cfun argument explicitly.
5352         * gimple-pretty-print.c (dump_gimple_switch): Likewise.
5353         * hsa-gen.c (gen_hsa_insns_for_switch_stmt): Use new
5354         function gimple_switch_default_bb.
5355         (convert_switch_statements):
5356         (expand_builtins):
5357         * ipa-fnsummary.c (set_switch_stmt_execution_predicate):
5358         * stmt.c (label_to_block_fn): Use label_to_block and pass
5359         cfun argument explicitly and use gimple_switch_label_bb.
5360         (expand_case): Likewise.
5361         * tree-cfg.c (lower_phi_internal_fn): Use label_to_block and pass
5362         cfun argument explicitly. Likewise.
5363         (make_edges_bb): Likewise.
5364         (make_cond_expr_edges): Likewise.
5365         (get_cases_for_edge): Likewise.
5366         (make_gimple_switch_edges): Likewise.
5367         (label_to_block_fn): Likewise.
5368         (label_to_block): Likewise.
5369         (make_goto_expr_edges): Likewise.
5370         (make_gimple_asm_edges): Likewise.
5371         (main_block_label): Likewise.
5372         (group_case_labels_stmt): Likewise.
5373         (find_taken_edge_computed_goto): Likewise.
5374         (find_taken_edge_switch_expr): Likewise.
5375         (gimple_verify_flow_info): Likewise.
5376         (gimple_redirect_edge_and_branch): Likewise.
5377         (gimple_switch_label_bb): New function.
5378         (gimple_switch_default_bb): Likewise.
5379         (gimple_switch_edge): Likewise.
5380         (gimple_switch_default_edge): Likewise.
5381         * tree-cfg.h (label_to_block_fn): Remove and replace ...
5382         (label_to_block): ... with this.
5383         (gimple_switch_label_bb): New.
5384         (gimple_switch_default_bb): Likewise.
5385         (gimple_switch_edge): Likewise.
5386         (gimple_switch_default_edge): Likewise.
5387         * tree-cfgcleanup.c (convert_single_case_switch): Use
5388         new gimple functions and pass new argument to label_to_block.
5389         (cleanup_control_flow_bb):
5390         * tree-eh.c (make_eh_dispatch_edges): Use label_to_block and pass
5391         cfun argument explicitly.
5392         (make_eh_edges): Likewise.
5393         (redirect_eh_dispatch_edge): Likewise.
5394         (lower_resx): Likewise.
5395         (lower_eh_dispatch): Likewise.
5396         (maybe_remove_unreachable_handlers): Likewise.
5397         (unsplit_eh): Likewise.
5398         (cleanup_empty_eh): Likewise.
5399         (verify_eh_edges): Likewise.
5400         (verify_eh_dispatch_edge): Likewise.
5401         * tree-ssa-dom.c (record_edge_info): Likewise.
5402         * tree-ssa-forwprop.c (simplify_gimple_switch_label_vec): Likewise.
5403         * tree-ssa-threadedge.c (thread_around_empty_blocks): Likewise.
5404         (thread_through_normal_block): Likewise.
5405         * tree-ssa-uncprop.c (associate_equivalences_with_edges): Likewise.
5406         * tree-ssa-uninit.c (convert_control_dep_chain_into_preds):
5407         * tree-switch-conversion.c (switch_conversion::collect): Use new
5408         gimple functions.
5409         (switch_conversion::check_final_bb): Likewise.
5410         (switch_conversion::gather_default_values): Pass new argument
5411         to label_to_block.
5412         (switch_conversion::build_constructors): Likewise.
5413         (switch_decision_tree::compute_cases_per_edge): Use new
5414         gimple_switch_edge function.
5415         (switch_decision_tree::analyze_switch_statement): Pass new argument
5416         to label_to_block.
5417         (switch_decision_tree::try_switch_expansion): Use
5418         gimple_switch_default_edge.
5419         * tree-vrp.c (find_switch_asserts): Pass new argument
5420         to label_to_block.
5421         * vr-values.c (vr_values::vrp_visit_switch_stmt): Likewise.
5422         (vr_values::simplify_switch_using_ranges): Likewise.
5424 2018-08-27  Richard Biener  <rguenther@suse.de>
5426         * cfganal.h (rev_post_order_and_mark_dfs_back_seme): Declare.
5427         * cfganal.c (rev_post_order_and_mark_dfs_back_seme): New function.
5429         * tree-ssa-sccvn.h (struct vn_pval): New structure.
5430         (struct vn_nary_op_s): Add unwind_to member.  Add
5431         predicated_values flag and put result into a union together
5432         with a linked list of vn_pval.
5433         (struct vn_ssa_aux): Add name member to make maintaining
5434         a map of SSA name to vn_ssa_aux possible.  Remove no longer
5435         needed info, dfsnum, low, visited, on_sccstack, use_processed
5436         and range_info_anti_range_p members.
5437         (run_scc_vn, vn_eliminate, free_scc_vn, vn_valueize): Remove.
5438         (do_rpo_vn, run_rpo_vn, eliminate_with_rpo_vn, free_rpo_vn):
5439         New functions.
5440         (vn_valueize): New global.
5441         (vn_context_bb): Likewise.
5442         (VN_INFO_RANGE_INFO, VN_INFO_ANTI_RANGE_P, VN_INFO_RANGE_TYPE,
5443         VN_INFO_PTR_INFO): Remove.
5444         * tree-ssa-sccvn.c: ... (rewrite)
5445         (pass_fre::execute): For -O2+ initialize loops and run
5446         RPO VN in optimistic mode (iterating).  For -O1 and -Og
5447         run RPO VN in non-optimistic mode.
5448         * params.def (PARAM_SCCVN_MAX_SCC_SIZE): Remove.
5449         (PARAM_RPO_VN_MAX_LOOP_DEPTH): Add.
5450         * doc/invoke.texi (sccvn-max-scc-size): Remove.
5451         (rpo-vn-max-loop-depth): Document.
5452         * tree-ssa-alias.c (walk_non_aliased_vuses): Stop walking
5453         when valuezing the VUSE signals we walked out of the region.
5454         * tree-ssa-pre.c (phi_translate_1): Ignore predicated values.
5455         (phi_translate): Set VN context block to use for availability
5456         lookup.
5457         (compute_avail): Likewise.
5458         (pre_valueize): New function.
5459         (pass_pre::execute): Adjust to the RPO VN API.
5461         * tree-ssa-loop-ivcanon.c: Include tree-ssa-sccvn.h.
5462         (propagate_constants_for_unrolling): Remove.
5463         (tree_unroll_loops_completely): Perform value-numbering
5464         on the unrolled bodies loop parent.
5466 2018-08-27  Richard Biener  <rguenther@suse.de>
5468         * tree-ssa-pre.c (compute_antic): Re-use inverted postorder
5469         for partial antic compute.
5471 2018-08-27  Jakub Jelinek  <jakub@redhat.com>
5473         PR rtl-optimization/87065
5474         * combine.c (simplify_if_then_else): Formatting fix.
5475         (if_then_else_cond): Guard MULT optimization with SCALAR_INT_MODE_P
5476         check.
5477         (known_cond): Don't return const_true_rtx for vector modes.  Use
5478         CONST0_RTX instead of const0_rtx.  Formatting fixes.
5480 2018-08-27  Martin Liska  <mliska@suse.cz>
5482         PR gcov-profile/87069
5483         * gcov.c (process_file): Record files already processed
5484         and warn about a file being processed multiple times.
5486 2018-08-27  Martin Liska  <mliska@suse.cz>
5488         PR driver/83193
5489         * config/aarch64/aarch64.c (aarch64_override_options_internal):
5490         Set default values for x_aarch64_*_string strings.
5491         * config/aarch64/aarch64.opt: Remove --{march,mcpu,mtune}==
5492         prefix.  For -mabi do not print '=ABI' in help and use
5493         <option_value> format for -msve-vector-bits and -moverride
5494         options.
5496 2018-08-26  Jeff Law  <law@redhat.com>
5498         * config/mips/frame-header-opt.c: Include "backend.h" rather than
5499         "cfg.h"
5501 2018-08-26  Marek Polacek  <polacek@redhat.com>
5503         PR c++/87029, Implement -Wredundant-move.
5504         * doc/invoke.texi: Document -Wredundant-move.
5506 2018-08-25  Martin Sebor  <msebor@redhat.com>
5508         PR tree-optimization/87059
5509         * builtins.c (expand_builtin_strncmp): Convert MIN_EXPR operand
5510         to the same type as the other.
5511         * fold-const.c (fold_binary_loc): Assert expectation.
5513 2018-08-25  Iain Sandoe  <iain@sandoe.co.uk>
5515         * config/darwin.c (machopic_legitimize_pic_address): Clean up
5516         extraneous parentheses, dead code section and formatting.
5518 2018-08-24  David Malcolm  <dmalcolm@redhat.com>
5520         PR c++/87091
5521         * diagnostic-show-locus.c (layout::layout): Ensure the margin is
5522         wide enough for jumps in the line-numbering to be visible.
5523         (layout::print_gap_in_line_numbering): New member function.
5524         (layout::calculate_line_spans): When using line numbering, merge
5525         line spans that are only 1 line apart.
5526         (diagnostic_show_locus): When printing line numbers, show gaps in
5527         line numbering directly, rather than printing headers.
5528         (selftest::test_diagnostic_show_locus_fixit_lines): Add test of
5529         line-numbering with multiple line spans.
5530         (selftest::test_fixit_insert_containing_newline_2): Add test of
5531         line-numbering, in which the spans are close enough to be merged.
5533 2018-08-24  Aldy Hernandez  <aldyh@redhat.com>
5535         * gimple-ssa-evrp-analyze.c (set_ssa_range_info): Pass value_range
5536         to range_includes_zero_p.  Do not special case VR_ANTI_RANGE.
5537         * tree-vrp.c (range_is_nonnull): Remove.
5538         (range_includes_zero_p): Accept value_range instead of min/max.
5539         (extract_range_from_binary_expr_1): Do not early bail on
5540         POINTER_PLUS_EXPR.
5541         Use range_includes_zero_p instead of range_is_nonnull.
5542         (extract_range_from_unary_expr): Use range_includes_zero_p instead
5543         of range_is_nonnull.
5544         (vrp_meet_1): Pass value_range to range_includes_zero_p.  Do not
5545         special case VR_ANTI_RANGE.
5546         (vrp_finalize): Same.
5547         * tree-vrp.h (range_includes_zero_p): Pass value_range as argument
5548         instead of min/max.
5549         (range_is_nonnull): Remove.
5550         * vr-values.c (vrp_stmt_computes_nonzero): Use
5551         range_includes_zero_p instead of range_is_nonnull.
5552         (extract_range_basic): Pass value_range to range_includes_zero_p
5553         instead of range_is_nonnull.
5555 2018-08-24  Uros Bizjak  <ubizjak@gmail.com>
5557         * emit-rtl.c (init_emit_once): Do not emit MODE_POINTER_BOUNDS RTXes.
5558         * emit-rtl.h (rtl_data): Remove return_bnd.
5559         * explow.c (trunc_int_for_mode): Do not handle POINTER_BOUNDS_MODE_P.
5560         * function.c (diddle_return_value): Do not handle crtl->return_bnd.
5561         * genmodes.c (complete_mode): Do not handle MODE_POINTER_BOUNDS.
5562         (POINTER_BOUNDS_MODE): Remove definition.
5563         (make_pointer_bounds_mode): Remove.
5564         (get_mode_class): Do not handle MODE_POINTER_BOUNDS.
5565         * machmode.h (POINTER_BOUNDS_MODE_P): Remove definition.
5566         (scalare_mode::includes_p): Do not handle MODE_POINTER_BOUNDS.
5567         * mode-classes.def: Do not define MODE_POINTER_BOUNDS.
5568         * stor-layout.c (int_mode_for_mode): Do not handle MODE_POINTER_BOUNDS.
5569         * tree-core.h (enum tree_index): Remove TI_POINTER_BOUNDS_TYPE.
5570         * varasm.c (output_constant_pool_2): Do not handle MODE_POINTER_BOUNDS.
5572         * config/i386/i386-modes.def (BND32, BND64): Remove.
5573         * config/i386/i386.c (dbx_register_map): Remove bound registers.
5574         (dbx64_register_map): Ditto.
5575         (svr4_dbx_register_map): Ditto.
5576         (indirect_thunk_bnd_needed): Remove.
5577         (indirect_thunks_bnd_used): Ditto.
5578         (indirect_return_bnd_needed): Ditto.
5579         (indirect_return_via_cx_bnd): Ditto.
5580         (enum indirect_thunk_prefix): Remove indirect_thunk_prefix_bnd.
5581         (indirect_thunk_name): Remove handling of indirect_thunk_prefix_bnd.
5582         (output_indirect_thunk): Ditto.  Remove need_prefix argument.
5583         (output_indirect_thunk_function): Remove handling of
5584         indirect_return_bnd_needed, indirect_return_via_cx_bnd,
5585         indirect_thunk_bnd_needed and indirect_thunks_bnd_used variables.
5586         (ix86_save_reg): Remove handling of crtl->return_bnd.
5587         (ix86_legitimate_constant_p): Remove handling of POINTER_BOUNDS_MODE_P.
5588         (ix86_print_operand_address_as): Remove handling of UNSPEC_BNDMK_ADDR
5589         and UNSPEC_BNDLX_ADDR.
5590         (ix86_output_indirect_branch_via_reg): Remove handling of
5591         indirect_thunk_prefix_bnd.
5592         (ix86_output_indirect_branch_via_push): Ditto.
5593         (ix86_output_function_return): Ditto.
5594         (ix86_output_indirect_function_return): Ditto.
5595         (avoid_func_arg_motion): Do not handle UNSPEC_BNDSTX.
5596         * config/i386/i386.h (FIXED_REGISTERS): Remove bound registers.
5597         (CALL_USED_REGISTERS): Ditto.
5598         (REG_ALLOC_ORDER): Update for removal of bound registers.
5599         (HI_REGISTER_NAMES): Ditto.
5600         * config/i386/i386.md (UNSPEC_BNDMK, UNSPEC_BNDMK_ADDR, UNSPEC_BNDSTX)
5601         (UNSPEC_BNDLDX, UNSPEC_BNDLDX_ADDR, UNSPEC_BNDCL, UNSPEC_BNDCU)
5602         (UNSPEC_BNDCN, UNSPEC_MPX_FENCE): Remove.
5603         (BND0_REG, BND1_REG, BND2_REG, BND3_REG): Remove
5604         (FIRST_PSEUDO_REG): Update.
5605         (BND): Remove mode iterator.
5606         * config/i386/predicates.md (bnd_mem_operator): Remove.
5608 2018-08-24  Richard Sandiford  <richard.sandiford@arm.com>
5610         * tree-vect-stmts.c (vectorizable_bswap): Handle variable-length
5611         vectors.
5613 2018-08-24  Richard Sandiford  <richard.sandiford@arm.com>
5615         * tree-vect-slp.c (vect_transform_slp_perm_load): Separate out
5616         the case in which the permute needs only a single element and
5617         repeats for every vector of the result.  Extend that case to
5618         handle variable-length vectors.
5619         * tree-vect-stmts.c (vectorizable_load): Update accordingly.
5621 2018-08-24  H.J. Lu  <hongjiu.lu@intel.com>
5623         PR debug/79342
5624         * dwarf2out.c (save_macinfo_strings): Call set_indirect_string
5625         on DW_MACINFO_start_file for -gsplit-dwarf -g3.
5627 2018-08-24  Richard Biener  <rguenther@suse.de>
5629         * cfg.h (struct control_flow_graph): Add edge_flags_allocated and
5630         bb_flags_allocated members.
5631         (auto_flag): New RAII class for allocating flags.
5632         (auto_edge_flag): New RAII class for allocating edge flags.
5633         (auto_bb_flag): New RAII class for allocating bb flags.
5634         * cfgloop.c (verify_loop_structure): Allocate temporary edge
5635         flag dynamically.
5636         * cfganal.c (dfs_enumerate_from): Remove use of visited sbitmap
5637         in favor of temporarily allocated BB flag.
5638         * hsa-brig.c: Re-order includes.
5639         * hsa-dump.c: Likewise.
5640         * hsa-regalloc.c: Likewise.
5641         * print-rtl.c: Likewise.
5642         * profile-count.c: Likewise.
5644 2018-08-24  Segher Boessenkool  <segher@kernel.crashing.org>
5646         PR target/86989
5647         * config/rs6000/rs6000.c (toc_relative_expr_p): Check that the base is
5648         the TOC register.
5650 2018-08-24  Aldy Hernandez  <aldyh@redhat.com>
5652         PR 87073/bootstrap
5653         * wide-int-range.cc (wide_int_range_div): Do not ignore result
5654         from wide_int_range_multiplicative_op.
5656 2018-08-23  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
5658         * tree-vect-data-refs.c (vect_grouped_store_supported): Fix typo
5659         "permutaion".
5661 2018-08-23  Giuliano Belinassi  <giuliano.belinassi@usp.br>
5663         * genmatch.c (parser::parse_operation): Fix typo 'exapnded'
5664         to 'expanded'.
5666 2018-08-23  Alexander Monakov  <amonakov@ispras.ru>
5668         * tree-scalar-evolution.c (final_value_replacement_loop): Dump
5669         full GENERIC expression used for replacement.
5671 2018-08-23  Aldy Hernandez  <aldyh@redhat.com>
5673         * tree-vrp.c (abs_extent_range): Remove.
5674         (extract_range_into_wide_ints): Pass wide ints by reference.
5675         (extract_range_from_binary_expr_1): Rewrite the *DIV_EXPR code.
5676         Pass wide ints by reference in all calls to
5677         extract_range_into_wide_ints.
5678         * wide-int-range.cc (wide_int_range_div): New.
5679         * wide-int-range.h (wide_int_range_div): New.
5680         (wide_int_range_includes_zero_p): New.
5681         (wide_int_range_zero_p): New.
5683 2018-08-23  Matthew Malcomson  <matthew.malcomson@arm.com>
5685         * config/aarch64/aarch64.md (arches): New enum.
5686         (arch): New enum attr.
5687         (arch_enabled): New attr.
5688         (enabled): Now uses arch_enabled only.
5689         (simd, sve, fp16): Removed attribute.
5690         (fp): Attr now defined in terms of 'arch'.
5691         (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64, *movti_aarch64,
5692         *movhf_aarch64, <optab><fcvt_target><GPF:mode>2,
5693         <FCVT_F2FIXED:fcvt_fixed_insn><GPF:mode>3,
5694         <FCVT_FIXED2F:fcvt_fixed_insn><GPI:mode>3): Merge 'fp' and 'simd'
5695         attributes into 'arch'.
5696         (*movsf_aarch64, *movdf_aarch64, *movtf_aarch64, *add<mode>3_aarch64,
5697         subdi3, neg<mode>2, <optab><mode>3, one_cmpl<mode>2,
5698         *<NLOGICAL:optab>_one_cmpl<mode>3, *xor_one_cmpl<mode>3,
5699         *aarch64_ashl_sisd_or_int_<mode>3, *aarch64_lshr_sisd_or_int_<mode>3,
5700         *aarch64_ashr_sisd_or_int_<mode>3, *aarch64_sisd_ushl): Convert use of
5701         'simd' attribute into 'arch'.
5702         (load_pair_sw_<SX:mode><SX2:mode>, load_pair_dw_<DX:mode><DX2:mode>,
5703         store_pair_sw_<SX:mode><SX2:mode>, store_pair_dw_<DX:mode><DX2:mode>):
5704         Convert use of 'fp' attribute to 'arch'.
5705         * config/aarch64/aarch64-simd.md (move_lo_quad_internal_<mode>,
5706         move_lo_quad_internal_<mode>): (different modes) Merge 'fp' and 'simd'
5707         into 'arch'.
5708         (move_lo_quad_internal_be_<mode>, move_lo_quad_internal_be_<mode>):
5709         (different modes) Merge 'fp' and 'simd' into 'arch'.
5710         (*aarch64_combinez<mode>, *aarch64_combinez_be<mode>): Merge 'fp' and
5711         'simd' into 'arch'.
5713 2018-08-23  Segher Boessenkool  <segher@kernel.crashing.org>
5715         PR rtl-optimization/87026
5716         * expmed.c (canonicalize_comparison): If we can no longer create
5717         pseudoregisters, don't.
5719 2018-08-23  Richard Earnshaw  <rearnsha@arm.com>
5721         PR target/86951
5722         * config/arm/arm-protos.h (arm_emit_speculation_barrier): New
5723         prototype.
5724         * config/arm/arm.c (speculation_barrier_libfunc): New static
5725         variable.
5726         (arm_init_libfuncs): Initialize it.
5727         (arm_emit_speculation_barrier): New function.
5728         * config/arm/arm.md (speculation_barrier): Call
5729         arm_emit_speculation_barrier for architectures that do not have
5730         DSB or ISB.
5731         (speculation_barrier_insn): Only match on Armv7 or later.
5733 2018-08-23  Richard Biener  <rguenther@suse.de>
5735         PR middle-end/87024
5736         * tree-inline.c (copy_bb): Drop unused __builtin_va_arg_pack_len
5737         calls.
5739 2018-08-23  Richard Sandiford  <richard.sandiford@arm.com>
5741         * config/aarch64/aarch64.c (aarch64_evpc_sve_tbl): Fix handling
5742         of single-vector TBLs.
5743         (aarch64_vectorize_vec_perm_const): Set one_vector_p when only
5744         one input is given.
5746 2018-08-23  Richard Sandiford  <richard.sandiford@arm.com>
5748         PR target/85910
5749         * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const_1): Fix
5750         aarch64_evpc_tbl guard.
5752 2018-08-22  Bernd Edlinger  <bernd.edlinger@hotmail.de>
5754         * tree-ssa-dse.c (compute_trims): Avoid folding away undefined
5755         behaviour.
5757 2018-08-22  Martin Sebor  <msebor@redhat.com>
5759         PR middle-end/87052
5760         * tree-pretty-print.c (pretty_print_string): Add argument.
5761         (dump_generic_node): Call to pretty_print_string with string size.
5763 2018-08-22  Segher Boessenkool  <segher@kernel.crashing.org>
5765         PR rtl-optimization/86771
5766         * combine.c (try_combine): Do not allow splitting a resulting PARALLEL
5767         of two SETs into those two SETs, one to be placed at i2, if that SETs
5768         destination is modified between i2 and i3.
5770 2018-08-22  Richard Sandiford  <richard.sandiford@arm.com>
5772         PR tree-optimization/86725
5773         * tree-vect-loop.c (vect_inner_phi_in_double_reduction_p): New
5774         function.
5775         (vect_analyze_scalar_cycles_1): Check it.
5777 2018-08-22  Richard Sandiford  <richard.sandiford@arm.com>
5779         PR tree-optimization/86725
5780         * tree-vect-loop.c (vect_is_simple_reduction): When treating
5781         an outer loop phi as a double reduction, make sure that the
5782         single user of the phi result is an inner loop phi.
5784 2018-08-22  Richard Sandiford  <richard.sandiford@arm.com>
5786         * tree-vect-data-refs.c (vect_analyze_group_access_1): Convert
5787         grouped stores with gaps to a strided group.
5789 2018-08-22  Richard Sandiford  <richard.sandiford@arm.com>
5791         * tree-vect-stmts.c (get_group_load_store_type)
5792         (get_load_store_type): Only test STMT_VINFO_STRIDED_P for the
5793         first statement in a group.
5795 2018-08-22  Iain Sandoe  <iain@sandoe.co.uk>
5797         * config/darwin.h (LINK_COMMAND_SPEC_A): Sync LTO options with
5798         the sequence used in gcc/gcc.c.
5800 2018-08-22  Iain Sandoe  <iain@sandoe.co.uk>
5802         PR other/704
5803         * gcc-ar.c (main): Don’t try to invoke the plug-in if we’re not
5804         building it.
5806 2018-08-22  Iain Sandoe  <iain@sandoe.co.uk>
5808         * config/darwin10.h (LINK_GCC_C_SEQUENCE_SPEC): Adjust to use the
5809         Darwin10-specific unwinder-shim.
5810         * config/darwin12.h (LINK_GCC_C_SEQUENCE_SPEC): Remove.
5811         * config/rs6000/darwin.h (DARWIN_CRT1_SPEC, DARWIN_DYLIB1_SPEC):
5812         New to cater for Darwin10 Rosetta.
5814 2018-08-22  Iain Sandoe  <iain@sandoe.co.uk>
5816         * config/i386/i386.c (ix86_output_addr_diff_elt): Move the MACH-O
5817         specific test before the one for HAVE_AS_GOTOFF_IN_DATA.
5819 2018-08-22  Iain Sandoe  <iain@sandoe.co.uk>
5821         PR bootstrap/81033
5822         PR target/81733
5823         PR target/52795
5824         * gcc/dwarf2out.c (FUNC_SECOND_SECT_LABEL): New.
5825         (dwarf2out_switch_text_section): Generate a local label for the
5826         second function sub-section and apply it as the second FDE start
5827         label.
5828         * gcc/final.c (final_scan_insn_1): Emit second FDE label after the
5829         second sub-section start.
5831 2018-08-22  Richard Biener  <rguenther@suse.de>
5833         PR tree-optimization/86988
5834         * tree-vrp.c (vrp_prop::check_mem_ref): Bail out on VLAs.
5836 2018-08-22  Richard Biener  <rguenther@suse.de>
5838         PR tree-optimization/86945
5839         * tree-cfg.c (generate_range_test): Use unsigned arithmetic.
5841 2018-08-22  Alexandre Oliva <oliva@adacore.com>
5843         * config/rs6000/rs6000.c (SMALL_DATA_RELOC, SMALL_DATA_REG): Add
5844         a comment about how uses of r2 for .sdata2 come about.
5846 2018-08-22  Alexandre Oliva <aoliva@redhat.com>
5848         * tree-ssa-reassoc.c (is_reassociable_op): Fix cut&pasto.
5850 2018-08-21  Marek Polacek  <polacek@redhat.com>
5852         PR c++/86981, Implement -Wpessimizing-move.
5853         * doc/invoke.texi: Document -Wpessimizing-move.
5855 2018-08-21  Jan Hubicka  <jh@suse.cz>
5857         * tree.c (find_decls_types_r): Do not check for redundant typedefs.
5858         * tree.h (is_redundant_typedef): Remove.
5859         * dwarf2out.c (is_redundant_typedef): Turn into static function.
5861 2018-08-21  Jan Hubicka  <jh@suse.cz>
5863         * tree.c (free_lang_data_in_decl): Remove types from DECL_CONTEXT
5864         when possible.
5866 2018-08-21  Tamar Christina  <tamar.christina@arm.com>
5868         * expmed.c (extract_low_bits): Reject invalid subregs early.
5870 2018-08-21  Bernd Edlinger  <bernd.edlinger@hotmail.de>
5872         PR middle-end/86121
5873         * tree-ssa-strlen.c (adjust_last_stmt): Avoid folding away undefined
5874         behaviour.
5876 2018-08-21  Rasmus Villemoes  <rv@rasmusvillemoes.dk>
5878         * config/vxworks.h: Guard vxworks_asm_out_constructor and
5879         vxworks_asm_out_destructor by !HAVE_INITFINI_ARRAY_SUPPORT
5880         * config/vxworks.c: Likewise.
5882 2018-08-21  Rasmus Villemoes  <rv@rasmusvillemoes.dk>
5884         * config/vxworks.c: Set targetm.have_ctors_dtors
5885         if HAVE_INITFINI_ARRAY_SUPPORT.
5886         * config/vxworks.h: Set SUPPORTS_INIT_PRIORITY
5887         if HAVE_INITFINI_ARRAY_SUPPORT.
5889 2018-08-21  Rasmus Villemoes  <rv@rasmusvillemoes.dk>
5891         * config/vxworks.h: Add $(WIND_BASE)/target/h/wrn/coreip to
5892         default search path for VxWorks < 7.
5894 2018-08-21  Bernd Edlinger  <bernd.edlinger@hotmail.de>
5896         * gimple-ssa-sprintf.c (decl_constant_value): Remove.
5897         (get_format_string): Refer to c_getstr.
5899 2018-08-21  Tom de Vries  <tdevries@suse.de>
5901         * cgraph.h (debuginfo_early_init, debuginfo_init, debuginfo_fini)
5902         (debuginfo_start, debuginfo_stop, debuginfo_early_start)
5903         (debuginfo_early_stop): Declare.
5904         * cgraphunit.c (debuginfo_early_init, debuginfo_init, debuginfo_fini)
5905         (debuginfo_start, debuginfo_stop, debuginfo_early_start)
5906         (debuginfo_early_stop): New function.
5907         (symbol_table::finalize_compilation_unit): Call debuginfo_early_start
5908         and debuginfo_early_stop.
5909         * dwarf2out.c (dwarf2out_finish, dwarf2out_early_finish): Dump dwarf.
5910         * toplev.c (compile_file): Call debuginfo_start and debuginfo_stop.
5911         (general_init): Call debuginfo_early_init.
5912         (finalize): Call debuginfo_fini.
5913         (do_compile): Call debuginfo_init.
5914         * doc/invoke.texi (@gccoptlist): Add -fdump-debug and
5915         -fdump-early-debug.
5916         (@item -fdump-debug, @item -fdump-earlydebug): Add.
5918 2018-08-21  Tom de Vries  <tdevries@suse.de>
5920         * dwarf2out.c (print_dw_val, print_loc_descr, print_die): Handle
5921         flag_dump_noaddr and flag_dump_unnumbered.
5923 2018-08-21  Aldy Hernandez  <aldyh@redhat.com>
5925         * wide-int-range.cc (wide_int_range_abs): New.
5926         (wide_int_range_order_set): Rename from wide_int_range_min_max.
5927         * wide-int-range.h (wide_int_range_abs): New.
5928         (wide_int_range_min_max): New.
5929         * tree-vrp.c (extract_range_from_unary_expr): Rewrite ABS_EXPR
5930         case to call wide_int_range_abs.
5931         Rewrite MIN/MAX_EXPR to call wide_int_range_min_max.
5932         (extract_range_from_abs_expr): Delete.
5934 2018-08-20  Michael Meissner  <meissner@linux.ibm.com>
5936         PR target/87033
5937         * config/rs6000/rs6000.md (extendsi<mode>2): Change constraints
5938         from 'Y' to 'YZ' to enable the LWAX instruction to be generated
5939         for indexed loads.
5941 2018-08-20  Nathan Sidwell  <nathan@acm.org>
5942             Jeff Law <law@redhat.com>
5944         * config/s390/s390-c (s390_macro_to_expand): Use cpp_macro_p.
5945         * config/spu/spu-c.c (spu_macro_to_expand): Likewise.
5947 2018-08-20  David Malcolm  <dmalcolm@redhat.com>
5949         PR other/84889
5950         * attribs.c (diag_attr_exclusions): Add auto_diagnostic_group instance.
5951         (decl_attributes): Likewise.
5952         * calls.c (maybe_warn_nonstring_arg): Add auto_diagnostic_group
5953         instance.
5954         * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
5955         * diagnostic-core.h (class auto_diagnostic_group): New class.
5956         * diagnostic.c (diagnostic_initialize): Initialize the new fields.
5957         (diagnostic_report_diagnostic): Handle the first diagnostics within
5958         a group.
5959         (emit_diagnostic): Add auto_diagnostic_group instance.
5960         (inform): Likewise.
5961         (inform_n): Likewise.
5962         (warning): Likewise.
5963         (warning_at): Likewise.
5964         (warning_n): Likewise.
5965         (pedwarn): Likewise.
5966         (permerror): Likewise.
5967         (error): Likewise.
5968         (error_n): Likewise.
5969         (error_at): Likewise.
5970         (sorry): Likewise.
5971         (fatal_error): Likewise.
5972         (internal_error): Likewise.
5973         (internal_error_no_backtrace): Likewise.
5974         (auto_diagnostic_group::auto_diagnostic_group): New ctor.
5975         (auto_diagnostic_group::~auto_diagnostic_group): New dtor.
5976         * diagnostic.h (struct diagnostic_context): Add fields
5977         "diagnostic_group_nesting_depth",
5978         "diagnostic_group_emission_count", "begin_group_cb",
5979         "end_group_cb".
5980         * gimple-ssa-isolate-paths.c (find_implicit_erroneous_behavior):
5981         Add auto_diagnostic_group instance(s).
5982         (find_explicit_erroneous_behavior): Likewise.
5983         * gimple-ssa-warn-alloca.c (pass_walloca::execute): Likewise.
5984         * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Likewise.
5985         * gimplify.c (warn_implicit_fallthrough_r): Likewise.
5986         (gimplify_va_arg_expr): Likewise.
5987         * hsa-gen.c (HSA_SORRY_ATV): Likewise.
5988         (HSA_SORRY_AT): Likewise.
5989         * ipa-devirt.c (compare_virtual_tables): Likewise.
5990         (warn_odr): Likewise.
5991         * multiple_target.c (expand_target_clones): Likewise.
5992         * opts-common.c (cmdline_handle_error): Likewise.
5993         * reginfo.c (globalize_reg): Likewise.
5994         * substring-locations.c (format_warning_n_va): Likewise.
5995         * tree-inline.c (expand_call_inline): Likewise.
5996         * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Likewise.
5997         * tree-ssa-loop-niter.c
5998         (do_warn_aggressive_loop_optimizations): Likewise.
5999         * tree-ssa-uninit.c (warn_uninit): Likewise.
6000         * tree.c (warn_deprecated_use): Likewise.
6002 2018-08-20  H.J. Lu  <hongjiu.lu@intel.com>
6004         PR target/87014
6005         * config/i386/i386.md (eh_return): Always update EH return
6006         address in word_mode.
6008 2018-08-20  Chung-Lin Tang  <cltang@codesourcery.com>
6010         * targhooks.c (std_gimplify_va_arg_expr): Properly handle case of when
6011         TARGET_SPLIT_COMPLEX_ARG is defined.
6013 2018-08-20  Bernd Edlinger  <bernd.edlinger@hotmail.de>
6015         * expr.c (store_field): Change gcc_assert to gcc_checking_assert.
6017 2018-08-20  Bernd Edlinger  <bernd.edlinger@hotmail.de>
6019         PR target/86984
6020         * expr.c (expand_assignment): Assert that bitpos is positive.
6021         (store_field): Likewise
6022         (expand_expr_real_1): Make sure that bitpos is positive.
6023         * config/alpha/alpha.h (CONSTANT_ADDRESS_P): Avoid signed
6024         integer overflow.
6026 2018-08-20  Nathan Sidwell  <nathan@acm.org>
6028         * Makefile.in (CPP_ID_DATA_H): Delete.
6029         (CPP_INTERNAL_H): Don't add it.
6030         (GTFILES): Replace CPP_ID_DATA_H with CPPLIB_H.
6031         * gengtype.c (open_base_files): Replace cpp-id-data.h with cpplib.h
6033 2018-08-20  Richard Biener  <rguenther@suse.de>
6035         PR tree-optimization/78655
6036         * tree-vrp.c (extract_range_from_binary_expr_1): Make
6037         pointer + offset nonnull if either operand is nonnull work.
6039 2018-08-20  Tom de Vries  <tdevries@suse.de>
6041         * dwarf2out.c (add_scalar_info): Don't add reference to existing die
6042         unless the referenced die describes the added property using
6043         DW_AT_location or DW_AT_const_value.  Fall back to exprloc case.
6044         Otherwise, add a DW_AT_location to the referenced die.
6046 2018-08-19  Uros Bizjak  <ubizjak@gmail.com>
6048         PR target/86994
6049         * config/i386/i386.c (ix86_rtx_costs) [case SET]: Check source for
6050         register_operand when calling ix86_set_reg_reg_cost.
6051         [case CONST_INT, case CONST, case LABEL_REF, case SYMBOL_REF]:
6052         Set *total to 0 for operands that satisfy x86_64_immediate_operand
6053         predicate and to 1 otherwise.
6055 2018-08-18  Iain Sandoe  <iain@sandoe.co.uk>
6057         * config/darwin.c (darwin_override_options): If -gsplit-dwarf is set,
6058         emit a diagnostic that it is not supported and reset the option.
6059         * config/darwin.h (DRIVER_SELF_SPECS): Note that gsplit-dwarf is not
6060         supported and consume the option.  (ASM_FINAL_SPEC): New.
6062 2018-08-17  Segher Boessenkool  <segher@kernel.crashing.org>
6064         * doc/md.texi (Patterns): Use @ref instead of @xref in the middle of
6065         a sentence.
6067 2018-08-17  Sandra Loosemore  <sandra@codesourcery.com>
6069         C-SKY port: Documentation
6071         * doc/extend.texi (C-SKY Function Attributes): New section.
6072         * doc/invoke.texi (Option Summary): Add C-SKY options.
6073         (C-SKY Options): New section.
6074         * doc/md.texi (Machine Constraints): Document C-SKY constraints.
6076 2018-08-17  Jojo  <jijie_rong@c-sky.com>
6077             Huibin Wang  <huibin_wang@c-sky.com>
6078             Sandra Loosemore  <sandra@codesourcery.com>
6079             Chung-Lin Tang  <cltang@codesourcery.com>
6081         C-SKY port: Backend implementation
6083         * config/csky/*: New.
6084         * common/config/csky/*: New.
6086 2018-08-17  Jojo  <jijie_rong@c-sky.com>
6087             Huibin Wang  <huibin_wang@c-sky.com>
6088             Sandra Loosemore  <sandra@codesourcery.com>
6089             Chung-Lin Tang  <cltang@codesourcery.com>
6090             Andrew Jenner  <andrew@codesourcery.com>
6092         C-SKY port: Configury
6094         * config.gcc (csky-*-*): New.
6095         * configure.ac: Add csky to targets for dwarf2 debug_line support.
6096         * configure: Regenerated.
6098 2018-08-17  David Malcolm  <dmalcolm@redhat.com>
6100         * dump-context.h: Include "dumpfile.h".
6101         (dump_context::dump_printf_va): Convert final param from va_list
6102         to va_list *.  Convert from ATTRIBUTE_PRINTF to
6103         ATTRIBUTE_GCC_DUMP_PRINTF.
6104         (dump_context::dump_printf_loc_va): Likewise.
6105         * dumpfile.c: Include "stringpool.h".
6106         (make_item_for_dump_printf_va): Delete.
6107         (make_item_for_dump_printf): Delete.
6108         (class dump_pretty_printer): New class.
6109         (dump_pretty_printer::dump_pretty_printer): New ctor.
6110         (dump_pretty_printer::emit_items): New member function.
6111         (dump_pretty_printer::emit_any_pending_textual_chunks): New member
6112         function.
6113         (dump_pretty_printer::emit_item): New member function.
6114         (dump_pretty_printer::stash_item): New member function.
6115         (dump_pretty_printer::format_decoder_cb): New member function.
6116         (dump_pretty_printer::decode_format): New member function.
6117         (dump_context::dump_printf_va): Reimplement in terms of
6118         dump_pretty_printer.
6119         (dump_context::dump_printf_loc_va): Convert final param from va_list
6120         to va_list *.
6121         (dump_context::begin_scope): Reimplement call to
6122         make_item_for_dump_printf.
6123         (dump_printf): Update for change to dump_printf_va.
6124         (dump_printf_loc): Likewise.
6125         (selftest::test_capture_of_dump_calls): Convert "stmt" from
6126         greturn * to gimple *.  Add a test_decl.  Add tests of dump_printf
6127         with %T, %E, and %G.
6128         * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): New macro.
6129         (dump_printf): Replace ATTRIBUTE_PRINTF_2 with
6130         ATTRIBUTE_GCC_DUMP_PRINTF (2, 3).
6131         (dump_printf_loc): Replace ATTRIBUTE_PRINTF_3 with
6132         ATTRIBUTE_GCC_DUMP_PRINTF (3, 0).
6133         * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Convert
6134         use of HOST_WIDE_INT_PRINT_DEC on unsigned HOST_WIDE_INT "count"
6135         within a dump_printf_loc call to "%wu".
6136         (vector_alignment_reachable_p): Merge two dump_printf[_loc] calls,
6137         converting a use of HOST_WIDE_INT_PRINT_DEC to "%wd".  Add a
6138         missing space after "=".
6139         * tree-vect-loop.c (vect_analyze_loop_2) Within a dump_printf
6140         call, convert use of HOST_WIDE_INT_PRINT_DEC to "%wd".
6141         * tree-vect-slp.c (vect_slp_bb): Within a dump_printf_loc call,
6142         convert use of HOST_WIDE_INT_PRINT_UNSIGNED to "%wu".
6143         * tree-vectorizer.c (try_vectorize_loop_1): Likewise.  Remove
6144         duplicate "vectorized" from message.
6146 2018-08-17  Szabolcs Nagy  <szabolcs.nagy@arm.com>
6148         * config/arm/arm-builtins.c (arm_init_simd_builtin_types): Clear
6149         polyNxK_t element's TYPE_STRING_FLAG.
6151 2018-08-17  Segher Boessenkool  <segher@kernel.crashing.org>
6153         * config/rs6000/rs6000.md (*cbranch, *creturn): Name these patterns
6154         (they were unnamed before).  Fix comments.
6156 2018-08-17  Nathan Sidwell  <nathan@acm.org>
6158         * cppbuiltin.c: Include "cpplib.h", not "cpp-id-data.h".
6160 2018-08-17  Richard Biener  <rguenther@suse.de>
6162         PR tree-optimization/86841
6163         * wide-int-range.cc (wide_int_range_lshift): Use to_uhwi.
6165 2018-08-17  Martin Liska  <mliska@suse.cz>
6167         * common.opt: Remove Warn, Init and Report for options with
6168         Ignore/Deprecated flag. Warning is done automatically for
6169         Deprecated flags.
6170         * config/i386/i386.opt: Likewise.
6171         * config/ia64/ia64.opt: Likewise.
6172         * config/rs6000/rs6000.opt: Likewise.
6173         * cppbuiltin.c (define_builtin_macros_for_compilation_flags):
6174         Remove usage of flag_check_pointer_bounds.
6175         * lto-wrapper.c (merge_and_complain): Do not handle
6176         OPT_fcheck_pointer_bounds.
6177         (append_compiler_options): Likewise.
6178         * opt-functions.awk: Do not handle Deprecated.
6179         * optc-gen.awk: Check that Var, Report and Init are not
6180         used for an option with Ignore/Deprecated flag.
6181         * opts-common.c (decode_cmdline_option): Do not report
6182         CL_ERR_DEPRECATED.
6183         (read_cmdline_option): Report warning for OPT_SPECIAL_deprecated
6184         options.
6185         * opts.h (struct cl_option): Remove cl_deprecated flag.
6186         (CL_ERR_DEPRECATED): Remove error enum value.
6188 2018-08-17  Richard Biener  <rguenther@suse.de>
6190         PR middle-end/86505
6191         * tree-inline.c (copy_bb): When inlining __builtin_va_arg_pack_len ()
6192         across a va-arg-pack using call adjust its return value accordingly.
6194 2018-08-16  Martin Sebor  <msebor@redhat.com>
6196         PR tree-optimization/86853
6197         * gimple-ssa-sprintf.c (struct format_result): Rename member.
6198         (struct fmtresult): Add member and initialize it in ctors.
6199         (format_character): Handle %C.  Extend range to NUL.  Set MAYFAIL.
6200         (format_string): Handle %S the same as %ls.  Set MAYFAIL.
6201         (format_directive): Set POSUNDER4K when MAYFAIL is set.
6202         (parse_directive): Handle %C same as %c.
6203         (sprintf_dom_walker::compute_format_length): Adjust.
6204         (is_call_safe): Adjust.
6206 2018-08-16  Bernd Edlinger  <bernd.edlinger@hotmail.de>
6208         * builtins.c (c_strlen): Add new parameter eltsize.  Use it
6209         for determining how to count the elements.
6210         * builtins.h (c_strlen): Adjust prototype.
6211         * expr.c (string_constant): Add new parameter mem_size.
6212         Set *mem_size appropriately.
6213         * expr.h (string_constant): Adjust protoype.
6214         * gimple-fold.c (get_range_strlen): Add new parameter eltsize.
6215         * gimple-fold.h (get_range_strlen): Adjust prototype.
6216         * gimple-ssa-sprintf.c (get_string_length): Add new parameter eltsize.
6217         (format_string): Call get_string_length with eltsize.
6219 2018-08-16  David Malcolm  <dmalcolm@redhat.com>
6221         * diagnostic.c (default_diagnostic_start_span_fn): Call pp_string
6222         to emit the span, rather than setting it as the prefix.
6224 2018-08-16  David Malcolm  <dmalcolm@redhat.com>
6226         * diagnostic-show-locus.c (layout::start_annotation_line): Add
6227         "margin_char" parameter, defaulting to space.  Use it in place
6228         of pp_space for the initial part of the margin.
6229         (layout::print_leading_fixits): Use '+' when filling the margin
6230         of line-insertion fix-it hints.
6232 2018-08-16  Segher Boessenkool  <segher@kernel.crashing.org>
6234         * config/rs6000/rs6000.md (two unnamed define_insn and define_split):
6235         Delete.
6237 2018-08-16  Segher Boessenkool  <segher@kernel.crashing.org>
6239         * config/rs6000/altivec.md: Don't set length attribute to the default
6240         value.
6241         * config/rs6000/darwin.md: Ditto.
6242         * config/rs6000/dfp.md: Ditto.
6243         * config/rs6000/htm.md: Ditto.
6244         * config/rs6000/rs6000.md: Ditto.
6245         * config/rs6000/sync.md: Ditto.
6246         * config/rs6000/vsx.md: Ditto.
6248 2018-08-16  Segher Boessenkool  <segher@kernel.crashing.org>
6250         * config/rs6000/altivec.md: Don't set length attribute to the default
6251         value, for branch instructions.
6252         * config/rs6000/darwin.md: Ditto.
6253         * config/rs6000/rs6000.md: Ditto.
6255 2018-08-16  Segher Boessenkool  <segher@kernel.crashing.org>
6257         * config/rs6000/rs6000.md (length): Always define as const_int 4.
6258         (unnamed conditional branch define_insn): Set length to 4 or 8
6259         depending on offset.
6260         (<bd>_<mode>): Similar, for alternative 0.
6261         (<bd>tf_<mode>): Ditto.
6263 2018-08-16  Tamar Christina  <tamar.christina@arm.com>
6265         * expr.c (copy_blkmode_to_reg): Perform larger copies when safe.
6267 2018-08-16  Matthew Malcomson  <matthew.malcomson@arm.com>
6269         * doc/rtl.texi: Replace old RTX class names with new names.
6272 2018-08-16  Vlad Lazar  <vlad.lazar@arm.com>
6274         * expmed.h (canonicalize_comparison): New declaration.
6275         * expmed.c (canonicalize_comparison, equivalent_cmp_code): New function.
6276         * expmed.c (emit_store_flag_1): Add call to canonicalize_comparison.
6277         * optabs.c (prepare_cmp_insn): Likewise.
6278         * rtl.h (unsigned_condition_p): New function which checks if a
6279         comparison operator is unsigned.
6281 2018-08-16  Nathan Sidwell  <nathan@acm.org>
6283         * config/rs6000/rs6000-c.c (rs6000_macro_to_expend): Use cpp_macro_p.
6284         * config/powerpcspc/powerpcspe-c.c (rs6000_macro_to_expend): Likewise.
6286 2018-08-16  Tamar Christina  <tamar.christina@arm.com>
6288         PR target/84711
6289         * config/arm/arm.c (arm_can_change_mode_class): Disallow subreg.
6290         * config/arm/neon.md (movv4hf, movv8hf): Refactored to..
6291         (mov<mov>): ..this and enable unconditionally.
6293 2018-08-16  Tamar Christina  <tamar.christina@arm.com>
6295         * config/arm/neon.md (*neon_mov<mode>): Remove reg-to-reg alternative.
6297 2018-08-16  Sam Tebbs  <sam.tebbs@arm.com>
6299         * config/aarch64/aarch64.opt (mlow-precision-recip-sqrt)
6300         (mlow-precision-sqrt, mlow-precision-div, mverbose-cost-dump): Replace
6301         "Common" with "Target".
6303 2018-08-15  Uros Bizjak  <ubizjak@gmail.com>
6305         * config/i386/i386.opt (mmitigate-rop): Mark as deprecated.
6306         * doc/invoke.texi (mmitigate-rop): Remove.
6307         * config/i386/i386.c: Do not include "regrename.h".
6308         (ix86_rop_should_change_byte_p, reg_encoded_number)
6309         (ix86_get_modrm_for_rop, set_rop_modrm_reg_bits, ix86_mitigate_rop):
6310         Remove.
6311         (ix86_reorg): Remove call to ix86_mitigate_rop.
6312         * config/i386/i386.md (attr "modrm_class"): Remove.
6313         (cmp<mode>_ccno_1, mov<mode>_xor, movstrict<mode>_xor)
6314         (x86_mov<mode>cc_0_m1. x86_mov<mode>cc_0_m1_se)
6315         (x86_mov<mode>cc_0_m1_neg): Remove modrm_class attribute override.
6317 2018-08-15  Will Schmidt  <will_schmidt@vnet.ibm.com>
6319         * config/rs6000/rs600.c (rs6000_gimple_fold_builtin): Add entries to
6320         allow folding of mergeh() and mergel() for the float and double types.
6321         (fold_mergehl_helper): Rework to handle building a permute tree
6322         for float vectors.
6324 2018-08-15  Uros Bizjak  <ubizjak@gmail.com>
6326         * config/i386/i386.c (expand_vec_perm_movs): Enable V4SFmode
6327         for TARGET_SSE.
6329 2018-08-15  David Malcolm  <dmalcolm@redhat.com>
6331         * common.opt (fdiagnostics-show-labels): New option.
6332         * diagnostic-show-locus.c (class layout_range): Add field
6333         "m_label".
6334         (class layout): Add field "m_show_labels_p".
6335         (layout_range::layout_range): Add param "label" and use it to
6336         initialize m_label.
6337         (make_range): Pass in NULL for new "label" param of layout_range's
6338         ctor.
6339         (layout::layout): Initialize m_show_labels_p.
6340         (layout::maybe_add_location_range): Pass in loc_range->m_label
6341         when constructing layout_range instances.
6342         (struct line_label): New struct.
6343         (layout::print_any_labels): New member function.
6344         (layout::print_line): Call it if label-printing is enabled.
6345         (selftest::test_one_liner_labels): New test.
6346         (selftest::test_diagnostic_show_locus_one_liner): Call it.
6347         * diagnostic.c (diagnostic_initialize): Initialize
6348         context->show_labels_p.
6349         * diagnostic.h (struct diagnostic_context): Add field
6350         "show_labels_p".
6351         * doc/invoke.texi (Diagnostic Message Formatting Options): Add
6352         -fno-diagnostics-show-labels.
6353         * dwarf2out.c (gen_producer_string): Add
6354         OPT_fdiagnostics_show_labels to the ignored options.
6355         * gcc-rich-location.c (gcc_rich_location::add_expr): Add "label"
6356         param.
6357         (gcc_rich_location::maybe_add_expr): Likewise.
6358         * gcc-rich-location.h (gcc_rich_location::gcc_rich_location): Add
6359         label" param, defaulting to NULL.
6360         (gcc_rich_location::add_expr): Add "label" param.
6361         (gcc_rich_location::maybe_add_expr): Likewise.
6362         (class text_range_label): New class.
6363         (class range_label_for_type_mismatch): New class.
6364         * gimple-ssa-sprintf.c (fmtwarn): Pass NULL for new label params
6365         of format_warning_va.
6366         (fmtwarn_n): Likewise for new params of format_warning_n_va.
6367         * lto-wrapper.c (merge_and_complain): Add
6368         OPT_fdiagnostics_show_labels to the "pick one setting" options.
6369         (append_compiler_options): Likewise to the dropped options.
6370         (append_diag_options): Likewise to the passed-on options.
6371         * opts.c (common_handle_option): Handle the new option.
6372         * selftest-diagnostic.c
6373         (test_diagnostic_context::test_diagnostic_context): Enable
6374         show_labels_p.
6375         * substring-locations.c: Include "gcc-rich-location.h".
6376         (format_warning_n_va): Add "fmt_label" and "param_label" params
6377         and use them as appropriate.
6378         (format_warning_va): Add "fmt_label" and "param_label" params,
6379         passing them on to format_warning_n_va.
6380         (format_warning_at_substring): Likewise.
6381         (format_warning_at_substring_n): Likewise.
6382         * substring-locations.h (format_warning_va): Add "fmt_label" and
6383         "param_label" params.
6384         (format_warning_n_va): Likewise.
6385         (format_warning_at_substring): Likewise.
6386         (format_warning_at_substring_n): Likewise.
6387         * toplev.c (general_init): Initialize global_dc->show_labels_p.
6389 2018-08-15  Qing Zhao  <qing.zhao@oracle.com>
6391         PR testsuite/86519
6392         * builtins.c (expand_builtin_memcmp): Do not expand the call
6393         when overflow is detected.
6395 2018-08-15  Martin Sebor  <msebor@redhat.com>
6397         PR tree-optimization/71625
6398         * config/aarch64/aarch64-builtins.c
6399         (aarch64_init_simd_builtin_types): Clear Poly8_t's TYPE_STRING_FLAG.
6401 2018-08-15  Ilya Leoshkevich  <iii@linux.ibm.com>
6403         * config/s390/s390.c (s390_reorg): Remove loop.
6405 2018-08-15  Iain Sandoe  <iain@sandoe.co.uk>
6407         * config/darwin.c
6408          (darwin_function_switched_text_sections): Delete.
6409         * gcc/config/darwin.h
6410          (TARGET_ASM_FUNCTION_SWITCHED_TEXT_SECTIONS): Likewise.
6412 2018-08-15  Iain Sandoe  <iain@sandoe.co.uk>
6414         PR target/81685
6415         * config/darwin.h: (DEBUG_STR_OFFSETS_SECTION, DEBUG_LOCLISTS_SECTION,
6416         DEBUG_RNGLISTS_SECTION) new macros.  (DEBUG_PUBNAMES_SECTION,
6417         DEBUG_PUBTYPES_SECTION) update to include GNU variant.
6419 2018-08-15  Martin Liska  <mliska@suse.cz>
6421         PR tree-optimization/86925
6422         * predict.c (expr_expected_value_1): When taking
6423         later predictor, assign also probability.
6424         Use fold_build2_initializer_loc in order to fold
6425         the expression in -frounding-math.
6427 2018-08-14  Allan Sandfeld Jensen <allan.jensen@qt.io>
6429         * config/i386/i386.c (expand_vec_perm_movs): New method matching movs
6430         patterns.
6431         (expand_vec_perm_1): Try the new method.
6433 2018-08-14  Ilya Leoshkevich  <iii@linux.ibm.com>
6435         PR target/86547
6436         * lra-lives.c (remove_some_program_points_and_update_live_ranges):
6437         Check whether lra_live_max_point is 0 before dividing.
6439 2018-08-14  Martin Sebor  <msebor@redhat.com>
6441         PR tree-optimization/86650
6442         * tree-vrp.c (vrp_prop::check_array_ref): Print an inform message.
6443         (vrp_prop::check_mem_ref): Same.
6445 2018-08-13  Liu Hao <lh_mouse@126.com>
6447         * pretty-print.c (eat_esc_sequence): Swap the foreground and
6448         background colors if the COMMON_LVB_REVERSE_VIDEO flag is set,
6449         and clear it thereafter, as it only works for DBCS.
6451 2018-08-13  Liu Hao <lh_mouse@126.com>
6453         * pretty-print.c (mingw_ansi_fputs): Do not call _close() on the
6454         handle returned by _get_osf_handle().
6456 2018-08-13  Will Schmidt  <will_schmidt@vnet.ibm.com>
6458         * gcc/config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support
6459         for folding vec_perm.
6461 2018-08-13  Will Schmidt  <will_schmidt@vnet.ibm.com>
6463         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin):
6464         Add support for gimple-folding of vec_pack() and vec_unpack()
6465         intrinsics.
6467 2018-08-13  Will Schmidt <will_schmidt@vnet.ibm.com>
6469         * config/rs6000/rs6000.c (rs6000_builtin_valid_without_lhs): Add
6470         vec_xst variants to the list.
6471         (rs6000_gimple_fold_builtin): Add support for folding unaligned
6472         vector loads and stores.
6474 2018-08-13  David Edelsohn  <dje.gcc@gmail.com>
6476         * config.gcc (rs6000-ibm-aix4.x): Delete.
6477         (rs6000-ibm-aix5.1): Delete.
6478         (rs6000-ibm-aix5.2): Delete.
6479         (rs6000-ibm-aix5.3): Delete.
6480         * config/rs6000/aix43.h: Delete.
6481         * config/rs6000/aix51.h: Delete.
6482         * config/rs6000/aix52.h: Delete.
6483         * config/rs6000/t-aix43: Delete.
6485 2018-08-13  Ilya Leoshkevich  <iii@linux.ibm.com>
6487         * config/s390/s390.c (s390_decompose_constant_pool_ref):
6488         New function.
6489         (s390_decompose_address): Factor out constant pool ref
6490         decomposition.
6492 2018-08-12  Chung-Ju Wu  <jasonwucj@gmail.com>
6494         * config/nds32/nds32-predicates.c
6495         (nds32_can_use_bclr_p): Change return type as bool.
6496         (nds32_can_use_bset_p): Ditto.
6497         (nds32_can_use_btgl_p): Ditto.
6498         (nds32_can_use_bitci_p): Ditto.
6499         * config/nds32/nds32-protos.h
6500         (nds32_can_use_bclr_p): Change declaration.
6501         (nds32_can_use_bset_p): Ditto.
6502         (nds32_can_use_btgl_p): Ditto.
6503         (nds32_can_use_bitci_p): Ditto.
6505 2018-08-12  Chung-Ju Wu  <jasonwucj@gmail.com>
6507         * config/nds32/nds32.c (nds32_expand_prologue, nds32_expand_epilogue):
6508         Support -msched-prolog-epilog option.
6509         * config/nds32/nds32.opt (msched-prolog-epilog): New option.
6511 2018-08-12  Chung-Ju Wu  <jasonwucj@gmail.com>
6513         * common/config/nds32/nds32-common.c
6514         (nds32_option_optimization_table): Enalbe -malways-align.
6516 2018-08-12  Chung-Ju Wu  <jasonwucj@gmail.com>
6518         * config.gcc (nds32*): Add nds32_isr.h and nds32_init.inc in
6519         extra_headers.
6520         * common/config/nds32/nds32-common.c (nds32_handle_option): Handle
6521         OPT_misr_secure_ case.
6522         * config/nds32/nds32-isr.c: Implementation of backward compatibility.
6523         * config/nds32/nds32-protos.h (nds32_isr_function_critical_p): New.
6524         * config/nds32/nds32.c (nds32_attribute_table): Add critical and
6525         secure attribute.
6526         * config/nds32/nds32.h (nds32_isr_nested_type): Add NDS32_CRITICAL.
6527         (nds32_isr_info): New field security_level.
6528         (TARGET_ISR_VECTOR_SIZE_4_BYTE): New macro.
6529         * config/nds32/nds32.md (return_internal): Consider critical attribute.
6530         * config/nds32/nds32.opt (misr-secure): New option.
6531         * config/nds32/nds32_init.inc: New file.
6532         * config/nds32/nds32_isr.h: New file.
6534 2018-08-11  John David Anglin  <danglin@gcc.gnu.org>
6536         * config/pa/pa.md (UNSPEC_MEMORY_BARRIER): New unspec enum.
6537         Update comment for atomic instructions.
6538         (atomic_storeqi, atomic_storehi, atomic_storesi, atomic_storesf,
6539         atomic_loaddf, atomic_loaddf_1, atomic_storedf, atomic_storedf_1):
6540         Remove.
6541         (atomic_loaddi): Revise fence expansion to only emit fence prior to
6542         load for __ATOMIC_SEQ_CST model.
6543         (atomic_loaddi_1): Remove float register target.
6544         (atomic_storedi): Handle CONST_INT values.
6545         (atomic_storedi_1): Remove float register source.  Add special case
6546         for zero value.
6547         (memory_barrier): New expander and insn.
6549 2018-08-11  Jakub Jelinek  <jakub@redhat.com>
6551         PR tree-optimization/86835
6552         * tree-ssa-math-opts.c (insert_reciprocals): Even when inserting
6553         new_stmt after def_gsi, make sure to insert new_square_stmt after
6554         that stmt, not 2 stmts before it.
6556 2018-08-10  Alexander Monakov  <amonakov@ispras.ru>
6558         PR target/82418
6559         * config/i386/i386.md (<s>mul<mode>3_highpart): Use DWIH mode iterator
6560         instead of SWI48.
6562 2018-08-10  Martin Liska  <mliska@suse.cz>
6564         PR target/83610
6565         * builtin-types.def (BT_FN_LONG_LONG_LONG_DOUBLE): Add new
6566         function type.
6567         * builtins.c (expand_builtin_expect_with_probability):
6568         New function.
6569         (expand_builtin_expect_with_probability): New function.
6570         (build_builtin_expect_predicate): Add new argumnet probability
6571         for BUILT_IN_EXPECT_WITH_PROBABILITY.
6572         (fold_builtin_expect):
6573         (fold_builtin_2):
6574         (fold_builtin_3):
6575         * builtins.def (BUILT_IN_EXPECT_WITH_PROBABILITY):
6576         * builtins.h (fold_builtin_expect): Set new argument.
6577         * doc/extend.texi: Document __builtin_expect_with_probability.
6578         * doc/invoke.texi: Likewise.
6579         * gimple-fold.c (gimple_fold_call): Pass new argument.
6580         * ipa-fnsummary.c (find_foldable_builtin_expect): Handle
6581         also BUILT_IN_EXPECT_WITH_PROBABILITY.
6582         * predict.c (get_predictor_value): New function.
6583         (expr_expected_value): Add new argument probability. Assume
6584         that predictor and probability are always non-null.
6585         (expr_expected_value_1): Likewise.  For __builtin_expect and
6586         __builtin_expect_with_probability set probability.  Handle
6587         combination in binary expressions.
6588         (tree_predict_by_opcode): Simplify code by simply calling
6589         get_predictor_value.
6590         (pass_strip_predict_hints::execute): Add handling of
6591         BUILT_IN_EXPECT_WITH_PROBABILITY.
6592         * predict.def (PRED_BUILTIN_EXPECT_WITH_PROBABILITY): Add
6593         new predictor.
6594         * tree.h (DECL_BUILT_IN_P): New function.
6596 2018-08-10  Martin Liska  <mliska@suse.cz>
6598         PR tree-optimization/85799
6599         * passes.def: Add argument for pass_strip_predict_hints.
6600         * predict.c (class pass_strip_predict_hints): Add new argument
6601         early_p.
6602         (strip_predictor_early): New function.
6603         (pass_strip_predict_hints::execute): Call the function to
6604         strip predictors.
6605         (strip_predict_hints): New function.
6606         * predict.def: Fix comment.
6608 2018-08-10  Thomas Preud'homme  <thomas.preudhomme@linaro.org>
6610         * Makefile.in: Clarify which tm.texi to copy over to assert the
6611         right to grant a GFDL license for all.
6613 2018-08-09  Jeff Law  <law@redhat.com>
6615         * config/m68k/m68k.c (m68k_adjust_decorated_operand): Remove
6616         unused variable.
6618 2018-08-09  Andreas Schwab  <schwab@linux-m68k.org>
6620         * config/m68k/m68k-protos.h (m68k_final_prescan_insn): Remove
6621         prototype.
6623 2018-08-09  Richard Sandiford  <richard.sandiford@arm.com>
6625         * tree-vect-loop.c (vectorizable_reduction): Allow inner-loop
6626         reductions for variable-length vectors.
6628 2018-08-09  David Malcolm  <dmalcolm@redhat.com>
6630         PR other/84889
6631         * common.opt (fdiagnostics-show-line-numbers): New option.
6632         * diagnostic-show-locus.c (class layout): Add fields
6633         "m_show_line_numbers_p" and "m_linenum_width";
6634         (num_digits): New function.
6635         (test_num_digits): New function.
6636         (layout::layout): Initialize new fields.  Update m_x_offset
6637         logic to handle any left margin.
6638         (layout::print_source_line): Print line number when requested.
6639         (layout::start_annotation_line): New member function.
6640         (layout::print_annotation_line): Call it.
6641         (layout::print_leading_fixits): Likewise.
6642         (layout::print_trailing_fixits): Likewise.  Update calls to
6643         move_to_column for new parameter.
6644         (layout::get_x_bound_for_row): Add "add_left_margin" param and use
6645         it to potentially call start_annotation_line.
6646         (layout::show_ruler): Call start_annotation_line.
6647         (selftest::test_line_numbers_multiline_range): New selftest.
6648         (selftest::diagnostic_show_locus_c_tests): Call test_num_digits
6649         and selftest::test_line_numbers_multiline_range.
6650         * diagnostic.c (diagnostic_initialize): Initialize
6651         show_line_numbers_p.
6652         * diagnostic.h (struct diagnostic_context): Add field
6653         "show_line_numbers_p".
6654         * doc/invoke.texi (Diagnostic Message Formatting Options): Add
6655         -fno-diagnostics-show-line-numbers.
6656         * dwarf2out.c (gen_producer_string): Add
6657         OPT_fdiagnostics_show_line_numbers to the ignored options.
6658         * lto-wrapper.c (merge_and_complain): Likewise to the "pick
6659         one setting" options.
6660         (append_compiler_options): Likewise to the dropped options.
6661         (append_diag_options): Likewise to the passed-on options.
6662         * opts.c (common_handle_option): Handle the new option.
6663         * toplev.c (general_init): Set up global_dc->show_line_numbers_p.
6665 2018-08-09  Kelvin Nilsen  <kelvin@gcc.gnu.org>
6667         * doc/extend.texi (PowerPC AltiVec Built-in Functions Available on
6668         ISA 2.07): Correct spelling of bcdsub to be __builtin_bcdsub.  Add
6669         third argument of type "const signed char" to descriptions of
6670         __builtin_bcdadd, __builtin_bcdadd_lt, __builtin_bcdadd_eq,
6671         __builtin_bcdadd_gt, __builtin_bcdadd_ov, __builtin_bcdsub,
6672         __builtin_bcdsub_lt, __builtin_bcdsub_eq, __builtin_bcdsub_gt,
6673         __builtin_bcdsub_ov functions.
6675 2018-08-09  Richard Sandiford  <richard.sandiford@arm.com>
6677         PR tree-optimization/86858
6678         * tree-vect-loop.c (vect_is_simple_reduction): Restore
6679         flow_bb_inside_loop_p calls.
6681 2018-08-09  Richard Sandiford  <richard.sandiford@arm.com>
6683         PR tree-optimization/86871
6684         * tree-vect-stmts.c (vect_transform_stmt): Use gimple_get_lhs
6685         instead of gimple_assign_lhs.
6687 2018-08-09  Richard Earnshaw  <rearnsha@arm.com>
6689         PR target/86887
6690         * config/aarch64/aarch64.md (add<mode>3_carryinC_zero): Add missing
6691         register constraint to operand 0.
6692         (add<mode>3_carryinC): Likewise.
6693         (add<mode>3_carryinV_zero, add<mode>3_carryinV): Likewise.
6695 2018-08-09  Martin Liska  <mliska@suse.cz>
6697         PR c/86895
6698         * common.opt: Remove extra line.
6700 2018-08-09  Martin Liska  <mliska@suse.cz>
6702         * params.def (PARAM_ALIGN_LOOP_ITERATIONS): Remove double dots
6703         at the end of a line, make first letter capital and end up
6704         a sentence with a dot.
6705         (PARAM_LOOP_INTERCHANGE_STRIDE_RATIO): Likewise.
6706         (PARAM_LOOP_BLOCK_TILE_SIZE): Likewise.
6707         (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Likewise.
6708         (PARAM_GRAPHITE_MAX_ARRAYS_PER_SCOP): Likewise.
6709         (PARAM_MAX_ISL_OPERATIONS): Likewise.
6710         (PARAM_GRAPHITE_ALLOW_CODEGEN_ERRORS): Likewise.
6711         (PARAM_PROFILE_FUNC_INTERNAL_ID): Likewise.
6712         (PARAM_INDIR_CALL_TOPN_PROFILE): Likewise.
6713         (PARAM_SLP_MAX_INSNS_IN_BB): Likewise.
6714         (PARAM_IPA_CP_EVAL_THRESHOLD): Likewise.
6715         (PARAM_IPA_CP_RECURSION_PENALTY): Likewise.
6716         (PARAM_IPA_CP_SINGLE_CALL_PENALTY): Likewise.
6717         (PARAM_IPA_CP_LOOP_HINT_BONUS): Likewise.
6718         (PARAM_IPA_CP_ARRAY_INDEX_HINT_BONUS): Likewise.
6719         (PARAM_TREE_REASSOC_WIDTH): Likewise.
6720         (PARAM_HSA_GEN_DEBUG_STORES): Likewise.
6721         (PARAM_MAX_SPECULATIVE_DEVIRT_MAYDEFS): Likewise.
6722         (PARAM_MAX_VRP_SWITCH_ASSERTIONS): Likewise.
6724 2018-08-09  Andreas Krebbel  <krebbel@linux.ibm.com>
6726         PR target/84332
6727         * config/s390/s390.c (s390_option_override_internal): Reduce the
6728         stack-clash-protection-probe-interval param if it would be too big
6729         for z900.
6731 2018-08-08  Andreas Schwab  <schwab@linux-m68k.org>
6733         PR target/46179
6734         * config/m68k/m68k.h (FINAL_PRESCAN_INSN): Don't define.
6735         * config/m68k/m68k.c (handle_move_double): Don't call
6736         m68k_final_prescan_insn.
6737         (m68k_adjust_decorated_operand): Renamed from
6738         m68k_final_prescan_insn, remove first and third operand and
6739         simplify.
6740         (print_operand): Call it.
6741         (print_operand_address): Call it.
6743 2018-08-08  Nathan Sidwell  <nathan@acm.org>
6745         * diagnostic.c (diagnostic_report_current_module): Use
6746         linemap_included_from & linemap_included_from_linemap.
6748 2018-08-08  Hongbo Zhang  <hongbo.zhang@linaro.org>
6750         * config/aarch64/aarch64-cores.def: Add phecda core.
6751         * config/aarch64/aarch64-tune.md: Regenerate.
6752         * doc/invoke.texi: Add phecda core.
6754 2018-08-08  Andreas Krebbel  <krebbel@linux.ibm.com>
6756         PR target/85295
6757         * config/s390/constraints.md ("NxHD0", "NxSD0"): New constraint
6758         definitions.
6759         * config/s390/s390.md ("movti"): Add more alternatives for
6760         constant to GPR copies.
6762 2018-08-08  Andreas Krebbel  <krebbel@linux.ibm.com>
6764         * config/s390/s390.c: Fix whitespace damage throughout the file.
6765         * config/s390/s390.h: Likewise.
6766         * config/s390/tpf.h: Likewise.
6768 2018-08-08  Ilya Leoshkevich  <iii@linux.ibm.com>
6770         * config/s390/s390.c (s390_loadrelative_operand_p):
6771         Remove TARGET_CPU_ZARCH usages.
6772         (s390_rtx_costs): Likewise.
6773         (s390_legitimate_constant_p): Likewise.
6774         (s390_cannot_force_const_mem): Likewise.
6775         (legitimate_reload_constant_p): Likewise.
6776         (s390_preferred_reload_class): Likewise.
6777         (legitimize_pic_address): Likewise.
6778         (legitimize_tls_address): Likewise.
6779         (s390_split_branches): Removed.
6780         (s390_add_execute): Removed.
6781         (s390_dump_pool): Remove TARGET_CPU_ZARCH usages.
6782         (s390_mainpool_start): Likewise.
6783         (s390_mainpool_finish): Likewise.
6784         (s390_mainpool_cancel): Removed.
6785         (s390_chunkify_start): Remove TARGET_CPU_ZARCH usages.
6786         (s390_chunkify_cancel): Likewise.
6787         (s390_return_addr_rtx): Likewise.
6788         (s390_register_info): Remove split_branches_pending_p uages.
6789         (s390_optimize_register_info): Likewise.
6790         (s390_init_frame_layout): Remove TARGET_CPU_ZARCH and
6791         split_branches_pending_p usages.
6792         (s390_can_eliminate): Remove TARGET_CPU_ZARCH usages.
6793         (s390_load_got): Likewise.
6794         (s390_expand_split_stack_prologue): Likewise.
6795         (output_asm_nops): Likewise.
6796         (s390_function_profiler): Likewise.
6797         (s390_emit_call): Likewise.
6798         (s390_conditional_register_usage): Likewise.
6799         (s390_optimize_prologue): Likewise.
6800         (s390_reorg): Remove TARGET_CPU_ZARCH and
6801         split_branches_pending_p usages.
6802         (s390_option_override_internal): Remove TARGET_CPU_ZARCH
6803         usages.
6804         (s390_output_indirect_thunk_function): Likewise.
6805         * config/s390/s390.h (TARGET_CPU_ZARCH): Removed.
6806         (TARGET_CPU_ZARCH_P): Removed.
6807         (struct machine_function): Remove split_branches_pending_p.
6808         * config/s390/s390.md: Remove TARGET_CPU_ZARCH usages.
6810 2018-08-08  Ilya Leoshkevich  <iii@linux.ibm.com>
6812         * common/config/s390/s390-common.c (processor_flags_table):
6813         Remove flags.
6814         * config.gcc: Remove with_arch/with_tune support.
6815         * config/s390/2064.md: Remove cpu attribute comparisons.
6816         * config/s390/driver-native.c (s390_host_detect_local_cpu):
6817         Remove MTN.
6818         * config/s390/linux.h (ASM_SPEC):
6819         Remove -march support.
6820         * config/s390/s390-c.c (s390_cpu_cpp_builtins_internal):
6821         Use a table to get an arch level.
6822         * config/s390/s390-opts.h (enum processor_type):
6823         Remove enum values.
6824         * config/s390/s390.c
6825         (processor_table): Remove entries, add arch_level values.
6826         (s390_issue_rate): Remove cases.
6827         (s390_option_override): Adjust
6828         s390_option_override_internal() call.
6829         (s390_option_override_internal): Remove deprecation warning.
6830         (s390_valid_target_attribute_tree): Adjust
6831         s390_option_override_internal() call.
6832         * config/s390/s390.h (struct s390_processor):
6833         Share with s390-c.c, add arch_level field.
6834         * config/s390/s390.md:
6835         Remove occurrences in cpu attribute.
6836         * config/s390/s390.opt: Remove -march/-mtune support.
6837         * config/s390/tpf.h (ASM_SPEC): Remove -march support.
6838         * doc/invoke.texi: Remove deprecation warning.
6840 2018-08-08  Luis Machado  <luis.machado@linaro.org>
6842         * config/aarch64/aarch64.c (qdf24xx_vector_cost): New static
6843         global.
6844         (qdf24xx_tunings): Set vector cost structure to
6845         qdf24xx_vector_cost.
6847         * config/aarch64/aarch64.c (qdf24xx_addrcost_table)
6848         <register_sextend>: Set to 3.
6850 2018-08-07  Richard Sandiford  <richard.sandiford@arm.com>
6852         PR target/86838
6853         * config/aarch64/iterators.md (FRECP, frecp_suffix): Delete.
6854         * config/aarch64/aarch64-simd.md
6855         (aarch64_frecp<FRECP:frecp_suffix><mode>): Fold FRECPE into...
6856         (@aarch64_frecpe<mode>): ...here and the move FRECPX to...
6857         (aarch64_frecpx<mode>): ...this new pattern.
6858         * config/aarch64/aarch64-simd-builtins.def: Remove comment
6859         about aarch64_frecp<FRECP:frecp_suffix><mode>.
6861 2018-08-07  Martin Liska  <mliska@suse.cz>
6863         PR middle-end/83023
6864         * predict.c (expr_expected_value_1): Handle DECL_IS_MALLOC,
6865         BUILT_IN_REALLOC and DECL_IS_OPERATOR_NEW.
6866         * predict.def (PRED_MALLOC_NONNULL): New predictor.
6867         * doc/extend.texi: Document that malloc attribute adds
6868         hit to compiler.
6870 2018-08-06  John David Anglin  <danglin@gcc.gnu.org>
6872         PR target/86785
6873         * config/pa/pa.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
6874         Define to speculation_safe_value_not_needed.
6876 2018-08-06  Jeff Law  <law@redhat.com>
6878         * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Pass down
6879         the vr_values instance to cprop_into_stmt.
6880         (cprop_into_stmt): Pass vr_values instance down to cprop_operand.
6881         (cprop_operand): Also query EVRP to determine if OP is a constant.
6883 2018-08-06  Nathan Sidwell  <nathan@acm.org>
6885         * diagnostic.c (diagnostic_report_current_module): Reroll
6886         included-at loop.  Translate text.
6888 2018-08-06  David Malcolm  <dmalcolm@redhat.com>
6890         * function-tests.c (selftest::test_expansion_to_rtl): Call
6891         free_after_compilation.
6893 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
6895         * config/aarch64/aarch64.md: Add clobber highs to tls_desc.
6897 2018-08-06  Andreas Krebbel  <krebbel@linux.ibm.com>
6899         * config/s390/s390.c (s390_loop_unroll_adjust): Prevent small
6900         loops with memory block operations from getting unrolled.
6902 2018-08-06  Ulrich Weigand  <uweigand@de.ibm.com>
6904         PR target/86807
6905         * config/spu/spu.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
6906         Define to speculation_safe_value_not_needed.
6908 2018-08-06  Jeff Law  <law@redhat.com>
6910         * reload1.c (forget_old_reloads_1): Adjust CLOBBER_HIGH
6911         assert.
6913 2018-08-06  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
6915         PR target/86662
6916         * gcc/tree.c (build_common_tree_nodes): Initialize integer_types array
6917         with all enabled __intN types.
6919         * gcc/testsuite/gcc.target/msp430/pr86662.c: New test.
6921 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
6923         * alias.c (record_set): Check for clobber high.
6924         * cfgexpand.c (expand_gimple_stmt): Likewise.
6925         * combine-stack-adj.c (single_set_for_csa): Likewise.
6926         * combine.c (find_single_use_1): Likewise.
6927         (set_nonzero_bits_and_sign_copies): Likewise.
6928         (get_combine_src_dest): Likewise.
6929         (is_parallel_of_n_reg_sets): Likewise.
6930         (try_combine): Likewise.
6931         (record_dead_and_set_regs_1): Likewise.
6932         (reg_dead_at_p_1): Likewise.
6933         (reg_dead_at_p): Likewise.
6934         * dce.c (deletable_insn_p): Likewise.
6935         (mark_nonreg_stores_1): Likewise.
6936         (mark_nonreg_stores_2): Likewise.
6937         * df-scan.c (df_find_hard_reg_defs): Likewise.
6938         (df_uses_record): Likewise.
6939         (df_get_call_refs): Likewise.
6940         * dwarf2out.c (mem_loc_descriptor): Likewise.
6941         * haifa-sched.c (haifa_classify_rtx): Likewise.
6942         * ira-build.c (create_insn_allocnos): Likewise.
6943         * ira-costs.c (scan_one_insn): Likewise.
6944         * ira.c (equiv_init_movable_p): Likewise.
6945         (rtx_moveable_p): Likewise.
6946         (interesting_dest_for_shprep): Likewise.
6947         * jump.c (mark_jump_label_1): Likewise.
6948         * postreload-gcse.c (record_opr_changes): Likewise.
6949         * postreload.c (reload_cse_simplify): Likewise.
6950         (struct reg_use): Add source expr.
6951         (reload_combine): Check for clobber high.
6952         (reload_combine_note_use): Likewise.
6953         (reload_cse_move2add): Likewise.
6954         (move2add_note_store): Likewise.
6955         * print-rtl.c (print_pattern): Likewise.
6956         * recog.c (decode_asm_operands): Likewise.
6957         (store_data_bypass_p): Likewise.
6958         (if_test_bypass_p): Likewise.
6959         * regcprop.c (kill_clobbered_value): Likewise.
6960         (kill_set_value): Likewise.
6961         * reginfo.c (reg_scan_mark_refs): Likewise.
6962         * reload1.c (maybe_fix_stack_asms): Likewise.
6963         (eliminate_regs_1): Likewise.
6964         (elimination_effects): Likewise.
6965         (mark_not_eliminable): Likewise.
6966         (scan_paradoxical_subregs): Likewise.
6967         (forget_old_reloads_1): Likewise.
6968         * reorg.c (find_end_label): Likewise.
6969         (try_merge_delay_insns): Likewise.
6970         (redundant_insn): Likewise.
6971         (own_thread_p): Likewise.
6972         (fill_simple_delay_slots): Likewise.
6973         (fill_slots_from_thread): Likewise.
6974         (dbr_schedule): Likewise.
6975         * resource.c (update_live_status): Likewise.
6976         (mark_referenced_resources): Likewise.
6977         (mark_set_resources): Likewise.
6978         * rtl.c (copy_rtx): Likewise.
6979         * rtlanal.c (reg_referenced_p): Likewise.
6980         (single_set_2): Likewise.
6981         (noop_move_p): Likewise.
6982         (note_stores): Likewise.
6983         * sched-deps.c (sched_analyze_reg): Likewise.
6984         (sched_analyze_insn): Likewise.
6986 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
6988         * cse.c (invalidate_reg): New function extracted from...
6989         (invalidate): ...here.
6990         (canonicalize_insn): Check for clobber high.
6991         (invalidate_from_clobbers): invalidate clobber highs.
6992         (invalidate_from_sets_and_clobbers): Likewise.
6993         (count_reg_usage): Check for clobber high.
6994         (insn_live_p): Likewise.
6995         * cselib.c (cselib_expand_value_rtx_1):Likewise.
6996         (cselib_invalidate_regno): Check for clobber in setter.
6997         (cselib_invalidate_rtx): Pass through setter.
6998         (cselib_invalidate_rtx_note_stores):
6999         (cselib_process_insn): Check for clobber high.
7000         * cselib.h (cselib_invalidate_rtx): Add operand.
7002 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
7004         * lra-eliminations.c (lra_eliminate_regs_1): Check for clobber high.
7005         (mark_not_eliminable): Likewise.
7006         * lra-int.h (struct lra_insn_reg): Add clobber high marker.
7007         * lra-lives.c (process_bb_lives): Check for clobber high.
7008         * lra.c (new_insn_reg): Remember clobber highs.
7009         (collect_non_operand_hard_regs): Check for clobber high.
7010         (lra_set_insn_recog_data): Likewise.
7011         (add_regs_to_insn_regno_info): Likewise.
7012         (lra_update_insn_regno_info): Likewise.
7014 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
7016         * rtl.h (reg_is_clobbered_by_clobber_high): Add declarations.
7017         * rtlanal.c (reg_is_clobbered_by_clobber_high): Add function.
7019 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
7021         * emit-rtl.c (verify_rtx_sharing): Check for CLOBBER_HIGH.
7022         (copy_insn_1): Likewise.
7023         (gen_hard_reg_clobber_high): New gen function.
7024         * genconfig.c (walk_insn_part): Check for CLOBBER_HIGH.
7025         * genemit.c (gen_exp): Likewise.
7026         (gen_emit_seq): Pass through info.
7027         (gen_insn): Check for CLOBBER_HIGH.
7028         (gen_expand): Pass through info.
7029         (gen_split): Likewise.
7030         (output_add_clobbers): Likewise.
7031         * genrecog.c (validate_pattern): Check for CLOBBER_HIGH.
7032         (remove_clobbers): Likewise.
7033         * rtl.h (gen_hard_reg_clobber_high): New declaration.
7035 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
7037         * doc/rtl.texi (clobber_high): Add.
7038         (parallel): Add in clobber high
7039         * rtl.c (rtl_check_failed_code3): Add function.
7040         * rtl.def (CLOBBER_HIGH): Add expression.
7041         * rtl.h (RTL_CHECKC3): Add macro.
7042         (rtl_check_failed_code3): Add declaration.
7043         (XC3EXP): Add macro.
7045 2018-08-05  H.J. Lu  <hongjiu.lu@intel.com>
7047         PR target/86386
7048         * config/i386/i386.c (ix86_finalize_stack_frame_flags): Set
7049         cfun->machine->max_used_stack_alignment if needed.
7051 2018-08-04  Martin Sebor  <msebor@redhat.com>
7053         PR tree-optimization/86571
7054         * gimple-ssa-sprintf.c (format_floating): Extend upper bound of
7055         NaN output to 4.
7057 2018-08-03  Sandra Loosemore  <sandra@codesourcery.com>
7059         PR target/86799
7060         * config/nios2/nios2.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7061         Define.
7063 2018-08-03  Jeff Law  <law@redhat.com>
7065         PR target/86795
7066         * config/mn10300/mn10300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7067         Define to speculation_safe_value_not_needed.
7069 2018-08-03  David Malcolm  <dmalcolm@redhat.com>
7071         * doc/gcov.texi (-x): Remove duplicate "to".
7072         * doc/invoke.texi (-Wnoexcept-type): Remove duplicate "calls".
7073         (-Wif-not-aligned): Remove duplicate "is".
7074         (-flto): Remove duplicate "the".
7075         (MicroBlaze Options): In examples of "-mcpu=cpu-type", remove
7076         duplicate "v5.00.b".
7077         (MSP430 Options): Remove duplicate "and" from the description
7078         of "-mgprel-sec=regexp".
7079         (x86 Options): Remove duplicate copies of "vmldLog102" and
7080         vmlsLog104 from description of "-mveclibabi=type".
7082 2018-08-03  Richard Sandiford  <richard.sandiford@arm.com>
7084         * internal-fn.h (first_commutative_argument): Declare.
7085         * internal-fn.c (first_commutative_argument): New function.
7086         * tree-vect-slp.c (vect_get_and_check_slp_defs): Remove extra
7087         restrictions for pattern statements.  Use first_commutative_argument
7088         to look for commutative operands in calls to internal functions.
7090 2018-08-03  Aldy Hernandez  <aldyh@redhat.com>
7092         * Makefile.in (wide-int-range.o): New.
7093         * tree-vrp.c: Move all the wide_int_* functions to...
7094         * wide-int-range.cc: ...here.
7095         * tree-vrp.h: Move all the wide_int_* prototypes to...
7096         * wide-int-range.h: ...here.
7098 2018-08-03  Tom de Vries  <tdevries@suse.de>
7100         * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): Return
7101         UI_NONE.
7102         * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Remove define.
7103         * except.c (output_function_exception_table): Do early exit if
7104         targetm_common.except_unwind_info (&global_options) == UI_NONE.
7106 2018-08-03  Martin Liska  <mliska@suse.cz>
7108         * predict.c (dump_prediction): Change to 2 digits
7109         in fraction part.
7111 2018-08-03  Siddhesh Poyarekar  <siddhesh@sourceware.org>
7113         * config/aarch64/falkor.md (falkor_am_1_vxvy_vxvy): Move
7114         neon_dup_q to...
7115         (falkor_am_1_gtov_gtov): ... a new insn reservation.
7117 2018-07-19  Ilya Leoshkevich  <iii@linux.ibm.com>
7119         * config/nds32/nds32.c (nds32_hard_regno_mode_ok): Replace > with >=.
7120         * df-problems.c (df_remove_dead_eq_notes): Replace > with >=.
7121         * dwarf2out.c (mem_loc_descriptor): Replace > with >=.
7122         * lra-constraints.c (spill_hard_reg_in_range): Replace <= with <.
7123         * lra-remat.c (call_used_input_regno_present_p): Replace <= with <.
7125 2018-08-02  David Malcolm  <dmalcolm@redhat.com>
7127         * diagnostic-show-locus.c (diagnostic_show_locus): Use
7128         pp_take_prefix when saving the existing prefix.
7129         * diagnostic.c (diagnostic_append_note): Likewise.
7130         * langhooks.c (lhd_print_error_function): Likewise.
7131         * pretty-print.c (pp_set_prefix): Drop the "const" from "prefix"
7132         param's type.  Free the existing prefix.
7133         (pp_take_prefix): New function.
7134         (pretty_printer::pretty_printer): Drop the prefix parameter.
7135         Rename the length parameter to match the comment.
7136         (pretty_printer::~pretty_printer): Free the prefix.
7137         * pretty-print.h (pretty_printer::pretty_printer): Drop the prefix
7138         parameter.
7139         (struct pretty_printer): Drop the "const" from "prefix" field's
7140         type and clarify memory management.
7141         (pp_set_prefix): Drop the "const" from the 2nd param.
7142         (pp_take_prefix): New decl.
7144 2018-08-02  Aaron Sawdey  <acsawdey@linux.ibm.com>
7146         * config/rs6000/rs6000-string.c (select_block_compare_mode): Move test
7147         for word_mode_ok here instead of passing as argument.
7148         (expand_block_compare): Change select_block_compare_mode() call.
7149         (expand_strncmp_gpr_sequence): New function.
7150         (expand_strn_compare): Make use of expand_strncmp_gpr_sequence.
7152 2018-08-02  Jeff Law  <law@redhat.com>
7154         PR target/86790
7155         * config/m68k/m68k.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7156         Define to speculation_safe_value_not_needed.
7158         PR target/86784
7159         * config/h8300/h8300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7160         Define to speculation_safe_value_not_needed.
7162 2018-08-02  Tom de Vries  <tdevries@suse.de>
7164         PR target/86660
7165         * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): New
7166         function.  Return UI_TARGET unconditionally.
7167         (TARGET_EXCEPT_UNWIND_INFO): Redefine to nvptx_except_unwind_info.
7168         * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Emit commented out '.byte'.
7170 2018-08-02  Richard Sandiford  <richard.sandiford@arm.com>
7172         * genemit.c (print_overload_test): Fix typo.
7174 2018-08-02  Richard Biener  <rguenther@suse.de>
7176         PR tree-optimization/86816
7177         * tree-ssa-tail-merge.c (tail_merge_valueize): New function
7178         which checks for value availability before querying it.
7179         (gvn_uses_equal): Use it.
7180         (same_succ_hash): Likewise.
7181         (gimple_equal_p): Likewise.
7183 2018-08-02  Nick Clifton  <nickc@redhat.com>
7185         PR target/86813
7186         * config/stormy16/stormy16.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7187         Define to speculation_safe_value_not_needed.
7189         PR target/86810
7190         * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7191         Define to speculation_safe_value_not_needed.
7193         PR target/86810
7194         * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7195         Define to speculation_safe_value_not_needed.
7197         PR target/86803
7198         * config/rx/rx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7199         Define to speculation_safe_value_not_needed.
7201         PR target/86797
7202         * config/msp430/msp430.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7203         Define to speculation_safe_value_not_needed.
7205         PR target/86791
7206         * config/mcore/mcore.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7207         Define to speculation_safe_value_not_needed.
7209         PR target/86789
7210         * config/m32r/m32r.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7211         Define to speculation_safe_value_not_needed.
7213         PR target/86787
7214         * config/iq2000/iq2000.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7215         Define to speculation_safe_value_not_needed.
7217         PR target/86782
7218         * config/frv/frv.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
7219         speculation_safe_value_not_needed.
7221         PR target/86781
7222         * config/fr30/fr30.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define
7223         to speculation_safe_value_not_needed.
7225 2018-08-02  Richard Sandiford  <richard.sandiford@arm.com>
7227         * doc/md.texi: Expand the documentation of instruction names
7228         to mention port-local uses.  Document '@' in pattern names.
7229         * read-md.h (overloaded_instance, overloaded_name): New structs.
7230         (mapping): Declare.
7231         (md_reader::handle_overloaded_name): New member function.
7232         (md_reader::get_overloads): Likewise.
7233         (md_reader::m_first_overload): New member variable.
7234         (md_reader::m_next_overload_ptr): Likewise.
7235         (md_reader::m_overloads_htab): Likewise.
7236         * read-md.c (md_reader::md_reader): Initialize m_first_overload,
7237         m_next_overload_ptr and m_overloads_htab.
7238         * read-rtl.c (iterator_group): Add "type" and "get_c_token" fields.
7239         (get_mode_token, get_code_token, get_int_token): New functions.
7240         (map_attr_string): Add an optional argument that passes back
7241         the associated iterator.
7242         (overloaded_name_hash, overloaded_name_eq_p, named_rtx_p):
7243         (md_reader::handle_overloaded_name, add_overload_instance): New
7244         functions.
7245         (apply_iterators): Handle '@' names.  Report an error if '@'
7246         is used without iterators.
7247         (initialize_iterators): Initialize the new iterator_group fields.
7248         * genopinit.c (handle_overloaded_code_for)
7249         (handle_overloaded_gen): New functions.
7250         (main): Use them to print declarations of maybe_code_for_* and
7251         maybe_gen_* functions, and inline definitions of code_for_* and gen_*.
7252         * genemit.c (print_overload_arguments, print_overload_test)
7253         (handle_overloaded_code_for, handle_overloaded_gen): New functions.
7254         (main): Use it to print definitions of maybe_code_for_* and
7255         maybe_gen_* functions.
7256         * config/aarch64/aarch64.c (aarch64_split_128bit_move): Use
7257         gen_aarch64_mov{low,high}_di and gen_aarch64_movdi_{low,high}
7258         instead of explicit mode checks.
7259         (aarch64_split_simd_combine): Likewise gen_aarch64_simd_combine.
7260         (aarch64_split_simd_move): Likewise gen_aarch64_split_simd_mov.
7261         (aarch64_emit_load_exclusive): Likewise gen_aarch64_load_exclusive.
7262         (aarch64_emit_store_exclusive): Likewise gen_aarch64_store_exclusive.
7263         (aarch64_expand_compare_and_swap): Likewise
7264         gen_aarch64_compare_and_swap and gen_aarch64_compare_and_swap_lse
7265         (aarch64_gen_atomic_cas): Likewise gen_aarch64_atomic_cas.
7266         (aarch64_emit_atomic_swap): Likewise gen_aarch64_atomic_swp.
7267         (aarch64_constant_pool_reload_icode): Delete.
7268         (aarch64_secondary_reload): Use code_for_aarch64_reload_movcp
7269         instead of aarch64_constant_pool_reload_icode.  Use
7270         code_for_aarch64_reload_mov instead of explicit mode checks.
7271         (rsqrte_type, get_rsqrte_type, rsqrts_type, get_rsqrts_type): Delete.
7272         (aarch64_emit_approx_sqrt): Use gen_aarch64_rsqrte instead of
7273         get_rsqrte_type and gen_aarch64_rsqrts instead of gen_rqrts_type.
7274         (recpe_type, get_recpe_type, recps_type, get_recps_type): Delete.
7275         (aarch64_emit_approx_div): Use gen_aarch64_frecpe instead of
7276         get_recpe_type and gen_aarch64_frecps instead of get_recps_type.
7277         (aarch64_atomic_load_op_code): Delete.
7278         (aarch64_emit_atomic_load_op): Likewise.
7279         (aarch64_gen_atomic_ldop): Use UNSPECV_ATOMIC_* instead of
7280         aarch64_atomic_load_op_code.  Use gen_aarch64_atomic_load
7281         instead of aarch64_emit_atomic_load_op.
7282         * config/aarch64/aarch64.md (aarch64_reload_movcp<GPF_TF:mode><P:mode>)
7283         (aarch64_reload_movcp<VALL:mode><P:mode>, aarch64_reload_mov<mode>)
7284         (aarch64_movdi_<mode>low, aarch64_movdi_<mode>high)
7285         (aarch64_mov<mode>high_di, aarch64_mov<mode>low_di): Add a '@'
7286         character before the pattern name.
7287         * config/aarch64/aarch64-simd.md (aarch64_split_simd_mov<mode>)
7288         (aarch64_rsqrte<mode>, aarch64_rsqrts<mode>)
7289         (aarch64_simd_combine<mode>, aarch64_frecpe<mode>)
7290         (aarch64_frecps<mode>): Likewise.
7291         * config/aarch64/atomics.md (atomic_compare_and_swap<mode>)
7292         (aarch64_compare_and_swap<mode>, aarch64_compare_and_swap<mode>_lse)
7293         (aarch64_load_exclusive<mode>, aarch64_store_exclusive<mode>)
7294         (aarch64_atomic_swp<mode>, aarch64_atomic_cas<mode>)
7295         (aarch64_atomic_load<atomic_ldop><mode>): Likewise.
7297 2018-08-02  Richard Sandiford  <richard.sandiford@arm.com>
7299         * config/aarch64/aarch64.c (aarch64_float_const_representable_p):
7300         Allow HFmode constants if TARGET_FP_F16INST.
7302 2018-08-02  Jackson Woodruff  <jackson.woodruff@arm.com>
7304         PR target/86014
7305         * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp):
7306         No longer check last store for clobber of address register.
7308 2018-08-02  Martin Liska  <mliska@suse.cz>
7310         PR gcov-profile/86817
7311         * gcov.c (process_all_functions): New function.
7312         (main): Call it.
7313         (process_file): Move functions processing to
7314         process_all_functions.
7316 2018-08-02  David Malcolm  <dmalcolm@redhat.com>
7318         * dumpfile.c (dump_user_location_t::dump_user_location_t): Add
7319         "const" to the "gimple *" and "rtx_insn *" parameters.
7320         * dumpfile.h (dump_user_location_t::dump_user_location_t):
7321         Likewise.
7322         (dump_location_t::dump_location_t): Likewise.
7324 2018-08-01  Martin Sebor  <msebor@redhat.com>
7326         PR tree-optimization/86650
7327         * gimple-pretty-print.c (percent_G_format): Accept a "gimple *"
7328         rather than a "gcall *".  Directly pass the data of interest
7329         to percent_K_format, rather than building a temporary CALL_EXPR
7330         to hold it.
7331         * gimple-fold.c (gimple_fold_builtin_strncpy): Adjust.
7332         (gimple_fold_builtin_strncat): Adjust.
7333         * gimple-ssa-warn-restrict.h (check_bounds_or_overlap): Replace
7334         gcall* argument with gimple*.
7335         * gimple-ssa-warn-restrict.c (check_call): Same.
7336         (wrestrict_dom_walker::before_dom_children): Same.
7337         (builtin_access::builtin_access): Same.
7338         (check_bounds_or_overlap): Same
7339         (maybe_diag_overlap): Same.
7340         (maybe_diag_offset_bounds): Same.
7341         * tree-diagnostic.c (default_tree_printer): Move usage of
7342         EXPR_LOCATION (t) and TREE_BLOCK (t) from within percent_K_format
7343         to this callsite.
7344         * tree-pretty-print.c (percent_K_format): Add argument.
7345         * tree-pretty-print.h: Add argument.
7346         * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Adjust.
7347         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Adjust.
7348         (maybe_diag_stxncpy_trunc): Same.
7349         (handle_builtin_stxncpy): Same.
7350         (handle_builtin_strcat): Same.
7352 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
7354         * match.pd: Optimise pointer range checks.
7356 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
7358         PR tree-optimization/86758
7359         * tree-vect-stmts.c (vectorizable_simd_clone_call): Don't try
7360         to remove pattern statements.
7362 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
7364         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Use the
7365         result of dfs_enumerate_from when constructing stmt_vec_infos,
7366         instead of additionally calling get_loop_body.
7368 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
7370         * tree-vectorizer.h (vect_create_data_ref_ptr): Remove inv_p
7371         parameter.
7372         * tree-vect-data-refs.c (vect_create_data_ref_ptr): Likewise.
7373         When creating an iv, assert that the step is not known to be zero.
7374         (vect_setup_realignment): Update call accordingly.
7375         * tree-vect-stmts.c (vectorizable_store): Likewise.
7376         (vectorizable_load): Likewise.  Handle VMAT_INVARIANT separately.
7378 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
7380         * tree-vectorizer.h (vect_stmt_to_vectorize): New function.
7381         * tree-vect-loop.c (vect_update_vf_for_slp): Use it.
7382         (vectorizable_reduction): Likewise.
7383         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
7384         (vect_detect_hybrid_slp_stmts): Likewise.
7385         * tree-vect-stmts.c (vect_is_simple_use): Likewise.
7387 2018-08-01  Aldy Hernandez  <aldyh@redhat.com>
7389         * tree-vrp (zero_nonzero_bits_from_bounds): Rename to...
7390         (wide_int_set_zero_nonzero_bits): ...this.
7391         (zero_nonzero_bits_from_vr): Rename to...
7392         (vrp_set_zero_nonzero_bits): ...this.
7393         (extract_range_from_multiplicative_op_1): Abstract wide int
7394         code...
7395         (wide_int_range_multiplicative_op): ...here.
7396         (extract_range_from_binary_expr_1): Extract wide int binary
7397         operations into their own functions.
7398         (wide_int_range_lshift): New.
7399         (wide_int_range_can_optimize_bit_op): New.
7400         (wide_int_range_shift_undefined_p): New.
7401         (wide_int_range_bit_xor): New.
7402         (wide_int_range_bit_ior): New.
7403         (wide_int_range_bit_and): New.
7404         (wide_int_range_trunc_mod): New.
7405         (extract_range_into_wide_ints): New.
7406         (vrp_shift_undefined_p): New.
7407         (extract_range_from_multiplicative_op): New.
7408         (vrp_can_optimize_bit_op): New.
7409         * tree-vrp.h (value_range::dump): New.
7410         (wide_int_range_multiplicative_op): New.
7411         (wide_int_range_lshift):New.
7412         (wide_int_range_shift_undefined_p): New.
7413         (wide_int_range_bit_xor): New.
7414         (wide_int_range_bit_ior): New.
7415         (wide_int_range_bit_and): New.
7416         (wide_int_range_trunc_mod): New.
7417         (zero_nonzero_bits_from_bounds): Rename to...
7418         (wide_int_set_zero_nonzero_bits): ...this.
7419         (zero_nonzero_bits_from_vr): Rename to...
7420         (vrp_set_zero_nonzero_bits): ...this.
7421         (range_easy_mask_min_max): Rename to...
7422         (wide_int_range_can_optimize_bit_op): this.
7423         * vr-values.c (simplify_bit_ops_using_ranges): Rename
7424         zero_nonzero_bits_from_vr into vrp_set_zero_nonzero_bits.
7426 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
7428         * tree-vectorizer.h (vect_orig_stmt): New function.
7429         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Use it.
7430         * tree-vect-loop.c (vect_model_reduction_cost): Likewise.
7431         (vect_create_epilog_for_reduction): Likewise.
7432         (vectorizable_live_operation): Likewise.
7433         * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
7434         (vect_detect_hybrid_slp_stmts, vect_schedule_slp): Likewise.
7435         * tree-vect-stmts.c (vectorizable_call): Likewise.
7436         (vectorizable_simd_clone_call, vect_remove_stores): Likewise.
7438 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
7440         * tree-vectorizer.h (vect_transform_stmt): Remove grouped_store
7441         argument.
7442         * tree-vect-stmts.c (vect_transform_stmt): Likewise.
7443         * tree-vect-loop.c (vect_transform_loop_stmt): Update call accordingly.
7444         (vect_transform_loop): Likewise.
7445         * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
7447 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
7449         * tree-vectorizer.h (vect_schedule_slp): Return void.
7450         * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
7451         (vect_schedule_slp): Likewise.
7453 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
7455         * tree-vect-loop.c (vect_transform_loop_stmt): Remove slp_scheduled
7456         argument.
7457         (vect_transform_loop): Update calls accordingly.  Schedule SLP
7458         instances before the main loop, if any exist.
7460 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
7462         PR tree-optimization/86749
7463         * tree-vect-patterns.c (vect_determine_min_output_precision_1):
7464         If the lhs is used in a COND_EXPR, check that it is being used
7465         as the "then" or "else" value.
7467 2018-08-01  Tom de Vries  <tdevries@suse.de>
7469         PR target/86800
7470         * config/nvptx/nvptx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
7471         speculation_safe_value_not_needed.
7473 2018-08-01  Richard Biener  <rguenther@suse.de>
7475         * tree-ssa-sccvn.c (visit_phi): Compare invariant addresses
7476         as base and offset.
7478 2018-08-01  Martin Liska  <mliska@suse.cz>
7480         * value-prof.c (gimple_divmod_fixed_value_transform): Unify
7481         format how successful transformation is dumped.
7482         (gimple_mod_pow2_value_transform): Likewise.
7483         (gimple_mod_subtract_transform): Likewise.
7484         (gimple_stringops_transform): Likewise.
7486 2018-08-01  Martin Liska  <mliska@suse.cz>
7488         PR value-prof/35543
7489         * value-prof.c (interesting_stringop_to_profile_p):
7490         Simplify the code and add BUILT_IN_MEMMOVE.
7491         (gimple_stringops_transform): Likewise.
7493 2018-08-01  Sam Tebbs  <sam.tebbs@arm.com>
7495         * config/aarch64/aarch64-simd.md
7496         (*aarch64_get_lane_zero_extendsi<mode>): Rename to...
7497         (*aarch64_get_lane_zero_extend<GPI:mode><VDQQH:mode>): ... This and
7498         use GPI iterator instead of SI mode.
7500 2018-08-01  Richard Earnshaw  <rearnsha@arm.com>
7502         * config/rs6000/rs6000.md (speculation_barrier): Renamed from
7503         rs6000_speculation_barrier.
7504         * config/rs6000/rs6000.c (rs6000_expand_builtin): Adjust for
7505         new barrier pattern name.
7507 2018-08-01  Richard Earnshaw  <rearnsha@arm.com>
7509         * config/i386/i386.md (unspecv): Add UNSPECV_SPECULATION_BARRIER.
7510         (speculation_barrier): New insn.
7512 2018-08-01  Richard Biener  <rguenther@suse.de>
7514         PR bootstrap/86724
7515         * graphite.h: Include isl/id.h and isl/space.h to allow build
7516         with ISL 0.20.
7518 2018-08-01  Jan Willem Jagersma  <jwjagersma@gmail.com>
7520         PR target/86651
7521         * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
7522         mode for COFF targets.
7523         * defaults.h (TARGET_COFF): Define.
7524         * config/i386/djgpp.h (TARGET_ASM_LTO_START, TARGET_ASM_LTO_END,
7525         TARGET_COFF): Define.
7526         (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): Declare.
7527         * config/i386/djgpp.c (saved_debug_info_level): New static variable.
7528         (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): New functions.
7530 2018-07-31  Alexandre Oliva <oliva@adacore.com>
7532         * gimple-streamer-in.c (input_bb): Restore BB discriminator.
7533         * gimple-streamer-out.c (output_bb): Save it.
7534         * lto-streamer-in.c (input_struct_function_base): Restore
7535         instance discriminator if available.  Create map on demand.
7536         * lto-streamer-out.c (output_struct_function_base): Save it if
7537         available.
7538         * final.c (decl_to_instance_map): Document LTO strategy.
7540 2018-07-31  Alexandre Oliva  <oliva@adacore.com>
7541             Olivier Hainque  <hainque@adacore.com>
7543         * debug.h (decl_to_instance_map_t): New type.
7544         (decl_to_instance_map): Declare.
7545         (maybe_create_decl_to_instance_map): New inline function.
7546         * final.c (bb_discriminator, last_bb_discriminator): New statics,
7547         to track basic block discriminators.
7548         (final_start_function_1): Initialize them.
7549         (final_scan_insn_1): On NOTE_INSN_BASIC_BLOCK, track
7550         bb_discriminator.
7551         (decl_to_instance_map): New variable.
7552         (map_decl_to_instance, maybe_set_discriminator): New functions.
7553         (notice_source_line): Set discriminator.
7555 2018-07-31  Ian Lance Taylor  <iant@golang.org>
7557         * targhooks.c (default_have_speculation_safe_value): Add
7558         ATTRIBUTE_UNUSED.
7560 2018-07-31  David Malcolm  <dmalcolm@redhat.com>
7562         * dump-context.h: Include "pretty-print.h".
7563         (dump_context::refresh_dumps_are_enabled): New decl.
7564         (dump_context::emit_item): New decl.
7565         (class dump_context): Add fields "m_test_pp" and
7566         "m_test_pp_flags".
7567         (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
7568         (temp_dump_context::get_dumped_text): New decl.
7569         (class temp_dump_context): Add field "m_pp".
7570         * dumpfile.c (refresh_dumps_are_enabled): Convert to...
7571         (dump_context::refresh_dumps_are_enabled): ...and add a test for
7572         m_test_pp.
7573         (set_dump_file): Update for above change.
7574         (set_alt_dump_file): Likewise.
7575         (dump_loc): New overload, taking a pretty_printer *.
7576         (dump_context::dump_loc): Call end_any_optinfo.  Dump the location
7577         to any test pretty-printer.
7578         (make_item_for_dump_gimple_stmt): New function, adapted from
7579         optinfo::add_gimple_stmt.
7580         (dump_context::dump_gimple_stmt): Call it, and use the result,
7581         eliminating the direct usage of dump_file and alt_dump_file in
7582         favor of indirectly using them via emit_item.
7583         (make_item_for_dump_gimple_expr): New function, adapted from
7584         optinfo::add_gimple_expr.
7585         (dump_context::dump_gimple_expr): Call it, and use the result,
7586         eliminating the direct usage of dump_file and alt_dump_file in
7587         favor of indirectly using them via emit_item.
7588         (make_item_for_dump_generic_expr): New function, adapted from
7589         optinfo::add_tree.
7590         (dump_context::dump_generic_expr): Call it, and use the result,
7591         eliminating the direct usage of dump_file and alt_dump_file in
7592         favor of indirectly using them via emit_item.
7593         (make_item_for_dump_printf_va): New function, adapted from
7594         optinfo::add_printf_va.
7595         (make_item_for_dump_printf): New function.
7596         (dump_context::dump_printf_va): Call make_item_for_dump_printf_va,
7597         and use the result, eliminating the direct usage of dump_file and
7598         alt_dump_file in favor of indirectly using them via emit_item.
7599         (make_item_for_dump_dec): New function.
7600         (dump_context::dump_dec): Call it, and use the result,
7601         eliminating the direct usage of dump_file and alt_dump_file in
7602         favor of indirectly using them via emit_item.
7603         (make_item_for_dump_symtab_node): New function, adapted from
7604         optinfo::add_symtab_node.
7605         (dump_context::dump_symtab_node): Call it, and use the result,
7606         eliminating the direct usage of dump_file and alt_dump_file in
7607         favor of indirectly using them via emit_item.
7608         (dump_context::begin_scope): Reimplement, avoiding direct usage
7609         of dump_file and alt_dump_file in favor of indirectly using them
7610         via emit_item.
7611         (dump_context::emit_item): New member function.
7612         (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
7613         Set up test pretty-printer on the underlying context.  Call
7614         refresh_dumps_are_enabled.
7615         (temp_dump_context::~temp_dump_context): Call
7616         refresh_dumps_are_enabled.
7617         (temp_dump_context::get_dumped_text): New member function.
7618         (selftest::verify_dumped_text): New function.
7619         (ASSERT_DUMPED_TEXT_EQ): New macro.
7620         (selftest::test_capture_of_dump_calls): Run all tests twice, with
7621         and then without optinfo enabled.  Add uses of
7622         ASSERT_DUMPED_TEXT_EQ to all tests.  Add test of nested scopes.
7623         * dumpfile.h: Update comment for the dump_* API.
7624         * optinfo-emit-json.cc
7625         (selftest::test_building_json_from_dump_calls): Update for new
7626         param for temp_dump_context ctor.
7627         * optinfo.cc (optinfo_item::optinfo_item): Remove "owned" param
7628         and "m_owned" field.
7629         (optinfo_item::~optinfo_item): Likewise.
7630         (optinfo::add_item): New member function.
7631         (optinfo::emit): Update comment.
7632         (optinfo::add_string): Delete.
7633         (optinfo::add_printf): Delete.
7634         (optinfo::add_printf_va): Delete.
7635         (optinfo::add_gimple_stmt): Delete.
7636         (optinfo::add_gimple_expr): Delete.
7637         (optinfo::add_tree): Delete.
7638         (optinfo::add_symtab_node): Delete.
7639         (optinfo::add_dec): Delete.
7640         * optinfo.h (class dump_context): New forward decl.
7641         (optinfo::add_item): New decl.
7642         (optinfo::add_string): Delete.
7643         (optinfo::add_printf): Delete.
7644         (optinfo::add_printf_va): Delete.
7645         (optinfo::add_gimple_stmt): Delete.
7646         (optinfo::add_gimple_expr): Delete.
7647         (optinfo::add_tree): Delete.
7648         (optinfo::add_symtab_node): Delete.
7649         (optinfo::add_dec): Delete.
7650         (optinfo::add_poly_int): Delete.
7651         (optinfo_item::optinfo_item): Remove "owned" param.
7652         (class optinfo_item): Remove field "m_owned".
7654 2018-07-31  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
7656         PR middle-end/86705
7657         * gcc/cfgexpand.c (set_parm_rtl): Use the alignment of Pmode when
7658         MAX_SUPPORTED_STACK_ALIGNMENT would otherwise be exceeded by the
7659         requested variable alignment.
7660         (expand_one_ssa_partition): Likewise.
7661         (expand_one_var): Likewise.
7663 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
7665         * config/pdp11/pdp11.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
7666         to speculation_safe_value_not_needed.
7668 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
7670         * targhooks.h (speculation_safe_value_not_needed): New prototype.
7671         * targhooks.c (speculation_safe_value_not_needed): New function.
7672         * target.def (have_speculation_safe_value): Update documentation.
7673         * doc/tm.texi: Regenerated.
7675 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
7677         * config/aarch64/iterators.md (ALLI_TI): New iterator.
7678         * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>): New
7679         expand.
7680         (despeculate_copy<ALLI:mode>_insn): New insn.
7681         (despeculate_copyti_insn): New insn.
7682         (despeculate_simple<ALLI:mode>): New insn
7683         (despeculate_simpleti): New insn.
7684         * config/aarch64/aarch64.c (aarch64_speculation_safe_value): New
7685         function.
7686         (TARGET_SPECULATION_SAFE_VALUE): Redefine to
7687         aarch64_speculation_safe_value.
7688         (aarch64_print_operand): Handle const0_rtx in modifier 'H'.
7690 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
7692         * config/aarch64/aarch64-speculation.cc: New file.
7693         * config/aarch64/aarch64-passes.def (pass_track_speculation): Add
7694         before pass_reorder_blocks.
7695         * config/aarch64/aarch64-protos.h (make_pass_track_speculation): Add
7696         prototype.
7697         * config/aarch64/aarch64.c (aarch64_conditional_register_usage): Fix
7698         X14 and X15 when tracking speculation.
7699         * config/aarch64/aarch64.md (register name constants): Add
7700         SPECULATION_TRACKER_REGNUM and SPECULATION_SCRATCH_REGNUM.
7701         (unspec): Add UNSPEC_SPECULATION_TRACKER.
7702         (speculation_barrier): New insn attribute.
7703         (cmp<mode>): Allow SP in comparisons.
7704         (speculation_tracker): New insn.
7705         (speculation_barrier): Add speculation_barrier attribute.
7706         * config/aarch64/t-aarch64: Add make rule for aarch64-speculation.o.
7707         * config.gcc (aarch64*-*-*): Add aarch64-speculation.o to extra_objs.
7708         * doc/invoke.texi (AArch64 Options): Document -mtrack-speculation.
7710 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
7712         * config/aarch64/aarch64.md (cb<optab><mode>1): Disable when
7713         aarch64_track_speculation is true.
7714         (tb<optab><mode>1): Likewise.
7715         * config/aarch64/aarch64.c (aarch64_split_compare_regs): Do not
7716         generate CB[N]Z when tracking speculation.
7717         (aarch64_split_compare_and_swap): Likewise.
7718         (aarch64_split_atomic_op): Likewise.
7720 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
7722         * config/aarch64/aarch64.opt (mtrack-speculation): New target option.
7724 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
7726         * config/aarch64.md (unspecv): Add UNSPECV_SPECULAION_BARRIER.
7727         (speculation_barrier): New insn.
7729 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
7731         * config/arm/unspecs.md (unspecv): Add VUNSPEC_SPECULATION_BARRIER.
7732         * config/arm/arm.md (speculation_barrier): New expand.
7733         (speculation_barrier_insn): New pattern.
7735 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
7737         * builtin-types.def (BT_FN_PTR_PTR_VAR): New function type.
7738         (BT_FN_I1_I1_VAR, BT_FN_I2_I2_VAR, BT_FN_I4_I4_VAR): Likewise.
7739         (BT_FN_I8_I8_VAR, BT_FN_I16_I16_VAR): Likewise.
7740         * builtin-attrs.def (ATTR_NOVOPS_NOTHROW_LEAF_LIST): New attribute
7741         list.
7742         * builtins.def (BUILT_IN_SPECULATION_SAFE_VALUE_N): New builtin.
7743         (BUILT_IN_SPECULATION_SAFE_VALUE_PTR): New internal builtin.
7744         (BUILT_IN_SPECULATION_SAFE_VALUE_1): Likewise.
7745         (BUILT_IN_SPECULATION_SAFE_VALUE_2): Likewise.
7746         (BUILT_IN_SPECULATION_SAFE_VALUE_4): Likewise.
7747         (BUILT_IN_SPECULATION_SAFE_VALUE_8): Likewise.
7748         (BUILT_IN_SPECULATION_SAFE_VALUE_16): Likewise.
7749         * builtins.c (expand_speculation_safe_value): New function.
7750         (expand_builtin): Call it.
7751         * doc/cpp.texi: Document predefine __HAVE_SPECULATION_SAFE_VALUE.
7752         * doc/extend.texi: Document __builtin_speculation_safe_value.
7753         * doc/md.texi: Document "speculation_barrier" pattern.
7754         * doc/tm.texi.in: Pull in TARGET_SPECULATION_SAFE_VALUE and
7755         TARGET_HAVE_SPECULATION_SAFE_VALUE.
7756         * doc/tm.texi: Regenerated.
7757         * target.def (have_speculation_safe_value, speculation_safe_value): New
7758         hooks.
7759         * targhooks.c (default_have_speculation_safe_value): New function.
7760         (default_speculation_safe_value): New function.
7761         * targhooks.h (default_have_speculation_safe_value): Add prototype.
7762         (default_speculation_safe_value): Add prototype.
7764 2018-07-31  David Malcolm  <dmalcolm@redhat.com>
7766         * dump-context.h (dump_context::dump_loc): New decl.
7767         * dumpfile.c (dump_context::dump_loc): New member function.
7768         (dump_context::dump_gimple_stmt_loc): Reimplement using dump_loc
7769         and dump_gimple_stmt.
7770         (dump_context::dump_gimple_expr_loc): Likewise, using
7771         dump_gimple_expr.
7772         (dump_context::dump_generic_expr_loc): Likewise, using
7773         dump_generic_expr.
7774         (dump_context::dump_printf_loc_va): Likewise, using
7775         dump_printf_va.
7776         (dump_context::begin_scope): Explicitly using the global function
7777         "dump_loc", rather than the member function.
7779 2018-07-31  Martin Sebor  <msebor@redhat.com>
7781         PR tree-optimization/86741
7782         * tree-vrp.c (vrp_prop::check_mem_ref): Avoid incomplete types.
7784 2018-07-31  Andreas Krebbel  <krebbel@linux.ibm.com>
7786         * config/s390/s390.c (s390_expand_setmem): Make the unrolling to
7787         depend on whether prefetch instructions will be emitted or not.
7788         Use TARGET_SETMEM_PFD for checking whether prefetch instructions
7789         will be emitted or not.
7790         * config/s390/s390.h (TARGET_SETMEM_PREFETCH_DISTANCE)
7791         (TARGET_SETMEM_PFD): New macros.
7793 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
7795         * tree-vectorizer.h (stmt_vec_info): Turn back into a typedef.
7796         (NULL_STMT_VEC_INFO): Delete.
7797         (stmt_vec_info::operator*): Likewise.
7798         (stmt_vec_info::operator gimple *): Likewise.
7799         * tree-vect-loop.c (vectorizable_reduction): Use NULL instead
7800         of NULL_STMT_VEC_INFO.
7801         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
7802         (vect_reassociating_reduction_p): Likewise.
7803         * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
7804         (vectorizable_store): Likewise.
7805         * tree-vectorizer.c (vec_info::set_vinfo_for_stmt): Likewise.
7806         (vec_info::free_stmt_vec_infos): Likewise.
7808 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
7810         * tree-vectorizer.h (vect_stmt_in_region_p): Delete.
7811         * tree-vectorizer.c (vect_stmt_in_region_p): Likewise.
7813 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
7815         * tree-vectorizer.h (vec_info::new_vinfo_for_stmt)
7816         (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
7817         (vec_info::free_stmt_vec_info): New private member functions.
7818         (set_stmt_vec_info_vec, free_stmt_vec_infos, vinfo_for_stmt)
7819         (set_vinfo_for_stmt, new_stmt_vec_info, free_stmt_vec_info): Delete.
7820         * tree-parloops.c (gather_scalar_reductions): Remove calls to
7821         set_stmt_vec_info_vec and free_stmt_vec_infos.
7822         * tree-vect-loop.c (_loop_vec_info): Remove call to
7823         set_stmt_vec_info_vec.
7824         * tree-vect-stmts.c (new_stmt_vec_info, set_stmt_vec_info_vec)
7825         (free_stmt_vec_infos, free_stmt_vec_info): Delete in favor of...
7826         * tree-vectorizer.c (vec_info::new_stmt_vec_info)
7827         (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
7828         (vec_info::free_stmt_vec_info): ...these new functions.  Remove
7829         assignments in {vec_info::,}new_stmt_vec_info that are redundant
7830         with the clearing in the xcalloc.
7831         (stmt_vec_info_vec): Delete.
7832         (vec_info::vec_info): Don't call set_stmt_vec_info_vec.
7833         (vectorize_loops): Likewise.
7834         (vec_info::~vec_info): Remove argument from call to
7835         free_stmt_vec_infos.
7836         (vec_info::add_stmt): Remove vinfo argument from call to
7837         new_stmt_vec_info.
7839 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
7841         * tree-vectorizer.h (free_stmt_vec_info): Take a stmt_vec_info
7842         rather than a gimple stmt.
7843         * tree-vect-stmts.c (free_stmt_vec_info): Likewise.  Don't free
7844         information for pattern statements when passed the original
7845         statement; instead wait to be passed the pattern statement itself.
7846         Don't call set_vinfo_for_stmt here.
7847         (free_stmt_vec_infos): Update call to free_stmt_vec_info.
7848         * tree-vect-loop.c (_loop_vec_info::~loop_vec_info): Don't free
7849         stmt_vec_infos here.
7850         * tree-vect-slp.c (_bb_vec_info::~bb_vec_info): Likewise.
7851         * tree-vectorizer.c (vec_info::remove_stmt): Nullify the statement's
7852         stmt_vec_infos entry.
7854 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
7856         * tree-vectorizer.h (vec_info::replace_stmt): Declare.
7857         * tree-vectorizer.c (vec_info::replace_stmt): New function.
7858         * tree-vect-slp.c (vect_remove_slp_scalar_calls): Use it.
7859         * tree-vect-stmts.c (vectorizable_call): Likewise.
7860         (vectorizable_simd_clone_call): Likewise.
7862 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
7864         * tree-vectorizer.h (vec_info::remove_stmt): Declare.
7865         * tree-vectorizer.c (vec_info::remove_stmt): New function.
7866         * tree-vect-loop-manip.c (vect_set_loop_condition): Use it.
7867         * tree-vect-loop.c (vect_transform_loop): Likewise.
7868         * tree-vect-slp.c (vect_schedule_slp): Likewise.
7869         * tree-vect-stmts.c (vect_remove_stores): Likewise.
7871 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
7873         * tree-vectorizer.h (vec_info::lookup_dr): New member function.
7874         (vect_dr_stmt): Delete.
7875         * tree-vectorizer.c (vec_info::lookup_dr): New function.
7876         * tree-vect-loop-manip.c (vect_update_inits_of_drs): Use it instead
7877         of DR_VECT_AUX.
7878         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
7879         (vect_analyze_data_ref_dependence, vect_record_base_alignments)
7880         (vect_verify_datarefs_alignment, vect_peeling_supportable)
7881         (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
7882         (vect_analyze_data_refs): Likewise.
7883         (vect_slp_analyze_data_ref_dependence): Likewise.  Take a vec_info
7884         argument.
7885         (vect_find_same_alignment_drs): Likewise.
7886         (vect_slp_analyze_node_dependences): Update calls accordingly.
7887         (vect_analyze_data_refs_alignment): Likewise.  Use vec_info::lookup_dr
7888         instead of DR_VECT_AUX.
7889         (vect_get_peeling_costs_all_drs): Take a loop_vec_info instead
7890         of a vector data references.  Use vec_info::lookup_dr instead of
7891         DR_VECT_AUX.
7892         (vect_peeling_hash_get_lowest_cost): Update calls accordingly.
7893         (vect_enhance_data_refs_alignment): Likewise.  Use vec_info::lookup_dr
7894         instead of DR_VECT_AUX.
7896 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
7898         * tree-vectorizer.h (_loop_vec_info::unaligned_dr): Change to
7899         dr_vec_info.
7900         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
7901         accordingly.
7902         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
7903         * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
7904         (vect_gen_prolog_loop_niters): Likewise.
7906 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
7908         * tree-vectorizer.h (set_dr_misalignment, dr_misalignment)
7909         (DR_TARGET_ALIGNMENT, aligned_access_p, known_alignment_for_access_p)
7910         (vect_known_alignment_in_bytes, vect_dr_behavior)
7911         (vect_get_scalar_dr_size): Take references as dr_vec_infos
7912         instead of data_references.  Update calls to other routines for
7913         which the same change has been made.
7914         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Take
7915         dr_vec_infos instead of stmt_vec_infos.
7916         (vect_analyze_data_ref_dependence): Update call accordingly.
7917         (vect_slp_analyze_data_ref_dependence)
7918         (vect_record_base_alignments): Use DR_VECT_AUX.
7919         (vect_calculate_target_alignment, vect_compute_data_ref_alignment)
7920         (vect_update_misalignment_for_peel, verify_data_ref_alignment)
7921         (vector_alignment_reachable_p, vect_get_data_access_cost)
7922         (vect_peeling_supportable, vect_analyze_group_access_1)
7923         (vect_analyze_group_access, vect_analyze_data_ref_access)
7924         (vect_vfa_segment_size, vect_vfa_access_size, vect_vfa_align)
7925         (vect_compile_time_alias, vect_small_gap_p)
7926         (vectorizable_with_step_bound_p, vect_duplicate_ssa_name_ptr_info):
7927         (vect_supportable_dr_alignment): Take references as dr_vec_infos
7928         instead of data_references.  Update calls to other routines for
7929         which the same change has been made.
7930         (vect_verify_datarefs_alignment, vect_get_peeling_costs_all_drs)
7931         (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
7932         (vect_slp_analyze_and_verify_node_alignment)
7933         (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
7934         (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
7935         (vect_setup_realignment): Use dr_vec_infos.  Update calls after
7936         above changes.
7937         (_vect_peel_info::dr): Replace with...
7938         (_vect_peel_info::dr_info): ...this new field.
7939         (vect_peeling_hash_get_most_frequent)
7940         (vect_peeling_hash_choose_best_peeling): Update accordingly.
7941         (vect_peeling_hash_get_lowest_cost):
7942         (vect_enhance_data_refs_alignment): Likewise.  Update calls to other
7943         routines for which the same change has been made.
7944         (vect_peeling_hash_insert): Likewise.  Take a dr_vec_info instead of a
7945         data_reference.
7946         * tree-vect-loop-manip.c (get_misalign_in_elems)
7947         (vect_gen_prolog_loop_niters): Use dr_vec_infos.  Update calls after
7948         above changes.
7949         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
7950         * tree-vect-stmts.c (vect_get_store_cost, vect_get_load_cost)
7951         (vect_truncate_gather_scatter_offset, compare_step_with_zero)
7952         (get_group_load_store_type, get_negative_load_store_type)
7953         (vect_get_data_ptr_increment, vectorizable_store)
7954         (vectorizable_load): Likewise.
7955         (ensure_base_align): Take a dr_vec_info instead of a data_reference.
7956         Update calls to other routines for which the same change has been made.
7958 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
7960         * tree-vectorizer.h (vec_info::move_dr): New member function.
7961         (dataref_aux): Rename to...
7962         (dr_vec_info): ...this and add "dr" and "stmt" fields.
7963         (_stmt_vec_info::dr_aux): Update accordingly.
7964         (_stmt_vec_info::data_ref_info): Delete.
7965         (STMT_VINFO_GROUPED_ACCESS, DR_GROUP_FIRST_ELEMENT)
7966         (DR_GROUP_NEXT_ELEMENT, DR_GROUP_SIZE, DR_GROUP_STORE_COUNT)
7967         (DR_GROUP_GAP, DR_GROUP_SAME_DR_STMT, REDUC_GROUP_FIRST_ELEMENT):
7968         (REDUC_GROUP_NEXT_ELEMENT, REDUC_GROUP_SIZE): Use dr_aux.dr instead
7969         of data_ref.
7970         (STMT_VINFO_DATA_REF): Likewise.  Turn into an lvalue.
7971         (STMT_VINFO_DR_INFO): New macro.
7972         (DR_VECT_AUX): Use STMT_VINFO_DR_INKFO and vect_dr_stmt.
7973         (set_dr_misalignment): Update after rename of dataref_aux.
7974         (vect_dr_stmt): Move earlier in file.  Return dr_aux.stmt.
7975         * tree-vect-stmts.c (new_stmt_vec_info): Remove redundant
7976         initialization of STMT_VINFO_DATA_REF.
7977         * tree-vectorizer.c (vec_info::move_dr): New function.
7978         * tree-vect-patterns.c (vect_recog_bool_pattern)
7979         (vect_recog_mask_conversion_pattern)
7980         (vect_recog_gather_scatter_pattern): Use it.
7981         * tree-vect-data-refs.c (vect_analyze_data_refs): Initialize
7982         the "dr" and "stmt" fields of dr_vec_info instead of
7983         STMT_VINFO_DATA_REF.
7985 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
7987         * tree-vectorizer.h (_stmt_vec_info::pattern_stmt_p): New field.
7988         (is_pattern_stmt_p): Use it.
7989         * tree-vect-patterns.c (vect_init_pattern_stmt): Set pattern_stmt_p
7990         on pattern statements.
7992 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
7994         * tree-vect-patterns.c (vect_mark_pattern_stmts): Take the
7995         original stmt as a stmt_vec_info rather than a gimple stmt.
7996         (vect_pattern_recog_1): Take the statement directly as a
7997         stmt_vec_info, rather than via a gimple_stmt_iterator.
7998         Update call to vect_mark_pattern_stmts.
7999         (vect_pattern_recog): Update calls accordingly.
8001 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
8003         * tree-vectorizer.h (vect_get_vec_defs_for_stmt_copy)
8004         (vect_get_vec_def_for_stmt_copy): Take a vec_info rather than
8005         a vect_def_type for the first argument.
8006         * tree-vect-stmts.c (vect_get_vec_defs_for_stmt_copy): Likewise.
8007         (vect_get_vec_def_for_stmt_copy): Likewise.  Return the original
8008         operand if it isn't defined by a vectorized statement.
8009         (vect_build_gather_load_calls): Remove the mask_dt argument and
8010         update calls to vect_get_vec_def_for_stmt_copy.
8011         (vectorizable_bswap): Likewise the dt argument.
8012         (vectorizable_call): Update calls to vectorizable_bswap and
8013         vect_get_vec_def_for_stmt_copy.
8014         (vectorizable_simd_clone_call, vectorizable_assignment)
8015         (vectorizable_shift, vectorizable_operation, vectorizable_condition)
8016         (vectorizable_comparison): Update calls to
8017         vect_get_vec_def_for_stmt_copy.
8018         (vectorizable_store): Likewise.  Remove now-unnecessary calls to
8019         vect_is_simple_use.
8020         (vect_get_loop_based_defs): Remove dt argument and update call
8021         to vect_get_vec_def_for_stmt_copy.
8022         (vectorizable_conversion): Update calls to vect_get_loop_based_defs
8023         and vect_get_vec_def_for_stmt_copy.
8024         (vectorizable_load): Update calls to vect_build_gather_load_calls
8025         and vect_get_vec_def_for_stmt_copy.
8026         * tree-vect-loop.c (vect_create_epilog_for_reduction)
8027         (vectorizable_reduction, vectorizable_live_operation): Update calls
8028         to vect_get_vec_def_for_stmt_copy.
8030 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
8032         * tree-vect-data-refs.c (vect_record_base_alignment): Replace vec_info
8033         and gimple stmt arguments with a stmt_vec_info.
8034         (vect_record_base_alignments): Update calls accordingly.
8035         * tree-vect-slp.c (vect_record_max_nunits): Replace vec_info
8036         and gimple stmt arguments with a stmt_vec_info.
8037         (vect_build_slp_tree_1): Remove vinfo argument and update call
8038         to vect_record_max_nunits.
8039         (vect_build_slp_tree_2): Update calls to vect_build_slp_tree_1
8040         and vect_record_max_nunits.
8042 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
8044         * tree-vectorizer.h (nested_in_vect_loop_p): Move further down
8045         file and take a stmt_vec_info instead of a gimple stmt.
8046         (supportable_widening_operation, vect_finish_replace_stmt)
8047         (vect_finish_stmt_generation, vect_get_store_rhs)
8048         (vect_get_vec_def_for_operand_1, vect_get_vec_def_for_operand)
8049         (vect_get_vec_defs, vect_init_vector, vect_transform_stmt)
8050         (vect_remove_stores, vect_analyze_stmt, vectorizable_condition)
8051         (vect_get_smallest_scalar_type, vect_check_gather_scatter)
8052         (vect_create_data_ref_ptr, bump_vector_ptr)
8053         (vect_permute_store_chain, vect_setup_realignment)
8054         (vect_transform_grouped_load, vect_record_grouped_load_vectors)
8055         (vect_create_addr_base_for_vector_ref, vectorizable_live_operation)
8056         (vectorizable_reduction, vectorizable_induction)
8057         (get_initial_def_for_reduction, is_simple_and_all_uses_invariant)
8058         (vect_get_place_in_interleaving_chain): Take stmt_vec_infos rather
8059         than gimple stmts as arguments.
8060         * tree-vect-data-refs.c (vect_get_smallest_scalar_type)
8061         (vect_preserves_scalar_order_p, vect_slp_analyze_node_dependences)
8062         (can_group_stmts_p, vect_check_gather_scatter)
8063         (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
8064         (bump_vector_ptr, vect_permute_store_chain, vect_setup_realignment)
8065         (vect_permute_load_chain, vect_shift_permute_load_chain)
8066         (vect_transform_grouped_load)
8067         (vect_record_grouped_load_vectors): Likewise.
8068         * tree-vect-loop.c (vect_fixup_reduc_chain)
8069         (get_initial_def_for_reduction, vect_create_epilog_for_reduction)
8070         (vectorize_fold_left_reduction, is_nonwrapping_integer_induction)
8071         (vectorizable_reduction, vectorizable_induction)
8072         (vectorizable_live_operation, vect_loop_kill_debug_uses): Likewise.
8073         * tree-vect-patterns.c (type_conversion_p, adjust_bool_stmts)
8074         (vect_get_load_store_mask): Likewise.
8075         * tree-vect-slp.c (vect_get_place_in_interleaving_chain)
8076         (vect_analyze_slp_instance, vect_mask_constant_operand_p): Likewise.
8077         * tree-vect-stmts.c (vect_mark_relevant)
8078         (is_simple_and_all_uses_invariant)
8079         (exist_non_indexing_operands_for_use_p, process_use)
8080         (vect_init_vector_1, vect_init_vector, vect_get_vec_def_for_operand_1)
8081         (vect_get_vec_def_for_operand, vect_get_vec_defs)
8082         (vect_finish_stmt_generation_1, vect_finish_replace_stmt)
8083         (vect_finish_stmt_generation, vect_truncate_gather_scatter_offset)
8084         (compare_step_with_zero, vect_get_store_rhs, get_group_load_store_type)
8085         (get_negative_load_store_type, get_load_store_type)
8086         (vect_check_load_store_mask, vect_check_store_rhs)
8087         (vect_build_gather_load_calls, vect_get_strided_load_store_ops)
8088         (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
8089         (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
8090         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
8091         (get_group_alias_ptr_type, vectorizable_store, hoist_defs_of_uses)
8092         (vectorizable_load, vectorizable_condition, vectorizable_comparison)
8093         (vect_analyze_stmt, vect_transform_stmt, vect_remove_stores)
8094         (supportable_widening_operation): Likewise.
8096 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
8098         * tree-vect-data-refs.c (vect_describe_gather_scatter_call): Take
8099         a stmt_vec_info instead of a gcall.
8100         (vect_check_gather_scatter): Update call accordingly.
8101         * tree-vect-loop-manip.c (iv_phi_p): Take a stmt_vec_info instead
8102         of a gphi.
8103         (vect_can_advance_ivs_p, vect_update_ivs_after_vectorizer)
8104         (slpeel_update_phi_nodes_for_loops):): Update calls accordingly.
8105         * tree-vect-loop.c (vect_transform_loop_stmt): Take a stmt_vec_info
8106         instead of a gimple stmt.
8107         (vect_transform_loop): Update calls accordingly.
8108         * tree-vect-slp.c (vect_split_slp_store_group): Take and return
8109         stmt_vec_infos instead of gimple stmts.
8110         (vect_analyze_slp_instance): Update use accordingly.
8111         * tree-vect-stmts.c (read_vector_array, write_vector_array)
8112         (vect_clobber_variable, vect_stmt_relevant_p, permute_vec_elements)
8113         (vect_use_strided_gather_scatters_p, vect_build_all_ones_mask)
8114         (vect_build_zero_merge_argument, vect_get_gather_scatter_ops)
8115         (vect_gen_widened_results_half, vect_get_loop_based_defs)
8116         (vect_create_vectorized_promotion_stmts, can_vectorize_live_stmts):
8117         Take a stmt_vec_info instead of a gimple stmt and pass stmt_vec_infos
8118         down to subroutines.
8120 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
8122         * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Change the type
8123         of the worklist from a vector of gimple stmts to a vector of
8124         stmt_vec_infos.
8125         * tree-vect-stmts.c (vect_mark_relevant, process_use)
8126         (vect_mark_stmts_to_be_vectorized): Likewise
8128 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
8130         * tree-vect-loop.c (vect_analyze_loop_operations): Look up the
8131         statement before passing it to vect_analyze_stmt.
8132         (vect_create_epilog_for_reduction): Use a stmt_vec_info to walk
8133         the chain of phi vector definitions.  Track the exit phi via its
8134         stmt_vec_info.
8135         (vectorizable_reduction): Set cond_stmt_vinfo directly from the
8136         STMT_VINFO_REDUC_DEF.
8137         * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Use
8138         stmt_vec_infos to handle the statement chains.
8139         (vect_get_slp_defs): Record the first statement in the node
8140         using a stmt_vec_info.
8141         * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Look up
8142         statements here and pass their stmt_vec_info down to subroutines.
8143         (vect_init_vector_1): Hoist call to vinfo_for_stmt and pass it
8144         down to vect_finish_stmt_generation.
8145         (vect_init_vector, vect_get_vec_defs, vect_finish_replace_stmt)
8146         (vect_finish_stmt_generation): Call vinfo_for_stmt and pass
8147         stmt_vec_infos to subroutines.
8148         (vect_remove_stores): Use stmt_vec_infos to handle the statement
8149         chains.
8151 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
8153         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences):
8154         (vect_check_gather_scatter, vect_create_data_ref_ptr, bump_vector_ptr)
8155         (vect_permute_store_chain, vect_setup_realignment)
8156         (vect_permute_load_chain, vect_shift_permute_load_chain)
8157         (vect_transform_grouped_load): Use stmt_vec_info rather than gimple
8158         stmts internally, and when passing values to other vectorizer routines.
8159         * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
8160         * tree-vect-loop.c (vect_analyze_scalar_cycles_1)
8161         (vect_analyze_loop_operations, get_initial_def_for_reduction)
8162         (vect_create_epilog_for_reduction, vectorize_fold_left_reduction)
8163         (vectorizable_reduction, vectorizable_induction)
8164         (vectorizable_live_operation, vect_transform_loop_stmt)
8165         (vect_transform_loop): Likewise.
8166         * tree-vect-patterns.c (vect_reassociating_reduction_p)
8167         (vect_recog_widen_op_pattern, vect_recog_mixed_size_cond_pattern)
8168         (vect_recog_bool_pattern, vect_recog_gather_scatter_pattern): Likewise.
8169         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
8170         (vect_slp_analyze_node_operations_1): Likewise.
8171         * tree-vect-stmts.c (vect_mark_relevant, process_use)
8172         (exist_non_indexing_operands_for_use_p, vect_init_vector_1)
8173         (vect_mark_stmts_to_be_vectorized, vect_get_vec_def_for_operand)
8174         (vect_finish_stmt_generation_1, get_group_load_store_type)
8175         (get_load_store_type, vect_build_gather_load_calls)
8176         (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
8177         (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
8178         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
8179         (vectorizable_store, vectorizable_load, vectorizable_condition)
8180         (vectorizable_comparison, vect_analyze_stmt, vect_transform_stmt)
8181         (supportable_widening_operation): Likewise.
8182         (vect_get_vector_types_for_stmt): Likewise.
8183         * tree-vectorizer.h (vect_dr_behavior): Likewise.
8185 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
8187         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
8188         (vect_slp_analyze_node_dependences, vect_analyze_data_ref_accesses)
8189         (vect_permute_store_chain, vect_permute_load_chain)
8190         (vect_shift_permute_load_chain, vect_transform_grouped_load): Avoid
8191         repeated stmt_vec_info lookups.
8192         * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
8193         (vect_update_ivs_after_vectorizer): Likewise.
8194         * tree-vect-loop.c (vect_is_simple_reduction): Likewise.
8195         (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
8196         * tree-vect-patterns.c (adjust_bool_stmts): Likewise.
8197         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
8198         (vect_bb_slp_scalar_cost): Likewise.
8199         * tree-vect-stmts.c (get_group_alias_ptr_type): Likewise.
8201 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
8203         * tree-vect-data-refs.c (vect_check_gather_scatter): Pass the
8204         gcall rather than the generic gimple stmt to gimple_call_internal_fn.
8205         (vect_get_smallest_scalar_type, can_group_stmts_p): Use dyn_cast
8206         to get gassigns and gcalls, rather than operating on generc gimple
8207         stmts.
8208         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p)
8209         (vect_mark_stmts_to_be_vectorized, vectorizable_store)
8210         (vectorizable_load, vect_analyze_stmt): Likewise.
8211         * tree-vect-loop.c (vectorizable_reduction): Likewise gphi.
8213 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
8215         * tree-vectorizer.h (get_earlier_stmt, get_later_stmt): Take and
8216         return stmt_vec_infos rather than gimple stmts.  Do not accept
8217         null arguments.
8218         (vect_find_last_scalar_stmt_in_slp): Return a stmt_vec_info instead
8219         of a gimple stmt.
8220         * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
8221         Update use of get_later_stmt.
8222         (vect_get_constant_vectors): Update call accordingly.
8223         (vect_schedule_slp_instance): Likewise
8224         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Likewise.
8225         (vect_slp_analyze_instance_dependence): Likewise.
8226         (vect_preserves_scalar_order_p): Update use of get_earlier_stmt.
8228 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
8230         * tree-vectorizer.h (stmt_info_for_cost::stmt): Replace with...
8231         (stmt_info_for_cost::stmt_info): ...this new field.
8232         (add_stmt_costs): Update accordingly.
8233         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
8234         (vect_get_known_peeling_cost): Likewise.
8235         (vect_estimate_min_profitable_iters): Likewise.
8236         * tree-vect-stmts.c (record_stmt_cost): Likewise.
8238 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
8240         * tree-vectorizer.h (_loop_vec_info::may_misalign_stmts): Change
8241         from an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
8242         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
8243         accordingly.
8244         * tree-vect-loop-manip.c (vect_create_cond_for_align_checks): Likewise.
8246 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
8248         * tree-vectorizer.h (_stmt_vec_info::same_dr_stmt): Change from
8249         a gimple stmt to a stmt_vec_info.
8250         * tree-vect-stmts.c (vectorizable_load): Update accordingly.
8252 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
8254         * tree-vectorizer.h (vec_info::grouped_stores): Change from
8255         an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
8256         (_loop_vec_info::reduction_chains): Likewise.
8257         * tree-vect-loop.c (vect_fixup_scalar_cycles_with_patterns): Update
8258         accordingly.
8259         * tree-vect-slp.c (vect_analyze_slp): Likewise.
8261 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
8263         * tree-vectorizer.h (_stmt_vec_info::first_element): Change from
8264         a gimple stmt to a stmt_vec_info.
8265         (_stmt_vec_info::next_element): Likewise.
8266         * tree-vect-data-refs.c (vect_update_misalignment_for_peel)
8267         (vect_slp_analyze_and_verify_node_alignment)
8268         (vect_analyze_group_access_1, vect_analyze_group_access)
8269         (vect_small_gap_p, vect_prune_runtime_alias_test_list)
8270         (vect_create_data_ref_ptr, vect_record_grouped_load_vectors)
8271         (vect_supportable_dr_alignment): Update accordingly.
8272         * tree-vect-loop.c (vect_fixup_reduc_chain): Likewise.
8273         (vect_fixup_scalar_cycles_with_patterns, vect_is_slp_reduction)
8274         (vect_is_simple_reduction, vectorizable_reduction): Likewise.
8275         * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
8276         * tree-vect-slp.c (vect_build_slp_tree_1)
8277         (vect_attempt_slp_rearrange_stmts, vect_supported_load_permutation_p)
8278         (vect_split_slp_store_group, vect_analyze_slp_instance)
8279         (vect_analyze_slp, vect_transform_slp_perm_load): Likewise.
8280         * tree-vect-stmts.c (vect_model_store_cost, vect_model_load_cost)
8281         (get_group_load_store_type, get_load_store_type)
8282         (get_group_alias_ptr_type, vectorizable_store, vectorizable_load)
8283         (vect_transform_stmt, vect_remove_stores): Likewise.
8285 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
8287         * tree-vectorizer.h (vect_dr_stmt): Return a stmt_vec_info rather
8288         than a gimple stmt.
8289         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
8290         (vect_slp_analyze_data_ref_dependence, vect_record_base_alignments)
8291         (vect_calculate_target_alignmentm, vect_compute_data_ref_alignment)
8292         (vect_update_misalignment_for_peel, vect_verify_datarefs_alignment)
8293         (vector_alignment_reachable_p, vect_get_data_access_cost)
8294         (vect_get_peeling_costs_all_drs, vect_peeling_hash_get_lowest_cost)
8295         (vect_peeling_supportable, vect_enhance_data_refs_alignment)
8296         (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
8297         (vect_analyze_group_access_1, vect_analyze_group_access)
8298         (vect_analyze_data_ref_access, vect_analyze_data_ref_accesses)
8299         (vect_vfa_access_size, vect_small_gap_p, vect_analyze_data_refs)
8300         (vect_supportable_dr_alignment): Remove vinfo_for_stmt from the
8301         result of vect_dr_stmt and use the stmt_vec_info instead of
8302         the associated gimple stmt.
8303         * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
8304         (vect_gen_prolog_loop_niters): Likewise.
8305         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
8307 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
8309         * tree-vectorizer.h (_slp_tree::stmts): Change from a vec<gimple *>
8310         to a vec<stmt_vec_info>.
8311         * tree-vect-slp.c (vect_free_slp_tree): Update accordingly.
8312         (vect_create_new_slp_node): Take a vec<gimple *> instead of a
8313         vec<stmt_vec_info>.
8314         (_slp_oprnd_info::def_stmts): Change from a vec<gimple *>
8315         to a vec<stmt_vec_info>.
8316         (bst_traits::value_type, bst_traits::value_type): Likewise.
8317         (bst_traits::hash): Update accordingly.
8318         (vect_get_and_check_slp_defs): Change the stmts parameter from
8319         a vec<gimple *> to a vec<stmt_vec_info>.
8320         (vect_two_operations_perm_ok_p, vect_build_slp_tree_1): Likewise.
8321         (vect_build_slp_tree): Likewise.
8322         (vect_build_slp_tree_2): Likewise.  Update uses of
8323         SLP_TREE_SCALAR_STMTS.
8324         (vect_print_slp_tree): Update uses of SLP_TREE_SCALAR_STMTS.
8325         (vect_mark_slp_stmts, vect_mark_slp_stmts_relevant)
8326         (vect_slp_rearrange_stmts, vect_attempt_slp_rearrange_stmts)
8327         (vect_supported_load_permutation_p, vect_find_last_scalar_stmt_in_slp)
8328         (vect_detect_hybrid_slp_stmts, vect_slp_analyze_node_operations_1)
8329         (vect_slp_analyze_node_operations, vect_slp_analyze_operations)
8330         (vect_bb_slp_scalar_cost, vect_slp_analyze_bb_1)
8331         (vect_get_constant_vectors, vect_get_slp_defs)
8332         (vect_transform_slp_perm_load, vect_schedule_slp_instance)
8333         (vect_remove_slp_scalar_calls, vect_schedule_slp): Likewise.
8334         (vect_analyze_slp_instance): Build up a vec of stmt_vec_infos
8335         instead of gimple stmts.
8336         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Change
8337         the stores parameter for a vec<gimple *> to a vec<stmt_vec_info>.
8338         (vect_slp_analyze_instance_dependence): Update uses of
8339         SLP_TREE_SCALAR_STMTS.
8340         (vect_slp_analyze_and_verify_node_alignment): Likewise.
8341         (vect_slp_analyze_and_verify_instance_alignment): Likewise.
8342         * tree-vect-loop.c (neutral_op_for_slp_reduction): Likewise.
8343         (get_initial_defs_for_reduction): Likewise.
8344         (vect_create_epilog_for_reduction): Likewise.
8345         (vectorize_fold_left_reduction): Likewise.
8346         * tree-vect-stmts.c (vect_prologue_cost_for_slp_op): Likewise.
8347         (vect_model_simple_cost, vectorizable_shift, vectorizable_load)
8348         (can_vectorize_live_stmts): Likewise.
8350 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
8352         * tree-vectorizer.h (_loop_vec_info::reductions): Change from an
8353         auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
8354         (vect_force_simple_reduction): Take and return stmt_vec_infos rather
8355         than gimple stmts.
8356         * tree-parloops.c (valid_reduction_p): Take a stmt_vec_info instead
8357         of a gimple stmt.
8358         (gather_scalar_reductions): Update after above interface changes.
8359         * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Likewise.
8360         (vect_is_simple_reduction): Take and return stmt_vec_infos rather
8361         than gimple stmts.
8362         (vect_force_simple_reduction): Likewise.
8363         * tree-vect-patterns.c (vect_pattern_recog_1): Update use of
8364         LOOP_VINFO_REDUCTIONS.
8365         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
8367 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
8369         * tree-vectorizer.h (_stmt_vec_info::reduc_def): Change from
8370         a gimple stmt to a stmt_vec_info.
8371         * tree-vect-loop.c (vect_active_double_reduction_p)
8372         (vect_force_simple_reduction, vectorizable_reduction): Update
8373         accordingly.
8375 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
8377         * tree-vectorizer.h (_slp_tree::vec_stmts): Change from a
8378         vec<gimple *> to a vec<stmt_vec_info>.
8379         * tree-vect-loop.c (vect_create_epilog_for_reduction): Change
8380         the reduction_phis argument from a vec<gimple *> to a
8381         vec<stmt_vec_info>.
8382         (vectorizable_reduction): Likewise the phis local variable that
8383         is passed to vect_create_epilog_for_reduction.  Update for new type
8384         of SLP_TREE_VEC_STMTS.
8385         (vectorizable_induction): Update for new type of SLP_TREE_VEC_STMTS.
8386         (vectorizable_live_operation): Likewise.
8387         * tree-vect-slp.c (vect_get_slp_vect_defs): Likewise.
8388         (vect_transform_slp_perm_load, vect_schedule_slp_instance): Likewise.
8390 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
8392         * tree-vectorizer.h (_stmt_vec_info::vectorized_stmt): Change from
8393         a gimple stmt to a stmt_vec_info.
8394         (vectorizable_condition, vectorizable_live_operation)
8395         (vectorizable_reduction, vectorizable_induction): Pass back the
8396         vectorized statement as a stmt_vec_info.
8397         * tree-vect-data-refs.c (vect_record_grouped_load_vectors): Update
8398         use of STMT_VINFO_VEC_STMT.
8399         * tree-vect-loop.c (vect_create_epilog_for_reduction): Likewise,
8400         accumulating the inner phis that feed the STMT_VINFO_VEC_STMT
8401         as stmt_vec_infos rather than gimple stmts.
8402         (vectorize_fold_left_reduction): Change vec_stmt from a gimple stmt
8403         to a stmt_vec_info.
8404         (vectorizable_live_operation): Likewise.
8405         (vectorizable_reduction, vectorizable_induction): Likewise,
8406         updating use of STMT_VINFO_VEC_STMT.
8407         * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Update use
8408         of STMT_VINFO_VEC_STMT.
8409         (vect_build_gather_load_calls, vectorizable_bswap, vectorizable_call)
8410         (vectorizable_simd_clone_call, vectorizable_conversion)
8411         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
8412         (vectorizable_store, vectorizable_load, vectorizable_condition)
8413         (vectorizable_comparison, can_vectorize_live_stmts): Change vec_stmt
8414         from a gimple stmt to a stmt_vec_info.
8415         (vect_transform_stmt): Update use of STMT_VINFO_VEC_STMT.  Pass a
8416         pointer to a stmt_vec_info to the vectorizable_* routines.
8418 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
8420         * tree-vectorizer.h (_stmt_vec_info::related_stmt): Change from
8421         a gimple stmt to a stmt_vec_info.
8422         (is_pattern_stmt_p): Update accordingly.
8423         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Likewise.
8424         (vect_record_grouped_load_vectors): Likewise.
8425         * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
8426         (vect_fixup_reduc_chain, vect_update_vf_for_slp): Likewise.
8427         (vect_model_reduction_cost): Likewise.
8428         (vect_create_epilog_for_reduction): Likewise.
8429         (vectorizable_reduction, vectorizable_induction): Likewise.
8430         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
8431         Return the stmt_vec_info for the pattern statement.
8432         (vect_set_pattern_stmt): Update use of STMT_VINFO_RELATED_STMT.
8433         (vect_split_statement, vect_mark_pattern_stmts): Likewise.
8434         * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
8435         (vect_detect_hybrid_slp, vect_get_slp_defs): Likewise.
8436         * tree-vect-stmts.c (vect_mark_relevant): Likewise.
8437         (vect_get_vec_def_for_operand_1, vectorizable_call): Likewise.
8438         (vectorizable_simd_clone_call, vect_analyze_stmt, new_stmt_vec_info)
8439         (free_stmt_vec_info, vect_is_simple_use): Likewise.
8441 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
8443         * tree-vectorizer.h (vect_finish_replace_stmt): Return a stmt_vec_info
8444         (vect_finish_stmt_generation): Likewise.
8445         * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
8446         (vect_finish_replace_stmt, vect_finish_stmt_generation): Likewise.
8447         (vect_build_gather_load_calls): Use the return value of the above
8448         functions instead of a separate call to vinfo_for_stmt.  Use narrow
8449         scopes for the input gimple stmt and wider scopes for the associated
8450         stmt_vec_info.  Use vec_info::lookup_def when setting these
8451         stmt_vec_infos from an SSA_NAME definition.
8452         (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
8453         (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
8454         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
8455         (vectorizable_store, vectorizable_load, vectorizable_condition)
8456         (vectorizable_comparison): Likewise.
8457         * tree-vect-loop.c (vectorize_fold_left_reduction): Likewise.
8458         (vectorizable_reduction): Likewise.
8460 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
8462         * tree-vectorizer.h (vect_is_simple_use): Add an optional
8463         stmt_vec_info * parameter before the optional gimple **.
8464         * tree-vect-stmts.c (vect_is_simple_use): Likewise.
8465         (process_use, vect_get_vec_def_for_operand_1): Update callers.
8466         (vect_get_vec_def_for_operand, vectorizable_shift): Likewise.
8467         * tree-vect-loop.c (vectorizable_reduction): Likewise.
8468         (vectorizable_live_operation): Likewise.
8469         * tree-vect-patterns.c (type_conversion_p): Likewise.
8470         (vect_look_through_possible_promotion): Likewise.
8471         (vect_recog_rotate_pattern): Likewise.
8472         * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
8474 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
8476         * tree-vectorizer.h (stmt_vec_info): Temporarily change from
8477         a typedef to a wrapper class.
8478         (NULL_STMT_VEC_INFO): New macro.
8479         (vec_info::stmt_infos): Change to vec<stmt_vec_info>.
8480         (stmt_vec_info::operator*): New function.
8481         (stmt_vec_info::operator gimple *): Likewise.
8482         (set_vinfo_for_stmt): Use NULL_STMT_VEC_INFO.
8483         (add_stmt_costs): Likewise.
8484         * tree-vect-loop-manip.c (iv_phi_p): Likewise.
8485         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
8486         (vect_get_known_peeling_cost): Likewise.
8487         (vect_estimate_min_profitable_iters): Likewise.
8488         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
8489         * tree-vect-slp.c (vect_remove_slp_scalar_calls): Likewise.
8490         * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
8491         (vectorizable_store, free_stmt_vec_infos): Likewise.
8492         (new_stmt_vec_info): Change return type of xcalloc to
8493         _stmt_vec_info *.
8495 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
8497         * tree-vectorizer.h (vec_info::lookup_single_use): Declare.
8498         * tree-vectorizer.c (vec_info::lookup_single_use): New function.
8499         * tree-vect-loop.c (vectorizable_reduction): Use it instead of
8500         a single_imm_use-based sequence.
8501         * tree-vect-stmts.c (supportable_widening_operation): Likewise.
8503 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
8505         * tree-vectorizer.h (vec_info::lookup_def): Declare.
8506         * tree-vectorizer.c (vec_info::lookup_def): New function.
8507         * tree-vect-patterns.c (vect_get_internal_def): Use it.
8508         (vect_widened_op_tree): Likewise.
8509         * tree-vect-stmts.c (vect_is_simple_use): Likewise.
8510         * tree-vect-loop.c (vect_analyze_loop_operations): Likewise.
8511         (vectorizable_reduction): Likewise.
8512         (vect_valid_reduction_input_p): Take a stmt_vec_info instead
8513         of a gimple *.
8514         (vect_is_slp_reduction): Update calls accordingly.  Use
8515         vec_info::lookup_def.
8516         (vect_is_simple_reduction): Likewise
8517         * tree-vect-slp.c (vect_detect_hybrid_slp_1): Use vec_info::lookup_def.
8519 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
8521         * tree-vectorizer.h (vec_info::lookup_stmt): Declare.
8522         * tree-vectorizer.c (vec_info::lookup_stmt): New function.
8523         * tree-vect-loop.c (vect_determine_vf_for_stmt): Use it instead
8524         of vinfo_for_stmt.
8525         (vect_determine_vectorization_factor, vect_analyze_scalar_cycles_1)
8526         (vect_compute_single_scalar_iteration_cost, vect_analyze_loop_form)
8527         (vect_update_vf_for_slp, vect_analyze_loop_operations)
8528         (vect_is_slp_reduction, vectorizable_induction)
8529         (vect_transform_loop_stmt, vect_transform_loop): Likewise.
8530         * tree-vect-patterns.c (vect_init_pattern_stmt):
8531         (vect_determine_min_output_precision_1, vect_determine_precisions)
8532         (vect_pattern_recog): Likewise.
8533         * tree-vect-stmts.c (vect_analyze_stmt, vect_transform_stmt): Likewise.
8534         * config/powerpcspe/powerpcspe.c (rs6000_density_test): Likewise.
8535         * config/rs6000/rs6000.c (rs6000_density_test): Likewise.
8536         * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
8537         (vect_detect_hybrid_slp_1, vect_detect_hybrid_slp_2)
8538         (vect_detect_hybrid_slp): Likewise.  Change the walk_stmt_info
8539         info field from a loop to a loop_vec_info.
8541 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
8543         * tree-vectorizer.h (stmt_vec_info): Move typedef earlier in file.
8544         (vec_info::add_stmt): Declare.
8545         * tree-vectorizer.c (vec_info::add_stmt): New function.
8546         * tree-vect-data-refs.c (vect_create_data_ref_ptr): Use it.
8547         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Likewise.
8548         (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
8549         (vectorizable_induction): Likewise.
8550         * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Likewise.
8551         * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
8552         (vectorizable_simd_clone_call, vectorizable_store): Likewise.
8553         (vectorizable_load): Likewise.
8554         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
8555         (vect_recog_bool_pattern, vect_recog_mask_conversion_pattern)
8556         (vect_recog_gather_scatter_pattern): Likewise.
8557         (append_pattern_def_seq): Likewise.  Remove a check that is
8558         performed by add_stmt itself.
8560 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
8562         * tree-vect-loop.c (vectorizable_reduction): Fix an instance in
8563         which make_ssa_name was called with new_stmt before new_stmt
8564         had been created.
8566 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
8568         * tree-vect-loop.c (vect_valid_reduction_input_p): New function,
8569         split out from...
8570         (vect_is_slp_reduction): ...here...
8571         (vect_is_simple_reduction): ...and here.  Remove repetition of tests
8572         that are already known to be false.
8574 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
8576         * tree-vectorizer.h (vect_free_slp_instance): Add a final_p parameter.
8577         * tree-vect-slp.c (vect_free_slp_tree): Likewise.  Don't update
8578         STMT_VINFO_NUM_SLP_USES when it's true.
8579         (vect_free_slp_instance): Add a final_p parameter and pass it to
8580         vect_free_slp_tree.
8581         (vect_build_slp_tree_2): Update call to vect_free_slp_instance.
8582         (vect_analyze_slp_instance): Likewise.
8583         (vect_slp_analyze_operations): Likewise.
8584         (vect_slp_analyze_bb_1): Likewise.
8585         * tree-vectorizer.c (vec_info): Likewise.
8586         * tree-vect-loop.c (vect_transform_loop): Likewise.
8588 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
8590         * tree-vect-loop.c (vectorizable_reduction): Assert that the
8591         function is not called for second and subsequent members of
8592         a reduction group.
8594 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
8596         * tree-vect-loop.c (get_initial_def_for_reduction): Move special
8597         cases for nested loops from here to ...
8598         (vect_create_epilog_for_reduction): ...here.  Only call
8599         vect_is_simple_use for inner-loop reductions.
8601 2018-07-31  Martin Liska  <mliska@suse.cz>
8603         PR gcov-profile/85338
8604         PR gcov-profile/85350
8605         PR gcov-profile/85372
8606         * profile.c (struct location_triplet): New.
8607         (struct location_triplet_hash): Likewise.
8608         (output_location): Do not output a BB that
8609         is already recorded for a line.
8610         (branch_prob): Use streamed_locations.
8612 2018-07-31  Martin Liska  <mliska@suse.cz>
8614         PR gcov-profile/85370
8615         * coverage.c (coverage_begin_function): Do not mark target
8616         clones as artificial functions.
8618 2018-07-31  Martin Liska  <mliska@suse.cz>
8620         PR gcov-profile/83813
8621         PR gcov-profile/84758
8622         PR gcov-profile/85217
8623         PR gcov-profile/85332
8624         * profile.c (branch_prob): Do not record GOTO expressions
8625         for GIMPLE statements which locations are already streamed.
8627 2018-07-31  Olivier Hainque  <hainque@adacore.com>
8629         * gcc.c (handle_spec_function): Accept a soft_matched_part
8630         argument, as do_spec_1.  Pass it down to ...
8631         (eval_spec_function): Accept a soft_matched_part argument,
8632         and pass it down to ...
8633         (do_spec_2): Accept a soft_matched_part argument, and pass
8634         it down to do_spec_1.
8635         (do_spec_1): Pass soft_matched_part to handle_spec_function.
8636         (handle_braces): Update call to handle_spec_function.
8637         (driver::set_up_specs): Update calls to do_spec_2.
8638         (compare_debug_dump_opt_spec_function): Likewise.
8639         (compare_debug_self_opt_spec_function): Likewise.
8641 2018-07-31  Olivier Hainque  <hainque@adacore.com>
8643         * common.opt (nolibc): New option.
8644         * doc/invoke.texi (Link Options): Document it.
8645         * gcc.c (LINK_GCC_C_SEQUENCE_SPEC): Honor nolibc.
8646         * config/alpha/linux.h: Likewise.
8647         * config/arc/elf.h: Likewise.
8648         * config/arm/uclinux-elf.h: Likewise.
8649         * config/arm/unknown-elf.h: Likewise.
8650         * config/avr/avrlibc.h: Likewise.
8651         * config/bfin/bfin.h: Likewise.
8652         * config/bfin/linux.h: Likewise.
8653         * config/bfin/uclinux.h: Likewise.
8654         * config/darwin.h: Likewise.
8655         * config/darwin10.h: Likewise.
8656         * config/darwin12.h: Likewise.
8657         * config/gnu-user.h: Likewise.
8658         * config/lm32/uclinux-elf.h: Likewise.
8659         * config/pa/pa-hpux11.h: Likewise.
8660         * config/pa/pa64-hpux.h: Likewise.
8661         * config/sparc/sparc.h: Likewise.
8663 2018-07-31  Olivier Hainque  <hainque@adacore.com>
8665         * gcc.c (getenv_spec_function): Prepend '/' to value for allowed
8666         undefined variables.
8668 2018-07-30  Segher Boessenkool  <segher@kernel.crashing.org>
8670         PR target/86640
8671         * config/arm/arm.c (arm_block_set_aligned_vect): Use gen_int_mode
8672         instead of GEN_INT.
8674 2018-07-30  Bernd Edlinger  <bernd.edlinger@hotmail.de>
8676         * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
8677         terminated string literal.
8679 2018-07-30  Segher Boessenkool  <segher@kernel.crashing.org>
8681         PR rtl-optimization/85160
8682         * combine.c (is_just_move): New function.
8683         (try_combine): Allow combining two instructions into two if neither of
8684         the original instructions was a move.
8686 2018-07-30  Alexander Monakov  <amonakov@ispras.ru>
8688         PR target/86673
8689         * doc/extend.texi (Global Register Variables): Discourage use of type
8690         qualifiers.
8691         (Local Register Variables): Likewise.
8693 2018-07-30  Richard Sandiford  <richard.sandiford@arm.com>
8695         PR tree-optimization/86506
8696         * hwint.h (ceil_log2): Resync with hwint.c implementation.
8698 2018-07-30  Ilya Leoshkevich  <iii@linux.ibm.com>
8700         PR target/86547
8701         * lra-constraints.c (spill_hard_reg_in_range): When selecting the
8702         hard_regno, make sure no insn between `from` and `to` clobbers it.
8704 2018-07-30  Cesar Philippidis  <cesar@codesourcery.com>
8705             Tom de Vries  <tdevries@suse.de>
8707         * config/nvptx/nvptx.c (PTX_GANG_DEFAULT): Rename to ...
8708         (PTX_DEFAULT_RUNTIME_DIM): ... this.
8709         (nvptx_goacc_validate_dims): Set default worker and gang dims to
8710         PTX_DEFAULT_RUNTIME_DIM.
8711         (nvptx_dim_limit): Ignore GOMP_DIM_WORKER.
8713 2018-07-29  John David Anglin  <danglin@gcc.gnu.org>
8715         * config/pa/pa.c (pa_output_addr_vec): Align address table.
8716         * config/pa/pa.h (JUMP_TABLES_IN_TEXT_SECTION): Revise comment.
8717         * config/pa/pa32-linux.h (JUMP_TABLES_IN_TEXT_SECTION): Define.
8719 2018-07-27  Michael Meissner  <meissner@linux.ibm.com>
8721         * config/rs6000/constraints.md (wG constraint): Delete, no longer
8722         used.
8723         * config/rs6000/predicates.md (p9_fusion_reg_operand): Rename
8724         predicate to reflect toc fusion has been deleted.
8725         (toc_fusion_mem_raw): Delete, no longer used.
8726         (toc_fusion_mem_wrapped): Likewise.
8727         * config/rs6000/rs6000-cpus.def (POWERPC_MASKS): Delete toc
8728         fusion mask bit.
8729         * config/rs6000/rs6000-protos.h (fusion_wrap_memory_address):
8730         Delete, no longer used.
8731         * config/rs6000/rs6000.c (struct rs6000_reg_addr): Delete fields
8732         meant to be used for toc fusion.
8733         (rs6000_debug_print_mode): Delete toc fusion debugging.
8734         (rs6000_debug_reg_global): Likewise.
8735         (rs6000_init_hard_regno_mode_ok): Delete setting up fields for toc
8736         fusion and secondary reload support that were never used.
8737         (rs6000_option_override_internal): Delete TOC fusion, that was only
8738         partially defined, and it did not work unless you also used the
8739         -mcmodel= switch.
8740         (rs6000_legitimate_address_p): Delete TOC fusion support.
8741         (rs6000_opt_masks): Likewise.
8742         (fusion_wrap_memory_address): Delete function, no longer used.
8743         (fusion_split_address); Delete TOC fusion support.
8744         * config/rs6000/rs6000.h (TARGET_TOC_FUSION_INT): Delete, no
8745         longer used with toc fusion being deleted.
8746         (TARGET_TOC_FUSION_FP): Likewise.
8747         * config/rs6000/rs6000.md (UNSPEC_FUSION_ADDIS): Delete TOC fusion
8748         UNSPEC.
8749         (toc fusion spliter): Delete TOC fusion support.
8750         (toc_fusionload_<mode>): Likewise.
8751         (toc_fusionload_di): Likewise.
8752         (fusion_gpr_load_<mode>): Delete generator function, this insn no
8753         longer needs to be named.  Rename predicate to delete TOC fusion.
8754         (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
8755         (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
8756         (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
8757         (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
8758         (p9 fusion peephole2s): Rename predicate to delete TOC fusion.
8760 2018-07-27  Kelvin Nilsen  <kelvin@gcc.gnu.org>
8762         * doc/extend.texi (Basic PowerPC Built-in Functions Available on
8763         ISA 2.05):  Replace __uint128_t with __uint128 and __int128_t with
8764         __int128 in built-in function prototypes.
8765         (PowerPC AltiVec Built-in Functions on ISA 2.07): Likewise.
8766         (PowerPC AltiVec Built-in Functions on ISA 3.0): Likewise.
8768 2018-07-27  Martin Sebor  <msebor@redhat.com>
8770         PR tree-optimization/86696
8771         * tree-ssa-strlen.c (get_min_string_length): Handle all integer
8772         types, including enums.
8773         (handle_char_store): Be prepared for the above function to fail.
8775 2018-07-26  Qing Zhao  <qing.zhao@oracle.com>
8777         * builtins.c (inline_expand_builtin_string_cmp): Disable inlining
8778         when optimization level is lower than 2 or optimize for size.
8780 2018-07-26  Martin Sebor  <msebor@redhat.com>
8782         PR tree-optimization/86043
8783         PR tree-optimization/86042
8784         * tree-ssa-strlen.c (handle_builtin_memcpy): Handle strict overlaps.
8785         (get_string_cst_length): Rename...
8786         (get_min_string_length): ...to this.  Add argument.
8787         (handle_char_store): Extend to handle multi-character stores by
8788         MEM_REF.
8789         * tree.c (initializer_zerop): Use new argument.  Handle MEM_REF.
8790         * tree.h (initializer_zerop): Add argument.
8792 2018-07-26  Jakub Jelinek  <jakub@redhat.com>
8794         PR middle-end/86660
8795         * omp-low.c (scan_sharing_clauses): Don't ignore map clauses for
8796         declare target to variables if they have always,{to,from,tofrom} map
8797         kinds.
8799 2018-07-26  Martin Liska  <mliska@suse.cz>
8801         PR lto/86548
8802         * lto-wrapper.c: Add linker_output as prefix
8803         for ltrans_output_file.
8805 2018-07-26  Segher Boessenkool  <segher@kernel.crashing.org>
8807         PR rtl-optimization/85805
8808         * combine.c (reg_nonzero_bits_for_combine): Only use the last set
8809         value for hard registers if that was written in the same mode.
8811 2018-07-26  Martin Liska  <mliska@suse.cz>
8813         PR gcov-profile/86536
8814         * gcov.c (format_gcov): Use printf format %.*f directly
8815         and do not handle special values.
8817 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
8819         * common/config/arc/arc-common.c (arc_option_optimization_table):
8820         Update default optimizations for size.
8822 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
8824         * config/arc/arc.md (movsf_insn): Add short instruction selection.
8825         * config/arc/constraints.md (CfZ): New constraint.
8826         * config/arc/fpu.md (addssf3_fpu): Use CfZ constraint.
8827         (subsf3_fpu): Likewise.
8828         (cmpsf_fpu): Likewise.
8829         (cmpsf_fpu_uneq): Likewise.
8831 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
8833         * config/arc/arc.c (compact_memory_operand_p): Check for uncached
8834         accesses as well.
8835         (arc_is_uncached_mem_p): uncached applies to both the variable and
8836         the pointer.
8838 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
8840         * config/arc/arc.h (ADDITIONAL_REGISTER_NAMES): Add additional
8841         register names.
8843 2018-07-25  David Malcolm  <dmalcolm@redhat.com>
8845         * optinfo-emit-json.cc (class optrecord_json_writer): Convert
8846         field "m_scopes" from vec to auto_vec.
8848 2018-07-25  Martin Liska  <mliska@suse.cz>
8850         * config/powerpcspe/powerpcspe-protos.h (rs6000_loop_align): Fix
8851         return type.
8853 2018-07-25  Richard Biener  <rguenther@suse.de>
8855         PR debug/86654
8856         * dwarf2out.c (dwarf2out_decl): Do not handle nested functions
8857         special wrt context_die late.
8858         (gen_subprogram_die): Re-use DIEs in local scope.
8860 2018-07-25  Richard Sandiford  <richard.sandiford@arm.com>
8862         PR tree-optimization/86644
8863         * hwint.c (ceil_log2): Fix comment.  Return 0 for 0.
8865 2018-07-25  Martin Liska  <mliska@suse.cz>
8867         PR middle-end/86645
8868         * dumpfile.c: And excluded values with TDF_ALL_VALUES.
8869         * dumpfile.h (enum dump_flag): Defince TDF_ALL_VALUES.
8871 2018-07-25  Martin Liska  <mliska@suse.cz>
8873         PR sanitizer/79635
8874         * params.def: Explain ASan abbreviation and provide
8875         a documentation link.
8877 2018-07-24  Martin Sebor  <msebor@redhat.com>
8879         PR tree-optimization/86622
8880         PR tree-optimization/86532
8881         * builtins.h (string_length): Declare.
8882         * builtins.c (c_strlen): Correct handling of non-constant offsets.
8883         (check_access): Be prepared for non-constant length ranges.
8884         (string_length): Make extern.
8885         * expr.c (string_constant): Only handle the minor non-constant
8886         array index.  Use string_constant to compute the length of
8887         a generic string constant.
8889 2018-07-24  Richard Sandiford  <richard.sandiford@arm.com>
8891         PR tree-optimization/86618
8892         * tree-vect-stmts.c (vectorizable_call): Don't take the address
8893         of LOOP_VINFO_MASKS (loop_vinfo) when loop_vinfo is null.
8895 2018-07-24  David Malcolm  <dmalcolm@redhat.com>
8897         PR tree-optimization/86636
8898         * json.cc (json::object::set): Fix comment.  Add assertions.
8899         (json::array::append): Move here from json.h.  Add comment and an
8900         assertion.
8901         (json::string::string): Likewise.
8902         * json.h (json::array::append): Move to json.cc.
8903         (json::string::string): Likewise.
8904         * optinfo-emit-json.cc
8905         (optrecord_json_writer::impl_location_to_json): Assert that we
8906         aren't attempting to write out UNKNOWN_LOCATION, or an ad-hoc
8907         wrapper around it.  Expand the location once, rather than three
8908         times.
8909         (optrecord_json_writer::inlining_chain_to_json): Fix the check for
8910         UNKNOWN_LOCATION, to use LOCATION_LOCUS to look through ad-hoc
8911         wrappers.
8912         (optrecord_json_writer::optinfo_to_json): Likewise, in four
8913         places.  Fix some overlong lines.
8915 2018-07-24  Matthew Malcomson  <matthew.malcomson@arm.com>
8917         * config/aarch64/aarch64-simd.md
8918         (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>): Split into...
8919         (aarch64_<ANY_EXTEND:su>subw<mode>): ... This...
8920         (aarch64_<ANY_EXTEND:su>addw<mode>): ... And this.
8921         (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>_internal): Split into...
8922         (aarch64_<ANY_EXTEND:su>subw<mode>_internal): ... This...
8923         (aarch64_<ANY_EXTEND:su>addw<mode>_internal): ... And this.
8924         (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w2<mode>_internal): Split into...
8925         (aarch64_<ANY_EXTEND:su>subw2<mode>_internal): ... This...
8926         (aarch64_<ANY_EXTEND:su>addw2<mode>_internal): ... And this.
8928 2018-07-24  Jakub Jelinek  <jakub@redhat.com>
8930         PR middle-end/86627
8931         * expmed.c (expand_divmod): Punt if d == HOST_WIDE_INT_MIN
8932         and size > HOST_BITS_PER_WIDE_INT.  For size > HOST_BITS_PER_WIDE_INT
8933         and abs_d == d, do the power of two handling if profitable.
8935 2018-07-24  Richard Biener  <rguenther@suse.de>
8937         * match.pd: Add BIT_FIELD_REF canonicalizations.
8939 2018-07-23  Bernd Edlinger  <bernd.edlinger@hotmail.de>
8941         PR c/86617
8942         * genmatch.c (dt_operand::gen_match_op): Avoid folding volatile values.
8944 2018-07-23  Bernd Edlinger  <bernd.edlinger@hotmail.de>
8946         * gimple-fold.c (gimple_fold_builtin_printf): Don't create a not NUL
8947         terminated STRING_CST object.
8949 2018-07-23  Bernd Edlinger  <bernd.edlinger@hotmail.de>
8951         hsa-dump.c (dump_hsa_symbol): Avoid out of scope access to buf.
8953 2018-07-23  Segher Boessenkool  <segher@kernel.crashing.org>
8955         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Adjust.
8956         * config/rs6000/rs6000-protos.h (rs6000_split_v4si_init): Delete.
8957         * config/rs6000/rs6000.c (rs6000_expand_vector_init): Always force
8958         the elements into a register.
8959         (rs6000_split_v4si_init_di_reg): Delete.
8960         (rs6000_split_v4si_init): Delete.
8961         * config/rs6000/vsx.md (unspec): Delete UNSPEC_VSX_VEC_INIT.
8962         (vsx_init_v4si): Rewrite as a define_expand.
8964 2018-07-23  Segher Boessenkool  <segher@kernel.crashing.org>
8966         * config/rs6000/rs6000.md (splitters for rldimi and rlwimi with the
8967         zero_extend argument from memory): New.
8969 2018-07-22  Martin Sebor  <msebor@redhat.com>
8971         PR bootstrap/86621
8972         * gimple-ssa-warn-alloca.c (alloca_call_type_by_arg): Avoid
8973         diagnosing calls with unknown arguments unless -Walloca-larger-than
8974         is restricted to less than PTRDIFF_MAX bytes.
8976 2018-07-22  Gerald Pfeifer  <gerald@pfeifer.com>
8978         * doc/gcov.texi (Invoking Gcov): Editorial changes.
8980 2018-07-20  David Malcolm  <dmalcolm@redhat.com>
8982         * pretty-print.c (text_info::set_location): Remove redundant
8983         "line_table" parameter from call to rich_location::set_range.
8985 2018-07-20  Martin Sebor  <msebor@redhat.com>
8987         PR middle-end/82063
8988         * builtins.c (expand_builtin_alloca): Adjust.
8989         * calls.c (alloc_max_size): Simplify.
8990         * cgraphunit.c (cgraph_node::expand): Adjust.
8991         * common.opt (larger_than_size, warn_frame_larger_than): Remove
8992         variables.
8993         (frame_larger_than_size): Same.
8994         (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Change options
8995         to take a HOST_WIDE_INT argument and accept a byte-size suffix.
8996         Initialize.
8997         * doc/invoke.texi (GCC Command Options): Document option arguments.
8998         Explain byte-size arguments and suffixes.
8999         (-Wvla-larger-than, -Wno-alloc-size-larger-than): Update.
9000         (-Wno-alloca-larger-than, -Wno-vla-larger-than): Same.
9001         (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Same.
9002         * doc/options.texi (UInteger): Expand.
9003         (Host_Wide_Int, ByteSize): Document new properties.
9004         * final.c (final_start_function_1): Include sizes in an error message.
9005         * function.c (frame_offset_overflow): Same.
9006         * gimple-ssa-warn-alloca.c (pass_walloca::gate): Adjust.
9007         (alloca_call_type_by_arg): Change function argument to HOST_WIDE_INT.
9008         Diagnose unbounded alloca calls only for limits of less than
9009         PTRDIFF_MAX.
9010         (alloca_call_type): Adjust.  Diagnose possibly out-of-bounds alloca
9011         calls and VLA size only for limits of less than PTRDIFF_MAX.  Same
9012         for alloca(0).
9013         (pass_walloca::execute): Adjust.  Diagnose alloca calls in loops
9014         only for limits of less than PTRDIFF_MAX.
9015         * langhooks-def.h (lhd_handle_option): Change function argument
9016         to HOST_WIDE_INT.
9017         * langhooks.c (lhd_handle_option): Same.
9018         * langhooks.h (handle_option): Same.
9019         * opt-functions.awk (switch_bit_fields): Handle Host_Wide_Int and
9020         ByteSize flags.
9021         (var_type, var_type_struct): Same.
9022         (var_set): Handle ByteSize flag.
9023         * optc-gen.awk: Add comments to output to ease debugging.  Make
9024         use of HOST_WIDE_INT where appropriate.
9025         * opts-gen-save.awk:  Use %lx to format unsigned long.
9026         * opth-gen.awk: Change function argument to HOST_WIDE_INT.
9027         * opts-common.c (integral_argument): Return HOST_WIDE_INT and add
9028         arguments.  Parse bytes-size suffixes.
9029         (enum_arg_to_value): Change function argument to HOST_WIDE_INT.
9030         (enum_value_to_arg): Same.
9031         (decode_cmdline_option): Handle cl_host_wide_int.  Adjust.
9032         (handle_option): Adjust.
9033         (generate_option): Change function argument to HOST_WIDE_INT.
9034         (cmdline_handle_error): Adjust.
9035         (read_cmdline_option): Change function argument to HOST_WIDE_INT.
9036         (set_option): Change function argument to HOST_WIDE_INT.
9037         (option_enabled): Handle cl_host_wide_int.
9038         (get_option_state): Handle CLVC_SIZE.
9039         (control_warning_option): Same.
9040         * opts.c (common_handle_option): Change function argument to
9041         HOST_WIDE_INT.  Remove handling of OPT_Walloca_larger_than_ and
9042         OPT_Wvla_larger_than_.
9043         * opts.h (enum cl_var_type): Add an enumerator.
9044         * stor-layout.c (layout_decl): Print a more meaningful warning.
9045         * toplev.c (output_stack_usage): Adjust.
9047 2018-07-20  Qing Zhao  <qing.zhao@oracle.com>
9049         * builtins.c (expand_builtin_memcmp): Delete the last parameter for
9050         call to inline_expand_builtin_string_cmp.
9051         (expand_builtin_strcmp): Likewise.
9052         (expand_builtin_strncmp): Likewise.
9053         (inline_string_cmp): Delete the last parameter, change char_type_node
9054         to unsigned_char_type_node for strcmp/strncmp, add conversions to the
9055         two operands.
9056         (inline_expand_builtin_string_cmp): Delete the last parameter, give up
9057         the inlining expansion on target where the type of the call has same or
9058         narrower precision than unsigned char.
9060 2018-07-20  David Malcolm  <dmalcolm@redhat.com>
9062         * Makefile.in (OBJS): Add json.o and optinfo-emit-json.o.
9063         (CFLAGS-optinfo-emit-json.o): Define TARGET_NAME.
9064         * common.opt (fsave-optimization-record): New option.
9065         * coretypes.h (struct kv_pair): Move here from dumpfile.c.
9066         * doc/invoke.texi (-fsave-optimization-record): New option.
9067         * dumpfile.c: Include "optinfo-emit-json.h".
9068         (struct kv_pair): Move to coretypes.h.
9069         (optgroup_options): Make non-static.
9070         (dump_context::end_scope): Call
9071         optimization_records_maybe_pop_dump_scope.
9072         * dumpfile.h (optgroup_options): New decl.
9073         * json.cc: New file.
9074         * json.h: New file.
9075         * optinfo-emit-json.cc: New file.
9076         * optinfo-emit-json.h: New file.
9077         * optinfo.cc: Include "optinfo-emit-json.h".
9078         (optinfo::emit): Call optimization_records_maybe_record_optinfo.
9079         (optinfo_enabled_p): Check optimization_records_enabled_p.
9080         (optinfo_wants_inlining_info_p): Likewise.
9081         * optinfo.h: Update comment.
9082         * profile-count.c (profile_quality_as_string): New function.
9083         * profile-count.h (profile_quality_as_string): New decl.
9084         (profile_count::quality): New accessor.
9085         * selftest-run-tests.c (selftest::run_tests): Call json_cc_tests
9086         and optinfo_emit_json_cc_tests.
9087         * selftest.h (selftest::json_cc_tests): New decl.
9088         (selftest::optinfo_emit_json_cc_tests): New decl.
9089         * toplev.c: Include "optinfo-emit-json.h".
9090         (compile_file): Call optimization_records_finish.
9091         (do_compile): Call optimization_records_start.
9092         * tree-ssa-live.c: Include optinfo.h.
9093         (remove_unused_scope_block_p): Retain inlining information if
9094         optinfo_wants_inlining_info_p returns true.
9096 2018-07-20  Richard Biener  <rguenther@suse.de>
9098         PR debug/86585
9099         * dwarf2out.c (dwarf2out_die_ref_for_decl): Test in_lto_p
9100         to cover -flto-partition=none.
9102 2018-07-20  Martin Liska  <mliska@suse.cz>
9104         * tree.h (DECL_LOCATION_RANGE): Remove unused macro.
9105         (get_decl_source_range): Remove unused function.
9107 2018-07-20  Richard Biener  <rguenther@suse.de>
9109         * tree-ssa-sccvn.h (struct vn_nary_op_s): Add next member.
9110         (struct vn_phi_s): Likewise.
9111         (struct vn_reference_s): Likewise.
9112         * tree-ssa-sccvn.c (vn_nary_op_hasher::equal): Add shortcut
9113         for searching the slot of an entry known to be in the hash itself.
9114         (vn_phi_hasher::equal): Likewise.
9115         (vn_reference_hasher::equal): Likewise.
9116         (last_inserted_ref, last_inserted_phi, last_inserted_nary): New
9117         globals.
9118         (optimistic_info, current_info): Remove, keeping only valid_info.
9119         (vn_reference_lookup_1): Remove fallback lookup.
9120         (vn_reference_lookup_2): Likewise.
9121         (vn_nary_op_lookup_1): Likewise.
9122         (vn_phi_lookup): Likewise.
9123         (vn_nary_build_or_lookup_1): Make sure to not chain the built
9124         hash element.
9125         (vn_reference_insert): Adjust, chain the inserted hash element
9126         at last_inserted_ref.
9127         (vn_reference_insert_pieces): Likewise.
9128         (visit_reference_op_call): Likewise.
9129         (vn_nary_op_insert_into): Chain the inserted hash element at
9130         last_inserted_nary.
9131         (vn_nary_op_insert_pieces): Adjust.
9132         (vn_nary_op_insert): Likewise.
9133         (vn_nary_op_insert_stmt): Likewise.
9134         (vn_phi_insert): Adjust, chain the inserted hash element at
9135         last_inserted_phi.
9136         (process_scc): Remove clearing and copying the optimistic
9137         table.  Instead remove elements inserted during an optimistic
9138         iteration from the single table we maintain.
9139         (init_scc_vn): Adjust.
9140         (free_scc_vn): Likewise.
9141         (sccvn_dom_walker::record_cond): Likewise.
9142         (sccvn_dom_walker::after_dom_children): Likewise.
9144 2018-07-19  Martin Sebor  <msebor@redhat.com>
9146         PR tree-optimization/84047
9147         PR tree-optimization/83776
9148         * tree-vrp.c (vrp_prop::check_mem_ref): New function.
9149         (check_array_bounds): Call it.
9151 2018-07-19  Martin Sebor  <msebor@redhat.com>
9153         * align.h (align_flags): Use member initialization.
9155 2018-07-19  David Malcolm  <dmalcolm@redhat.com>
9157         * Makefile.in (OBJS): Add optinfo.o.
9158         * coretypes.h (class symtab_node): New forward decl.
9159         (struct cgraph_node): New forward decl.
9160         (class varpool_node): New forward decl.
9161         * dump-context.h: New file.
9162         * dumpfile.c: Include "optinfo.h", "dump-context.h", "cgraph.h",
9163         "tree-pass.h".
9164         (refresh_dumps_are_enabled): Use optinfo_enabled_p.
9165         (set_dump_file): Call dumpfile_ensure_any_optinfo_are_flushed.
9166         (set_alt_dump_file): Likewise.
9167         (dump_context::~dump_context): New dtor.
9168         (dump_gimple_stmt): Move implementation to...
9169         (dump_context::dump_gimple_stmt): ...this new member function.
9170         Add the stmt to any pending optinfo, creating one if need be.
9171         (dump_gimple_stmt_loc): Move implementation to...
9172         (dump_context::dump_gimple_stmt_loc): ...this new member function.
9173         Start a new optinfo and add the stmt to it.
9174         (dump_gimple_expr): Move implementation to...
9175         (dump_context::dump_gimple_expr): ...this new member function.
9176         Add the stmt to any pending optinfo, creating one if need be.
9177         (dump_gimple_expr_loc): Move implementation to...
9178         (dump_context::dump_gimple_expr_loc): ...this new member function.
9179         Start a new optinfo and add the stmt to it.
9180         (dump_generic_expr): Move implementation to...
9181         (dump_context::dump_generic_expr): ...this new member function.
9182         Add the tree to any pending optinfo, creating one if need be.
9183         (dump_generic_expr_loc): Move implementation to...
9184         (dump_context::dump_generic_expr_loc): ...this new member
9185         function.  Add the tree to any pending optinfo, creating one if
9186         need be.
9187         (dump_printf): Move implementation to...
9188         (dump_context::dump_printf_va): ...this new member function.  Add
9189         the text to any pending optinfo, creating one if need be.
9190         (dump_printf_loc): Move implementation to...
9191         (dump_context::dump_printf_loc_va): ...this new member function.
9192         Start a new optinfo and add the stmt to it.
9193         (dump_dec): Move implementation to...
9194         (dump_context::dump_dec): ...this new member function.  Add the
9195         value to any pending optinfo, creating one if need be.
9196         (dump_context::dump_symtab_node): New member function.
9197         (dump_context::get_scope_depth): New member function.
9198         (dump_context::begin_scope): New member function.
9199         (dump_context::end_scope): New member function.
9200         (dump_context::ensure_pending_optinfo): New member function.
9201         (dump_context::begin_next_optinfo): New member function.
9202         (dump_context::end_any_optinfo): New member function.
9203         (dump_context::s_current): New global.
9204         (dump_context::s_default): New global.
9205         (dump_scope_depth): Delete global.
9206         (dumpfile_ensure_any_optinfo_are_flushed): New function.
9207         (dump_symtab_node): New function.
9208         (get_dump_scope_depth): Reimplement in terms of dump_context.
9209         (dump_begin_scope): Likewise.
9210         (dump_end_scope): Likewise.
9211         (selftest::temp_dump_context::temp_dump_context): New ctor.
9212         (selftest::temp_dump_context::~temp_dump_context): New dtor.
9213         (selftest::verify_item): New function.
9214         (ASSERT_IS_TEXT): New macro.
9215         (ASSERT_IS_TREE): New macro.
9216         (ASSERT_IS_GIMPLE): New macro.
9217         (selftest::test_capture_of_dump_calls): New test.
9218         (selftest::dumpfile_c_tests): Call it.
9219         * dumpfile.h (dump_printf, dump_printf_loc, dump_basic_block)
9220         (dump_generic_expr_loc, dump_generic_expr, dump_gimple_stmt_loc)
9221         (dump_gimple_stmt, dump_dec): Gather these related decls and add a
9222         descriptive comment.
9223         (dump_function, print_combine_total_stats, enable_rtl_dump_file)
9224         (dump_node, dump_bb): Move these unrelated decls.
9225         (class dump_manager): Add leading comment.
9226         * optinfo.cc: New file.
9227         * optinfo.h: New file.
9229 2018-07-19  Michael Collison  <michael.collison@arm.com>
9230             Richard Henderson <rth@redhat.com>
9232         * config/aarch64/aarch64.md (subv<GPI>4, usubv<GPI>4): New patterns.
9233         (subti): Handle op1 zero.
9234         (subvti4, usub4ti4): New.
9235         (*sub<GPI>3_compare1_imm): New.
9236         (sub<GPI>3_carryinCV): New.
9237         (*sub<GPI>3_carryinCV_z1_z2, *sub<GPI>3_carryinCV_z1): New.
9238         (*sub<GPI>3_carryinCV_z2, *sub<GPI>3_carryinCV): New.
9240 2018-07-19  Michael Collison  <michael.collison@arm.com>
9241             Richard Henderson <rth@redhat.com>
9243         * config/aarch64/aarch64.md: (addv<GPI>4, uaddv<GPI>4): New.
9244         (addti3): Create simpler code if low part is already known to be 0.
9245         (addvti4, uaddvti4): New.
9246         (*add<GPI>3_compareC_cconly_imm): New.
9247         (*add<GPI>3_compareC_cconly): New.
9248         (*add<GPI>3_compareC_imm): New.
9249         (*add<GPI>3_compareC): Rename from add<GPI>3_compare1; do not
9250         handle constants within this pattern..
9251         (*add<GPI>3_compareV_cconly_imm): New.
9252         (*add<GPI>3_compareV_cconly): New.
9253         (*add<GPI>3_compareV_imm): New.
9254         (add<GPI>3_compareV): New.
9255         (add<GPI>3_carryinC, add<GPI>3_carryinV): New.
9256         (*add<GPI>3_carryinC_zero, *add<GPI>3_carryinV_zero): New.
9257         (*add<GPI>3_carryinC, *add<GPI>3_carryinV): New.
9258         ((*add<GPI>3_compareC_cconly_imm): Replace 'ne' operator
9259         with 'comparison' operator.
9260         (*add<GPI>3_compareV_cconly_imm): Ditto.
9261         (*add<GPI>3_compareV_cconly): Ditto.
9262         (*add<GPI>3_compareV_imm): Ditto.
9263         (add<GPI>3_compareV): Ditto.
9264         (add<mode>3_carryinC): Ditto.
9265         (*add<mode>3_carryinC_zero): Ditto.
9266         (*add<mode>3_carryinC): Ditto.
9267         (add<mode>3_carryinV): Ditto.
9268         (*add<mode>3_carryinV_zero): Ditto.
9269         (*add<mode>3_carryinV): Ditto.
9271 2018-07-19  Michael Collison  <michael.collison@arm.com>
9272             Richard Henderson <rth@redhat.com>
9274         * config/aarch64/aarch64-modes.def (CC_V): New.
9275         * config/aarch64/aarch64-protos.h
9276         (aarch64_addti_scratch_regs): Declare
9277         (aarch64_subvti_scratch_regs): Declare.
9278         (aarch64_expand_subvti): Declare.
9279         (aarch64_gen_unlikely_cbranch): Declare
9280         * config/aarch64/aarch64.c (aarch64_select_cc_mode): Test
9281         for signed overflow using CC_Vmode.
9282         (aarch64_get_condition_code_1): Handle CC_Vmode.
9283         (aarch64_gen_unlikely_cbranch): New function.
9284         (aarch64_addti_scratch_regs): New function.
9285         (aarch64_subvti_scratch_regs): New function.
9286         (aarch64_expand_subvti): New function.
9288 2018-07-19  Andre Vieira  <andre.simoesdiasvieira@arm.com>
9290         * config/aarch64/aarch64-option-extensions.def: New entry for profile
9291         extension.
9292         * config/aarch64/aarch64.h (AARCH64_FL_PROFILE): New.
9293         * doc/invoke.texi (aarch64-feature-modifiers): New entry for profile
9294         extension.
9296 2018-07-19  Andre Vieira  <andre.simoesdiasvieira@arm.com>
9298         PR target/83009
9299         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
9300         address check not strict.
9302 2018-07-19  Andre Vieira  <andre.simoesdiasvieira@arm.com>
9304         * config/aarch64/aarch64-simd.md (aarch64_simd_mov<VQ:mode>): Replace
9305         Umq with Umn.
9306         (store_pair_lanes<mode>): Likewise.
9307         * config/aarch64/aarch64-protos.h (aarch64_addr_query_type): Add new
9308         enum value 'ADDR_QUERY_LDP_STP_N'.
9309         * config/aarch64/aarch64.c (aarch64_addr_query_type): Likewise.
9310         (aarch64_print_address_internal): Add declaration.
9311         (aarch64_print_ldpstp_address): Remove.
9312         (aarch64_classify_address): Adapt mode for 'ADDR_QUERY_LDP_STP_N'.
9313         (aarch64_print_operand): Change printing of 'y'.
9314         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Use
9315         new enum value 'ADDR_QUERY_LDP_STP_N', don't hardcode mode and use
9316         'true' rather than '1'.
9317         * config/aarch64/constraints.md (Uml): Likewise.
9318         (Uml): Rename to Umn.
9319         (Umq): Remove.
9321 2018-07-19  Richard Biener  <rguenther@suse.de>
9323         * tree-ssa-sccvn.h (struct vn_phi_s): Make phiargs member
9324         a trailing array.
9325         * tree-ssa-sccvn.c: Remove alloc-pool.h use.
9326         (vn_phi_hasher): Derive from nofree_ptr_hash and remove remove method.
9327         (vn_reference_hasher): Likewise.
9328         (struct vn_tables_s): Remove obstack and alloc-pool members.
9329         (vn_tables_obstack, vn_tables_insert_obstack): New global obstacks.
9330         (vn_nary_build_or_lookup_1): Manually build in vn_tables_insert_obstack.
9331         (vn_reference_insert): Allocate from obstack instead of from alloc-pool.
9332         (vn_reference_insert_pieces): Likewise.
9333         (alloc_vn_nary_op_noinit): Adjust.
9334         (vn_nary_op_insert_stmt): Allocate phiargs in-place.
9335         (vn_phi_eq): Adjust.
9336         (shared_lookup_phiargs): Remove.
9337         (vn_phi_lookup): Allocate temporary vn_phi_s on the stack.
9338         (vn_phi_insert): Allocate from obstack instead of from alloc-pool.
9339         (visit_reference_op_call): Likewise.
9340         (copy_nary, copy_phi, copy_reference): Remove.
9341         (process_scc): Rewind the obstack when iterating.  Do not
9342         copy the elements to valid_info but just move them from one
9343         hashtable to the other.
9344         (allocate_vn_table): Adjust.
9345         (free_vn_table): Likewise.
9346         (init_scc_vn): Likewise.
9347         (free_scc_vn): Likewise.
9349 2018-07-19  H.J. Lu  <hongjiu.lu@intel.com>
9351         PR target/86560
9352         * config/i386/i386.c (rest_of_insert_endbranch): Lookup
9353         indirect_return as function type attribute.
9354         (ix86_attribute_table): Change indirect_return to function
9355         type attribute.
9356         * doc/extend.texi: Update indirect_return attribute.
9358 2018-07-19  Aldy Hernandez  <aldyh@redhat.com>
9360         * wide-int.h (widest2_int): New.
9361         * gimple-fold.c (arith_overflowed_p): Use it.
9362         * tree.h (widest2_int_cst): New.
9363         * tree-vrp.c (wide_int_binop_overflow): Rename from
9364         vrp_int_const_binop.
9365         Rewrite to work on trees.
9366         (extract_range_from_multiplicative_op_1): Abstract code to...
9367         (wide_int_range_min_max): ...here.
9368         (wide_int_range_cross_product): ...and here.
9369         (extract_range_from_binary_expr_1): Abstract overflow code to...
9370         (wide_int_range_mult_wrapping): ...here.
9371         * tree-vrp.h (wide_int_range_cross_product): New.
9372         (wide_int_range_mult_wrapping): New.
9374 2018-07-19  Andrew Senkevich  <andrew.senkevich@intel.com>
9375             Julia Koval  <julia.koval@intel.com>
9377         * config/i386/x86-tune-costs.h (skylake_memcpy,
9378         skylake_memset): Replace rep_prefix with unrolling for size 512.
9380 2018-07-18  Kugan Vivekanandarajah  <kuganv@linaro.org>
9382         PR middle-end/86544
9383         * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): Handle
9384         comparision with EQ_EXPR in last stmt.
9386 2018-07-18  Kelvin Nilsen  <kelvin@gcc.gnu.org>
9388         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Rename
9389         this subsection to "PowerPC AltiVec/VSX Built-in Functions".
9390         (PowerPC AltiVec/VSX Built-in Functions): New name for subsection
9391         previously known as "PowerPC AltiVec Built-in Functions".  Move
9392         some material to new subsubsections "PowerPC AltiVec Built-in
9393         Functions on ISA 2.06" and "PowerPC AltiVec Built-in Functions on
9394         ISA 2.07".
9395         (PowerPC Altivec Built-in Functions on ISA 2.05): New subsubsection.
9396         (PowerPC Altivec Built-in Functions on ISA 2.06): Likewise.
9397         (PowerPC Altivec Built-in Functions on ISA 2.07): Likewise.
9398         (PowerPC Altivec Built-in Functions on ISA 3.0): Likewise.
9400 2018-07-18  Richard Biener  <rguenther@suse.de>
9402         PR tree-optimization/86557
9403         * tree-vect-patterns.c (vect_recog_divmod_pattern): Also handle
9404         EXACT_DIV_EXPR.
9406 2018-07-18  Ilya Leoshkevich  <iii@linux.ibm.com>
9408         * config/s390/s390.c (s390_function_profiler): Generate CFI.
9410 2018-07-17  Jeff Law  <law@redhat.com>
9412         * config/arm/arm.c (get_label_padding): Update for recent
9413         changes to label_to_alignment.
9415         PR tree-optimization/86010
9416         * tree-ssa-dse.c (compute_trims): Fix typo/thinko.
9418         * config/mips/mips.c (vr4130_align_insns): Update for recent
9419         changes to label_to_alignment.
9421         * config/frv/frv.c (frv_label_align): Update for recent changes
9422         to label_to_alignment.
9424         * config/nios2/nios2.c (nios2_label_align): Update for recent
9425         changes which dropped ALIGN_LABELS_LOG.
9427 2018-07-17  Andreas Schwab  <schwab@linux-m68k.org>
9429         * config/m68k/m68k.md (umulsi3_highpart+1, const_umulsi3_highpart)
9430         (smulsi3_highpart+1, const_smulsi3_highpart): Add CC_STATUS_INIT.
9432 2018-07-17  Claudiu Zissulescu  <claziss@synopsys.com>
9434         * config/arc/arc.c (arc_label_align): Use align_labels instead of
9435         deprecated align_labels_log.
9437 2018-07-17  Richard Biener  <rguenther@suse.de>
9439         PR lto/86456
9440         * dwarf2out.c (init_sections_and_labels): Always generate
9441         a debug_line_str_section for early LTO debug.
9442         (dwarf2out_finish): Reset debug_line_str_hash output early.
9443         Bump counter for extra dwarf5 .debug_loc labels to not conflict
9444         with fat LTO part.
9445         (dwarf2out_early_finish): Output debug_line_str.
9447 2018-07-17  Robin Dapp  <rdapp@linux.ibm.com>
9449         * config/s390/s390.c (preferred_la_operand_p): Do not use LA with
9450         index register on z196 or later.
9452 2018-07-17  Robin Dapp  <rdapp@linux.ibm.com>
9454         * config/s390/s390.c (s390_default_align): Set default function
9455         alignment to 16.
9456         (s390_override_options_after_change): Call s390_default align.
9457         (s390_option_override_internal): Call s390_default_align.
9458         (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Define.
9460 2018-07-17  Jakub Jelinek  <jakub@redhat.com>
9462         PR middle-end/86542
9463         * omp-low.c (create_task_copyfn): Copy over also fields corresponding
9464         to _looptemp_ clauses, other than the first two.
9466 2018-07-17  Martin Liska  <mliska@suse.cz>
9468         * opts.c: Do not enable OPT_falign_* for -Os.
9470 2018-07-17  Martin Liska  <mliska@suse.cz>
9472         * align.h (MAX_CODE_ALIGN): New.
9473         (MAX_CODE_ALIGN_VALUE): New.
9474         * common/config/i386/i386-common.c (ix86_handle_option):
9475         (MAX_CODE_ALIGN): Moved to align.h.
9476         * final.c (MAX_CODE_ALIGN): Likewise.
9477         * opts.c (parse_and_check_align_values):
9478         (MAX_CODE_ALIGN): Likewise.
9479         (MAX_CODE_ALIGN_VALUE): Likewise.
9481 2018-07-17  Martin Liska  <mliska@suse.cz>
9483         * config/i386/att.h (ASM_OUTPUT_ALIGN): Fix spacing
9484         in order to fulfil coding style.
9485         * config/i386/cygming.h (ASM_OUTPUT_ALIGN): Likewise.
9486         * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
9487         * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
9488         * config/iq2000/iq2000.h (ASM_OUTPUT_ALIGN): Likewise.
9489         * config/pa/pa.h (ASM_OUTPUT_ALIGN): Likewise.
9490         * config/sparc/sol2.h (ASM_OUTPUT_ALIGN_WITH_NOP): Likewise.
9491         * config/sparc/sparc.h (ASM_OUTPUT_ALIGN): Likewise.
9492         * config/visium/visium.h (ASM_OUTPUT_ALIGN): Likewise.
9493         (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
9495 2018-07-17  Martin Liska  <mliska@suse.cz>
9497         * align.h: New file.
9498         * config/alpha/alpha.c (alpha_align_insns_1): Use align_functions
9499         directly.
9500         * config/i386/i386.c (ix86_avoid_jump_mispredicts): Use new return type
9501         align_flags of label_to_alignment.
9502         * config/m32r/m32r.h (LOOP_ALIGN): Wrap returned values into
9503         align_flags class.
9504         * config/m68k/m68k.c: Do not use removed align_labels_value and
9505         align_loops_value.
9506         * config/nds32/nds32.h (JUMP_ALIGN): Wrap result into align_flags class.
9507         (LOOP_ALIGN): Likewise.
9508         (LABEL_ALIGN): Likewise.
9509         * config/powerpcspe/powerpcspe.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
9510         Remove not used macro.
9511         (rs6000_loop_align): Change return type to align_flags.
9512         (rs6000_loop_align_max_skip): Remove.
9513         * config/rs6000/rs6000-protos.h (rs6000_loop_align):
9514         Change return type to align_flags.
9515         * config/rs6000/rs6000.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
9516         Remove not used macro.
9517         (rs6000_loop_align):  Change return type to align_flags.
9518         (rs6000_loop_align_max_skip): Remove.
9519         * config/rx/rx.h (JUMP_ALIGN): Wrap integer values
9520         * config/rx/rx-protos.h (rx_align_for_label): Make it
9521         static function.
9522         * config/rx/rx.c (rx_align_for_label): Change return type
9523         to align_flags.
9524         (rx_max_skip_for_label): Remove TARGET_ASM_*_ALIGN_MAX_SKIP
9525         macro definitions.
9526         into align_flags class.
9527         (LABEL_ALIGN): Likewise.
9528         (LOOP_ALIGN): Likewise.
9529         * config/s390/s390.c (s390_label_align): Use align_flags
9530         class member.
9531         (s390_asm_output_function_label): Likewise.
9532         * config/sh/sh.c (sh_override_options_after_change):
9533         Use align_flags class directly without macros.
9534         (find_barrier): Likewise.
9535         (barrier_align): Likewise.
9536         (sh_loop_align): Likewise.
9537         * config/spu/spu.c (spu_option_override):
9538         Use align_flags_tuple::get_value instead of removed macros.
9539         (spu_sched_init): Likewise.
9540         * config/spu/spu.h (GTY): Likewise.
9541         * config/visium/visium.c (visium_option_override):
9542         Set "8" as default secondary alignment.
9543         * config/visium/visium.h (SUBALIGN_LOG): Define to 3
9544         in order to guarantee secondary alignment of 8.
9545         * coretypes.h: Include align.h header file.
9546         * doc/tm.texi: Remove TARGET_ASM_JUMP_ALIGN_MAX_SKIP,
9547         TARGET_ASM_LOOP_ALIGN_MAX_SKIP, TARGET_ASM_LABEL_ALIGN_MAX_SKIP
9548         and TARGET_ASM_LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP macros.
9549         * doc/tm.texi.in: Likewise.
9550         * final.c (struct label_alignment): Remove not used structure.
9551         (LABEL_ALIGN): Change type to align_flags.
9552         (LOOP_ALIGN): Likewise.
9553         (JUMP_ALIGN): Likewise.
9554         (default_loop_align_max_skip): Remove.
9555         (default_label_align_max_skip): Likewise.
9556         (default_jump_align_max_skip): Likewise.
9557         (default_label_align_after_barrier_max_skip):
9558         (LABEL_TO_ALIGNMENT): Change to access label_align vector.
9559         (LABEL_TO_MAX_SKIP): Remove.
9560         (label_to_alignment): Return align_flags type instead of integer.
9561         (label_to_max_skip): Remove.
9562         (align_fuzz): Use align_flags type.
9563         (compute_alignments): Use align_flags type and use align_flags::max
9564         to combine multiple alignments.
9565         (grow_label_align): Grow vec instead of C array.
9566         (update_alignments): Assign just LABEL_TO_ALIGNMENT.
9567         (shorten_branches):  Use align_flags type and use align_flags::max
9568         to combine multiple alignments.
9569         (final_scan_insn_1): Remove usage of secondary alignment that comes
9570         from label alignment, but instead use proper secondary alignment
9571         which is computed in grow_label_align.
9572         * flags.h (struct align_flags_tuple): Move to align.h.
9573         (struct align_flags): Likewise.
9574         (state_align_loops): Rename to align_loops.
9575         (state_align_jumps): Rename to align_jumps.
9576         (state_align_labels): Rename to align_labels.
9577         (state_align_functions): Rename to align_functions.
9578         (align_loops_log): Remove.
9579         (align_jumps_log): Remove.
9580         (align_labels_log): Remove.
9581         (align_functions_log): Remove.
9582         (align_loops_max_skip): Remove.
9583         (align_jumps_max_skip): Remove.
9584         (align_labels_max_skip): Remove.
9585         (align_functions_max_skip): Remove.
9586         (align_loops_value): Remove.
9587         (align_jumps_value): Remove.
9588         (align_labels_value): Remove.
9589         (align_functions_value): Remove.
9590         * output.h (label_to_alignment): Change return type to align_flags.
9591         (label_to_max_skip): Remove.
9592         * target.def: Remove loop_align_max_skip, label_align_max_skip,
9593         jump_align_max_skip macros.
9594         * targhooks.h (default_loop_align_max_skip): Remove.
9595         (default_label_align_max_skip): Likewise.
9596         (default_jump_align_max_skip): Likewise.
9597         (default_label_align_after_barrier_max_skip): Remove.
9598         * toplev.c (read_log_maxskip): Use ::normalize function.
9599         (parse_N_M): Remove not used argument and also call ::normalize.
9600         (parse_alignment_opts): Do not pass unused arguments.
9601         * varasm.c (assemble_start_function): Use directly align_functions
9602         instead of removed macros.
9603         * system.h: Do not poison removed macros.
9605 2018-07-17  Jakub Jelinek  <jakub@redhat.com>
9607         PR middle-end/86539
9608         * gimplify.c (gimplify_omp_for): Ensure taskloop firstprivatized init
9609         and cond temporaries don't have reference type if iterator has
9610         pointer type.  For init use &for_pre_body instead of pre_p if
9611         for_pre_body is non-empty.
9613 2018-07-16  Segher Boessenkool  <segher@kernel.crashing.org>
9615         * config/rs6000/rs6000.md (trunc<mode>sf2): Expand truncates of
9616         double-double modes to SFmode directly directly.
9617         (trunc<mode>sf2_fprs): Delete.
9619 2018-07-16  Segher Boessenkool  <segher@kernel.crashing.org>
9621         * config/rs6000/rs6000.c (init_float128_ibm): Use the correct names
9622         for conversions between IFmode and the decimal floating point modes.
9623         (init_float128_ieee): Use the correct names for conversions between
9624         KFmode and the decimal floating point modes.
9626 2018-07-16  Segher Boessenkool  <segher@kernel.crashing.org>
9628         * config/rs6000/rs6000.c (init_float128_ibm): Use more correct names
9629         for the conversions between TDmode and IFmode.
9630         (init_float128_ieee): Use more correct names for the conversions
9631         between TDmode and KFmode.
9633 2018-07-16  Jakub Jelinek  <jakub@redhat.com>
9635         PR tree-optimization/86526
9636         * builtins.c (expand_builtin_memcmp): Formatting fixes.
9637         (inline_expand_builtin_string_cmp): Likewise.
9638         (inline_string_cmp): Likewise.  Use c_readstr instead of
9639         builtin_memcpy_read_str.  Add unit_mode temporary.
9641 2018-07-16  Bernd Edlinger  <bernd.edlinger@hotmail.de>
9643         PR middle-end/86528
9644         * builtins.c (check_access): Bail out if range[0] is no INTEGER_CST.
9645         * expr.c (string_constant): Fix the element size of ARRAY_TYPE.
9647 2018-07-16  Kelvin Nilsen  <kelvin@gcc.gnu.org>
9649         * doc/extend.texi (PowerPC AltiVec Built-in Functions):
9650         Alphabetize prototypes of built-in functions, separating out
9651         built-in functions that are listed in this section but should be
9652         described elsewhere.
9654 2018-07-16  Uros Bizjak  <ubizjak@gmail.com>
9656         PR target/86511
9657         * expmed.c (emit_store_flag): Do not emit setcc followed by a
9658         conditional move when trapping comparison was split to a
9659         non-trapping one (and vice versa).
9661 2018-07-16  Ilya Leoshkevich  <iii@linux.ibm.com>
9663         * config/s390/s390.c (s390_function_profiler): Generate nops
9664         instead of profiler call sequences.
9665         * config/s390/s390.opt: Add the new option.
9667 2018-07-16  Ilya Leoshkevich  <iii@linux.ibm.com>
9669         * config/s390/s390.c (s390_function_profiler): Generate
9670         __mcount_loc section.
9671         * config/s390/s390.opt: Add the new option.
9673 2018-07-16  Ilya Leoshkevich  <iii@linux.ibm.com>
9675         * common.opt: Add the new warning.
9676         * config/s390/s390.c (s390_function_profiler): Emit "brasl
9677         %r0,__fentry__" when -mfentry is specified.
9678         (s390_option_override_internal): Disallow -mfentry for 31-bit
9679         CPUs.
9680         * config/s390/s390.opt: Add the new option.
9682 2018-07-16  Richard Biener  <rguenther@suse.de>
9684         PR lto/86523
9685         * dwarf2out.c (dwarf2out_register_external_die): Assign DIE parents
9686         for function-local FUNCTION_DECL and RESULT_DECL immediately.
9688 2018-07-16  Martin Liska  <mliska@suse.cz>
9690         PR ipa/86529
9691         * ipa-pure-const.c (malloc_candidate_p): Revert ::get
9692         to ::get_create.
9694 2017-07-16  Claudiu Zissulescu  <claziss@synopsys.com>
9696         * config/arc/arcHS.md: Update ARCHS scheduling rules.
9698 2017-07-16  Claudiu Zissulescu  <claziss@synopsys.com>
9700         * config/arc/arc-arch.h (arc_tune_attr): Add new tune parameters
9701         for ARCHS4x.
9702         * config/arc/arc-cpus.def (hs4x): New cpu.
9703         (hs4xd): Likewise.
9704         * config/arc/arc-tables.opt: Regenerate.
9705         * config/arc/arc.c (arc_sched_issue_rate): New function.
9706         (TARGET_SCHED_ISSUE_RATE): Define.
9707         (TARGET_SCHED_EXPOSED_PIPELINE): Likewise.
9708         * config/arc/arc.md (attr type): Add fpu_fuse, fpu_sdiv, fpu_ddiv,
9709         fpu_cvt.
9710         (attr tune): Add ARCHS4x tune values.
9711         (attr tune_dspmpy): Define.
9712         (*tst): Correct instruction type.
9713         * config/arc/arcHS.md: Don't use this automaton for ARCHS4x cpus.
9714         * config/arc/arcHS4x.md: New file.
9715         * config/arc/fpu.md: Update instruction type attributes.
9716         * config/arc/t-multilib: Regenerate.
9718 2018-07-16  Tom de Vries  <tdevries@suse.de>
9720         PR debug/86455
9721         * var-tracking.c (vt_initialize): Fix pre_dec handling.
9723 2018-07-16  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
9725         * config/aarch64/atomics.md (aarch64_store_execlusive<mode>): Add
9726         early clobber.
9728 2018-07-16  Eric Botcazou  <ebotcazou@adacore.com>
9730         PR tree-optimization/86514
9731         * tree-ssa-reassoc.c (init_range_entry) <CASE_CONVERT>: Return for a
9732         conversion to a boolean type from a type with greater precision.
9734 2018-07-16  Tom de Vries  <tdevries@suse.de>
9736         * var-tracking.c (vt_initialize): Print adjusted insn slim if
9737         dump_flags request TDF_SLIM.
9739 2018-07-16  Aldy Hernandez  <aldyh@redhat.com>
9741         * fold-const.c (int_const_binop_1): Abstract...
9742         (wide_int_binop): ...wide int code here.
9743         (poly_int_binop): ...poly int code here.
9744         Abstract the rest of int_const_binop_1 into int_const_binop.
9745         * fold-const.h (wide_int_binop): New.
9746         * tree-vrp.c (vrp_int_const_binop): Call wide_int_binop.
9747         Remove useless PLUS/MINUS_EXPR case.
9748         (zero_nonzero_bits_from_vr): Move wide int code...
9749         (zero_nonzero_bits_from_bounds): ...here.
9750         (extract_range_from_binary_expr_1): Move mask optimization code...
9751         (range_easy_mask_min_max): ...here.
9752         * tree-vrp.h (zero_nonzero_bits_from_bounds): New.
9753         (range_easy_mask_min_max): New.
9755 2018-07-15  Jeff Law  <law@redhat.com>
9757         PR target/85993
9758         * config/sh/sh.c (output_mi_thunk): Remove dead conditional
9759         block.
9761 2018-07-14  Jim Wilson  <jimw@sifive.com>
9763         * config/riscv/linux.h (TARGET_ASM_FILE_END): New.
9765 2018-07-14  Paul Koning  <ni1d@arrl.net>
9767         * config/pdp11/pdp11.c (pdp11_rtx_costs): Bugfixes.
9769 2018-07-13  Jan Hubicka  <hubicka@ucw.cz>
9771         * lto-streamer-out.c (copy_function_or_variable): Dump info about
9772         copying section.
9774 2018-07-13  Bill Schmidt  <wschmidt@linux.ibm.com>
9775             Steve Munroe  <munroesj52@gmail.com>
9777         * config/rs6000/emmintrin.h (_mm_and_si128): New function.
9778         (_mm_andnot_si128): Likewise.
9779         (_mm_or_si128): Likewise.
9780         (_mm_xor_si128): Likewise.
9782 2018-07-13  Qing Zhao  <qing.zhao@oracle.com>
9784         PR middle-end/78809
9785         * builtins.c (expand_builtin_memcmp): Inline the calls first
9786         when result_eq is false.
9787         (expand_builtin_strcmp): Inline the calls first.
9788         (expand_builtin_strncmp): Likewise.
9789         (inline_string_cmp): New routine. Expand a string compare
9790         call by using a sequence of char comparison.
9791         (inline_expand_builtin_string_cmp): New routine. Inline expansion
9792         a call to str(n)cmp/memcmp.
9793         * doc/invoke.texi (--param builtin-string-cmp-inline-length):
9794         New option.
9795         * params.def (BUILTIN_STRING_CMP_INLINE_LENGTH): New.
9797 2018-07-13  Richard Earnshaw  <rearnsha@arm.com>
9799         * config/arm/driver-arm.c: Include arm-native.h.
9800         (host_detect_local_cpu): Use auto-generated data tables.
9801         (vendors, arm_cpu_table): Delete.  Move part information to ...
9802         * config/arm/arm-cpus.in: ... here.
9803         * config/arm/parsecpu.awk (gen_native): New function.
9804         (vendor, part): New CPU fields.
9805         (END): Add support for building the native CPU detection tables.
9806         * config/arm/t-arm (arm-native.h): Add build rule.
9807         (driver-arm.o): Add dependency on arm-native.h.
9809 2018-07-13  Richard Biener  <rguenther@suse.de>
9811         PR middle-end/85974
9812         * match.pd (addr1 - addr2): Allow either of the operand to
9813         have a conversion.
9815 2018-07-13  Tom de Vries  <tdevries@suse.de>
9817         * tree-inline.c (remap_ssa_name): Save and reuse debug exprs generated
9818         in remap_ssa_name.
9820 2018-07-13  Jackson Woodruff  <jackson.woodruff@arm.com>
9822         * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp): Use
9823         arrays instead of numbered variables.
9825 2018-07-13  Eric Botcazou  <ebotcazou@adacore.com>
9827         * config/sparc/sparc-protos.h (sparc_compute_frame_size): Delete.
9828         * config/sparc/sparc.c (sparc_compute_frame_size): Make static.
9830 2018-07-13  Richard Biener  <rguenther@suse.de>
9832         PR debug/86452
9833         * dwarf2out.c (gen_type_die_with_usage): Use scope_die_for
9834         instead of get_context_die.
9836 2018-07-13  Kugan Vivekanandarajah  <kuganv@linaro.org>
9837             Richard Biener  <rguenther@suse.de>
9839         PR middle-end/86489
9840         * tree-ssa-loop-niter.c (number_of_iterations_popcount): Check
9841         that the loop latch destination where phi is defined.
9843 2018-07-12  Kito Cheng  <kito.cheng@gmail.com>
9845         * config/riscv/riscv.c (enum riscv_privilege_levels): Add UNKNOWN_MODE.
9846         (riscv_expand_epilogue): Add assertion to check interrupt mode.
9847         (riscv_set_current_function): Extract getting interrupt type to new
9848         function.
9849         (riscv_get_interrupt_type): New function.
9850         (riscv_merge_decl_attributes): New function, checking interrupt type is
9851         same.
9852         (TARGET_MERGE_DECL_ATTRIBUTES): Define.
9854 2018-07-12  Paul Koning  <ni1d@arrl.net>
9856         * config/pdp11/pdp11.c (pdp11_output_def): Fix typo in .set
9857         directive.
9859 2018-07-12  Paul Koning  <ni1d@arrl.net>
9861         * doc/rtl.texi (REG_NONNEG): Remove decrement and branch until
9862         zero reference, add doloop_end instead.
9863         * doc/md.texi (decrement_and_branch_until_zero): Remove.
9864         (Looping patterns): Remove decrement_and_branch_until_zero.  Add
9865         detail for doloop_end.
9867 2018-07-12  Martin Sebor  <msebor@redhat.com>
9869         PR c/86453
9870         * attribs.c (decl_attributes): Reject conflicting attributes before
9871         calling attribute handlers.
9873 2018-07-12  Jan Hubicka  <hubicka@ucw.cz>
9875         * dumpfile.c (gcc::dump_manager::get_dump_file_name): Add PART
9876          parameter.
9877         (gcc::dump_manager::get_dump_file_name): likewise.
9878         (dump_begin): Likewise.
9879         * dumpfile.h (dump_begin): Update prototype.
9880         (gcc::dump_manager::get_dump_file_name,
9881         gcc::dump_manager::get_dump_file_name): Update prototype.
9883 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
9885         * internal-fn.h (vectorizable_internal_fn_p): New function.
9886         * tree-vect-slp.c (compatible_calls_p): Likewise.
9887         (vect_build_slp_tree_1): Remove nops argument.  Handle calls
9888         to internal functions.
9889         (vect_build_slp_tree_2): Update call to vect_build_slp_tree_1.
9891 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
9893         * fold-const.h (inverse_conditions_p): Declare.
9894         * fold-const.c (inverse_conditions_p): New function.
9895         * match.pd: Use inverse_conditions_p.  Add folds of view_converts
9896         that test the inverse condition of a conditional internal function.
9897         * internal-fn.h (vectorized_internal_fn_supported_p): Declare.
9898         * internal-fn.c (internal_fn_mask_index): Handle conditional
9899         internal functions.
9900         (vectorized_internal_fn_supported_p): New function.
9901         * tree-if-conv.c: Include internal-fn.h and fold-const.h.
9902         (any_pred_load_store): Replace with...
9903         (need_to_predicate): ...this new variable.
9904         (redundant_ssa_names): New variable.
9905         (ifcvt_can_use_mask_load_store): Move initial checks to...
9906         (ifcvt_can_predicate): ...this new function.  Handle tree codes
9907         for which a conditional internal function exists.
9908         (if_convertible_gimple_assign_stmt_p): Use ifcvt_can_predicate
9909         instead of ifcvt_can_use_mask_load_store.  Update after variable
9910         name change.
9911         (predicate_load_or_store): New function, split out from
9912         predicate_mem_writes.
9913         (check_redundant_cond_expr): New function.
9914         (value_available_p): Likewise.
9915         (predicate_rhs_code): Likewise.
9916         (predicate_mem_writes): Rename to...
9917         (predicate_statements): ...this.  Use predicate_load_or_store
9918         and predicate_rhs_code.
9919         (combine_blocks, tree_if_conversion): Update after above name changes.
9920         (ifcvt_local_dce): Handle redundant_ssa_names.
9921         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): Handle
9922         general conditional functions.
9923         * tree-vect-stmts.c (vectorizable_call): Likewise.
9925 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
9926             Alan Hayward  <alan.hayward@arm.com>
9927             David Sherwood  <david.sherwood@arm.com>
9929         * internal-fn.h (can_interpret_as_conditional_op_p): Declare.
9930         * internal-fn.c (can_interpret_as_conditional_op_p): New function.
9931         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Handle conditional
9932         plus and minus and convert them into IFN_COND_FMA-based sequences.
9933         (convert_mult_to_fma): Handle conditional plus and minus.
9935 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
9937         * doc/md.texi (cond_fma, cond_fms, cond_fnma, cond_fnms): Document.
9938         * optabs.def (cond_fma_optab, cond_fms_optab, cond_fnma_optab)
9939         (cond_fnms_optab): New optabs.
9940         * internal-fn.def (COND_FMA, COND_FMS, COND_FNMA, COND_FNMS): New
9941         internal functions.
9942         (FMA): Use DEF_INTERNAL_FLT_FN rather than DEF_INTERNAL_FLT_FLOATN_FN.
9943         * internal-fn.h (get_conditional_internal_fn): Declare.
9944         (get_unconditional_internal_fn): Likewise.
9945         * internal-fn.c (cond_ternary_direct): New macro.
9946         (expand_cond_ternary_optab_fn): Likewise.
9947         (direct_cond_ternary_optab_supported_p): Likewise.
9948         (FOR_EACH_COND_FN_PAIR): Likewise.
9949         (get_conditional_internal_fn): New function.
9950         (get_unconditional_internal_fn): Likewise.
9951         * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 5.
9952         (gimple_match_op::gimple_match_op): Add a new overload for 5
9953         operands.
9954         (gimple_match_op::set_op): Likewise.
9955         (gimple_resimplify5): Declare.
9956         * genmatch.c (decision_tree::gen): Generate simplifications for
9957         5 operands.
9958         * gimple-match-head.c (gimple_simplify): Define an overload for
9959         5 operands.  Handle calls with 5 arguments in the top-level overload.
9960         (convert_conditional_op): Handle conversions from unconditional
9961         internal functions to conditional ones.
9962         (gimple_resimplify5): New function.
9963         (build_call_internal): Pass a fifth operand.
9964         (maybe_push_res_to_seq): Likewise.
9965         (try_conditional_simplification): Try converting conditional
9966         internal functions to unconditional internal functions.
9967         Handle 3-operand unconditional forms.
9968         * match.pd (UNCOND_TERNARY, COND_TERNARY): Operator lists.
9969         Define ternary equivalents of the current rules for binary conditional
9970         internal functions.
9971         * config/aarch64/aarch64.c (aarch64_preferred_else_value): Handle
9972         ternary operations.
9973         * config/aarch64/iterators.md (UNSPEC_COND_FMLA, UNSPEC_COND_FMLS)
9974         (UNSPEC_COND_FNMLA, UNSPEC_COND_FNMLS): New unspecs.
9975         (optab): Handle them.
9976         (SVE_COND_FP_TERNARY): New int iterator.
9977         (sve_fmla_op, sve_fmad_op): New int attributes.
9978         * config/aarch64/aarch64-sve.md (cond_<optab><mode>)
9979         (*cond_<optab><mode>_2, *cond_<optab><mode_4)
9980         (*cond_<optab><mode>_any): New SVE_COND_FP_TERNARY patterns.
9982 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
9984         * target.def (preferred_else_value): New target hook.
9985         * doc/tm.texi.in (TARGET_PREFERRED_ELSE_VALUE): New hook.
9986         * doc/tm.texi: Regenerate.
9987         * targhooks.h (default_preferred_else_value): Declare.
9988         * targhooks.c (default_preferred_else_value): New function.
9989         * internal-fn.h (conditional_internal_fn_code): Declare.
9990         * internal-fn.c (FOR_EACH_CODE_MAPPING): New macro.
9991         (get_conditional_internal_fn): Use it.
9992         (conditional_internal_fn_code): New function.
9993         * gimple-match.h (gimple_match_cond): New struct.
9994         (gimple_match_op): Add a cond member function.
9995         (gimple_match_op::gimple_match_op): Update all forms to take a
9996         gimple_match_cond.
9997         * genmatch.c (expr::gen_transform): Use the same condition as res_op
9998         for the suboperation, but don't specify a particular else_value.
9999         * tree-ssa-sccvn.c (vn_nary_simplify, vn_reference_lookup_3)
10000         (visit_nary_op, visit_reference_op_load): Pass
10001         gimple_match_cond::UNCOND to the gimple_match_op constructor.
10002         * gimple-match-head.c: Include tree-eh.h
10003         (convert_conditional_op): New function.
10004         (maybe_resimplify_conditional_op): Likewise.
10005         (gimple_resimplify1): Call maybe_resimplify_conditional_op.
10006         (gimple_resimplify2): Likewise.
10007         (gimple_resimplify3): Likewise.
10008         (gimple_resimplify4): Likewise.
10009         (maybe_push_res_to_seq): Return null for conditional operations.
10010         (try_conditional_simplification): New function.
10011         (gimple_simplify): Call it.  Pass conditions to the gimple_match_op
10012         constructor.
10013         * match.pd: Fold VEC_COND_EXPRs of an IFN_COND_* call to a new
10014         IFN_COND_* call.
10015         * config/aarch64/aarch64.c (aarch64_preferred_else_value): New
10016         function.
10017         (TARGET_PREFERRED_ELSE_VALUE): Redefine.
10019 2018-07-12  Jan Hubicka  <hubicka@ucw.cz>
10021         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
10022         DECL_FCONTEXT
10023         (hash_tree): Do not hash DECL_FCONTEXT
10024         * tree-streamer-in.c (lto_input_ts_field_decl_tree_pointers):
10025         Do not stream DECL_FCONTEXT.
10026         * tree-streamer-out.c (write_ts_field_decl_tree_pointers): Likewise.
10027         * tree.c (free_lang_data_in_decl): Free DECL_FCONTEXT.
10029 2018-07-12  Richard Biener  <rguenther@suse.de>
10031         PR debug/86462
10032         * dwarf2out.c (gen_block_die): Only output blocks when they have
10033         at least one !DECL_IGNORED_P variable.
10035 2018-07-12  Richard Biener  <rguenther@suse.de>
10037         PR target/84829
10038         * config/gnu-user.h (GNU_USER_TARGET_NO_PTHREADS_LIB_SPEC):
10039         Remove -mieee-fp handling.
10041 2018-07-12  Richard Biener  <rguenther@suse.de>
10043         * tree-ssa-sccvn.c (vn_lookup_simplify_result): Remove bogus
10044         left-over from last patch.
10046 2018-07-12  Jakub Jelinek  <jakub@redhat.com>
10048         PR tree-optimization/86492
10049         * gimple-ssa-store-merging.c
10050         (imm_store_chain_info::coalesce_immediate_stores): Call
10051         check_no_overlap even for the merge_overlapping case.  Formatting fix.
10053 2018-07-12  Richard Biener  <rguenther@suse.de>
10055         PR middle-end/86479
10056         * fold-const.c (fold_binary_op_with_conditional_arg): Do not
10057         move possibly trapping operations into the conditional.
10059 2018-07-12  Richard Biener  <rguenther@suse.de>
10061         * tree-ssa-sccvn.c (mprts_hook_cnt): Remove.
10062         (vn_lookup_simplify_result): Remove recursion limit applied
10063         here.
10064         (vn_nary_build_or_lookup_1): Adjust.
10065         (try_to_simplify): Likewise.
10066         * gimple-match-head.c (gimple_resimplify1): Instead apply one
10067         here.
10068         (gimple_resimplify2): Likewise.
10069         (gimple_resimplify3): Likewise.
10070         (gimple_resimplify4): Likewise.
10072 2018-07-11  Jakub Jelinek  <jakub@redhat.com>
10074         * config/i386/avx512bitalgintrin.h (_mm512_mask_bitshuffle_epi64_mask):
10075         Use __mmask64 type instead of __mmask8 for __M argument.
10076         * config/i386/avx512fintrin.h (_mm512_mask_xor_epi64,
10077         _mm512_maskz_xor_epi64): Use __mmask8 type instead of __mmask16 for
10078         __U argument.
10079         (_mm512_mask_cmpneq_epi64_mask): Use __mmask8 type instead of
10080         __mmask16 for __M argument.
10081         (_mm512_maskz_insertf32x4, _mm512_maskz_inserti32x4,
10082         _mm512_mask_insertf32x4, _mm512_mask_inserti32x4): Cast last argument
10083         to __mmask16 instead of __mmask8.
10084         * config/i386/avx512vlintrin.h (_mm_mask_add_ps, _mm_maskz_add_ps,
10085         _mm256_mask_add_ps, _mm256_maskz_add_ps, _mm_mask_sub_ps,
10086         _mm_maskz_sub_ps, _mm256_mask_sub_ps, _mm256_maskz_sub_ps,
10087         _mm256_maskz_cvtepi32_ps, _mm_maskz_cvtepi32_ps): Use __mmask8 type
10088         instead of __mmask16 for __U argument.
10089         * config/i386/avx512vlbwintrin.h (_mm_mask_cmp_epi8_mask): Use
10090         __mmask16 instead of __mmask8 for __U argument.
10091         (_mm256_mask_cmp_epi8_mask): Use __mmask32 instead of __mmask16 for
10092         __U argument.
10093         (_mm256_cmp_epi8_mask): Use __mmask32 return type instead of
10094         __mmask16.
10095         (_mm_mask_cmp_epu8_mask): Use __mmask16 instead of __mmask8 for __U
10096         argument.
10097         (_mm256_mask_cmp_epu8_mask): Use __mmask32 instead of __mmask16 for
10098         __U argument.
10099         (_mm256_cmp_epu8_mask): Use __mmask32 return type instead of
10100         __mmask16.
10101         (_mm_mask_cmp_epi16_mask): Cast last argument to __mmask8 instead
10102         of __mmask16.
10103         (_mm256_mask_cvtepi8_epi16): Use __mmask16 instead of __mmask32 for
10104         __U argument.
10105         (_mm_mask_cvtepi8_epi16): Use __mmask8 instead of __mmask32 for
10106         __U argument.
10107         (_mm256_mask_cvtepu8_epi16): Use __mmask16 instead of __mmask32 for
10108         __U argument.
10109         (_mm_mask_cvtepu8_epi16): Use __mmask8 instead of __mmask32 for
10110         __U argument.
10111         (_mm256_mask_cmpneq_epu8_mask, _mm256_mask_cmplt_epu8_mask,
10112         _mm256_mask_cmpge_epu8_mask, _mm256_mask_cmple_epu8_mask): Change
10113         return type as well as __M argument type and all casts from __mmask8
10114         to __mmask32.
10115         (_mm256_mask_cmpneq_epu16_mask, _mm256_mask_cmplt_epu16_mask,
10116         _mm256_mask_cmpge_epu16_mask, _mm256_mask_cmple_epu16_mask): Change
10117         return type as well as __M argument type and all casts from __mmask8
10118         to __mmask16.
10119         (_mm256_mask_cmpneq_epi8_mask, _mm256_mask_cmplt_epi8_mask,
10120         _mm256_mask_cmpge_epi8_mask, _mm256_mask_cmple_epi8_mask): Change
10121         return type as well as __M argument type and all casts from __mmask8
10122         to __mmask32.
10123         (_mm256_mask_cmpneq_epi16_mask, _mm256_mask_cmplt_epi16_mask,
10124         _mm256_mask_cmpge_epi16_mask, _mm256_mask_cmple_epi16_mask): Change
10125         return type as well as __M argument type and all casts from __mmask8
10126         to __mmask16.
10127         * config/i386/avx512vbmi2vlintrin.h (_mm_mask_shrdi_epi32,
10128         _mm_mask_shldi_epi32): Cast last argument to __mmask8 instead of
10129         __mmask16.
10131 2018-07-11  Grazvydas Ignotas  <notasas@gmail.com>
10133         * config/i386/avx512bwintrin.h: (_mm512_mask_cmp_epi8_mask,
10134         _mm512_mask_cmp_epu8_mask): Use __mmask64 type instead of __mmask32
10135         for __U argument.
10137 2018-07-11  Paul Koning  <ni1d@arrl.net>
10139         * doc/md.texi (define_subst): Document how multiple occurrences of
10140         the same argument in the replacement pattern are handled.
10142 2018-07-11  Paul Koning  <ni1d@arrl.net>
10144         * doc/extend.texi (Common Variable Attributes): Move "mode" into
10145         alphabetical order.
10146         (Common Type Attributes): Add "mode" attribute.
10148 2018-07-11  Jan Hubicka  <hubicka@ucw.cz>
10150         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not
10151         stream DECL_ORIGINAL_TYPE.
10152         (DFS::DFS_write_tree_body): Drop hack handling local external decls.
10153         (hash_tree): Do not walk DECL_ORIGINAL_TYPE.
10154         * tree-streamer-in.c (lto_input_ts_decl_non_common_tree_pointers):
10155         Do not walk original type.
10156         * tree-streamer-out.c (streamer_write_chain): Drop hack handling
10157         external decls.
10158         (write_ts_decl_non_common_tree_pointers): Do not stream
10159         DECL_ORIGINAL_TYPE
10160         * tree.c (free_lang_data_in_decl): Clear DECL_ORIGINAL_TYPE.
10161         (find_decls_types_r): Do not walk DEC_ORIGINAL_TYPE.
10163 2018-07-11  Aldy Hernandez  <aldyh@redhat.com>
10165         * tree-ssa-threadupdate.c (thread_through_all_blocks): Do not jump
10166         thread twice from the same starting edge.
10168 2018-07-11  Aldy Hernandez  <aldyh@redhat.com>
10170         * vr-values.c (gimple_stmt_nonzero_p): Abstract common code to...
10171         * gimple.c (gimple_call_nonnull_result_p): ...here...
10172         (gimple_call_nonnull_arg): ...and here.
10173         * gimple.h (gimple_call_nonnull_result_p): New.
10174         (gimple_call_nonnull_arg): New.
10176 2018-07-11  Richard Earnshaw  <rearnsha@arm.com>
10178         * config/arm/arm-cpus.in: Move information from fpu field of each
10179         cpu definition to the isa field.
10180         * config/arm/parsecpu.awk (fpu): Delete match rule.
10181         (gen_comm_data): Don't add bits from the CPU's FPU entry.
10183 2018-07-11  Richard Biener  <rguenther@suse.de>
10185         PR debug/86457
10186         * dwarf2out.c (init_sections_and_labels): Use
10187         output_asm_line_debug_info consistently.
10188         (dwarf2out_early_finish): Likewise.
10189         (dwarf2out_finish): Remove DW_AT_stmt_list from early generated
10190         type units.
10192 2018-07-11  Richard Biener  <rguenther@suse.de>
10194         * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1):
10195         Rework father_bb setting in a way to avoid propagating constants
10196         multiple times on a loop body.
10198 2018-07-10  Mark Wielaard  <mark@klomp.org>
10200         PR debug/86459
10201         * dwarf2out.c (output_macinfo_op): Fix dwarf_FORM typo in gcc_assert.
10203 2018-07-10  Richard Biener  <rguenther@suse.de>
10205         * hash-map.h (hash_map::iterator::operator*): Return
10206         references to key and value.
10208 2018-07-10  Jakub Jelinek  <jakub@redhat.com>
10210         PR c++/86443
10211         * gimplify.c (find_combined_omp_for): Add DATA argument, in addition
10212         to finding the inner OMP_FOR/OMP_SIMD stmt find non-trivial wrappers,
10213         BLOCKs with BLOCK_VARs, OMP_PARALLEL in between, OMP_FOR in between.
10214         (gimplify_omp_for): For composite loops, move outer
10215         OMP_{DISTRIBUTE,TASKLOOP,FOR,PARALLEL} right around innermost
10216         OMP_FOR/OMP_SIMD if there are any non-trivial wrappers.  For class
10217         iterators add any needed clauses.  Allow OMP_FOR_ORIG_DECLS to contain
10218         TREE_LIST for both the original class iterator and the "last" helper
10219         var.  Gimplify OMP_FOR_PRE_BODY before the outermost composite
10220         loop, remember has_decl_expr from outer composite loops for the
10221         innermost OMP_SIMD in TREE_PRIVATE bit on OMP_FOR_INIT.
10223 2018-07-09  Martin Sebor  <msebor@redhat.com>
10225         PR middle-end/77357
10226         PR middle-end/86428
10227         * builtins.c (c_strlen): Avoid out-of-bounds warnings when
10228         accessing implicitly initialized array elements.
10229         * expr.c (string_constant): Handle string initializers of
10230         character arrays within aggregates.
10231         * gimple-fold.c (fold_array_ctor_reference): Add argument.
10232         Store element offset.  As a special case, handle zero size.
10233         (fold_nonarray_ctor_reference): Same.
10234         (fold_ctor_reference): Add argument.  Store subobject offset.
10235         * gimple-fold.h (fold_ctor_reference): Add argument.
10237 2018-07-09  Paul Koning  <ni1d@arrl.net>
10239         * config/pdp11/pdp11.c (pdp11_addr_cost): New function.
10240         (pdp11_insn_cost): New function.
10241         (pdp11_md_asm_adjust): New function.
10242         (TARGET_INVALID_WITHIN_DOLOOP): Define.
10243         (pdp11_rtx_costs): Update to match machine better.
10244         (output_addr_const_pdp11): Correct format mismatch warnings.
10245         * config/pdp11/pdp11.h (SLOW_BYTE_ACCESS): Correct definition.
10246         * config/pdp11/pdp11.md: General change to add base_cost and/or
10247         length attributes for use by new pdp11_insn_cost function.
10248         (MIN_BRANCH): Correct definition.
10249         (MIN_SOB): Ditto.
10250         (doloop_end): Use standard pattern name for looping pattern.
10251         (doloop_end_nocc): New.
10252         (movsf): Add another constraint alternative.
10253         (zero_extendqihi2): Add constraint alternatives for not in place
10254         extend.
10255         (zero_extendhisi2): Remove.
10256         (shift patterns): Add CC handling variants.
10257         (bswaphi2): New.
10258         (bswapsi2): New.
10259         (rothi3): New.
10260         (define_peephole2): New peephole to recognize mov that sets CC for
10261         subsequent test.
10263 2018-07-09  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
10265         * config/sparc/sparc.c (sparc_fold_builtin) <SPARC_BUILTIN_PDIST,
10266         SPARC_BUILTIN_PDISTN>: Adapt for signature change of wi::neg,
10267         wi::add.
10269 2018-07-09  Jakub Jelinek  <jakub@redhat.com>
10271         PR c/86420
10272         * real.c (real_nextafter): Return true if result is denormal.
10274 2018-07-09  Martin Liska  <mliska@suse.cz>
10276         * common.opt: Add back wrongly removed attribute.
10278 2018-07-09  Richard Biener  <rguenther@suse.de>
10280         PR debug/86413
10281         * dwarf2out.c (gen_block_die): For an early generated DIE
10282         always output high/low PC attributes.
10284 2018-07-09  Tom de Vries  <tdevries@suse.de>
10286         * cfgexpand.c (expand_debug_source_expr): Handle VAR_DECL.
10287         * tree-inline.c (remap_ssa_name): Handle default def ssa_name mapping
10288         onto VAR_DECL with abstract origin.
10290 2018-07-07  Jim Wilson  <jimw@sifive.com>
10292         * config/riscv/riscv.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): New.
10294 2018-07-07  Tom de Vries  <tdevries@suse.de>
10296         * tree-dfa.c (dump_enumerated_decls): Handle cfun->cfg == NULL.
10298 2018-07-07  Aldy Hernandez  <aldyh@redhat.com>
10300         * tree-vrp.c (vrp_int_const_binop): Change overflow type to
10301         overflow_type.
10302         (combine_bound): Use wide-int overflow calculation instead of
10303         rolling our own.
10304         * calls.c (maybe_warn_alloc_args_overflow): Change overflow type to
10305         overflow_type.
10306         * fold-const.c (int_const_binop_2): Same.
10307         (extract_muldiv_1): Same.
10308         (fold_div_compare): Same.
10309         (fold_abs_const): Same.
10310         * match.pd: Same.
10311         * poly-int.h (add): Same.
10312         (sub): Same.
10313         (neg): Same.
10314         (mul): Same.
10315         * predict.c (predict_iv_comparison): Same.
10316         * profile-count.c (slow_safe_scale_64bit): Same.
10317         * simplify-rtx.c (simplify_const_binary_operation): Same.
10318         * tree-chrec.c (tree_fold_binomial): Same.
10319         * tree-data-ref.c (split_constant_offset_1): Same.
10320         * tree-if-conv.c (idx_within_array_bound): Same.
10321         * tree-scalar-evolution.c (iv_can_overflow_p): Same.
10322         * tree-ssa-phiopt.c (minmax_replacement): Same.
10323         * tree-vect-loop.c (is_nonwrapping_integer_induction): Same.
10324         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Same.
10325         * vr-values.c (vr_values::adjust_range_with_scev): Same.
10326         * wide-int.cc (wi::add_large): Same.
10327         (wi::mul_internal): Same.
10328         (wi::sub_large): Same.
10329         (wi::divmod_internal): Same.
10330         * wide-int.h: Change overflow type to overflow_type for neg, add,
10331         mul, smul, umul, div_trunc, div_floor, div_ceil, div_round,
10332         mod_trunc, mod_ceil, mod_round, add_large, sub_large,
10333         mul_internal, divmod_internal.
10334         (overflow_type): New enum.
10335         (accumulate_overflow): New.
10337 2018-07-06  Kugan Vivekanandarajah  <kugan.vivekanandarajah@linaro.org>
10339         * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): New.
10340         (tree_ssa_phiopt_worker): Call cond_removal_in_popcount_pattern.
10342 2018-07-06  Kugan Vivekanandarajah  <kuganv@linaro.org>
10344         * tree-ssa-loop-niter.c (number_of_iterations_popcount): If popcount
10345         argument is checked for zero before entering loop, avoid checking again.
10347 2018-07-06  Kugan Vivekanandarajah  <kuganv@linaro.org>
10349         * gimplify.h (generic_expr_could_trap_p): Set as global function.
10350         * gimplify.h (generic_expr_could_trap_p): Likwise.
10351         * tree-scalar-evolution.c (expression_expensive_p): Handle COND_EXPR.
10353 2018-07-06  Jakub Jelinek  <jakub@redhat.com>
10355         PR tree-optimization/86401
10356         * fold-const.c (fold_binary_loc) <case BIT_AND_EXPR>: Move the
10357         ((A & N) + B) & M -> (A + B) & M etc. optimization into ...
10358         (fold_bit_and_mask): ... here.  New helper function for match.pd.
10359         * fold-const.h (fold_bit_and_mask): Declare.
10360         * match.pd (((A & N) + B) & M -> (A + B) & M): New optimization.
10362 2018-07-06  Peter Bergner  <bergner@linux.ibm.com>
10364         PR target/86324
10365         * target.def (translate_mode_attribute): New hook.
10366         * targhooks.h (default_translate_mode_attribute): Declare.
10367         * targhooks.c (default_translate_mode_attribute): New function.
10368         * doc/tm.texi.in (TARGET_TRANSLATE_MODE_ATTRIBUTE): New hook.
10369         * doc/tm.texi: Regenerate.
10370         * config/rs6000/rs6000.c (TARGET_TRANSLATE_MODE_ATTRIBUTE): Define.
10371         (rs6000_translate_mode_attribute): New function.
10373 2018-07-06  Paul Koning  <ni1d@arrl.net>
10375         * doc/md.texi (define_split): Document DONE and FAIL.
10376         (define_peephole2): Ditto.
10378 2018-07-05  Jeff Law  <law@redhat.com>
10380         PR tree-optimization/86010
10381         * tree-ssa-dse.c (compute_trims): More aggressively trim at
10382         both the head and tail of mem* and str* calls.
10384 2018-07-05  Jim Wilson  <jimw@sifive.com>
10386         * config.gcc (riscv*-*-*): When setting xlen, handle riscv-*.
10388 2018-07-05  Indu Bhagat  <indu.bhagat@oracle.com>
10390         * config/aarch64/aarch64-simd.md: correct flags text for
10391         MIN_EXPR replacement.
10393 2018-07-05  James Clarke  <jrtc27@jrtc27.com>
10395         * configure: Regenerated.
10397 2018-07-05  Carl Love  <cel@us.ibm.com>
10399         * config/rs6000/rs6000-c.c: Map ALTIVEC_BUILTIN_VEC_UNPACKH for
10400         float argument to VSX_BUILTIN_DOUBLEH_V4SF.
10401         Map ALTIVEC_BUILTIN_VEC_UNPACKL for float argument to
10402         VSX_BUILTIN_DOUBLEL_V4SF.
10404 2018-07-05  Martin Sebor  <msebor@redhat.com>
10406         PR c++/86400
10407         * tree-ssa-strlen.c (maybe_set_strlen_range): Use type size rather
10408         than its domain to compute its the upper bound of a char array.
10410 2018-07-05  Nathan Sidwell  <nathan@acm.org>
10412         Replace NO_IMPLICIT_EXTERN_C with SYSTEM_IMPLICIT_EXTERN_C.
10413         * doc/cpp.texi: Update comment.
10414         * doc/tm.texi: Rebuilt.
10415         * doc/tm.texi.in (NO_IMPLICIT_EXTERN_C): Replace with ...
10416         (SYSTEM_IMPLICIT_EXTERN_C): ... this, opposite sense.
10417         * doc/extend.texi (Backwards Compatibility): Clarify it is system
10418         headers affected by extern "C".
10419         * system.h: Poison NO_IMPLICIT_EXTERN_C.
10420         * config/alpha/alpha.h, config/arm/uclinux-elf.h,
10421         config/bfin/elf.h, config/cris/cris.h, config/darwin.h,
10422         config/dragonfly.h, config/freebsd.h, config/gnu-user.h,
10423         config/i386/cygming.h, config/i386/djgpp.h, config/i386/nto.h,
10424         config/ia64/hpux.h, config/lm32/lm32.h, config/lm32/uclinux-elf.h,
10425         config/lynx.h, config/mips/elf.h, config/mmix/mmix.h,
10426         config/netbsd.h, config/pa/pa-hpux.h, config/powerpcspe/sysv4.h,
10427         config/riscv/elf.h, config/rs6000/sysv4.h, config/rtems.h,
10428         config/s390/tpf.h, config/sh/newlib.h, config/sol2.h,
10429         config/sparc/openbsd64.h, config/sparc/sp-elf.h,
10430         config/sparc/sp64-elf.h, config/spu/spu.h,
10431         config/stormy16/stormy16.h, config/v850/v850.h,
10432         config/visium/visium.h, config/vx-common.h, config/xtensa/elf.h: Don't
10433         define NO_IMPLICIT_EXTERN_C.
10434         * config/rs6000/aix.h: Set SYSTEM_IMPLICIT_EXTERN_C.
10436 2018-07-05  Tamar Christina  <tamar.christina@arm.com>
10438         PR target/84711
10439         * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
10440         instead of GET_MODE_SIZE when comparing Units.
10442 2018-07-05  Tamar Christina  <tamar.christina@arm.com>
10444         PR target/84711
10445         * rtlanal.c (set_noop_p): Constrain on mode change,
10446         include hard-reg-set.h
10448 2018-07-05  Tamar Christina  <tamar.christina@arm.com>
10450         * config/aarch64/aarch64.c (aarch64_expand_movmem): Fix mode size.
10452 2018-07-05  Jakub Jelinek  <jakub@redhat.com>
10454         Revert
10455         2018-07-04  Maxim Ostapenko  <m.ostapenko@samsung.com>
10457         PR sanitizer/84250
10458         * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
10459         libasan.
10460         * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
10462 2018-07-04  Maxim Ostapenko  <m.ostapenko@samsung.com>
10464         PR sanitizer/84250
10465         * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
10466         libasan.
10467         * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
10469 2018-07-04  Eric Botcazou  <ebotcazou@adacore.com>
10471         PR middle-end/86380
10472         * expmed.c (choose_multiplier): Fix incorrect comparison with mask.
10474 2018-07-04  Aldy Hernandez  <aldyh@redhat.com>
10476         * tree-vrp.c (extract_range_from_binary_expr_1): Initialize
10477         neg_*_op* variables.
10479 2018-07-04  Martin Liska  <mliska@suse.cz>
10481         * tree-switch-conversion.c: Define
10482         max_ratio_for_speed and max_ratio_for_size constants.
10484 2018-07-04  Denys Vlasenko  <dvlasenk@redhat.com>
10485             Martin Liska  <mliska@suse.cz>
10487         PR middle-end/66240
10488         PR target/45996
10489         PR c/84100
10490         * common.opt: Rename align options with 'str_' prefix.
10491         * common/config/i386/i386-common.c (set_malign_value): New
10492         function.
10493         (ix86_handle_option): Use it to set -falign-* options/
10494         * config/aarch64/aarch64-protos.h (struct tune_params): Change
10495         type from int to string.
10496         * config/aarch64/aarch64.c: Update default values from int
10497         to string.
10498         * config/alpha/alpha.c (alpha_override_options_after_change):
10499         Likewise.
10500         * config/arm/arm.c (arm_override_options_after_change_1): Likewise.
10501         * config/i386/dragonfly.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
10502         max skip conditionally.
10503         * config/i386/freebsd.h (SUBALIGN_LOG): New.
10504         (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
10505         max skip conditionally.
10506         * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
10507         max skip conditionally.
10508         * config/i386/gnu-user.h (SUBALIGN_LOG): New.
10509         (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
10510         max skip conditionally.
10511         * config/i386/i386.c (struct ptt): Change type from int to
10512         string.
10513         (ix86_default_align): Set default values.
10514         * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Print
10515         max skip conditionally.
10516         * config/i386/iamcu.h (SUBALIGN_LOG): New.
10517         (ASM_OUTPUT_MAX_SKIP_ALIGN):
10518         * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN):
10519         * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
10520         max skip conditionally.
10521         * config/i386/openbsdelf.h (SUBALIGN_LOG): New.
10522         (ASM_OUTPUT_MAX_SKIP_ALIGN) Print max skip conditionally.:
10523         * config/i386/x86-64.h (SUBALIGN_LOG): New.
10524         (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
10525         max skip conditionally.
10526         (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
10527         * config/ia64/ia64.c (ia64_option_override): Set default values
10528         for alignment options.
10529         * config/m68k/m68k.c: Handle new str_align_* options.
10530         * config/mips/mips.c (mips_set_compression_mode): Change
10531         type of constants.
10532         (mips_option_override): Set default values for options.
10533         * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
10534         Likewise.
10535         * config/rs6000/rs6000.c (rs6000_option_override_internal):
10536         Likewise.
10537         * config/rx/rx.c (rx_option_override): Likewise.
10538         * config/rx/rx.h (JUMP_ALIGN): Use align_jumps_log.
10539         (LABEL_ALIGN): Use align_labels_log.
10540         (LOOP_ALIGN): Use align_loops_align.
10541         * config/s390/s390.c (s390_asm_output_function_label): Use new
10542         macros.
10543         * config/sh/sh.c (sh_override_options_after_change):
10544         Change type of constants.
10545         * config/spu/spu.c (spu_sched_init): Likewise.
10546         * config/sparc/sparc.c (sparc_option_override): Set default
10547         values for options.
10548         * config/visium/visium.c (visium_option_override): Likewise.
10549         * config/visium/visium.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Do not
10550         emit p2align format with last argument if it's not needed.
10551         * doc/invoke.texi: Document extended format of -falign-*.
10552         * final.c: Use align_labels alignment.
10553         * flags.h (struct target_flag_state): Change type to use
10554         align_flags.
10555         (struct align_flags_tuple): New.
10556         (struct align_flags): Likewise.
10557         (align_loops_log): Redefine macro to use new types.
10558         (align_loops_max_skip): Redefine macro to use new types.
10559         (align_jumps_log): Redefine macro to use new types.
10560         (align_jumps_max_skip): Redefine macro to use new types.
10561         (align_labels_log): Redefine macro to use new types.
10562         (align_labels_max_skip): Redefine macro to use new types.
10563         (align_functions_log): Redefine macro to use new types.
10564         (align_loops): Redefine macro to use new types.
10565         (align_jumps): Redefine macro to use new types.
10566         (align_labels): Redefine macro to use new types.
10567         (align_functions): Redefine macro to use new types.
10568         (align_functions_max_skip): Redefine macro to use new types.
10569         (align_loops_value): New macro.
10570         (align_jumps_value): New macro.
10571         (align_labels_value): New macro.
10572         (align_functions_value): New macro.
10573         * function.c (invoke_set_current_function_hook): Propagate
10574         alignment values from flags to global variables default in
10575         topleev.h.
10576         * ipa-icf.c (sem_function::equals_wpa): Use
10577         cl_optimization_option_eq instead of memcmp.
10578         * lto-streamer.h (cl_optimization_stream_out): Support streaming
10579         of string types.
10580         (cl_optimization_stream_in): Likewise.
10581         * optc-save-gen.awk: Support strings in cl_optimization.
10582         * opth-gen.awk: Likewise.
10583         * opts.c (finish_options): Remove error checking of invalid
10584         value ranges.
10585         (MAX_CODE_ALIGN): Remove.
10586         (MAX_CODE_ALIGN_VALUE): Likewise.
10587         (parse_and_check_align_values): New function.
10588         (check_alignment_argument): Likewise.
10589         (common_handle_option): Use check_alignment_argument.
10590         * opts.h (parse_and_check_align_values): Declare.
10591         * toplev.c (init_alignments): Remove.
10592         (read_log_maxskip): New.
10593         (parse_N_M): Likewise.
10594         (parse_alignment_opts): Likewise.
10595         (backend_init_target): Remove usage of init_alignments.
10596         * toplev.h (parse_alignment_opts): Declare.
10597         * tree-streamer-in.c (streamer_read_tree_bitfields): Add new
10598         argument.
10599         * tree-streamer-out.c (streamer_write_tree_bitfields): Likewise.
10600         * tree.c (cl_option_hasher::equal): New.
10601         * varasm.c: Use new global macros.
10603 2018-07-04  Denys Vlasenko  <dvlasenk@redhat.com>
10605         * config/i386/dragonfly.h: (ASM_OUTPUT_MAX_SKIP_ALIGN):
10606         Use a simpler align directive also if MAXSKIP = ALIGN-1.
10607         * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
10608         * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
10609         * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
10610         * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
10611         * config/i386/freebsd.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Remove "If N
10612         is large, do at least 8 byte alignment" code. Add SUBALIGN_LOG
10613         define. Use a simpler align directive also if MAXSKIP = ALIGN-1.
10614         * config/i386/gnu-user.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
10615         * config/i386/iamcu.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
10616         * config/i386/openbsdelf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
10617         * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
10619 2018-07-04  Martin Liska  <mliska@suse.cz>
10620             Jonathan Wakely  <jwakely@redhat.com>
10622         * coverage.c: Use correct type.
10623         * doc/invoke.texi: Language correction.
10625 2018-07-03  H.J. Lu  <hongjiu.lu@intel.com>
10627         PR target/85620
10628         * config/i386/i386.c (rest_of_insert_endbranch): Also generate
10629         ENDBRANCH for non-tail call which may return via indirect branch.
10630         * doc/extend.texi: Document indirect_return attribute.
10632 2018-07-03  Martin Sebor  <msebor@redhat.com>
10634         PR tree-optimization/86274
10635         * gimple-ssa-sprintf.c (fmtresult::type_max_digits): Verify
10636         precondition.
10637         (format_floating): Correct handling of infinities and NaNs.
10639 2018-07-03  Martin Sebor  <msebor@redhat.com>
10641         * print-tree.c (print_real_cst): New function.
10642         (print_node_brief): Call it.
10643         (print_node): Ditto.
10645 2018-07-03  Jeff Law  <law@redhat.com>
10647         * config/h8300/h8300.md (logical<mode>3_sn, logical<mode>3): Merge
10648         into a single pattern.
10650         * config/h8300/h8300.md (ors code_iterator): New.
10651         (bsetqi_msx, bnotqi_msx patterns and splitters): Consolidate into
10652         a single pattern and single splitter.
10653         (bsethi_msx, bnothi_msx patterns): Consolidate into a single pattern.
10654         (iorqi3_1, xorqi3_1): Likewise.
10655         (iorqi3, xorqi3 expanders): Similarly.
10657         * config/h8300/h8300.md (movmd_internal_normal): Consolidated with
10658         (movmd_internal) into a single pattern using the P mode iterator.
10659         (movmd splitters): Similarly.
10660         (stpcpy_internal_normal, stpcpy_internal): Similarly for thes patterns.
10661         (movsd splitters): Similarly.
10663         * config/h8300/h8300.c (h8300_insn_length_from_table): Consolidate
10664         ADDB, ADDW and ADDL into a single ADD attribute which selects the
10665         right table based on the size of the operand.
10666         * config/h8300/h8300.md (length_table): Corresponding changes. All
10667         references to "addb", "addw" and "addl" changed to "add".
10668         (btst patterns): Merge two variants into a single pattern.
10669         (tstqi, tsthi): Likewise.
10670         (addhi3_incdec, addsi3_incdec): Likewise.
10671         (subhi3_h8300hs, subsi3_h8300hs): Likewise.
10672         (mulhi3, mulsi3): Likewise.
10673         (udivhi3, udivsi3): Likewise.
10674         (divhi3, divsi3): Likewise.
10675         (andorqi3, andorhi3, andorsi3): Likewise.
10677 2018-07-03  Uros Bizjak  <ubizjak@gmail.com>
10679         PR target/85694
10680         * config/i386/sse.md (uavg<mode>3_ceil): New expander.
10681         (<sse2_avx2>_uavg<mode>3<mask_name>): Simplify expander.
10683 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
10685         PR tree-optimization/85694
10686         * config/aarch64/iterators.md (HADD, RHADD): New int iterators.
10687         (u): Handle UNSPEC_SHADD, UNSPEC_UHADD, UNSPEC_SRHADD and
10688         UNSPEC_URHADD.
10689         * config/aarch64/aarch64-simd.md (<u>avg<mode>3_floor)
10690         (<u>avg<mode>3_ceil): New patterns.
10692 2018-07-03  David Malcolm  <dmalcolm@redhat.com>
10694         * gcc.dg/vect/slp-perm-1.c: Remove "note: " prefix from
10695         scan-tree-dump directive.
10696         * gcc.dg/vect/slp-perm-2.c: Likewise.
10697         * gcc.dg/vect/slp-perm-3.c: Likewise.
10698         * gcc.dg/vect/slp-perm-5.c: Likewise.
10699         * gcc.dg/vect/slp-perm-6.c: Likewise.
10700         * gcc.dg/vect/slp-perm-7.c: Likewise.
10701         * gcc.dg/vect/slp-perm-8.c: Likewise.
10703 2018-07-03  Marek Polacek  <polacek@redhat.com>
10705         PR middle-end/86202
10706         * gimple-fold.c (size_must_be_zero_p): Check the type of the size.
10708 2018-07-03  Richard Biener  <rguenther@suse.de>
10710         PR ipa/86389
10711         * tree-ssa-structalias.c (find_func_clobbers): Properly
10712         handle indirect calls.
10714 2018-07-03  Jeff Law  <law@redhat.com>
10716         * config/h8300/h8300.md (HSI, QHSI, QHSIF): New mode iterators.
10717         (shifts): New code iterator.
10718         (movqi, movhi, movsi, movsf expanders): Consolidate into a single
10719         expander.  Fix HImode handling on H8/SX.
10720         (addqi3, addhi3, addsi3 expanders): Consolidate into a single expander.
10721         (subqi3, subhi3, subsi3 expanders): Likewise.
10722         (andqi3, andhi3, andsi3 expanders): Likewise.
10723         (iorqi3, iorhi3, iorsi3 expanders): Likewise.
10724         (xorqi3, xorhi3, xorsi3 expanders): Likewise.
10725         (negqi2, neghi2, negsi2, negsf2 expanders): Likewise.
10726         (one_cmplqi2, one_cmplhi2, one_cmplsi2): Likewise.
10727         (zero_extendqihi2, zero_extendqisi2): Likewise.
10728         (extendqihi2, extendqisi2): Likewise.
10729         (rotlqi3, rotlhi3, rotlsi3): Likewise.
10730         (neghi2_h8300, negsi2_h8300): Likewise for these patterns.
10731         (rotlqi3_1, rotlhi3_1): Likewise.
10732         (logicalhi3_sn, logicalsi3_sn): Likewise.
10733         (logicalhi3, logicalsi3): Likewise.
10735 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
10737         * tree-vect-patterns.c (vect_recog_rotate_pattern)
10738         (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
10739         (vect_recog_mixed_size_cond_pattern, adjust_bool_pattern_cast)
10740         (adjust_bool_pattern, vect_recog_bool_pattern): Pass the vector
10741         type to append_pattern_def_seq instead of creating a stmt_vec_info
10742         directly.
10743         (build_mask_conversion): Likewise.  Remove vinfo argument.
10744         (vect_add_conversion_to_patterm): Likewise, renaming to...
10745         (vect_add_conversion_to_pattern): ...this.
10746         (vect_recog_mask_conversion_pattern): Update call to
10747         build_mask_conversion.  Pass the vector type to
10748         append_pattern_def_seq here too.
10749         (vect_recog_gather_scatter_pattern): Update call to
10750         vect_add_conversion_to_pattern.
10752 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
10754         * tree-vect-patterns.c (new_pattern_def_seq): Delete.
10755         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
10756         (vect_recog_widen_op_pattern, vect_recog_over_widening_pattern)
10757         (vect_recog_rotate_pattern, vect_synth_mult_by_constant): Don't set
10758         STMT_VINFO_PATTERN_DEF_SEQ to null here.
10759         (vect_recog_pow_pattern, vect_recog_vector_vector_shift_pattern)
10760         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern): Use
10761         append_pattern_def_seq instead of new_pattern_def_seq.
10762         (vect_recog_divmod_pattern): Do both of the above.
10763         (vect_pattern_recog_1): Assert that STMT_VINO_PATTERN_DEF_SEQ
10764         is null.
10766 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
10768         * tree-vect-patterns.c (vect_recog_dot_prod_pattern):
10769         (vect_recog_sad_pattern, vect_recog_widen_op_pattern)
10770         (vect_recog_widen_mult_pattern, vect_recog_pow_pattern):
10771         (vect_recog_widen_sum_pattern, vect_recog_over_widening_pattern)
10772         (vect_recog_average_pattern, vect_recog_cast_forwprop_pattern)
10773         (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
10774         (vect_recog_vector_vector_shift_pattern, vect_synth_mult_by_constant)
10775         (vect_recog_mult_pattern, vect_recog_divmod_pattern)
10776         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
10777         (vect_recog_mask_conversion_pattern): Replace vec<gimple *>
10778         parameter with a single stmt_vec_info.
10779         (vect_recog_func_ptr): Likewise.
10780         (vect_recog_gather_scatter_pattern): Likewise, folding in...
10781         (vect_try_gather_scatter_pattern): ...this.
10782         (vect_pattern_recog_1): Remove stmts_to_replace and just pass
10783         the stmt_vec_info of the statement to be matched.  Don't clear
10784         STMT_VINFO_RELATED_STMT.
10785         (vect_pattern_recog): Update call accordingly.
10787 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
10789         PR tree-optimization/85694
10790         * doc/md.texi (avgM3_floor, uavgM3_floor, avgM3_ceil)
10791         (uavgM3_ceil): Document new optabs.
10792         * doc/sourcebuild.texi (vect_avg_qi): Document new target selector.
10793         * internal-fn.def (IFN_AVG_FLOOR, IFN_AVG_CEIL): New internal
10794         functions.
10795         * optabs.def (savg_floor_optab, uavg_floor_optab, savg_ceil_optab)
10796         (savg_ceil_optab): New optabs.
10797         * tree-vect-patterns.c (vect_recog_average_pattern): New function.
10798         (vect_vect_recog_func_ptrs): Add it.
10799         * tree-vect-stmts.c (vectorizable_call): Get the type of the zero
10800         constant directly from the associated lhs.
10802 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
10804         * tree-vect-patterns.c (vect_split_statement): New function.
10805         (vect_convert_input): Use it to try to split an existing cast.
10807 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
10809         * poly-int.h (print_hex): New function.
10810         * dumpfile.h (dump_dec, dump_hex): Declare.
10811         * dumpfile.c (dump_dec, dump_hex): New poly_wide_int functions.
10812         * tree-vectorizer.h (_stmt_vec_info): Add min_output_precision,
10813         min_input_precision, operation_precision and operation_sign.
10814         * tree-vect-patterns.c (vect_get_range_info): New function.
10815         (vect_same_loop_or_bb_p, vect_single_imm_use)
10816         (vect_operation_fits_smaller_type): Delete.
10817         (vect_look_through_possible_promotion): Add an optional
10818         single_use_p parameter.
10819         (vect_recog_over_widening_pattern): Rewrite to use new
10820         stmt_vec_info infomration.  Handle one operation at a time.
10821         (vect_recog_cast_forwprop_pattern, vect_narrowable_type_p)
10822         (vect_truncatable_operation_p, vect_set_operation_type)
10823         (vect_set_min_input_precision): New functions.
10824         (vect_determine_min_output_precision_1): Likewise.
10825         (vect_determine_min_output_precision): Likewise.
10826         (vect_determine_precisions_from_range): Likewise.
10827         (vect_determine_precisions_from_users): Likewise.
10828         (vect_determine_stmt_precisions, vect_determine_precisions): Likewise.
10829         (vect_vect_recog_func_ptrs): Put over_widening first.
10830         Add cast_forwprop.
10831         (vect_pattern_recog): Call vect_determine_precisions.
10833 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
10835         * tree-vect-patterns.c (vect_mark_pattern_stmts): Remove pattern
10836         statements that have been replaced by further pattern statements.
10837         (vect_pattern_recog_1): Clear STMT_VINFO_PATTERN_DEF_SEQ on failure.
10839 2018-07-03  Richard Biener  <rguenther@suse.de>
10841         * tree-vect-stmts.c (vect_is_simple_use): Consolidate dumping,
10842         always set *dt.  Dump vectype in vectype overload.
10843         * dumpfile.h (dump_gimple_expr): New function.
10844         (dump_gimple_expr_loc): Likewise.
10845         * dumpfile.c (dump_gimple_expr): New function.
10846         (dump_gimple_expr_loc): Likewise.
10848 2018-07-02  Jeff Law  <law@redhat.com>
10850         * config/h8300/h8300.md (movqi_h8300, movqi_h8300hs): Consolidate
10851         the H8/300, H8/300H and H8/S variants into a single pattern.
10852         (movhi_h8300, movqi_h8300hs): Similarly.
10853         (pushqi_h8300hs, pushhi_h8300hs): Consolidate into a single pattern.
10854         (QHI mode iterator): New.
10856         * config/h8300/h8300.md: Remove trailing whitespace.
10858 2018-07-02  Jim Wilson  <jimw@sifive.com>
10860         * config/riscv/riscv.c (riscv_expand_epilogue): Use emit_jump_insn
10861         instead of emit_insn for interrupt returns.
10862         * config/riscv/riscv.md (riscv_met): Add (return) to rtl.
10863         (riscv_sret, riscv_uret): Likewise.
10865 2018-07-02  David Malcolm  <dmalcolm@redhat.com>
10867         * pretty-print.c (selftest::test_pp_format): Move save and restore
10868         of quotes to class auto_fix_quotes, and add an instance.
10869         * selftest.c: Include "intl.h".
10870         (selftest::auto_fix_quotes::auto_fix_quotes): New ctor.
10871         (selftest::auto_fix_quotes::~auto_fix_quotes): New dtor.
10872         * selftest.h (selftest::auto_fix_quotes): New class.
10874 2018-07-02  Richard Henderson  <richard.henderson@linaro.org>
10876         * config/aarch64/aarch64-protos.h, config/aarch64/aarch64.c
10877         (aarch64_sve_prepare_conditional_op): Remove.
10878         * config/aarch64/aarch64-sve.md (cond_<SVE_INT_BINARY><SVE_I>):
10879         Allow aarch64_simd_reg_or_zero as select operand; remove
10880         the aarch64_sve_prepare_conditional_op call.
10881         (cond_<SVE_INT_BINARY_SD><SVE_SDI>): Likewise.
10882         (cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
10883         (*cond_<SVE_INT_BINARY><SVE_I>_z): New pattern.
10884         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_z): New pattern.
10885         (*cond_<SVE_COND_FP_BINARY><SVE_F>_z): New pattern.
10886         (*cond_<SVE_INT_BINARY><SVE_I>_any): New pattern.
10887         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_any): New pattern.
10888         (*cond_<SVE_COND_FP_BINARY><SVE_F>_any): New pattern
10889         and a splitters to match all of the *_any patterns.
10890         * config/aarch64/predicates.md (aarch64_sve_any_binary_operator): New.
10892         * config/aarch64/iterators.md (SVE_INT_BINARY_REV): Remove.
10893         (SVE_COND_FP_BINARY_REV): Remove.
10894         (sve_int_op_rev, sve_fp_op_rev): New.
10895         * config/aarch64/aarch64-sve.md (*cond_<SVE_INT_BINARY><SVE_I>_0): New.
10896         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_0): New.
10897         (*cond_<SVE_COND_FP_BINARY><SVE_F>_0): New.
10898         (*cond_<SVE_INT_BINARY><SVE_I>_2): Rename, add movprfx alternative.
10899         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_2): Similarly.
10900         (*cond_<SVE_COND_FP_BINARY><SVE_F>_2): Similarly.
10901         (*cond_<SVE_INT_BINARY><SVE_I>_3): Similarly; use sve_int_op_rev.
10902         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_3): Similarly.
10903         (*cond_<SVE_COND_FP_BINARY><SVE_F>_3): Similarly; use sve_fp_op_rev.
10905         * config/aarch64/aarch64-sve.md (cond_<SVE_COND_FP_BINARY><SVE_F>):
10906         Remove match_dup 1 from the inner unspec.
10907         (*cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
10909         * config/aarch64/aarch64.md (movprfx): New attr.
10910         (length): Default movprfx to 8.
10911         * config/aarch64/aarch64-sve.md (*mul<SVE_I>3): Add movprfx alt.
10912         (*madd<SVE_I>, *msub<SVE_I): Likewise.
10913         (*<su>mul<SVE_I>3_highpart): Likewise.
10914         (*<SVE_INT_BINARY_SD><SVE_SDI>3): Likewise.
10915         (*v<ASHIFT><SVE_I>3): Likewise.
10916         (*<su><MAXMIN><SVE_I>3): Likewise.
10917         (*<su><MAXMIN><SVE_F>3): Likewise.
10918         (*fma<SVE_F>4, *fnma<SVE_F>4): Likewise.
10919         (*fms<SVE_F>4, *fnms<SVE_F>4): Likewise.
10920         (*div<SVE_F>4): Likewise.
10922 2018-07-02  Richard Sandiford  <richard.sandiford@arm.com>
10924         * tree-vect-patterns.c (vect_recog_widen_shift_pattern): Fix typo
10925         in dump string.
10927 2018-07-02  Richard Biener  <rguenther@suse.de>
10929         PR tree-optimization/86363
10930         * tree-ssa-sccvn.c (vn_reference_lookup_3): Check the
10931         memset argument refers to a non-variable address.
10933 2018-07-02  Aldy Hernandez  <aldyh@redhat.com>
10935         * tree-vrp.c (extract_range_from_binary_expr_1): Abstract a lot of the
10936         {PLUS,MINUS}_EXPR code to...
10937         (adjust_symbolic_bound): ...here,
10938         (combine_bound): ...here,
10939         (set_value_range_with_overflow): ...and here.
10941 2018-07-02  Aldy Hernandez  <aldyh@redhat.com>
10943         * tree-vrp.c (extract_range_from_unary_expr): Abstract ABS_EXPR
10944         code...
10945         (extract_range_from_abs_expr): ...here.
10947 2018-07-02  Eric Botcazou  <ebotcazou@adacore.com>
10949         * config/i386/i386.c (ix86_finalize_stack_frame_flags): Do not overrule
10950         -fno-omit-frame-pointer when not optimizing.
10952 2018-07-02  Martin Liska  <mliska@suse.cz>
10954         PR ipa/86279
10955         * ipa-pure-const.c (malloc_candidate_p): Revert usage of ::get.
10956         (propagate_nothrow): Likewise.
10958 2018-07-02  Martin Liska  <mliska@suse.cz>
10960         PR ipa/86323
10961         * ipa-inline.c (early_inliner): Revert wrongly added ::get call.
10963 2018-07-02  David Malcolm  <dmalcolm@redhat.com>
10965         * dumpfile.c (dump_generic_expr_loc): Undo removal of this
10966         function in r262149, changing "loc" param from source_location to
10967         const dump_location_t &.
10968         * dumpfile.h (dump_generic_expr_loc): Undo removal of this
10969         declaration, as above.
10971 2018-07-01  Paul Koning  <ni1d@arrl.net>
10973         * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
10974         -munit-asm, -mgnu-asm, -mdec-asm.
10975         * config/pdp11/pdp11-protos.h (pdp11_gen_int_label): New.
10976         (pdp11_output_labelref): New.
10977         (pdp11_output_def): New.
10978         (pdp11_output_addr_vec_elt): New.
10979         * config/pdp11/pdp11.c: Use tab between opcode and operands.  Use
10980         %# and %@ format codes.
10981         (pdp11_option_override): New.
10982         (TARGET_ASM_FILE_START_FILE_DIRECTIVE): Define.
10983         (pdp11_output_ident): New.
10984         (pdp11_asm_named_section): New.
10985         (pdp11_asm_init_sections): New.
10986         (pdp11_file_start): New.
10987         (pdp11_file_end): New.
10988         (output_ascii): Use .ascii/.asciz for -mdec-asm.
10989         (pdp11_asm_print_operand): Update %# and %$ for -mdec-asm.  Add
10990         %o, like %c but octal.
10991         (pdp11_option_override): New.
10992         * config/pdp11/pdp11.h (TEXT_SECTION_ASM_OP): Update for
10993         -mdec-asm.
10994         (DATA_SECTION_ASM_OP): Ditto.
10995         (READONLY_DATA_SECTION_ASM_OP): New.
10996         (IS_ASM_LOGICAL_LINE_SEPARATOR): New.
10997         (ASM_GENERATE_INTERNAL_LABEL): Use new function.
10998         (ASM_OUTPUT_LABELREF): Ditto.
10999         (ASM_OUTPUT_DEF): Ditto.
11000         (ASM_OUTPUT_EXTERNAL): New.
11001         (ASM_OUTPUT_SOURCE_FILENAME): New.
11002         (ASM_OUTPUT_ADDR_VEC_ELT): Use new function.
11003         (ASM_OUTPUT_SKIP): Update for -mdec-asm.
11004         * config/pdp11/pdp11.md: Use tab between opcode and operands.  Use
11005         %# and %@ format codes.
11006         * config/pdp11/pdp11.opt (mgnu-asm): New.
11007         (mdec-asm): Conflicts with -mgnu-asm and -munix-asm.
11008         (munix-asm): Conflicts with -mdec-asm and -mgnu-asm.
11009         * doc/invoke.txt (PDP-11 Options): Add -mgnu-asm.
11011 2018-07-01  Aldy Hernandez  <aldyh@redhat.com>
11013         * tree-ssa-threadupdate.c (mark_threaded_blocks): Avoid
11014         dereferencing path[] beyond its length.
11015         (debug_path): New.
11016         (debug_all_paths): New.
11017         (rewire_first_differing_edge): New.
11018         (adjust_paths_after_duplication): New.
11019         (duplicate_thread_path): Call adjust_paths_after_duplication.
11020         Add new argument.
11021         (thread_through_all_blocks): Add new argument to
11022         duplicate_thread_path.
11024 2018-06-30  Jim Wilson  <jimw@sifive.com>
11026         * config/riscv/predicates.md (p2m1_shift_operand): New.
11027         (high_mask_shift_operand): New.
11028         * config/riscv/riscv.md (lshrsi3_zero_extend_3+1): New combiner
11029         pattern using p2m1_shift_operand.
11030         (lshsi3_zero_extend_3+2): New combiner pattern using
11031         high_mask_shift_operand.
11033 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
11035         * tree-vect-patterns.c (vect_get_external_def_edge): New function,
11036         split out from...
11037         (vect_recog_rotate_pattern): ...here.
11038         (vect_convert_input): Try to insert casts of invariants in the
11039         preheader.
11040         * tree-vect-loop-manip.c (vect_loop_versioning): Don't require the
11041         preheader to be empty.
11043 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
11045         * tree-vect-patterns.c (append_pattern_def_seq): Take an optional
11046         vector type.  If given, install it in the new statement's
11047         STMT_VINFO_VECTYPE.
11048         (vect_element_precision): New function.
11049         (vect_unpromoted_value): New struct.
11050         (vect_unpromoted_value::vect_unpromoted_value): New function.
11051         (vect_unpromoted_value::set_op): Likewise.
11052         (vect_look_through_possible_promotion): Likewise.
11053         (vect_joust_widened_integer, vect_joust_widened_type): Likewise.
11054         (vect_widened_op_tree, vect_convert_input): Likewise.
11055         (vect_convert_inputs, vect_convert_output): Likewise.
11056         (vect_recog_dot_prod_pattern): Use vect_look_through_possible_promotion
11057         to handle the optional cast of the multiplication result and
11058         vect_widened_op_tree to detect the widened multiplication itself.
11059         Do not require the input and output of promotion casts to have
11060         the same sign, but base the signedness of the operation on the
11061         input rather than the result.  If the pattern includes two
11062         promotions, check that those promotions have the same sign.
11063         Do not restrict the MULT_EXPR handling to a double-width result;
11064         handle quadruple-width results and wider.  Use vect_convert_inputs
11065         to convert the inputs to the common type.
11066         (vect_recog_sad_pattern):  Use vect_look_through_possible_promotion
11067         to handle the optional cast of the ABS result.  Also allow a sign
11068         change or a sign extension between the ABS and MINUS.
11069         Use vect_widened_op_tree to detect the widened subtraction and use
11070         vect_convert_inputs to convert the inputs to the common type.
11071         (vect_handle_widen_op_by_const): Delete.
11072         (vect_recog_widen_op_pattern): New function.
11073         (vect_recog_widen_mult_pattern): Use it.
11074         (vect_recog_widen_shift_pattern): Likewise.
11075         (vect_recog_widen_sum_pattern): Use
11076         vect_look_through_possible_promotion to handle the promoted
11077         PLUS_EXPR operand.
11079 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
11081         * gimple-iterator.c (gsi_for_stmt): Add a new overload that takes
11082         the containing gimple_seq *.
11083         * gimple-iterator.h (gsi_for_stmt): Declare it.
11084         * tree-vect-patterns.c (vect_recog_dot_prod_pattern)
11085         (vect_recog_sad_pattern, vect_recog_widen_sum_pattern)
11086         (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
11087         (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
11088         (vect_recog_mask_conversion_pattern): Remove STMT_VINFO_IN_PATTERN_P
11089         checks.
11090         (vect_init_pattern_stmt, vect_set_pattern_stmt): New functions,
11091         split out from...
11092         (vect_mark_pattern_stmts): ...here.  Handle cases in which the
11093         statement being replaced is part of an existing pattern
11094         definition sequence, inserting the new pattern statements before
11095         the original one.
11096         (vect_pattern_recog_1): Don't return a bool.  If the statement
11097         is already part of a pattern, instead apply pattern matching
11098         to the pattern definition statements.  Don't clear the
11099         STMT_VINFO_RELATED_STMT if is_pattern_stmt_p.
11100         (vect_pattern_recog): Don't break after the first match;
11101         continue processing the pattern definition statements instead.
11102         Don't bail out for STMT_VINFO_IN_PATTERN_P here.
11104 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
11106         * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
11107         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
11108         (vect_recog_widen_sum_pattern): Use it.
11110 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
11112         * tree-vect-loop.c (vectorizable_reduction): Assert that the
11113         phi is not a pattern statement and has not been replaced by
11114         a pattern statement.
11115         * tree-vect-patterns.c (type_conversion_p): Don't check
11116         STMT_VINFO_IN_PATTERN_P.
11117         (vect_recog_vector_vector_shift_pattern): Likewise.
11118         (vect_recog_dot_prod_pattern): Expect vect_is_simple_use to return
11119         the pattern statement rather than the original statement; check
11120         directly for a WIDEN_MULT_EXPR here.
11121         * tree-vect-slp.c (vect_get_and_check_slp_defs): Expect
11122         vect_is_simple_use to return the pattern statement rather
11123         than the original statement; use is_pattern_stmt_p to check
11124         for such a pattern statement.
11125         * tree-vect-stmts.c (process_use): Expect vect_is_simple_use
11126         to return the pattern statement rather than the original statement;
11127         don't do the same transformation here.
11128         (vect_is_simple_use): If the defining statement has been replaced
11129         by a pattern statement, return the pattern statement instead.
11130         Remove the corresponding (local) transformation from the vectype
11131         overload.
11133 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
11135         * tree-vectorizer.h (vect_is_simple_use): Move the gimple ** to the
11136         end and default to null.
11137         * tree-vect-loop.c (vect_create_epilog_for_reduction)
11138         (vectorizable_reduction): Update calls accordingly, dropping the
11139         gimple ** argument if the passed-back statement isn't needed.
11140         * tree-vect-patterns.c (vect_get_internal_def, type_conversion_p)
11141         (vect_recog_rotate_pattern): Likewise.
11142         (vect_recog_mask_conversion_pattern): Likewise.
11143         * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
11144         (vect_mask_constant_operand_p): Likewise.
11145         * tree-vect-stmts.c (is_simple_and_all_uses_invariant, process_use):
11146         (vect_model_simple_cost, vect_get_vec_def_for_operand): Likewise.
11147         (get_group_load_store_type, get_load_store_type): Likewise.
11148         (vect_check_load_store_mask, vect_check_store_rhs): Likewise.
11149         (vectorizable_call, vectorizable_simd_clone_call): Likewise.
11150         (vectorizable_conversion, vectorizable_assignment): Likewise.
11151         (vectorizable_shift, vectorizable_operation): Likewise.
11152         (vectorizable_store, vect_is_simple_cond): Likewise.
11153         (vectorizable_condition, vectorizable_comparison): Likewise.
11154         (get_same_sized_vectype, vect_get_mask_type_for_stmt): Likewise.
11155         (vect_is_simple_use): Rename the def_stmt argument to def_stmt_out
11156         and move it to the end.  Cope with null def_stmt_outs.
11158 2018-06-30  Bernd Edlinger  <bernd.edlinger@hotmail.de>
11160         * Makefile.in (FLAGS_TO_PASS): Add RANLIB_FOR_TARGET.
11162 2018-06-29  Jeff Law  <law@redhat.com>
11164         * config/v850/v850.c (v850_legitimate_address_p): Handle large
11165         displacements for TARGET_V850E2V3 and newer.
11166         (TARGET_LRA_P): Remove.  Defaults to LRA now.
11167         * config/v850/v850.md (sign23byte_load): Remove.
11168         (unsign23byte_load, sign23hword_load, unsign23hword_load): Likewise.
11169         (23word_load, 23byte_store, 23hword_store, 23word_store): Likewise.
11171 2018-06-29  Martin Liska  <mliska@suse.cz>
11173         PR lto/85759
11174         * coverage.c (coverage_init): Mangle full path name.
11175         * doc/invoke.texi: Document the change.
11176         * gcov-io.c (mangle_path): New.
11177         * gcov-io.h (mangle_path): Likewise.
11178         * gcov.c (mangle_name): Use mangle_path for path mangling.
11180 2018-06-29  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
11182         * config/arm/arm.c (output_move_double): Don't allow STRD instructions
11183         if starting source register is not even.
11185 2018-06-29  Martin Liska  <mliska@suse.cz>
11187         PR tree-optimization/86263
11188         * tree-switch-conversion.c (switch_decision_tree::try_switch_expansion):
11189         Make edge redirection.
11191 2018-06-29  David Malcolm  <dmalcolm@redhat.com>
11193         * dumpfile.c (dump_loc): Add indentation based on scope depth.
11194         (dump_scope_depth): New variable.
11195         (get_dump_scope_depth): New function.
11196         (dump_begin_scope): New function.
11197         (dump_end_scope): New function.
11198         * dumpfile.h (get_dump_scope_depth): New declaration.
11199         (dump_begin_scope): New declaration.
11200         (dump_end_scope): New declaration.
11201         (class auto_dump_scope): New class.
11202         (AUTO_DUMP_SCOPE): New macro.
11203         * tree-vectorizer.h (DUMP_VECT_SCOPE): Reimplement in terms of
11204         AUTO_DUMP_SCOPE.
11206 2018-06-29  Richard Biener  <rguenther@suse.de>
11208         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences): Assert
11209         compute_all_dependences succeeds.
11210         * tree-vect-loop.c (vect_get_datarefs_in_loop): Fail early if we
11211         exceed --param loop-max-datarefs-for-datadeps.
11213 2018-06-29  Jakub Jelinek  <jakub@redhat.com>
11215         * config/rs6000/t-rs6000: Append rs6000-modes.h to TM_H.
11217 2018-06-28  Uros Bizjak  <ubizjak@gmail.com>
11219         PR target/86348
11220         * config/i386/sse.md (*vec_extractv4si_0_zext_sse4): Use
11221         alternative 0 in preferred_for_speed attribute.
11223 2018-06-28  Paul Koning  <ni1d@arrl.net>
11225         * config/pdp11/pdp11-protos.h (pdp11_shift_length): New function.
11226         * config/pdp11/pdp11.c (pdp11_shift_length): New function.
11227         * config/pdp11/pdp11.h (ADJUST_INSN_LENGTH): Remove.
11228         * config/pdp11/pdp11.md: Correct "length" attribute calculation
11229         for shift insn patterns.
11231 2018-06-28  David Malcolm  <dmalcolm@redhat.com>
11233         * cgraph.c (cgraph_node::get_body): Replace assignments to
11234         "dump_file" with calls to set_dump_file.
11235         * dumpfile.c (alt_dump_file): Make static, and group with...
11236         (alt_flags): ...this definition.
11237         (dumps_are_enabled): New variable.
11238         (refresh_dumps_are_enabled): New function.
11239         (set_dump_file): New function.
11240         (set_alt_dump_file): New function.
11241         (gcc::dump_manager::dump_start): Replace assignments to
11242         "dump_file" and "alt_dump_file" with calls to set_dump_file and
11243         set_alt_dump_file.
11244         (gcc::dump_manager::dump_finish): Likewise.
11245         * dumpfile.h (alt_dump_file): Delete decl.
11246         (dumps_are_enabled): New variable decl.
11247         (set_dump_file): New function decl.
11248         (dump_enabled_p): Rewrite in terms of new "dumps_are_enabled"
11249         global.
11250         * tree-nested.c (lower_nested_functions): Replace assignments to
11251         "dump_file" with calls to set_dump_file.
11253 2018-06-28  Eric Botcazou  <ebotcazou@adacore.com>
11255         * tree-cfg.c (verify_gimple_in_cfg): Call verify_location on the
11256         goto_locus of each outgoing edge of each basic block.
11258 2018-06-28  Richard Biener  <rguenther@suse.de>
11260         * dwarf2out.c (decl_scope_table): Remove.
11261         (push_decl_scope): Likewise.
11262         (pop_decl_scope): Likewise.
11263         (gen_type_die_for_member): Do not call push/pop_decl_scope.
11264         (gen_struct_or_union_type_die): Likewise.
11265         (gen_tagged_type_die): Likewise.
11266         (dwarf2out_init): Do not initialize decl_scope_table.
11267         (dwarf2out_c_finalize): Do not free it.
11269 2018-06-28  Richard Biener  <rguenther@suse.de>
11271         * dwarf2out.c (gen_subprogram_die): Use is_unit_die when
11272         deciding whether to not re-use a DIE.
11274 2018-06-28  Richard Biener  <rguenther@suse.de>
11276         * dwarf2out.c (gen_subprogram_die): Always re-use DIEs with an
11277         DW_AT_abstract_origin attribute.
11279 2018-06-28  Martin Liska  <mliska@suse.cz>
11281         * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
11282         Use newly introduced constants.
11283         * tree-switch-conversion.h (struct jump_table_cluster):
11284         Define max_ratio_for_size and max_ratio_for_speed.
11286 2018-06-28  Martin Liska  <mliska@suse.cz>
11288         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
11289         Add new checking assert to catch invalid state.
11290         (jump_table_cluster::can_be_handled): Handle single case
11291         clusters.
11292         (jump_table_cluster::is_beneficial): Bail out for such case.
11293         (bit_test_cluster::find_bit_tests):
11294         Add new checking assert to catch invalid state.
11295         (bit_test_cluster::can_be_handled): Handle single case
11296         clusters.
11297         (bit_test_cluster::is_beneficial): Bail out for such case.
11298         (switch_decision_tree::analyze_switch_statement):
11299         Fix comment.
11301 2018-06-28  Martin Liska  <mliska@suse.cz>
11303         * common.opt: Introduce -completion option.
11304         * gcc.c (driver_handle_option): Handle it.
11305         (driver::main): Print completions if completion
11306         is set.
11307         * opt-suggestions.c (option_proposer::get_completions):
11308         New function.
11309         (option_proposer::suggest_completion): Likewise.
11310         (option_proposer::find_param_completions): Likewise.
11311         (verify_autocompletions): Likewise.
11312         (test_completion_valid_options): Likewise.
11313         (test_completion_valid_params): Likewise.
11314         (in_completion_p): Likewise.
11315         (empty_completion_p): Likewise.
11316         (test_completion_partial_match): Likewise.
11317         (test_completion_garbage): Likewise.
11318         (opt_proposer_c_tests): Likewise.
11319         * opt-suggestions.h: Declare new functions.
11320         * opts.c (common_handle_option): Handle OPT__completion_.
11321         * selftest-run-tests.c (selftest::run_tests): Add
11322         opt_proposer_c_tests.
11323         * selftest.c (assert_str_startswith): New.
11324         * selftest.h (assert_str_startswith): Likewise.
11325         (opt_proposer_c_tests): New.
11326         (ASSERT_STR_STARTSWITH): Likewise.
11328 2018-06-28  Martin Liska  <mliska@suse.cz>
11330         * Makefile.in: Add opt-suggestions.o.
11331         * gcc-main.c: Include opt-suggestions.h.
11332         * gcc.c (driver::driver): Likewise.
11333         (driver::~driver): Remove m_option_suggestions.
11334         (driver::build_option_suggestions): Moved to option_proposer.
11335         (driver::suggest_option): Likewise.
11336         (driver::handle_unrecognized_options): Use option_proposer.
11337         * gcc.h (class driver): Add new memver m_option_proposer.
11338         * opt-suggestions.c: New file.
11339         * opt-suggestions.h: New file.
11341 2018-06-28  Martin Liska  <mliska@suse.cz>
11343         * vec.h (class auto_string_vec): New (moved from auto_argvec).
11344         (auto_string_vec::~auto_string_vec): Likewise.
11346 2018-06-28  Eric Botcazou  <ebotcazou@adacore.com>
11348         * tree-inline.h (struct copy_body_data): Move remapping_type_depth and
11349         prevent_decl_creation_for_types fields up and add reset_location field.
11350         * tree-inline.c (remap_gimple_stmt): Force input_location on the new
11351         statement if id->reset_location is true.
11352         (copy_edges_for_bb): Do not set goto_locus on the new edges if
11353         id->reset_location is true.
11354         (copy_phis_for_bb): Force input_location on the arguments if
11355         id->reset_location is true.
11356         (expand_call_inline): Set id->reset_location if DECL_IGNORED_P
11357         is set on the function to be inlined.
11359 2018-06-27  Stephan Bergmann  <sbergman@redhat.com>
11361         * doc/invoke.texi (Debugging Options): Add -gsplit-dwarf.
11363 2018-06-27  Dimitar Dimitrov  <dimitar@dinux.eu>
11365         * lra-eliminations.c (update_reg_eliminate): Mark all spanning hard
11366         registers for Pmode.
11367         * lra-lives.c (check_pseudos_live_through_calls): Mark all spanning
11368         hard registers for the clobbered pseudo.
11370 2018-06-27  Paul Koning  <ni1d@arrl.net>
11372         * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
11373         mutually exclusive options.
11374         * config/pdp11/constraints.md (h): New constraint.
11375         (O): Update definition to match shift code generation.
11376         (D): New constraint.
11377         * config/pdp11/pdp11-modes.def (CCNZ): Define mode.
11378         (CCFP): Remove.
11379         * config/pdp11/pdp11-protos.h (int_no_side_effect_operand): New
11380         function.
11381         (output_jump): Change arguments.
11382         (pdp11_fixed_cc_regs): New function.
11383         (pdp11_cc_mode): Ditto.
11384         (pdp11_expand_shift): Ditto.
11385         (pdp11_assemble_shift): Ditto.
11386         (pdp11_small_shift): Ditto.
11387         (pdp11_branch_cost): Remove.
11388         * config/pdp11/pdp11.c (pdp11_assemble_integer): Remove comments
11389         from output.
11390         (pdp11_register_move_cost): Update for CC registers.
11391         (pdp11_rtx_costs): Add case for LSHIFTRT.
11392         (pdp11_output_jump): Add CCNZ mode conditional branches.
11393         (notice_update_cc_on_set): Remove.
11394         (pdp11_cc_mode): New function.
11395         (simple_memory_operand): Correct pre/post decrement case.
11396         (no_side_effect_operand): New function.
11397         (pdp11_regno_reg_class): Add CC_REGS class.
11398         (pdp11_fixed_cc_regs): New function.
11399         (pdp11_small_shift): New function.
11400         (pdp11_expand_shift): New function to expand shift insns.
11401         (pdp11_assemble_shift): New function to output shifts.
11402         (pdp11_branch_cost): Remove.
11403         (pdp11_modes_tieable_p): Make QI/HI modes tieable.
11404         * config/pdp11/pdp11.h (SIZE_TYPE): Ensure 16-bit type.
11405         (WCHAR_TYPE): Ditto.
11406         (PTRDIFF_TYPE): Ditto.
11407         (ADJUST_INSN_LENGTH): New macro.
11408         (FIXED_REGISTERS): Add CC registers.
11409         (CALL_USED_REGISTERS): Ditto.
11410         (reg_class): Ditto.
11411         (REG_CLASS_NAMES): Ditto.
11412         (REG_CLASS_CONTENTS): Ditto.
11413         (SELECT_CC_MODE): Use new function.
11414         (TARGET_FLAGS_REGNUM): New macro.
11415         (TARGET_FIXED_CONDITION_CODE_REGS): Ditto.
11416         (cc0_reg_rtx): Remove.
11417         (CC_STATUS_MDEP): Remove.
11418         (CC_STATUS_MDEFP_INIT): Remove.
11419         (CC_IN_FPU): Remove.
11420         (NOTICE_UPDATE_CC): Remove.
11421         (REGISTER_NAMES): Add CC registers.
11422         (BRANCH_COST): Change to constant 1.
11423         * config/pdp11/pdp11.md: Rewrite for CCmode condition code
11424         handling.
11425         * config/pdp11/pdp11.opt (mbcopy): Remove.
11426         (mbcopy-builtin): Remove.
11427         (mbranch-cheap): Remove.
11428         (mbranch-expensive): Remove.
11429         * config/pdp11/predicates.md (expand_shift_operand): Update to
11430         match shift code generation.
11431         (ccnz_operator): New predicate.
11432         * doc/invoke.texi (PDP-11 Options): Remove deleted options
11433         -mbcopy, -mbcopy-builtin, -mbranch-cheap, -mbranch-expensive.
11434         Remove non-existent option -mabshi, -mno-abshi.  Document mutually
11435         exclusive options.
11436         * doc/md.texi (PDP-11): Document new D and h constraints.  Update
11437         description of O constraint.
11439 2018-06-27  Jeff Law  <law@redhat.com>
11440             Austin Law  <austinklaw@gmail.com>
11442         * config/v850/v850.md (addsi3_set_flags): New pattern.
11443         (subsi3_set_flags, negsi2_set_flags, andsi3_set_flags): Likewise.
11444         (iorsi3_set_flags, xorsi3_set_flags, one_cmplsi2_set_flags): Likewise.
11445         (zero_extendhisi2_v850_set_flags): Likewise.
11446         (zero_extendqisi2_v850_set_flags): Likewise.
11447         (ashlsi3_set_flags, ashlsi3_v850e2_set_flags): Likewise.
11448         (lshrsi3_set_flags, lshrsi3_v850e2_set_flags): Likewise.
11449         (ashrsi3_set_flags, ashrsi3_v850e2_set_flags): Likewise.
11451         * config/v850/v850-protos.h (notice_update_cc): Remove.
11452         * config/v850/v850.c (v850_compare_op0, v850_compare_op1): Remove.
11453         (v850_print_operand): Handle 'D' and "d".
11454         (v850_select_cc_mode): Remove ATTRIBUTE_UNUSED for last argument.
11455         Add handling of arithmetic/logical operations compared against zero.
11456         (v850_gen_float_compare): Remove ATTRIBUTE_UNUSED for last argument.
11457         Do not look at v850_compare_op, instead get mode from last argument.
11458         (v850_gen_compare): Remove
11459         (increment_stack): Use addsi3_clobber_flags to avoid splitting failure
11460         after reload for prologue insns.
11461         (expand_prologue): Account for CLOBBER of CC_REGNUM in various
11462         patterns.
11463         (construct_save_jarl): Likewise.
11464         (TARGET_FLAGS_REGNUM): Define.
11465         * config/v850/v850.h (v850_compare_op0, v850_compare_op1): Remove.
11466         (NOTICE_UPDATE_CC): Remove.
11467         * config/v850/v850.md (v850_tst1): Use (reg:CCZ CC_REGNUM) rather
11468         than cc0.  Conditionalize on reload_completed.
11469         (cmpsi_insn, setfcc_insn): Likewise.
11470         (tst1 splitter): Turn into define_and_split which sets the flags
11471         after reload.
11472         (cstoresi4, cbranchsf4, cbranchdf4, cbranchsi4_insn): Likewise.
11473         (cbranchsi4, branch_normal, branch_invert): Do not expose cc0 here.
11474         (cstoresf4, cstoredf4): Clobber the flags.
11475         (cmpsi, cmpsf, cmpdf): Remove expanders.
11476         (setf_insn): Remove pattern.
11477         (addsi3): Turn into define_and_split which clobbers the flags after
11478         reload and a suitable pattern (addsi3_clobber_flags) for use after
11479         reload.
11480         (subsi3, negsi2, andsi3, iorsi3, xorsi3, one_cmplsi2) Likewise.
11481         (ashlsi3, ashlsi3_v850e2, lshrsi3, lsh4si3_v850e2): Likewise.
11482         (ashrsi3, ashrsi3_v850e2): Likewise.
11483         (bins): Clobber the flags.
11484         (movsicc_normal_cc, movsicc_normal, movsicc_tst1): Likewise.
11485         (movsicc_tst1_revesed, sasf, swap and rotate patterns): Likewise.
11486         (fix_loop_counter, call_internal_short, call_internal_long): Likewise.
11487         (call_value_internal_short, call_value_internal_long): Likewise.
11488         (callt_save_interrupt, callt_return_interrupt): Likewise.
11489         (save_interrupt, return_interrupt): Likewise.
11490         (callt_save_all_interrupt, save_all_interrupt): Likewise.
11491         (_save_all_interrupt, callt_restore_all_interrupt): Likewise.
11492         (restore_all_interrupt, _restore_all_interrupt): Likewise.
11493         (All FP comparisons): Only allow after reload has completed.
11494         (trfsr): Likewise.
11495         (divh, divhu): Tweak output template.
11496         (branch_z_normal, branch_z_invert): Remove
11497         (branch_nz_normal, branch_nz_invert): Likewise.
11498         (extendhisi_insn, extendqisi_insn): Do not clobber flags.
11500         * config/v850/v850-modes.def (CCZ, CCNZ): Add new modes.
11501         * config/v850/v850.c (notice_update_cc): Remove.
11502         * config/v850/v850.h  (CC_OVERFLOW_UNUSABLE): Remove
11503         (CC_NO_CARRY): Likewise.
11504         (NOTICE_UPDATE_CC): Define to nothing.
11505         * config/v850/v850.md: Remove block comment on cc0 handling
11506         Remove "cc" attribute from all patterns.  Remove cc_status handling
11507         from all patterns.  Minor formatting fixes.
11509 2018-06-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
11511         * config/aarch64/aarch64-cores.def (cortex-a76): New entry.
11512         (cortex-a76.cortex-a55): Likewise.
11513         * config/aarch64/aarch64-tune.md: Regenerate.
11514         * doc/invoke.texi (AArch64 Options): Document cortex-a76 and
11515         cortex-a76.cortex-a55.
11517 2018-06-27  Jeff Law  <law@redhat.com>
11519         * config/v850/t-v850 (MULTILIB_OPTIONS): Remove 8byte-align.
11520         (MULTILIB_DIRNAMES): Similarly.
11522 2018-06-27  Eric Botcazou  <ebotcazou@adacore.com>
11524         * gimple.h (gimple_return_retbnd): Delete.
11525         (gimple_return_set_retbnd): Likewise.
11526         * cgraphunit.c (cgraph_node::expand_thunk): Remove call to
11527         gimple_return_set_retbnd.
11528         * gimple-pretty-print.c (dump_gimple_return): Remove call to
11529         gimple_return_retbnd and adjust.
11530         * tree-inline.h (struct copy_body_data): Remove retbnd field.
11531         * tree-inline.c (remap_gimple_stmt): Remove handling of retbnd.
11532         Explicitly return NULL in a couple more cases.  Move assertion
11533         on debug statements and remove unreachable code.
11534         (reset_debug_binding): Do not test id->retbnd.
11535         (expand_call_inline): Do not set it.
11537 2018-06-27  Rasmus Villemoes  <rv@rasmusvillemoes.dk>
11539         * configure.ac: Add --disable-gcov option.
11540         * configure: Regenerate.
11541         * Makefile.in: Honour @enable_gcov@.
11542         * doc/install.texi: Document --disable-gcov.
11544 2018-06-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
11546         * config/arm/arm-cpus.in (cortex-a76): New entry.
11547         (cortex-a76.cortex-a55): Likewise.
11548         * config/arm/arm-tables.opt: Regenerate.
11549         * config/arm/arm-tune.md: Likewise.
11550         * config/arm/driver-arm.c (arm_cpu_table): Add Cortex-A76 entry.
11551         * doc/invoke.texi (ARM Options): Document cortex-a76 and
11552         cortex-a76.cortex-a55.
11554 2018-06-27  Tamar Christina  <tamar.christina@arm.com>
11556         PR target/85769
11557         * config/aarch64/aarch64.md (*movhf_aarch64): Add dup v0.4h pattern.
11559 2018-06-27  Siddhesh Poyarekar  <siddhesh@sourceware.org>
11561         * config/aarch64/aarch64.h (CALL_USE_REGISTERS): Fix obsolete
11562         comment.
11563         (EPILOGUE_USES): Likewise.
11565 2018-06-26  Eric Botcazou  <ebotcazou@adacore.com>
11567         * tree-inline.c (remap_location): New function extracted from...
11568         (copy_edges_for_bb): Add ID parameter.  Remap goto_locus.
11569         (copy_phis_for_bb): ...here.  Call remap_location.
11570         (copy_cfg_body): Adjust call to copy_edges_for_bb.
11572 2018-06-26  Aaron Sawdey  <acsawdey@linux.ibm.com>
11574         * config/rs6000/rs6000-string.c (expand_block_clear): Don't use
11575         unaligned vsx for 16B memset.
11577 2018-06-26  Segher Boessenkool  <segher@kernel.crashing.org>
11579         PR target/86285
11580         * config/rs6000/rs6000.c (rs6000_init_builtins): Do not set
11581         ieee128_float_type_node to long_double_type_node unless
11582         TARGET_LONG_DOUBLE_128 is set.
11584 2018-06-26  David Malcolm  <dmalcolm@redhat.com>
11586         * cfgloop.c (get_loop_location): Convert return type from
11587         location_t to dump_user_location_t, replacing INSN_LOCATION lookups
11588         by implicit construction from rtx_insn *, and using
11589         dump_user_location_t::from_function_decl for the fallback case.
11590         * cfgloop.h (get_loop_location): Convert return type from
11591         location_t to dump_user_location_t.
11592         * cgraphunit.c (walk_polymorphic_call_targets): Update call to
11593         dump_printf_loc to pass in a dump_location_t rather than a
11594         location_t, via the gimple stmt.
11595         * coverage.c (get_coverage_counts): Update calls to
11596         dump_printf_loc to pass in dump_location_t rather than a
11597         location_t.
11598         * doc/optinfo.texi (Dump types): Convert example of
11599         dump_printf_loc from taking "locus" to taking "insn".  Update
11600         description of the "_loc" calls to cover dump_location_t.
11601         * dumpfile.c: Include "backend.h", "gimple.h", "rtl.h", and
11602         "selftest.h".
11603         (dump_user_location_t::dump_user_location_t): New constructors,
11604         from gimple *stmt and rtx_insn *.
11605         (dump_user_location_t::from_function_decl): New function.
11606         (dump_loc): Make static.
11607         (dump_gimple_stmt_loc): Convert param "loc" from location_t to
11608         const dump_location_t &.
11609         (dump_generic_expr_loc): Delete.
11610         (dump_printf_loc): Convert param "loc" from location_t to
11611         const dump_location_t &.
11612         (selftest::test_impl_location): New function.
11613         (selftest::dumpfile_c_tests): New function.
11614         * dumpfile.h: Include "profile-count.h".
11615         (class dump_user_location_t): New class.
11616         (struct dump_impl_location_t): New struct.
11617         (class dump_location_t): New class.
11618         (dump_printf_loc): Convert 2nd param from source_location to
11619         const dump_location_t &.
11620         (dump_generic_expr_loc): Delete.
11621         (dump_gimple_stmt_loc): Convert 2nd param from source_location to
11622         const dump_location_t &.
11623         * gimple-fold.c (fold_gimple_assign): Update call to
11624         dump_printf_loc to pass in a dump_location_t rather than a
11625         location_t, via the gimple stmt.
11626         (gimple_fold_call): Likewise.
11627         * gimple-loop-interchange.cc
11628         (loop_cand::analyze_iloop_reduction_var): Update for change to
11629         check_reduction_path.
11630         (tree_loop_interchange::interchange): Update for change to
11631         find_loop_location.
11632         * graphite-isl-ast-to-gimple.c (scop_to_isl_ast): Update for
11633         change in return-type of find_loop_location.
11634         (graphite_regenerate_ast_isl): Likewise.
11635         * graphite-optimize-isl.c (optimize_isl): Likewise.
11636         * graphite.c (graphite_transform_loops): Likewise.
11637         * ipa-devirt.c (ipa_devirt): Update call to dump_printf_loc to
11638         pass in a dump_location_t rather than a location_t, via the
11639         gimple stmt.
11640         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
11641         * ipa.c (walk_polymorphic_call_targets): Likewise.
11642         * loop-unroll.c (report_unroll): Convert "locus" param from
11643         location_t to dump_location_t.
11644         (decide_unrolling): Update for change to get_loop_location's
11645         return type.
11646         * omp-grid.c (struct grid_prop): Convert field "target_loc" from
11647         location_t to dump_user_location_t.
11648         (grid_find_single_omp_among_assignments_1): Updates calls to
11649         dump_printf_loc to pass in a dump_location_t rather than a
11650         location_t, via the gimple stmt.
11651         (grid_parallel_clauses_gridifiable): Convert "tloc" from
11652         location_t to dump_location_t.  Updates calls to dump_printf_loc
11653         to pass in a dump_location_t rather than a location_t, via the
11654         gimple stmt.
11655         (grid_inner_loop_gridifiable_p): Likewise.
11656         (grid_dist_follows_simple_pattern): Likewise.
11657         (grid_gfor_follows_tiling_pattern): Likewise.
11658         (grid_target_follows_gridifiable_pattern): Likewise.
11659         (grid_attempt_target_gridification): Convert initialization
11660         of local "grid" from memset to zero-initialization; FIXME: does
11661         this require C++11?  Update call to dump_printf_loc to pass in a
11662         optinfo_location rather than a location_t, via the gimple stmt.
11663         * profile.c (read_profile_edge_counts): Updates call to
11664         dump_printf_loc to pass in a dump_location_t rather than a
11665         location_t
11666         (compute_branch_probabilities): Likewise.
11667         * selftest-run-tests.c (selftest::run_tests): Call
11668         dumpfile_c_tests.
11669         * selftest.h (dumpfile_c_tests): New decl.
11670         * tree-loop-distribution.c (pass_loop_distribution::execute):
11671         Update for change in return type of find_loop_location.
11672         * tree-parloops.c (parallelize_loops): Likewise.
11673         * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Convert
11674         "locus" from location_t to dump_user_location_t.
11675         (canonicalize_loop_induction_variables): Likewise.
11676         * tree-ssa-loop-ivopts.c (tree_ssa_iv_optimize_loop): Update
11677         for change in return type of find_loop_location.
11678         * tree-ssa-loop-niter.c (number_of_iterations_exit): Update call
11679         to dump_printf_loc to pass in a dump_location_t rather than a
11680         location_t, via the stmt.
11681         * tree-ssa-sccvn.c (eliminate_dom_walker::before_dom_children):
11682         Likewise.
11683         * tree-vect-loop-manip.c (find_loop_location): Convert return
11684         type from source_location to dump_user_location_t.
11685         (vect_do_peeling): Update for above change.
11686         (vect_loop_versioning): Update for change in type of
11687         vect_location.
11688         * tree-vect-loop.c (check_reduction_path): Convert "loc" param
11689         from location_t to dump_user_location_t.
11690         (vect_estimate_min_profitable_iters): Update for change in type
11691         of vect_location.
11692         * tree-vect-slp.c (vect_print_slp_tree): Convert param "loc" from
11693         location_t to dump_location_t.
11694         (vect_slp_bb): Update for change in type of vect_location.
11695         * tree-vectorizer.c (vect_location): Convert from source_location
11696         to dump_user_location_t.
11697         (try_vectorize_loop_1): Update for change in vect_location's type.
11698         (vectorize_loops): Likewise.
11699         (increase_alignment): Likewise.
11700         * tree-vectorizer.h (vect_location): Convert from source_location
11701         to dump_user_location_t.
11702         (find_loop_location): Convert return type from source_location to
11703         dump_user_location_t.
11704         (check_reduction_path): Convert 1st param from location_t to
11705         dump_user_location_t.
11706         * value-prof.c (check_counter): Update call to dump_printf_loc to
11707         pass in a dump_user_location_t rather than a location_t; update
11708         call to error_at for change in type of "locus".
11709         (check_ic_target): Update call to dump_printf_loc to
11710         pass in a dump_user_location_t rather than a location_t, via the
11711         call_stmt.
11713 2018-06-26  Robin Dapp  <rdapp@linux.vnet.ibm.com>
11715         * config/s390/s390.h (enum processor_flags): Do not use
11716         default tune parameter when -march was specified.
11718 2018-06-26  Jakub Jelinek  <jakub@redhat.com>
11720         PR target/86314
11721         * config/i386/i386.md (setcc + movzbl to xor + setcc peephole2s):
11722         Check reg_overlap_mentioned_p in addition to reg_set_p with the same
11723         operands.
11725 2018-06-26  Richard Biener  <rguenther@suse.de>
11727         PR tree-optimization/86287
11728         PR bootstrap/86316
11729         * tree-vect-loop.c (vect_transform_loop_stmt): Fix read-after-free.
11730         (vect_analyze_loop): Initialize n_stmts.
11732 2018-06-26  Richard Biener  <rguenther@suse.de>
11734         PR middle-end/86271
11735         * fold-const.c (fold_convertible_p): Pointer extension
11736         isn't valid.
11738 2018-06-26  Alexandre Oliva <aoliva@redhat.com>
11740         PR debug/86064
11741         * dwarf2out.c (loc_list_has_views): Adjust comments.
11742         (dw_loc_list): Split single cross-partition range with
11743         nonzero locview.
11745 2018-06-25  Jeff Law  <law@redhat.com>
11747         * common/config/v850/v850-common.c (TARGET_DEFAULT_TARGET_FLAGS): Turn
11748         on -mbig-switch by default.
11750         * config/v850/predicates.md (const_float_1_operand): Fix match_code
11751         test.
11752         (const_float_0_operand): Remove unused predicate.
11753         * config/v850/v850.md (define_constants): Remove UNSPEC_LOOP.
11754         (define_c_enum unspec): Add LOOP, RCP and RSQRT constants.
11755         (recipsf2): New expander.  Original pattern now called
11756         (recipsf2_insn).
11757         (recipdf2, recipdf2_insn): Similarly.
11758         (rsqrtsf2, rsqrtsf2_insn): Similarly
11759         (rsqrtdf2, rsqrtdf2_insn): Similarly
11761 2018-06-26  Gerald Pfeifer  <gerald@pfeifer.com>
11763         * ginclude/stddef.h: Remove an obsolete comment on FreeBSD 5.
11764         Simplify logic for FreeBSD (twice).
11766 2018-06-25  Martin Sebor  <msebor@redhat.com>
11768         PR tree-optimization/86204
11769         * tree-ssa-strlen.c (handle_builtin_strlen): Avoid storing
11770         a strnlen result if it's less than the length of the string.
11772 2018-06-25  Martin Sebor  <msebor@redhat.com>
11774         PR tree-optimization/85700
11775         * gimple-fold.c (gimple_fold_builtin_strncat): Adjust comment.
11776         * tree-ssa-strlen.c (is_strlen_related_p): Handle integer subtraction.
11777         (maybe_diag_stxncpy_trunc): Distinguish strncat from strncpy.
11779 2018-06-25  Martin Sebor  <msebor@redhat.com>
11781         * doc/extend.texi (Zero-length arrays): Update and clarify.
11783 2018-06-25  Michael Meissner  <meissner@linux.ibm.com>
11785         * config.gcc (powerpc64le*): Revert January 16th, 2018 patch that
11786         added IEEE/IBM long double multilib support on PowerPC little
11787         endian Linux systems.
11788         * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Likewise.
11789         (MULTILIB_DEFAULTS): Likewise.
11790         * config/rs6000/rs6000.c (rs6000_option_override_internal):
11791         Likewise.
11792         * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Likewise.
11793         * config/rs6000/t-ldouble-linux64le-ibm: Delete, no longer used.
11794         * config/rs6000/t-ldouble-linux64le-ieee: Delete, no longer used.
11796 2018-06-25  Alexander Monakov  <amonakov@ispras.ru>
11798         PR middle-end/86311
11799         * sort.cc (REORDER_23): Avoid memcpy with same destination and source.
11800         (REORDER_45): Likewise.
11802 2018-06-25  Jeff Law  <law@redhat.com>
11804         * config/v850/v850.md (divmodhi4): Make sure to sign extend the
11805         dividend to 32 bits.  Adjust length.
11806         (udivmodhi4): Cleanup output template.  Fix length.
11808 2018-06-25  Carl Love  <cel@us.ibm.com>
11810         * config/rs6000/vsx.md: Change word selector to prefered location.
11812 2018-06-25  Richard Biener  <rguenther@suse.de>
11814         PR tree-optimization/86304
11815         * tree-vectorizer.c (vectorize_loops): Walk over new possibly
11816         epilogue-if-converted loops as well.
11818 2018-06-25  Jan Hubicka  <hubicka@ucw.cz>
11820         * lto-section-out.c (lto_begin_section): Do not print section
11821         name for noaddr and unnumbered dumps.
11823 2018-06-25  Richard Biener  <rguenther@suse.de>
11825         * tree-vectorizer.h (struct vec_info_shared): New structure
11826         with parts split out from struct vec_info and loop_nest from
11827         struct _loop_vec_info.
11828         (struct vec_info): Adjust accordingly.
11829         (struct _loop_vec_info): Likewise.
11830         (LOOP_VINFO_LOOP_NEST): Adjust.
11831         (LOOP_VINFO_DATAREFS): Likewise.
11832         (LOOP_VINFO_DDRS): Likewise.
11833         (struct _bb_vec_info): Likewise.
11834         (BB_VINFO_DATAREFS): Likewise.
11835         (BB_VINFO_DDRS): Likewise.
11836         (struct _stmt_vec_info): Add dr_aux member.
11837         (DR_VECT_AUX): Adjust to refer to member of DR_STMTs vinfo.
11838         (DR_MISALIGNMENT_UNINITIALIZED): New.
11839         (set_dr_misalignment): Adjust.
11840         (dr_misalignment): Assert misalign isn't DR_MISALIGNMENT_UNINITIALIZED.
11841         (vect_analyze_loop): Adjust prototype.
11842         (vect_analyze_loop_form): Likewise.
11843         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
11844         Compute dependences lazily.
11845         (vect_record_base_alignments): Use shared datarefs/ddrs.
11846         (vect_verify_datarefs_alignment): Likewise.
11847         (vect_analyze_data_refs_alignment): Likewise.
11848         (vect_analyze_data_ref_accesses): Likewise.
11849         (vect_analyze_data_refs): Likewise.
11850         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Add
11851         constructor parameter for shared part.
11852         (vect_analyze_loop_form): Pass in shared part and adjust.
11853         (vect_analyze_loop_2): Pass in storage for the number of
11854         stmts.  Move loop nest finding to the caller.  Compute
11855         datarefs lazily.
11856         (vect_analyze_loop): Pass in shared part.
11857         (vect_transform_loop): Verify shared datarefs are unchanged.
11858         * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Add
11859         constructor parameter for shared part.
11860         (vect_slp_analyze_bb_1): Pass in shared part and adjust.
11861         (vect_slp_bb): Verify shared datarefs are unchanged before
11862         transform.
11863         * tree-vect-stmts.c (ensure_base_align): Adjust for DR_AUX
11864         change.
11865         (new_stmt_vec_info): Initialize DR_AUX misalignment to
11866         DR_MISALIGNMENT_UNINITIALIZED.
11867         * tree-vectorizer.c (vec_info::vec_info): Add constructor
11868         parameter for shared part.
11869         (vec_info::~vec_info): Adjust.
11870         (vec_info_shared::vec_info_shared): New.
11871         (vec_info_shared::~vec_info_shared): Likewise.
11872         (vec_info_shared::save_datarefs): Likewise.
11873         (vec_info_shared::check_datarefs): Likewise.
11874         (try_vectorize_loop_1): Construct shared part live for analyses
11875         of a single loop for multiple vector sizes.
11876         * tree-parloops.c (gather_scalar_reductions): Adjust.
11878 2018-06-25  Richard Biener  <rguenther@suse.de>
11880         * tree-vect-data-refs.c (vect_find_stmt_data_reference): Modify
11881         DR for SIMD lane accesses here and mark DR with (void *)-1 aux.
11882         (vect_analyze_data_refs): Remove similar code from here and
11883         simplify accordingly.
11885 2018-06-25  Richard Biener  <rguenther@suse.de>
11887         * tree-vect-data-refs.c (vect_check_gather_scatter): Fail
11888         for reverse storage order accesses rather than asserting
11889         they cannot happen here.
11891 2018-06-25  Tom de Vries  <tdevries@suse.de>
11893         PR debug/86257
11894         * config/i386/i386.md (define_insn "*tls_global_dynamic_64_<mode>"):
11895         Use data16 instead of .byte for insn prefix.
11897 2018-06-25  Andreas Krebbel  <krebbel@linux.ibm.com>
11899         PR C++/86082
11900         * parser.c (make_char_string_pack): Pass this literal chars
11901         through cpp_interpret_string.
11902         (cp_parser_userdef_numeric_literal): Check the result of
11903         make_char_string_pack.
11905 2018-06-24  Maya Rashish  <coypu@sdf.org>
11907         * ginclude/stddef.h: Simplify conditions around avoiding
11908         re-definition of __size_t.
11910 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
11912         * lto-streamer-out.c (tree_is_indexable): Make LABEL_DECL nonindexable
11913         unless it is forced or nonlocal; assert that we stream no IMPORTED_DECL.
11915 2018-06-22  Maya Rashish  <coypu@sdf.org>
11917         * doc/invoke.texi (mno-fancy-math-387): Update for changes
11918         made to OpenBSD and NetBSD through the years.
11920 2018-06-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
11922         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
11923         behavior of vec_pack (vector double, vector double) to match
11924         behavior of vec_float2 (vector double, vector double).
11926 2018-06-22  Olivier Hainque  <hainque@adacore.com>
11928         * gimplify.c (gimplify_function_tree): Prevent creation
11929         of a trampoline for the address of the current function
11930         passed to entry/exit instrumentation hooks.
11932 2018-06-22  Aaron Sawdey  <acsawdey@linux.ibm.com>
11934         PR target/86222
11935         * config/rs6000/rs6000-string.c (expand_strn_compare): Handle -m32
11936         correctly.
11938 2018-06-22  Martin Liska  <mliska@suse.cz>
11940         PR tree-optimization/86263
11941         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
11942         Bail out if is_enabled is false.
11943         * tree-switch-conversion.h (jump_table_cluster::is_enabled):
11944         New declaration.
11945         (jump_table_cluster::is_enabled): New function.
11947 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
11949         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
11950         BINFO_BASE_ACCESSES and BINFO_VPTR_FIELD.
11951         * tree-streamer-in.c (streamer_read_tree_bitfields): Likewise.
11952         (lto_input_ts_binfo_tree_pointers): Likewise.
11953         * tree-streamer-out.c (streamer_write_tree_bitfields,
11954         write_ts_binfo_tree_pointers): Likewise.
11955         * tree.c (free_lang_data_in_binfo): Clear BINFO_VPTR_FIELD.
11957 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
11959         * tree.c (free_lang_data_in_type): Free all TYPE_VFIELDs.
11961 2018-06-22  Martin Liska  <mliska@suse.cz>
11963         * symbol-summary.h (get): Make it pure and inline move
11964         functionality from ::get function.
11965         (get): Remove and inline into ::get and ::get_create.
11966         (get_create): Move code from ::get function.
11968 2018-06-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
11970         PR target/85994
11971         * config/i386/sol2.h (CPP_SPEC): Don't pass -P for
11972         -x assembler-with-cpp.
11974 2018-06-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
11976         * config/sol2.h (TARGET_OS_CPP_BUILTINS): Define
11977         _FILE_OFFSET_BITS=64 for C++.
11979 2018-06-21  Michael Meissner  <meissner@linux.ibm.com>
11981         * config/rs6000/rs6000.md (extendtfif2): Add missing 128-bit
11982         conversion insn that shows up when pr85657-3.c is compiled using
11983         IEEE 128-bit long double.
11984         (neg<mode>2_internal): Use the correct mode to check whether the
11985         mode is IBM extended.
11986         * config/rs6000/rs6000.c (init_float128_ieee): Prevent complex
11987         multiply and divide external functions from being created more
11988         than once.
11990 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
11992         * cfgrtl.c (fixup_reorder_chain): Do not emit NOPs in DECL_IGNORED_P
11993         functions.
11994         (rtl_merge_blocks): Likewise.  Do not emit a NOP if the location of
11995         the edge can be forwarded.
11996         (cfg_layout_merge_blocks): Likewise.
11998 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
12000         * except.c (finish_eh_generation): Commit edge insertions only after
12001         the EH edges have been redirected from post-landing to landing pads.
12003 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
12005         * tree-nested.c (get_frame_type): Use create_tmp_var_raw instead of
12006         create_tmp_var_for to create the FRAME decl.
12007         (finalize_nesting_tree_1): Do not unchain the FRAME decl.
12009 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
12011         * tree-inline.c (copy_edges_for_bb): Minor tweak.
12012         (maybe_move_debug_stmts_to_successors): Also reset the locus of the
12013         debug statement when resetting its value.
12014         (expand_call_inline): Copy the locus of the call onto the assignment
12015         of the return value, if any.  Use local variable in more cases.
12017 2018-06-21  Martin Liska  <mliska@suse.cz>
12019         * ipa-pure-const.c (propagate_nothrow): Use
12020         funct_state_summaries->get.
12021         (dump_malloc_lattice): Likewise.
12022         (propagate_malloc): Likewise.
12024 2018-06-21  Richard Biener  <rguenther@suse.de>
12026         * lto-streamer-out.c (DFS::DFS_write_tree_body): Update outdated
12027         comment.  Follow BLOCK_ABSTRACT_ORIGIN unconditionally.
12028         * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Update
12029         comment.
12030         * tree-streamer-out.c (write_ts_block_tree_pointers): Stream
12031         BLOCK_ABSTRACT_ORIGIN unconditionally.
12033 2018-06-21  David Malcolm  <dmalcolm@redhat.com>
12035         * ipa-cp.c (ipcp_driver): Set edge_clone_summaries to NULL after
12036         deleting it.
12037         * ipa-reference.c (ipa_reference_c_finalize): Delete
12038         ipa_ref_opt_sum_summaries and set it to NULL.
12040 2018-06-21  Tom de Vries  <tdevries@suse.de>
12042         PR tree-optimization/85859
12043         * tree-ssa-tail-merge.c (stmt_local_def): Copy gimple_is_call
12044         test with comment from bb_no_side_effects_p.
12046 2018-06-21  Richard Biener  <rguenther@suse.de>
12048         PR tree-optimization/86232
12049         * tree-ssa-loop-niter.c (number_of_iterations_popcount): Adjust
12050         max for constant niter.
12052 2018-06-21  Andre Vieira  <andre.simoesdiasvieira@arm.com>
12054         * config/aarch64/aarch64-simd.md
12055         (*aarch64_crypto_aes<aes_op>v16qi_xor_combine): New.
12057 2018-06-21  Andre Vieira  <andre.simoesdiasvieira@arm.com>
12059         * config/aarch64/aarch64-simd.md (aarch64_crypto_aes<aes_op>v16qi):
12060         Make opernads of the unspec commutative.
12062 2018-06-21  Richard Biener  <rguenther@suse.de>
12064         * tree-data-ref.c (dr_step_indicator): Handle NULL DR_STEP.
12065         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
12066         Avoid calling vect_mark_for_runtime_alias_test with gathers or scatters.
12067         (vect_analyze_data_ref_dependence): Re-order checks to deal with
12068         NULL DR_STEP.
12069         (vect_record_base_alignments): Do not record base alignment
12070         for gathers or scatters.
12071         (vect_compute_data_ref_alignment): Drop return value that is always
12072         true.  Bail out early for gathers or scatters.
12073         (vect_enhance_data_refs_alignment): Bail out early for gathers
12074         or scatters.
12075         (vect_find_same_alignment_drs): Likewise.
12076         (vect_analyze_data_refs_alignment): Remove dead code.
12077         (vect_slp_analyze_and_verify_node_alignment): Likewise.
12078         (vect_analyze_data_refs): For possible gathers or scatters do
12079         not create an alternate DR, just check their possible validity
12080         and mark them.  Adjust DECL_NONALIASED handling to not rely
12081         on DR_BASE_ADDRESS.
12082         * tree-vect-loop-manip.c (vect_update_inits_of_drs): Do not
12083         update inits of gathers or scatters.
12084         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern):
12085         Also copy gather/scatter flag to pattern vinfo.
12087 2018-06-20  Kelvin Nilsen  <kelvin@gcc.gnu.org>
12089         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
12090         behavior of vec_packsu (vector unsigned long long, vector unsigned
12091         long long) to match behavior of vec_packs with same signature.
12093 2018-06-20  Chung-Lin Tang <cltang@codesourcery.com>
12094             Thomas Schwinge <thomas@codesourcery.com>
12095             Cesar Philippidis  <cesar@codesourcery.com>
12097         * gimplify.c (gimplify_scan_omp_clauses): Add support for
12098         OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
12099         (gimplify_adjust_omp_clauses): Likewise.
12100         (gimplify_oacc_declare_1): Add support for GOMP_MAP_RELEASE, remove
12101         support for GOMP_MAP_FORCE_{ALLOC,TO,FROM,TOFROM}.
12102         (gimplify_omp_target_update): Update handling of acc update and
12103         enter/exit data.
12104         * omp-low.c (install_var_field): Remove unused parameter
12105         base_pointers_restrict.
12106         (scan_sharing_clauses): Remove base_pointers_restrict parameter.
12107         Update call to install_var_field. Handle OMP_CLAUSE_{IF_PRESENT,
12108         FINALIZE}
12109         (omp_target_base_pointers_restrict_p): Delete.
12110         (scan_omp_target): Update call to scan_sharing_clauses.
12111         * tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_{IF_PRESENT,
12112         FINALIZE}.
12113         * tree-nested.c (convert_nonlocal_omp_clauses): Handle
12114         OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
12115         (convert_local_omp_clauses): Likewise.
12116         * tree-pretty-print.c (dump_omp_clause): Likewise.
12117         * tree.c (omp_clause_num_ops): Add entries for  OMP_CLAUSE_{IF_PRESENT,
12118         FINALIZE}.
12119         (omp_clause_code_name): Likewise.
12121 2018-06-20  Jakub Jelinek  <jakub@redhat.com>
12123         PR debug/86194
12124         * var-tracking.c (use_narrower_mode_test): Check if shift amount can
12125         be narrowed.
12127         PR tree-optimization/86231
12128         * tree-vrp.c (union_ranges): For (  [  )  ] or (   )[   ] range and
12129         anti-range don't overwrite *vr0min before using it to compute *vr0max.
12131 2018-06-20  Tom de Vries  <tdevries@suse.de>
12133         PR tree-optimization/86097
12134         * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Also convert *nit to
12135         iv type if signedness of iv type is not the same as that of *nit.
12137 2018-06-20  Jakub Jelinek  <jakub@redhat.com>
12139         * cfgrtl.c (rtl_verify_edges): Formatting fix.  If bb->preds has any
12140         EDGE_EH edges, verify they are all EDGE_EH.
12142 2018-06-20  Maya Rashish  <coypu@sdf.org>
12144         * ginclude/stddef.h: Limit #include <machine/ansi.h> to NetBSD.
12146 2018-06-20  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
12148         * config/aarch64/aarch64-tuning-flags.def (no_ldp_stp_qregs): New.
12149         * config/aarch64/aarch64.c (xgene1_tunings): Add
12150         AARCH64_EXTRA_TUNE_NO_LDP_STP_QREGS to tune_flags.
12151         (aarch64_mode_valid_for_sched_fusion_p):
12152         Allow 16-byte modes.
12153         (aarch64_classify_address): Allow 16-byte modes for load_store_pair_p.
12154         * config/aarch64/aarch64-ldpstp.md: Add peepholes for LDP STP of
12155         128-bit modes.
12156         * config/aarch64/aarch64-simd.md (load_pair<VQ:mode><VQ2:mode>):
12157         New pattern.
12158         (vec_store_pair<VQ:mode><VQ2:mode>): Likewise.
12159         * config/aarch64/iterators.md (VQ2): New mode iterator.
12161 2018-06-20  Martin Liska  <mliska@suse.cz>
12163         * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
12164         Change default ratio from 10 to 8.
12166 2018-06-20  Martin Liska  <mliska@suse.cz>
12168         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
12169         New.
12170         (bit_test_cluster::find_bit_tests): Likewise.
12171         (switch_decision_tree::analyze_switch_statement): Find clusters.
12172         * tree-switch-conversion.h (struct jump_table_cluster): Document
12173         hierarchy.
12175 2018-06-20  Martin Liska  <mliska@suse.cz>
12177         * tree-switch-conversion.c (switch_conversion::collect):
12178         Record m_uniq property.
12179         (switch_conversion::expand): Bail out for special conditions.
12180         (group_cluster::~group_cluster): New.
12181         (group_cluster::group_cluster): Likewise.
12182         (group_cluster::dump): Likewise.
12183         (jump_table_cluster::emit): New.
12184         (switch_decision_tree::fix_phi_operands_for_edges): New.
12185         (struct case_node): Remove struct.
12186         (jump_table_cluster::can_be_handled): New.
12187         (case_values_threshold): Moved to header.
12188         (reset_out_edges_aux): Likewise.
12189         (jump_table_cluster::is_beneficial): New.
12190         (bit_test_cluster::can_be_handled): Likewise.
12191         (add_case_node): Remove.
12192         (bit_test_cluster::is_beneficial): New.
12193         (case_bit_test::cmp): New.
12194         (bit_test_cluster::emit): New.
12195         (expand_switch_as_decision_tree_p): Remove.
12196         (bit_test_cluster::hoist_edge_and_branch_if_true): New.
12197         (fix_phi_operands_for_edge): Likewise.
12198         (switch_decision_tree::analyze_switch_statement): New.
12199         (compute_cases_per_edge): Move ...
12200         (switch_decision_tree::compute_cases_per_edge): ... here.
12201         (try_switch_expansion): Likewise.
12202         (switch_decision_tree::try_switch_expansion): Likewise.
12203         (record_phi_operand_mapping): Likewise.
12204         (switch_decision_tree::record_phi_operand_mapping): Likewise.
12205         (emit_case_decision_tree): Likewise.
12206         (switch_decision_tree::emit): Likewise.
12207         (balance_case_nodes): Likewise.
12208         (switch_decision_tree::balance_case_nodes): Likewise.
12209         (dump_case_nodes): Likewise.
12210         (switch_decision_tree::dump_case_nodes): Likewise.
12211         (emit_jump): Likewise.
12212         (switch_decision_tree::emit_jump): Likewise.
12213         (emit_cmp_and_jump_insns): Likewise.
12214         (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
12215         (emit_case_nodes): Likewise.
12216         (switch_decision_tree::emit_case_nodes): Likewise.
12217         (conditional_probability): Remove.
12218         * tree-switch-conversion.h (enum cluster_type): New.
12219         (PRINT_CASE): New.
12220         (struct cluster): Likewise.
12221         (cluster::cluster): Likewise.
12222         (struct simple_cluster): Likewise.
12223         (simple_cluster::simple_cluster): Likewise.
12224         (struct group_cluster): Likewise.
12225         (struct jump_table_cluster): Likewise.
12226         (struct bit_test_cluster): Likewise.
12227         (struct min_cluster_item): Likewise.
12228         (struct case_tree_node): Likewise.
12229         (case_tree_node::case_tree_node): Likewise.
12230         (jump_table_cluster::case_values_threshold): Likewise.
12231         (struct case_bit_test): Likewise.
12232         (struct switch_decision_tree): Likewise.
12233         (struct switch_conversion): Likewise.
12234         (switch_decision_tree::reset_out_edges_aux): Likewise.
12236 2018-06-20  Martin Liska  <mliska@suse.cz>
12238         * tree-switch-conversion.c (MAX_CASE_BIT_TESTS): Remove.
12239         (hoist_edge_and_branch_if_true): Likewise.
12240         (expand_switch_using_bit_tests_p): Likewise.
12241         (struct case_bit_test): Likewise.
12242         (case_bit_test_cmp): Likewise.
12243         (emit_case_bit_tests): Likewise.
12244         (switch_conversion::switch_conversion): New class.
12245         (struct switch_conv_info): Remove old struct.
12246         (collect_switch_conv_info): More to ...
12247         (switch_conversion::collect): ... this.
12248         (check_range): Likewise.
12249         (switch_conversion::check_range): Likewise.
12250         (check_all_empty_except_final): Likewise.
12251         (switch_conversion::check_all_empty_except_final): Likewise.
12252         (check_final_bb): Likewise.
12253         (switch_conversion::check_final_bb): Likewise.
12254         (create_temp_arrays): Likewise.
12255         (switch_conversion::create_temp_arrays): Likewise.
12256         (free_temp_arrays): Likewise.
12257         (gather_default_values): Likewise.
12258         (switch_conversion::gather_default_values): Likewise.
12259         (build_constructors): Likewise.
12260         (switch_conversion::build_constructors): Likewise.
12261         (constructor_contains_same_values_p): Likewise.
12262         (switch_conversion::contains_same_values_p): Likewise.
12263         (array_value_type): Likewise.
12264         (switch_conversion::array_value_type): Likewise.
12265         (build_one_array): Likewise.
12266         (switch_conversion::build_one_array): Likewise.
12267         (build_arrays): Likewise.
12268         (switch_conversion::build_arrays): Likewise.
12269         (gen_def_assigns): Likewise.
12270         (switch_conversion::gen_def_assigns): Likewise.
12271         (prune_bbs): Likewise.
12272         (switch_conversion::prune_bbs): Likewise.
12273         (fix_phi_nodes): Likewise.
12274         (switch_conversion::fix_phi_nodes): Likewise.
12275         (gen_inbound_check): Likewise.
12276         (switch_conversion::gen_inbound_check): Likewise.
12277         (process_switch): Use the newly created class.
12278         (switch_conversion::expand): New.
12279         (switch_conversion::~switch_conversion): New.
12280         * tree-switch-conversion.h: New file.
12282 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
12284         * tree-vectorizer.h (NUM_PATTERNS, vect_recog_func_ptr): Move to
12285         tree-vect-patterns.c.
12286         * tree-vect-patterns.c (vect_supportable_direct_optab_p): New function.
12287         (vect_recog_dot_prod_pattern): Use it.  Remove the type_in argument.
12288         (vect_recog_sad_pattern): Likewise.
12289         (vect_recog_widen_sum_pattern): Likewise.
12290         (vect_recog_pow_pattern): Likewise.  Check for a null vectype.
12291         (vect_recog_widen_shift_pattern): Remove the type_in argument.
12292         (vect_recog_rotate_pattern): Likewise.
12293         (vect_recog_mult_pattern): Likewise.
12294         (vect_recog_vector_vector_shift_pattern): Likewise.
12295         (vect_recog_divmod_pattern): Likewise.
12296         (vect_recog_mixed_size_cond_pattern): Likewise.
12297         (vect_recog_bool_pattern): Likewise.
12298         (vect_recog_mask_conversion_pattern): Likewise.
12299         (vect_try_gather_scatter_pattern): Likewise.
12300         (vect_recog_widen_mult_pattern): Likewise.  Check for a null vectype.
12301         (vect_recog_over_widening_pattern): Likewise.
12302         (vect_recog_gather_scatter_pattern): Likewise.
12303         (vect_recog_func_ptr): Move from tree-vectorizer.h
12304         (vect_vect_recog_func_ptrs): Move further down the file.
12305         (vect_recog_func): Likewise.  Remove the third argument.
12306         (NUM_PATTERNS): Define based on vect_vect_recog_func_ptrs.
12307         (vect_pattern_recog_1): Expect the pattern function to do any
12308         necessary target tests.  Also expect it to provide a vector type.
12309         Remove the type_in handling.
12311 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
12313         * tree-vect-patterns.c (vect_pattern_detected): New function.
12314         (vect_recog_dot_prod_patternm, vect_recog_sad_pattern)
12315         (vect_recog_widen_mult_pattern, vect_recog_widen_sum_pattern)
12316         (vect_recog_over_widening_pattern, vect_recog_widen_shift_pattern
12317         (vect_recog_rotate_pattern, vect_recog_vector_vector_shift_pattern)
12318         (vect_recog_mult_pattern, vect_recog_divmod_pattern)
12319         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
12320         (vect_recog_mask_conversion_pattern)
12321         (vect_try_gather_scatter_pattern): Likewise.
12323 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
12325         * tree-vect-patterns.c (vect_get_internal_def): New function.
12326         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
12327         (vect_recog_vector_vector_shift_pattern, check_bool_pattern)
12328         (search_type_for_mask_1): Use it.
12330 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
12332         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
12333         redundant WIDEN_SUM_EXPR handling.
12334         (vect_recog_sad_pattern): Likewise.
12336 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
12338         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
12339         redundant check that the types of a PLUS_EXPR or MULT_EXPR agree.
12340         (vect_recog_sad_pattern): Likewise PLUS_EXPR, ABS_EXPR and MINUS_EXPR.
12341         (vect_recog_widen_mult_pattern): Likewise MULT_EXPR.
12342         (vect_recog_widen_sum_pattern): Likewise PLUS_EXPR.
12344 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
12346         * tree-vect-stmts.c (vectorizable_call): Make sure that we
12347         use the stmt_vec_info of the original bb statement for the
12348         new zero assignment, even if the call is part of a pattern.
12350 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
12352         * tree-vectorizer.h (_stmt_vec_info): Note above pattern_def_seq
12353         that the sequence is attached to the original statement rather
12354         than the pattern statement.
12355         * tree-vect-loop.c (vect_determine_vf_for_stmt): Take the
12356         PATTERN_DEF_SEQ from the original statement rather than
12357         the main pattern statement.
12358         * tree-vect-stmts.c (free_stmt_vec_info): Likewise.
12359         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Likewise.
12360         (vect_mark_pattern_stmts): Don't copy the PATTERN_DEF_SEQ.
12362 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
12364         * tree-vect-stmts.c (vect_analyze_stmt): Move the handling of pattern
12365         definition statements before the early exit for statements that aren't
12366         live or relevant.
12367         * tree-vect-loop.c (vect_transform_loop_stmt): New function,
12368         split out from...
12369         (vect_transform_loop): ...here.  Process pattern definition
12370         statements without first checking whether the main pattern
12371         statement is live or relevant.
12373 2018-06-19  Eric Botcazou  <ebotcazou@adacore.com>
12375         * tree-cfgcleanup.c (tree_forwarder_block_p): Do not return false at
12376         -O0 if the locus represent UNKNOWN_LOCATION but have different values.
12378 2018-06-19  Aaron Sawdey  <acsawdey@linux.ibm.com>
12380         * config/rs6000/rs6000-string.c (select_block_compare_mode): Check
12381         TARGET_EFFICIENT_OVERLAPPING_UNALIGNED here instead of in caller.
12382         (do_and3, do_and3_mask, do_compb3, do_rotl3): New functions.
12383         (expand_block_compare): Change select_block_compare_mode call.
12384         (expand_strncmp_align_check): Use new functions, fix comment.
12385         (emit_final_str_compare_gpr): New function.
12386         (expand_strn_compare): Refactor and clean up code.
12387         * config/rs6000/vsx.md (vsx_mov<mode>_64bit): Remove *.
12389 2018-06-19  Tony Reix  <tony.reix@atos.com>
12390             Damien Bergamini  <damien.bergamini@atos.com>
12391             David Edelsohn  <dje.gcc@gmail.com>
12393         * collect2.c (static_obj): New variable.
12394         (static_libs): New variable.
12395         (is_in_list): Uncomment declaration.
12396         (main): Track AIX libraries linked statically.
12397         (is_in_list): Uncomment definition.
12398         (scan_prog_file): Don't add AIX shared libraries initializer
12399         to constructor list if linking statically.
12401 2018-06-19  Max Filippov  <jcmvbkbc@gmail.com>
12403         * config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec
12404         constant.
12405         (allocate_stack, frame_blockage, *frame_blockage): New patterns.
12407 2018-06-19  Jan Hubicka  <hubicka@ucw.cz>
12409         * tree.c (find_decls_types_r): Remove all non-VAR_DECLs from
12410         blocks.
12412 2018-06-19  Martin Liska  <mliska@suse.cz>
12414         * config/i386/i386.c (ix86_can_inline_p): Do not use
12415         ipa_fn_summaries::get_create.
12416         * ipa-cp.c (ipcp_cloning_candidate_p): Replace get_create with
12417         get.
12418         (devirtualization_time_bonus): Likewise.
12419         (ipcp_propagate_stage): Likewise.
12420         * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
12421         (edge_set_predicate): Likewise.
12422         (evaluate_conditions_for_known_args): Likewise.
12423         (evaluate_properties_for_edge): Likewise.
12424         (ipa_call_summary::reset): Tranform to ...
12425         (ipa_call_summary::~ipa_call_summary): ... this.
12426         (ipa_fn_summary::reset): Transform to ...
12427         (ipa_fn_summary::~ipa_fn_summary): ... this.
12428         (ipa_fn_summary_t::remove): Rename to ...
12429         (ipa_fn_summary_t::remove_callees): ... this.
12430         (ipa_fn_summary_t::duplicate): Use placement new
12431         instead of memory copy.
12432         (ipa_call_summary_t::duplicate): Likewise.
12433         (ipa_call_summary_t::remove): Remove.
12434         (dump_ipa_call_summary): Change get_create to get.
12435         (ipa_dump_fn_summary): Dump only when summary exists.
12436         (analyze_function_body): Use symbol_summary::get instead
12437         of get_create.
12438         (compute_fn_summary): Likewise.
12439         (estimate_edge_devirt_benefit): Likewise.
12440         (estimate_edge_size_and_time): Likewise.
12441         (inline_update_callee_summaries): Likewise.
12442         (remap_edge_change_prob): Likewise.
12443         (remap_edge_summaries): Likewise.
12444         (ipa_merge_fn_summary_after_inlining): Likewise.
12445         (write_ipa_call_summary): Likewise.
12446         (ipa_fn_summary_write): Likewise.
12447         (ipa_free_fn_summary): Likewise.
12448         * ipa-fnsummary.h (struct GTY): Add new ctor and copy ctor.
12449         (struct ipa_call_summary): Likewise.
12450         * ipa-icf.c (sem_function::merge): Use symbol_summary::get instead
12451         of get_create.
12452         * ipa-inline-analysis.c (do_estimate_edge_time): Likewise.
12453         (estimate_size_after_inlining): Likewise.
12454         (estimate_growth): Likewise.
12455         (growth_likely_positive): Likewise.
12456         * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
12457         (inline_call): Likewise.
12458         * ipa-inline.c (caller_growth_limits): Likewise.
12459         (can_inline_edge_p): Likewise.
12460         (can_inline_edge_by_limits_p): Likewise.
12461         (compute_uninlined_call_time): Likewise.
12462         (compute_inlined_call_time): Likewise.
12463         (want_inline_small_function_p): Likewise.
12464         (edge_badness): Likewise.
12465         (update_caller_keys): Likewise.
12466         (update_callee_keys): Likewise.
12467         (inline_small_functions): Likewise.
12468         (inline_to_all_callers_1): Likewise.
12469         (dump_overall_stats): Likewise.
12470         (early_inline_small_functions): Likewise.
12471         (early_inliner): Likewise.
12472         * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
12473         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
12474         * ipa-pure-const.c (malloc_candidate_p): Likewise.
12475         * ipa-split.c (execute_split_functions): Likewise.
12476         * symbol-summary.h: Likewise.
12477         * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
12479 2018-06-19  Richard Biener  <rguenther@suse.de>
12481         * tree-vectorizer.c (try_vectorize_loop_1): Split out of ...
12482         (vectorize_loops): ... here.  Fix dbgcnt handling.
12483         (try_vectorize_loop): Wrap try_vectorize_loop_1.
12485 2018-06-19  Segher Boessenkool  <segher@kernel.crashing.org>
12487         PR target/86197
12488         * config/rs6000/rs6000.md (rs6000_discover_homogeneous_aggregate): An
12489         ieee128 argument takes up only one (vector) register, not two (floating
12490         point) registers.
12492 2018-06-19  Eric Botcazou  <ebotcazou@adacore.com>
12494         * gimplify.c (gimplify_init_constructor): Really never clear for an
12495         incomplete constructor if CONSTRUCTOR_NO_CLEARING is set.
12497 2018-06-19  Richard Biener  <rguenther@suse.de>
12499         PR tree-optimization/86179
12500         * tree-vect-patterns.c (vect_pattern_recog_1): Clean up
12501         after failed recognition.
12503 2018-06-18  Martin Sebor  <msebor@redhat.com>
12505         PR middle-end/85602
12506         * calls.c (maybe_warn_nonstring_arg): Handle strncat.
12507         * tree-ssa-strlen.c (is_strlen_related_p): Make extern.
12508         Handle integer subtraction.
12509         (maybe_diag_stxncpy_trunc): Handle nonstring source arguments.
12510         * tree-ssa-strlen.h (is_strlen_related_p): Declare.
12512 2018-06-18  David Malcolm  <dmalcolm@redhat.com>
12514         * config/frv/frv-protos.h (frv_ifcvt_modify_insn): Strengthen 3rd
12515         param from rtx to rtx_insn *.
12516         * config/frv/frv.c (frv_ifcvt_add_insn): Likewise for "insn"
12517         param.
12518         (frv_ifcvt_modify_insn): Likwise.
12519         (frv_ifcvt_modify_final): Likwise for local "existing_insn",
12520         adding an as_a <rtx_insn *> cast.  Likewise for local "insn".
12521         * config/mips/mips.c (r10k_insert_cache_barriers): Add an
12522         as_a <rtx_insn *> cast to local "unprotected_region" once
12523         it's been established that it's not NULL or pc_rtx.
12524         * config/nds32/nds32-relax-opt.c (nds32_group_insns): Strengthen
12525         param "sethi" from rtx to rtx_insn *.
12526         (nds32_group_float_insns): Likewise for param "insn".
12527         * config/vax/vax-protos.h (vax_output_int_add): Likewise for 1st
12528         param.
12529         (vax_output_int_subtract): Likewise.
12530         * config/vax/vax.c (vax_output_int_add): Likewise for param
12531         "insn".
12532         (vax_output_int_subtract): Likewise.
12533         * emit-rtl.c (set_insn_deleted): Likewise, removing cast.
12534         (emit_pattern_after): Likewise for param "after".
12535         (emit_insn_after): Likewise.
12536         (emit_jump_insn_after): Likewise.
12537         (emit_call_insn_after): Likewise.
12538         (emit_debug_insn_after): Likewise.
12539         (emit_pattern_before): Likewise for param "before".
12540         (emit_insn_before): Likewise.
12541         (emit_jump_insn_before): Likewise.
12542         * final.c (get_insn_template): Likewise for param "insn", removing
12543         a cast.
12544         * output.h (get_insn_template): Likewise for 2nd param.
12545         * rtl.h (emit_insn_before): Likewise.
12546         (emit_jump_insn_before): Likewise.
12547         (emit_debug_insn_before_noloc): Likewise.
12548         (emit_insn_after): Likewise.
12549         (emit_jump_insn_after): Likewise.
12550         (emit_call_insn_after): Likewise.
12551         (emit_debug_insn_after): Likewise.
12552         (set_insn_deleted): Likewise for param.
12554 2018-06-18  Michael Meissner  <meissner@linux.ibm.com>
12556         PR target/85358
12557         * config/rs6000/rs6000-modes.def (toplevel): Rework the 128-bit
12558         floating point modes, so that IFmode is numerically greater than
12559         TFmode, which is greater than KFmode using FRACTIONAL_FLOAT_MODE
12560         to declare the ordering.  This prevents IFmode from being
12561         converted to TFmode when long double is IEEE 128-bit on an ISA 3.0
12562         machine.  Include rs6000-modes.h to share the fractional values
12563         between genmodes* and the rest of the compiler.
12564         (IFmode): Likewise.
12565         (KFmode): Likewise.
12566         (TFmode): Likewise.
12567         * config/rs6000/rs6000-modes.h: New file.
12568         * config/rs6000/rs6000.c (rs6000_debug_reg_global): Change the
12569         meaning of rs6000_long_double_size so that 126..128 selects an
12570         appropriate 128-bit floating point type.
12571         (rs6000_option_override_internal): Likewise.
12572         * config/rs6000/rs6000.h (toplevel): Include rs6000-modes.h.
12573         (TARGET_LONG_DOUBLE_128): Change the meaning of
12574         rs6000_long_double_size so that 126..128 selects an appropriate
12575         128-bit floating point type.
12576         (LONG_DOUBLE_TYPE_SIZE): Update comment.
12577         * config/rs6000/rs6000.md (trunciftf2): Correct the modes of the
12578         source and destination to match the standard usage.
12579         (truncifkf2): Likewise.
12580         (copysign<mode>3, IEEE iterator): Rework copysign of float128 on
12581         ISA 2.07 to use an explicit clobber, instead of passing in a
12582         temporary.
12583         (copysign<mode>3_soft): Likewise.
12585 2018-06-18  David Malcolm  <dmalcolm@redhat.com>
12587         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
12588         Replace dump_printf_loc call with DUMP_VECT_SCOPE.
12589         (vect_slp_analyze_instance_dependence): Likewise.
12590         (vect_enhance_data_refs_alignment): Likewise.
12591         (vect_analyze_data_refs_alignment): Likewise.
12592         (vect_slp_analyze_and_verify_instance_alignment
12593         (vect_analyze_data_ref_accesses): Likewise.
12594         (vect_prune_runtime_alias_test_list): Likewise.
12595         (vect_analyze_data_refs): Likewise.
12596         * tree-vect-loop-manip.c (vect_update_inits_of_drs): Likewise.
12597         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
12598         (vect_analyze_scalar_cycles_1): Likewise.
12599         (vect_get_loop_niters): Likewise.
12600         (vect_analyze_loop_form_1): Likewise.
12601         (vect_update_vf_for_slp): Likewise.
12602         (vect_analyze_loop_operations): Likewise.
12603         (vect_analyze_loop): Likewise.
12604         (vectorizable_induction): Likewise.
12605         (vect_transform_loop): Likewise.
12606         * tree-vect-patterns.c (vect_pattern_recog): Likewise.
12607         * tree-vect-slp.c (vect_analyze_slp): Likewise.
12608         (vect_make_slp_decision): Likewise.
12609         (vect_detect_hybrid_slp): Likewise.
12610         (vect_slp_analyze_operations): Likewise.
12611         (vect_slp_bb): Likewise.
12612         * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Likewise.
12613         (vectorizable_bswap): Likewise.
12614         (vectorizable_call): Likewise.
12615         (vectorizable_simd_clone_call): Likewise.
12616         (vectorizable_conversion): Likewise.
12617         (vectorizable_assignment): Likewise.
12618         (vectorizable_shift): Likewise.
12619         (vectorizable_operation): Likewise.
12620         * tree-vectorizer.h (DUMP_VECT_SCOPE): New macro.
12622 2018-06-18  Martin Sebor  <msebor@redhat.com>
12624         PR tree-optimization/81384
12625         * builtin-types.def (BT_FN_SIZE_CONST_STRING_SIZE): New.
12626         * builtins.c (expand_builtin_strnlen): New function.
12627         (expand_builtin): Call it.
12628         (fold_builtin_n): Avoid setting TREE_NO_WARNING.
12629         * builtins.def (BUILT_IN_STRNLEN): New.
12630         * calls.c (maybe_warn_nonstring_arg): Handle BUILT_IN_STRNLEN.
12631         Warn for bounds in excess of maximum object size.
12632         * tree-ssa-strlen.c (maybe_set_strlen_range): Return tree representing
12633         single-value ranges.  Handle strnlen.
12634         (handle_builtin_strlen): Handle strnlen.
12635         (strlen_check_and_optimize_stmt): Same.
12636         * doc/extend.texi (Other Builtins): Document strnlen.
12638 2018-06-18  Maya Rashish  <coypu@sdf.org>
12640         * config/alpha/openbsd.h (TARGET_DEFAULT): Define.
12641         (LINK_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Likewise.
12642         (INTMAX_TYPE, UINTMAX_TYPE, WINT_TYPE): Likewise.
12644         * config/alpha/elf.h (STARTFILE_SPEC, ENDFILE_SPEC): Move from
12645         here to ...
12646         * config/alpha/linux.h (STARTFILE_SPEC, ENDFILE_SPEC): Here.
12648 2018-06-18  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
12650         * tree.c (escaped_string::escape): Replace cast to char * by
12651         const_cast<char *> (unescaped).
12653 2018-06-18  Nick Clifton  <nickc@redhat.com>
12655         PR 84195
12656         * tree.c (escaped_string): New class.  Converts an unescaped
12657         string into its escaped equivalent.
12658         (warn_deprecated_use): Use the new class to convert the
12659         deprecation message, if present.
12660         (test_escaped_strings): New self test.
12661         (test_c_tests): Add test_escaped_strings.
12662         * doc/extend.texi (deprecated): Add a note that the
12663         deprecation message is affected by the -fmessage-length
12664         option, and that control characters will be escaped.
12665         (#pragma GCC error): Document this pragma.
12666         (#pragma GCC warning): Likewise.
12667         * doc/invoke.texi (-fmessage-length): Document this option's
12668         effect on the #warning and #error preprocessor directives and
12669         the deprecated attribute.
12671 2018-06-18  Eric Botcazou  <ebotcazou@adacore.com>
12673         * tree.c (decl_value_expr_lookup): Revert latest change.
12674         (decl_value_expr_insert): Likewise.
12676 2018-06-17  Eric Botcazou  <ebotcazou@adacore.com>
12678         * gimplify.c (nonlocal_vlas): Delete.
12679         (nonlocal_vla_vars): Likewise.
12680         (gimplify_var_or_parm_decl): Do not add debug VAR_DECLs for non-local
12681         referenced VLAs.
12682         (gimplify_body): Do not create and destroy nonlocal_vlas.
12683         * tree-nested.c: Include diagnostic.h.
12684         (use_pointer_in_frame): Tweak.
12685         (lookup_field_for_decl): Add assertion and declare the transformation.
12686         (convert_nonlocal_reference_op) <PARM_DECL>: Rework and issue an
12687         internal error when the reference is in a wrong context.  Do not
12688         create a debug decl by default.
12689         (note_nonlocal_block_vlas): Delete.
12690         (convert_nonlocal_reference_stmt) <GIMPLE_BIND>: Do not call it.
12691         (convert_local_reference_op) <PARM_DECL>: Skip the frame decl.  Do not
12692         create a debug decl by default.
12693         (convert_gimple_call) <GIMPLE_CALL>: Issue an internal error when the
12694         call is in a wrong context.
12695         (fixup_vla_decls): New function.
12696         (finalize_nesting_tree_1): Adjust comment.  Call fixup_vla_decls if no
12697         debug variables were created.
12698         * tree.c (decl_value_expr_lookup): Add checking assertion.
12699         (decl_value_expr_insert): Likewise.
12701 2018-06-16  Kugan Vivekanandarajah  <kuganv@linaro.org>
12703         PR middle-end/82479
12704         * ipa-fnsummary.c (will_be_nonconstant_expr_predicate): Handle CALL_EXPR.
12705         * tree-scalar-evolution.c (interpret_expr): Likewise.
12706         (expression_expensive_p): Likewise.
12707         * tree-ssa-loop-ivopts.c (contains_abnormal_ssa_name_p): Likewise.
12708         * tree-ssa-loop-niter.c (number_of_iterations_popcount): New.
12709         (number_of_iterations_exit_assumptions): Use number_of_iterations_popcount.
12710         (ssa_defined_by_minus_one_stmt_p): New.
12712 2018-06-16  Kugan Vivekanandarajah  <kuganv@linaro.org>
12714         PR middle-end/64946
12715         * cfgexpand.c (expand_debug_expr): Hande ABSU_EXPR.
12716         * config/i386/i386.c (ix86_add_stmt_cost): Likewise.
12717         * dojump.c (do_jump): Likewise.
12718         * expr.c (expand_expr_real_2): Check operand type's sign.
12719         * fold-const.c (const_unop): Handle ABSU_EXPR.
12720         (fold_abs_const): Likewise.
12721         * gimple-pretty-print.c (dump_unary_rhs): Likewise.
12722         * gimple-ssa-backprop.c (backprop::process_assign_use): Likesie.
12723         (strip_sign_op_1): Likesise.
12724         * match.pd: Add new pattern to generate ABSU_EXPR.
12725         * optabs-tree.c (optab_for_tree_code): Handle ABSU_EXPR.
12726         * tree-cfg.c (verify_gimple_assign_unary): Likewise.
12727         * tree-eh.c (operation_could_trap_helper_p): Likewise.
12728         * tree-inline.c (estimate_operator_cost): Likewise.
12729         * tree-pretty-print.c (dump_generic_node): Likewise.
12730         * tree-vect-patterns.c (vect_recog_sad_pattern): Likewise.
12731         * tree.def (ABSU_EXPR): New.
12733 2018-06-16  Jakub Jelinek  <jakub@redhat.com>
12735         PR middle-end/86095
12736         * common.opt (Wunsafe-loop-optimizations): Add Ignore, remove Var,
12737         documented as preserved for backward compatibility only.
12738         * doc/invoke.texi: Remove -Wunsafe-loop-optimizations documentation.
12740         PR rtl-optimization/86108
12741         * bb-reorder.c (create_forwarder_block): Renamed to ...
12742         (create_eh_forwarder_block): ... this.  Split OLD_BB after labels and
12743         jump from new landing pad to the second part.
12744         (sjlj_fix_up_crossing_landing_pad, dw2_fix_up_crossing_landing_pad):
12745         Adjust callers.
12747 2018-06-15  Jakub Jelinek  <jakub@redhat.com>
12749         PR middle-end/85878
12750         * expr.c (expand_assignment): Remove now redundant COMPLEX_MODE_P
12751         check from first store_expr, use to_mode instead of GET_MODE (to_rtx).
12752         Only call store_expr for halves if the mode is the same.
12754         PR middle-end/86123
12755         * match.pd ((X / Y) == 0 -> X < Y): Don't transform complex divisions.
12756         Fix up comment formatting.
12758 2018-06-15  Bernd Edlinger  <bernd.edlinger@hotmail.de>
12760         * typed-splay-tree.h (typed_splay_tree::remove): New function.
12761         (typed_splay_tree::closure,
12762         typed_splay_tree::inner_foreach_fn, typed_splay_tree::m_inner): Deleted.
12763         (typed_splay_tree::typed_splay_tree,
12764         typed_splay_tree::operator =): Declared private.
12765         (typed_splay_tree::splay_tree_key, typed_splay_tree::splay_tree_value,
12766         typed_splay_tree::splay_tree_node_s, typed_splay_tree::KDEL,
12767         typed_splay_tree::VDEL, typed_splay_tree::splay_tree_delete_helper,
12768         typed_splay_tree::rotate_left, typed_splay_tree::rotate_right,
12769         typed_splay_tree::splay_tree_splay,
12770         typed_splay_tree::splay_tree_foreach_helper,
12771         typed_splay_tree::splay_tree_insert,
12772         typed_splay_tree::splay_tree_remove,
12773         typed_splay_tree::splay_tree_lookup,
12774         typed_splay_tree::splay_tree_predecessor,
12775         typed_splay_tree::splay_tree_successor,
12776         typed_splay_tree::splay_tree_min,
12777         typed_splay_tree::splay_tree_max): Took over from splay-tree.c/.h.
12778         (typed_splay_tree::root, typed_splay_tree::comp,
12779         typed_splay_tree::delete_key,
12780         typed_splay_tree::delete_value): New data members.
12781         * typed-splay-tree.c (selftest::test_str_to_int): Add a test for
12782         typed_splay_tree::remove.
12784 2018-06-15  Matthew Fortune  <matthew.fortune@mips.com>
12786         * config/mips/mips.h (ASM_SPEC): Pass through -mcrc, -mno-crc,
12787         -mginv and -mno-ginv to the assembler.
12788         * config/mips/mips.opt (-mcrc): New option.
12789         (-mginv): Likewise.
12790         * doc/invoke.text (-mcrc): Document.
12791         (-mginv): Likewise.
12793 2018-06-15  Nick Clifton  <nickc@redhat.com>
12795         PR 84195
12796         * tree.c (escaped_string): New class.  Converts an unescaped
12797         string into its escaped equivalent.
12798         (warn_deprecated_use): Use the new class to convert the
12799         deprecation message, if present.
12800         (test_escaped_strings): New self test.
12801         (test_c_tests): Add test_escaped_strings.
12802         * doc/extend.texi (deprecated): Add a note that the
12803         deprecation message is affected by the -fmessage-length
12804         option, and that control characters will be escaped.
12805         (#pragma GCC error): Document this pragma.
12806         (#pragma GCC warning): Likewise.
12807         * doc/invoke.texi (-fmessage-length): Document this option's
12808         effect on the #warning and #error preprocessor directives and
12809         the deprecated attribute.
12811 2018-06-15  Richard Biener  <rguenther@suse.de>
12813         * tree-vect-slp.c (vect_slp_bb): Dump MSG_OPTIMIZED_LOCATIONS
12814         here, also noting vector size used.
12815         * tree-vectorizer.c (vectorize_loops): Adjust.  Note vector
12816         size used in MSG_OPTIMIZED_LOCATIONS dump.
12817         (pass_slp_vectorize::execute): Adjust.
12819 2018-06-15  Claudiu Zissulescu  <claziss@synopsys.com>
12821         PR target/85968
12822         * config/arc/arc.c (arc_return_address_register): Fix
12823         if-condition.
12825 2018-06-15  Richard Biener  <rguenther@suse.de>
12827         PR middle-end/86159
12828         * tree-cfg.c (gimplify_build3): Do not strip sign conversions,
12829         leave useless conversion stripping to force_gimple_operand_gsi.
12830         (gimplify_build2): Likewise.
12831         (gimplify_build1): Likewise.
12833 2018-06-15  Richard Biener  <rguenther@suse.de>
12835         PR middle-end/86076
12836         * tree-cfg.c (move_stmt_op): unshare invariant addresses
12837         before adjusting their block.
12839 2018-06-15  Sebastian Huber  <sebastian.huber@embedded-brains.de>
12841         * config.gcc (riscv*-*-elf* | riscv*-*-rtems*): Use custom
12842         multilibs for *-*-rtems*.
12843         * config/riscv/t-rtems: New file.
12845 2018-06-14  Jakub Jelinek  <jakub@redhat.com>
12847         PR middle-end/86122
12848         * match.pd ((A +- CST1) +- CST2): Punt if last resort
12849         unsigned_type_for returns NULL.
12851         PR target/85945
12852         * lower-subreg.c (find_decomposable_subregs): Don't decompose float
12853         subregs of multi-word pseudos unless the float mode has word size.
12855 2018-06-14  Richard Biener  <rguenther@suse.de>
12857         PR middle-end/86139
12858         * tree-vect-generic.c (build_word_mode_vector_type): Remove
12859         duplicate and harmful type_hash_canon.
12860         * tree.c (type_hash_canon): Assert we didn't find ourselves.
12862 2018-06-14  Richard Biener  <rguenther@suse.de>
12864         PR ipa/86124
12865         * tree-ssa-struct-alias.c (create_variable_info_for): Handle
12866         NULL cgraph_node.
12868 2018-06-14  Sebastian Huber  <sebastian.huber@embedded-brains.de>
12870         * config/rtems.h (STDINT_LONG32): Define.
12872 2018-06-13  Matthew Fortune  <matthew.fortune@mips.com>
12873             Prachi Godbole  <prachi.godbole@imgtec.com>
12875         * config/mips/mips-cpus.def: Define P6600.
12876         * config/mips/mips-tables.opt: Regenerate.
12877         * config/mips/mips.c (mips_ucbranch_type): New enum.
12878         (mips_rtx_cost_data): Add support for P6600.
12879         (mips_issue_rate): Likewise.
12880         (mips_multipass_dfa_lookahead): Likewise.
12881         (mips_avoid_hazard): Likewise.
12882         (mips_reorg_process_insns): Likewise.
12883         (mips_classify_branch_p6600): New function.
12884         * config/mips/mips.h (TUNE_P6600): New define.
12885         (MIPS_ISA_LEVEL_SPEC): Infer mips64r6 from p6600.
12886         (ENABLE_LD_ST_PAIRS): Enable load/store bonding for p6600.
12887         * config/mips/mips.md: Include p6600.md.
12888         (processor): Add p6600.
12889         * config/mips/p6600.md: New file.
12890         * doc/invoke.texi: Add p6600 to supported architectures.
12892 2018-06-13  Martin Sebor  <msebor@redhat.com>
12894         PR tree-optimization/86114
12895         * gimple-fold.c (gimple_fold_builtin_strlen): Only handle LHS
12896         of integer types.
12897         * tree-ssa-strlen.c (maybe_set_strlen_range): Same.
12899 2018-06-13  Richard Biener  <rguenther@suse.de>
12901         * tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern):
12902         Properly set vector type of the intermediate stmt.
12903         * tree-vect-stmts.c (vectorizable_operation): The destination
12904         var always has vectype_out type.
12906 2018-06-13  Jeff Law  <law@redhat.com>
12908         * config/rl78/rl78.c (move_elim_pass): Use TDF_NONE rather than
12909         integer 0 for argument to print_rtl_with_bb.
12910         (rl78_reorg): Likewise.
12912 2018-06-13  David Malcolm  <dmalcolm@redhat.com>
12914         * config/arc/arc.c (hwloop_optimize): Strengthen local "end_label"
12915         from rtx to rtx_insn *.
12916         * config/bfin/bfin.c (hwloop_optimize): Likewise for local
12917         "label".
12918         (add_sched_insns_for_speculation): Likewise for local "target",
12919         converting usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
12920         * config/c6x/c6x.c (reorg_split_calls): Strengthen param "call_labels"
12921         from rtx_insn ** to rtx_code_label **.
12922         (reorg_emit_nops): Likewise.
12923         (c6x_reorg): Likewise for local "call_labels".
12924         * config/sh/sh-protos.h (get_dest_uid): Strengthen 1st param from
12925         rtx to rtx_insn *.
12926         * config/sh/sh.c (dump_table): Strengthen local "lab" from rtx to
12927         rtx_code_label *, adding safe_as_a <rtx_code_label *> casts to
12928         the loops over LABEL_REFS.
12929         (fixup_addr_diff_vecs): Add as_a <rtx_insn *> to usage of
12930         braf_label.
12931         (barrier_align): Convert usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
12932         (get_dest_uid): Strengthen param "label" from rtx to rtx_insn *.
12933         (split_branches): Strengthen local "olabel" from rtx to
12934         rtx_insn *, adding a safe_as_a cast.
12935         * emit-rtl.c (next_real_insn): Strengthen param from "rtx"
12936         to "rtx_insn *".
12937         (add_insn_after): Likewise for first two params.
12938         (add_insn_before): Likewise.
12939         (remove_insn): Likewise for param.
12940         (emit_pattern_before_noloc): Likewise for second and third params.
12941         (emit_jump_insn_before_noloc): Convert NULL_RTX to NULL.
12942         (emit_call_insn_before_noloc): Likewise.
12943         (emit_debug_insn_before_noloc): Strengthen "before" param from "rtx"
12944         to "rtx_insn *".
12945         (emit_barrier_before): Likewise.
12946         (emit_label_before): Strengthen "label" param from "rtx" to
12947         "rtx_code_label *".  Strengthen "before" param from "rtx" to
12948         "rtx_insn *".
12949         (emit_insn_after_1): Strengthen "after" param from "rtx" to
12950         "rtx_insn *".
12951         (emit_pattern_after_noloc): Likewise.
12952         (emit_insn_after_noloc): Likewise.
12953         (emit_jump_insn_after_noloc): Likewise.
12954         (emit_call_insn_after_noloc): Likewise.
12955         (emit_debug_insn_after_noloc): Likewise.
12956         (emit_barrier_after): Likewise.
12957         (emit_label_after): Likewise for both params.
12958         (emit_pattern_after_setloc): Likewise for "after" param.  Convert
12959         "loc" param from "int" to "location_t".
12960         (emit_insn_after_setloc): Likewise.
12961         (emit_jump_insn_after_setloc): Likewise.
12962         (emit_call_insn_after_setloc): Likewise.
12963         (emit_debug_insn_after_setloc): Likewise.
12964         (emit_pattern_before_setloc): Likewise for "before" param.  Convert
12965         "loc" param from "int" to "location_t".
12966         (emit_pattern_before): Convert NULL_RTX to NULL.
12967         (emit_insn_before_setloc): Convert "loc" param from "int" to
12968         "location_t".
12969         (emit_jump_insn_before_setloc): Likewise.
12970         (emit_call_insn_before_setloc): Likewise.
12971         (emit_debug_insn_before_setloc): Strengthen "before" param from rtx to
12972         rtx_insn *.  Convert "loc" param from "int" to "location_t".
12973         * rtl.h (emit_insn_before_setloc, emit_jump_insn_before_setloc,
12974         emit_call_insn_before_setloc, emit_debug_insn_before_setloc):
12975         Convert 3rd param from "int" to "location_t".
12976         (emit_barrier_before, emit_barrier_after, next_real_insn):
12977         Strengthen param from rtx to rtx_insn *.
12978         (emit_label_before): Strengthen 1st param from "rtx" to
12979         "rtx_code_label *".  Strengthen 2nd param from "rtx" to
12980         "rtx_insn *".
12981         (emit_insn_after_noloc, emit_jump_insn_after_noloc,
12982         emit_call_insn_after_noloc, emit_debug_insn_after_noloc):
12983         Strengthen 2nd param from "rtx" to "rtx_insn *".
12984         (emit_insn_after_setloc, emit_jump_insn_after_setloc)
12985         emit_call_insn_after_setloc, emit_debug_insn_after_setloc):
12986         Likewise. Convert 3rd param from "int" to "location_t".
12987         (emit_label_after): Strengthen 1st param from "rtx" to
12988         "rtx_code_label *".
12989         (next_real_insn, remove_insn): Strengthen param from "rtx" to
12990         "rtx_insn *".
12991         (add_insn_before, add_insn_after): Strengthen 1st and 2nd params
12992         from "rtx" to "rtx_insn *".
12994 2018-06-13  Jan Hubicka  <hubicka@gcc.gnu.org>
12996         * cgraph.c (cgraph_node::get_untransformed_body): Dump function
12997         bodies streamed in with -Q.
12998         * dumpfile.c (dump_files): Add lto-stream-out dump file.
12999         * dumpfile.h (tree_dump_index): Add lto_stream_out.
13000         * gimple-streamer-out.c: Include gimple-pretty-print.h
13001         (output_bb): Dump stmts streamed.
13002         * lto-section-out.c: Include print-tree.h
13003         (lto_begin_section): Dump sections created.
13004         (lto_output_decl_index): Dump decl encoded.
13005         * lto-streamer-out.c: Include print-tree.h
13006         (create_output_block): Dump output block created.
13007         (DFS::DFS_write_tree_body): Dump DFS SCCs streamed.
13008         (output_function): Dump function output.
13009         (output_constructor): Dump constructor streamed.
13010         (write_global_stream): Output indexes encoded.
13011         (produce_asm_for_decls): Dump streams encoded.
13012         * lto-streamer.c (streamer_dump_file): New global var.
13013         * lto-streamer.h (streamer_dump_file): Declare.
13014         * passes.c (ipa_write_summaries): Initialize streamer dump.
13015         * varpool.c (varpool_node::get_constructor): Dump constructors streamed
13016         in.
13018 2018-06-13  Eric Botcazou  <ebotcazou@adacore.com>
13020         PR target/86048
13021         * config/i386/winnt.c (i386_pe_seh_cold_init): Do not emit negative
13022         offsets for register save directives.  Emit a second batch of save
13023         directives, if need be, when the function accesses prior frames.
13025 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
13027         * config/arc/fpu.md (fmasf4): Force operand to register.
13028         (fnmasf4): Likewise.
13030 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
13032         * config/arc/arc-protos.h (arc_pad_return): Remove.
13033         * config/arc/arc.c (machine_function): Remove force_short_suffix
13034         and size_reason.
13035         (arc_print_operand): Adjust printing of '&'.
13036         (arc_verify_short): Remove conditional printing of short suffix.
13037         (arc_final_prescan_insn): Remove reference to size_reason.
13038         (pad_return): New function.
13039         (arc_reorg): Call pad_return.
13040         (arc_pad_return): Remove.
13041         (arc_init_machine_status): Remove reference to force_short_suffix.
13042         * config/arc/arc.md (vunspec): Add VUNSPEC_ARC_BLOCKAGE.
13043         (attr length): When attribute iscompact is true force to 2
13044         regardless; in the case of maybe check if we want to force the
13045         instruction to have 4 bytes length.
13046         (nopv): Change it to generate 4 byte long nop as well.
13047         (blockage): New pattern.
13048         (simple_return): Remove call to arc_pad_return.
13049         (p_return_i): Likewise.
13051 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
13053         * config/arc/elf.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
13055 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
13057         * config/arc/builtins.def (SYNC): SYNC instruction is valid on all
13058         ARC cores.
13060 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
13062         * config/arc/arc.c (atomic_exchangesi): EX instruction is default
13063         for ARC700 and ARCv2.
13065 2018-06-13  Chenghua Xu <paul.hua.gm@gmail.com>
13067         PR target/86076
13068         * config/mips/loongson.md (vec_setv4hi): Gen_lowpart for
13069         operands[2] instead of operands[1].
13072 2018-06-12  Richard Sandiford  <richard.sandiford@linaro.org>
13074         * lra-constraints.c (simplify_operand_subreg): In the paradoxical
13075         case, check whether the outer register overlaps an unallocatable
13076         register, not just whether it fits the required class.
13078 2018-06-12  Richard Sandiford  <richard.sandiford@linaro.org>
13080         * poly-int.h (can_div_trunc_p): Add new overload in which all values
13081         are poly_ints.
13082         * alias.c (get_addr): Extend CONST_INT handling to poly_int_rtx_p.
13083         (memrefs_conflict_p): Likewise.
13084         (init_alias_analysis): Likewise.
13085         * cfgexpand.c (expand_debug_expr): Likewise.
13086         * combine.c (combine_simplify_rtx, force_int_to_mode): Likewise.
13087         * cse.c (fold_rtx): Likewise.
13088         * explow.c (adjust_stack, anti_adjust_stack): Likewise.
13089         * expr.c (emit_block_move_hints): Likewise.
13090         (clear_storage_hints, push_block, emit_push_insn): Likewise.
13091         (store_expr_with_bounds, reduce_to_bit_field_precision): Likewise.
13092         (emit_group_load_1): Use rtx_to_poly_int64 for group offsets.
13093         (emit_group_store): Likewise.
13094         (find_args_size_adjust): Use strip_offset.  Use rtx_to_poly_int64
13095         to read the PRE/POST_MODIFY increment.
13096         * calls.c (store_one_arg): Use strip_offset.
13097         * rtlanal.c (rtx_addr_can_trap_p_1): Extend CONST_INT handling to
13098         poly_int_rtx_p.
13099         (set_noop_p): Use rtx_to_poly_int64 for the elements selected
13100         by a VEC_SELECT.
13101         * simplify-rtx.c (avoid_constant_pool_reference): Use strip_offset.
13102         (simplify_binary_operation_1): Extend CONST_INT handling to
13103         poly_int_rtx_p.
13104         * var-tracking.c (compute_cfa_pointer): Take a poly_int64 rather
13105         than a HOST_WIDE_INT.
13106         (hard_frame_pointer_adjustment): Change from HOST_WIDE_INT to
13107         poly_int64.
13108         (adjust_mems, add_stores): Update accodingly.
13109         (vt_canonicalize_addr): Track polynomial offsets.
13110         (emit_note_insn_var_location): Likewise.
13111         (vt_add_function_parameter): Likewise.
13112         (vt_initialize): Likewise.
13114 2018-06-12  Jeff Law  <law@redhat.com>
13116         * config.gcc (alpha*-*-freebsd*): Remove.
13117         * config/alpha/freebsd.h: Remove.
13119 2018-06-12  David Malcolm  <dmalcolm@redhat.com>
13121         PR other/69968
13122         * spellcheck-tree.c (levenshtein_distance): Rename to...
13123         (get_edit_distance): ...this, and update for underlying renaming.
13124         * spellcheck-tree.h (levenshtein_distance): Rename to...
13125         (get_edit_distance): ...this.
13126         * spellcheck.c (levenshtein_distance): Rename to...
13127         (get_edit_distance): ...this.  Convert from Levenshtein distance
13128         to Damerau-Levenshtein distance by supporting transpositions of
13129         adjacent characters.  Rename "v1" to "v_next" and "v0" to
13130         "v_one_ago".
13131         (selftest::levenshtein_distance_unit_test_oneway): Rename to...
13132         (selftest::test_edit_distance_unit_test_oneway): ...this, and
13133         update for underlying renaming.
13134         (selftest::levenshtein_distance_unit_test): Rename to...
13135         (selftest::test_get_edit_distance_unit): ...this, and update for
13136         underlying renaming.
13137         (selftest::test_find_closest_string): Add example from PR 69968
13138         where transposition helps
13139         (selftest::test_metric_conditions): Update for renaming.
13140         (selftest::test_metric_conditions): Likewise.
13141         (selftest::spellcheck_c_tests): Likewise.
13142         * spellcheck.h (levenshtein_distance): Rename both overloads to...
13143         (get_edit_distance): ...this.
13144         (best_match::consider): Update for renaming.
13146 2018-06-12  Martin Sebor  <msebor@redhat.com>
13148         PR tree-optimization/85259
13149         * builtins.c (compute_objsize): Handle constant offsets.
13150         * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return
13151         true iff a warning has been issued.
13152         * gimple.h (gimple_nonartificial_location): New function.
13153         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Call
13154         gimple_nonartificial_location and handle -Wno-system-headers.
13155         (handle_builtin_stxncpy): Same.
13157 2018-06-12  Martin Sebor  <msebor@redhat.com>
13159         PR c/85931
13160         * fold-const.c (operand_equal_p): Handle SAVE_EXPR.
13162 2018-06-12  Will Schmidt  <will_schmidt@vnet.ibm.com>
13164         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
13165         BUILTIN_VEC_XST entries for pointer to double and long long.
13167 2018-06-12  H.J. Lu  <hongjiu.lu@intel.com>
13169         PR target/85990
13170         * config/i386/gnu-user.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
13171         Update comments.
13172         * config/i386/gnu-user64.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
13173         Likewise.
13175 2018-06-12  Martin Liska  <mliska@suse.cz>
13177         * doc/options.texi: Document IntegerRange.
13179 2018-06-12  Martin Liska  <mliska@suse.cz>
13181         * config/i386/i386.opt: Make MPX-related options as Deprecated.
13182         * opt-functions.awk: Handle Deprecated flag.
13183         * opts-common.c (decode_cmdline_option): Handle cl_deprecated
13184         and report error.
13185         (read_cmdline_option): Report warning for a deprecated option.
13186         * opts.h (struct cl_option): Add new field cl_deprecated.
13187         (CL_ERR_DEPRECATED): New.
13189 2018-06-12  Martin Liska  <mliska@suse.cz>
13191         * doc/options.texi: Document Deprecated option flag.
13193 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
13195         * config/arc/arc-arch.h (arc_extras): New enum.
13196         (arc_cpu_t):Add field extra.
13197         (arc_cpu_types): Consider the extras.
13198         * config/arc/arc-cpus.def: Add extras info.
13199         * config/arc/arc-opts.h (processor_type): Consider extra field.
13200         * config/arc/arc.c (arc_override_options): Handle extra field.
13202 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
13204         * config/arc/arc-arch.h: Update ARC_OPTX macro.
13205         * config/arc/arc-options.def (ARC_OPTX): Introduce a new doc
13206         field.
13207         * config/arc/arc.c (arc_init): Update pic warning.
13208         (irq_range): Update irq range parsing warnings.
13209         (arc_override_options): Update various warning messages.
13210         (arc_handle_aux_attribute): Likewise.
13212 2018-06-12  Robert Suchanek  <robert.suchanek@mips.com>
13214         * config/mips/i6400.md (i6400_fpu_fadd): Remove frint.
13216 2018-06-12  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
13218         * doc/sourcebuild.texi: Document usage of line number 0 in verify
13219         compiler messages directives.
13221 2018-06-12  Matthew Fortune  <mfortune@gmail.com>
13223         * config/mips/mips-cpus.def: New MIPS_CPU for i6500.
13224         * config/mips/mips-tables.opt: Regenerate.
13225         * config/mips/mips.h (MIPS_ISA_LEVEL_SPEC): Mark i6500 as
13226         mips64r6.
13227         * doc/invoke.texi: Document -march=i6500.
13229 2018-06-12  Prachi Godbole  <prachi.godbole@imgtec.com>
13231         * config/mips/i6400.md (i6400_gpmuldiv): Remove cpu_unit.
13232         (i6400_gpmul): Add cpu_unit.
13233         (i6400_gpdiv): Likewise.
13234         (i6400_msa_add_d): Update reservations.
13235         (i6400_msa_int_add) Likewise.
13236         (i6400_msa_short_logic3) Likewise.
13237         (i6400_msa_short_logic2) Likewise.
13238         (i6400_msa_short_logic) Likewise.
13239         (i6400_msa_move) Likewise.
13240         (i6400_msa_cmp) Likewise.
13241         (i6400_msa_short_float2) Likewise.
13242         (i6400_msa_div_d) Likewise.
13243         (i6400_msa_long_logic1) Likewise.
13244         (i6400_msa_long_logic2) Likewise.
13245         (i6400_msa_mult) Likewise.
13246         (i6400_msa_long_float2) Likewise.
13247         (i6400_msa_long_float4) Likewise.
13248         (i6400_msa_long_float5) Likewise.
13249         (i6400_msa_long_float8) Likewise.
13250         (i6400_fpu_fadd): Include frint type.
13251         (i6400_fpu_store): New define_insn_reservation.
13252         (i6400_fpu_load): Likewise.
13253         (i6400_fpu_move): Likewise.
13254         (i6400_fpu_fcmp): Likewise.
13255         (i6400_fpu_fmadd): Likewise.
13256         (i6400_int_mult): Include imul3nc type and update reservation.
13257         (i6400_int_div): Include idiv3 type and update reservation.
13258         (i6400_int_load): Update to check type not move_type.
13259         (i6400_int_store): Likewise.
13260         (i6400_int_prefetch): Set zero latency.
13262 2018-06-12  Eric Botcazou  <ebotcazou@adacore.com>
13264         * gcc.c: Document new %@{...} sequence.
13265         (LINK_COMMAND_SPEC): Use it for the -L switches.
13266         (cpp_unique_options): Use it for the -I switches.
13267         (at_file_argbuf): New global variable.
13268         (in_at_file): Likewise.
13269         (alloc_args): Create at_file_argbuf.
13270         (clear_args): Truncate at_file_argbuf.
13271         (store_arg): If in_at_file, push the argument onto at_file_argbuf.
13272         (open_at_file): New function.
13273         (close_at_file): Likewise.
13274         (create_at_file): Delete.
13275         (do_spec_1) <'i'>: Use open_at_file/close_at_file.
13276         <'o'>: Likewise.
13277         <'@'>: New case.
13278         (validate_switches_from_spec): Deal with %@{...} sequence.
13279         (validate_switches): Likewise.
13280         (driver::finalize): Call clear_args.
13282 2018-06-11  Rasmus Villemoes  <rasmus.villemoes@prevas.dk>
13284         * config/vx-common.h (USE_TM_CLONE_REGISTRY): #define to 0.
13286 2018-06-11  Martin Sebor  <msebor@redhat.com>
13288         * doc/invoke.texi (-Wall): List -Wc++17-compat.
13289         (Wno-class-memaccess): Add @opindex.
13290         (Wno-templates, Wno-multiple-inheritance): Same.
13291         (Wno-virtual-inheritance, Wno-namespaces): Same.
13292         (Wno-pedantic, Wno-chkp, Wcoverage-mismatch): Same.
13293         (Wno-format-overflow, Wno-format-truncation): Same.
13294         (Wno-unused-local-typedefs, Walloc-size-larger-than): Same.
13295         (Wno-alloc-size-larger-than, Wframe-larger-than): Same
13296         (Wno-stack-usage, Wno-c++-compat, Wno-c++11-compat): Same.
13297         (Wno-c++14-compat, Wno-c++17-compat, Wno-openmp-simd): Same.
13298         (Wno-unsuffixed-float-constants, Wno-addr-space-convert): Same.
13299         (Wno-misspelled-isr): Same.
13301 2018-06-11  Martin Sebor  <msebor@redhat.com>
13303         * PR tree-optimization/86083
13304         * tree-ssa-strlen.c (handle_char_store): Use tree_expr_nonzero_p.
13306 2018-06-11  Zhouyi Zhou <zhouzhouyi@gmail.com>
13308         * tree-eh.c (lower_eh_constructs_2): Add a comma to comment.
13310 2018-06-11  Segher Boessenkool  <segher@kernel.crashing.org>
13312         PR target/85755
13313         * config/rs6000/rs6000.md (*movdi_internal32): Put constraint modifiers
13314         on the correct operand.
13315         (*movdi_internal64): Ditto.
13317 2018-06-11  Martin Liska  <mliska@suse.cz>
13319         PR tree-optimization/86089
13320         * tree-ssa-strlen.c (get_string_length): Move back removed hunk.
13322 2018-06-11  Julia Koval  <julia.koval@intel.com>
13324         * config/i386/vaesintrin.h (_mm_aesdec_epi128, _mm_aesdeclast_epi128)
13325         _mm_aesenc_epi128, _mm_aesenclast_epi128: Remove.
13326         * config/i386/vpclmulqdqintrin.h (_mm_clmulepi64_epi128): Remove.
13328 2018-06-11  Olivier Hainque  <hainque@adacore.com>
13330         * dwarf2out.c (gen_compile_unit_die): Fallout to DW_LANG_Ada83
13331         for Ada with strict dwarf2.
13333 2018-06-08  Peter Bergner  <bergner@vnet.ibm.com>
13335         PR target/85755
13336         * config/rs6000/rs6000.c (mem_operand_gpr): Enable PRE_INC and PRE_DEC
13337         addresses.
13339 2018-06-08  Jan Hubicka  <hubicka@ucw.cz>
13341         * dumpfile.c (FIRST_ME_AUTO_NUMBERED_DUMP): Bump to 4.
13343 2018-06-08  David Edelsohn  <dje.gcc@gmail.com>
13345         * config/rs6000/rs6000.c (rs6000_passes_ieee128): Protect with #if
13346         TARGET_ELF.
13348 2018-06-08  Martin Liska  <mliska@suse.cz>
13350         * tree-cfg.h (debug_function): Fix argument type to match
13351         implementation.
13353 2018-06-08  Martin Liska  <mliska@suse.cz>
13355         * config/powerpcspe/powerpcspe.c (rs6000_xcoff_visibility):
13356         Remove usage of MPX-related (and removed) fields.
13357         * config/rs6000/rs6000.c (rs6000_xcoff_visibility): Likewise.
13359 2018-06-08  David Malcolm  <dmalcolm@redhat.com>
13361         * cfg.c (debug): Use TDF_NONE rather than 0.
13362         * cfghooks.c (debug): Likewise.
13363         * dumpfile.c (DUMP_FILE_INFO): Likewise; also for OPTGROUP.
13364         (struct dump_option_value_info): Convert to...
13365         (struct kv_pair): ...this template type.
13366         (dump_options): Convert to kv_pair<dump_flags_t>; use TDF_NONE
13367         rather than 0.
13368         (optinfo_verbosity_options): Likewise.
13369         (optgroup_options): Convert to kv_pair<optgroup_flags_t>; use
13370         OPTGROUP_NONE.
13371         (gcc::dump_manager::dump_register): Use optgroup_flags_t rather
13372         than int for "optgroup_flags" param.
13373         (dump_generic_expr_loc): Use dump_flags_t rather than int for
13374         "dump_kind" param.
13375         (dump_dec): Likewise.
13376         (dump_finish): Use TDF_NONE rather than 0.
13377         (gcc::dump_manager::opt_info_enable_passes): Use optgroup_flags_t
13378         rather than int for "optgroup_flags" param.  Use TDF_NONE rather
13379         than 0.  Update for change to option_ptr.
13380         (opt_info_switch_p_1): Convert "optgroup_flags" param from int *
13381         to optgroup_flags_t *.  Use TDF_NONE and OPTGROUP_NONE rather than
13382         0.  Update for changes to optinfo_verbosity_options and
13383         optgroup_options.
13384         (opt_info_switch_p): Convert optgroup_flags from int to
13385         optgroup_flags_t.
13386         (dump_basic_block): Use dump_flags_t rather than int
13387         for "dump_kind" param.
13388         * dumpfile.h (TDF_ADDRESS, TDF_SLIM, TDF_RAW, TDF_DETAILS,
13389         TDF_STATS, TDF_BLOCKS, TDF_VOPS, TDF_LINENO, TDF_UID)
13390         TDF_STMTADDR, TDF_GRAPH, TDF_MEMSYMS, TDF_RHS_ONLY, TDF_ASMNAME,
13391         TDF_EH, TDF_NOUID, TDF_ALIAS, TDF_ENUMERATE_LOCALS, TDF_CSELIB,
13392         TDF_SCEV, TDF_GIMPLE, TDF_FOLDING, MSG_OPTIMIZED_LOCATIONS,
13393         MSG_MISSED_OPTIMIZATION, MSG_NOTE, MSG_ALL, TDF_COMPARE_DEBUG,
13394         TDF_NONE): Convert from macros to...
13395         (enum dump_flag): ...this new enum.
13396         (dump_flags_t): Update to use enum.
13397         (operator|, operator&, operator~, operator|=, operator&=):
13398         Implement for dump_flags_t.
13399         (OPTGROUP_NONE, OPTGROUP_IPA, OPTGROUP_LOOP, OPTGROUP_INLINE,
13400         OPTGROUP_OMP, OPTGROUP_VEC, OPTGROUP_OTHER, OPTGROUP_ALL):
13401         Convert from macros to...
13402         (enum optgroup_flag): ...this new enum.
13403         (optgroup_flags_t): New typedef.
13404         (operator|, operator|=): Implement for optgroup_flags_t.
13405         (struct dump_file_info): Convert field "alt_flags" to
13406         dump_flags_t.  Convert field "optgroup_flags" to
13407         optgroup_flags_t.
13408         (dump_basic_block): Use dump_flags_t rather than int for param.
13409         (dump_generic_expr_loc): Likewise.
13410         (dump_dec): Likewise.
13411         (dump_register): Convert param "optgroup_flags" to
13412         optgroup_flags_t.
13413         (opt_info_enable_passes): Likewise.
13414         * early-remat.c (early_remat::dump_edge_list): Use TDF_NONE rather
13415         than 0.
13416         * gimple-pretty-print.c (debug): Likewise.
13417         * gimple-ssa-store-merging.c (bswap_replace): Likewise.
13418         (merged_store_group::apply_stores): Likewise.
13419         * gimple-ssa-strength-reduction.c (insert_initializers): Likewise.
13420         * gimple.c (verify_gimple_pp): Likewise.
13421         * graphite-poly.c (print_pbb_body): Likewise.
13422         * passes.c (pass_manager::register_one_dump_file): Convert
13423         local "optgroup_flags" to optgroup_flags_t.
13424         * print-tree.c (print_node): Use TDF_NONE rather than 0.
13425         (debug): Likewise.
13426         (debug_body): Likewise.
13427         * tree-pass.h (struct pass_data): Convert field "optgroup_flags"
13428         to optgroup_flags_t.
13429         * tree-pretty-print.c (print_struct_decl): Use TDF_NONE rather
13430         than 0.
13431         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Likewise.
13432         (convert_mult_to_fma): Likewise.
13433         * tree-ssa-reassoc.c (undistribute_ops_list): Likewise.
13434         * tree-ssa-sccvn.c (vn_eliminate): Likewise.
13435         * tree-vect-data-refs.c (dump_lower_bound): Convert param
13436         "dump_kind" to dump_flags_t.
13438 2018-06-08  Segher Boessenkool  <segher@kernel.crashing.org>
13440         * config/rs6000/rs6000.c (min, max): Delete.
13442 2018-06-08  Segher Boessenkool  <segher@kernel.crashing.org>
13444         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete mention of
13445         -mabi=spe and -mabi=no-spe.
13447 2018-06-08  Martin Liska  <mliska@suse.cz>
13449         * ipa-pure-const.c (propagate_pure_const): Use ::get at places
13450         where we expect an existing summary.
13452 2018-06-08  Martin Liska  <mliska@suse.cz>
13454         * ipa-inline-analysis.c (simple_edge_hints): Use ::get method.
13455         * ipa-inline.h (estimate_edge_growth): Likewise.
13457 2018-06-08  Martin Liska  <mliska@suse.cz>
13459         * cgraph.c (function_version_hasher::hash): Use
13460         cgraph_node::get_uid ().
13461         (function_version_hasher::equal):
13462         * cgraph.h (cgraph_node::get_uid): New method.
13463         * ipa-inline.c (update_caller_keys): Use
13464         cgraph_node::get_uid ().
13465         (update_callee_keys): Likewise.
13466         * ipa-utils.c (searchc): Likewise.
13467         (ipa_reduced_postorder): Likewise.
13468         * lto-cgraph.c (input_node): Likewise.
13469         * passes.c (is_pass_explicitly_enabled_or_disabled): Likewise.
13470         * symbol-summary.h (symtab_insertion): Likewise.
13471         (symtab_removal): Likewise.
13472         (symtab_duplication): Likewise.
13473         * tree-pretty-print.c (dump_function_header): Likewise.
13474         * tree-sra.c (convert_callers_for_node): Likewise.
13476 2018-06-08  Martin Liska  <mliska@suse.cz>
13478         * cgraph.c (symbol_table::create_edge): Always assign a new
13479         unique number.
13480         (symbol_table::free_edge): Do not recycle numbers.
13481         * cgraph.h (cgraph_edge::get): New method.
13482         * symbol-summary.h (symtab_removal): Use it.
13483         (symtab_duplication): Likewise.
13484         (call_summary::hashable_uid): Remove.
13486 2018-06-08  Martin Liska  <mliska@suse.cz>
13488         * ipa-inline-analysis.c (inline_edge_removal_hook): Remove.
13489         (initialize_growth_caches): Remove.
13490         (free_growth_caches): Likewise.
13491         (do_estimate_edge_time): Use edge_growth_cache.
13492         (do_estimate_edge_size): Likewise.
13493         (do_estimate_edge_hints): Likewise.
13494         * ipa-inline.c (reset_edge_caches): Likewise.
13495         (recursive_inlining): Likewise.
13496         (inline_small_functions): Likewise.
13497         * ipa-inline.h (initialize_growth_caches): Remove.
13498         (estimate_edge_size): Likewise.
13499         (estimate_edge_time): Likewise.
13500         (estimate_edge_hints): Likewise.
13501         (reset_edge_growth_cache): Likewise.
13502         * symbol-summary.h (call_summary::remove): New method.
13504 2018-06-08  Martin Liska  <mliska@suse.cz>
13506         * ipa-cp.c (class edge_clone_summary): New summary.
13507         (grow_edge_clone_vectors): Remove.
13508         (ipcp_edge_duplication_hook): Remove.
13509         (class edge_clone_summary_t): New call_summary class.
13510         (ipcp_edge_removal_hook): Remove.
13511         (edge_clone_summary_t::duplicate): New function.
13512         (get_next_cgraph_edge_clone): Use edge_clone_summaries.
13513         (create_specialized_node): Likewise.
13514         (ipcp_driver): Initialize edge_clone_summaries and do not
13515         register hooks.
13517 2018-06-08  Martin Liska  <mliska@suse.cz>
13519         * symbol-summary.h (get): New function.
13520         (call_summary::m_initialize_when_cloning): New class member.
13522 2018-06-08  Martin Liska  <mliska@suse.cz>
13524         * cgraph.c (cgraph_node::remove): Do not recycle uid.
13525         * cgraph.h (symbol_table::release_symbol): Do not pass uid.
13526         (symbol_table::allocate_cgraph_symbol): Do not set uid.
13527         * passes.c (uid_hash_t): Record removed_nodes by their uids.
13528         (remove_cgraph_node_from_order): Use the removed_nodes set.
13529         (do_per_function_toporder): Likwise.
13530         * symbol-summary.h (symtab_insertion): Use cgraph_node::uid
13531         instead of summary_uid.
13532         (symtab_removal): Likewise.
13533         (symtab_duplication): Likewise.
13535 2018-06-08  Martin Liska  <mliska@suse.cz>
13537         * ipa-cp.c (ipcp_store_bits_results): Use
13538         ipcp_transformation_sum.
13539         (ipcp_store_vr_results): Likewise.
13540         * ipa-prop.c (ipcp_grow_transformations_if_necessary): Renamed
13541         to ...
13542         (ipcp_transformation_initialize): ... this.
13543         (ipa_set_node_agg_value_chain):
13544         (ipa_node_params_t::duplicate): Use ipcp_transformation_sum.
13545         (write_ipcp_transformation_info): Likewise.
13546         (read_ipcp_transformation_info): Likewise.
13547         (ipcp_update_bits): Likewise.
13548         (ipcp_update_vr): Likewise.
13549         (ipcp_transform_function): Likewise.
13550         * ipa-prop.h: Rename ipcp_transformation_summary to
13551         ipcp_transformation.
13552         (class ipcp_transformation_t): New function summary.
13553         (ipcp_get_transformation_summary): Use ipcp_transformation_sum.
13554         (ipa_get_agg_replacements_for_node): Likewise.
13556 2018-06-08  Martin Liska  <mliska@suse.cz>
13558         * ipa-pure-const.c (struct funct_state_d): Do it class instead
13559         of struct.
13560         (class funct_state_summary_t): New function_summary class.
13561         (has_function_state): Remove.
13562         (get_function_state): Likewise.
13563         (set_function_state): Likewise.
13564         (add_new_function): Likewise.
13565         (funct_state_summary_t::insert): New function.
13566         (duplicate_node_data): Remove.
13567         (remove_node_data): Remove.
13568         (funct_state_summary_t::duplicate): New function.
13569         (register_hooks): Create new funct_state_summaries.
13570         (pure_const_generate_summary): Use it.
13571         (pure_const_write_summary): Likewise.
13572         (pure_const_read_summary): Likewise.
13573         (propagate_pure_const): Likewise.
13574         (propagate_nothrow): Likewise.
13575         (dump_malloc_lattice): Likewise.
13576         (propagate_malloc): Likewise.
13577         (execute): Do not register hooks, just remove summary
13578         instead.
13579         (pass_ipa_pure_const::pass_ipa_pure_const): Simplify
13580         constructor.
13582 2018-06-08  Martin Liska  <mliska@suse.cz>
13584         * ipa-reference.c (remove_node_data): Remove.
13585         (duplicate_node_data): Likewise.
13586         (class ipa_ref_var_info_summary_t): New class.
13587         (class ipa_ref_opt_summary_t): Likewise.
13588         (get_reference_vars_info): Use ipa_ref_var_info_summaries.
13589         (get_reference_optimization_summary): Use
13590         ipa_ref_opt_sum_summaries.
13591         (set_reference_vars_info): Remove.
13592         (set_reference_optimization_summary): Likewise.
13593         (ipa_init): Create summaries.
13594         (init_function_info): Use function summary.
13595         (ipa_ref_opt_summary_t::duplicate): New function.
13596         (ipa_ref_opt_summary_t::remove): New function.
13597         (get_read_write_all_from_node): Fix GNU coding style.
13598         (propagate): Use function summary.
13599         (write_node_summary_p): Fix GNU coding style.
13600         (stream_out_bitmap): Likewise.
13601         (ipa_reference_read_optimization_summary): Use function summary.
13602         (ipa_reference_c_finalize): Do not release hooks.
13604 2018-06-08  Martin Liska  <mliska@suse.cz>
13606         * ipa-fnsummary.c (dump_ipa_call_summary): Use ::get method.
13607         (analyze_function_body): Extract multiple calls of get_create.
13608         * ipa-inline-analysis.c (simple_edge_hints): Likewise.
13609         * ipa-inline.c (recursive_inlining): Use ::get method.
13610         * ipa-inline.h (estimate_edge_growth): Likewise.
13612 2018-06-08  Martin Liska  <mliska@suse.cz>
13614         * hsa-common.h (enum hsa_function_kind): Rename HSA_NONE to
13615         HSA_INVALID.
13616         (hsa_function_summary::hsa_function_summary): Use the new enum
13617         value.
13618         (hsa_gpu_implementation_p): Use hsa_summaries::get.
13619         * hsa-gen.c (hsa_get_host_function): Likewise.
13620         (get_brig_function_name): Likewise.
13621         * ipa-hsa.c (process_hsa_functions): Likewise.
13622         (ipa_hsa_write_summary): Likewise.
13623         * symbol-summary.h (symtab_duplication): Use ::get function/
13624         (get): New function.
13626 2018-06-08  Martin Liska  <mliska@suse.cz>
13628         * config/i386/i386.c (ix86_can_inline_p): Use get_create instead
13629         of get.
13630         * hsa-common.c (hsa_summary_t::link_functions): Likewise.
13631         (hsa_register_kernel): Likewise.
13632         * hsa-common.h (hsa_gpu_implementation_p): Likewise.
13633         * hsa-gen.c (hsa_get_host_function): Likewise.
13634         (get_brig_function_name): Likewise.
13635         (generate_hsa): Likewise.
13636         (pass_gen_hsail::execute): Likewise.
13637         * ipa-cp.c (ipcp_cloning_candidate_p): Likewise.
13638         (devirtualization_time_bonus): Likewise.
13639         (ipcp_propagate_stage): Likewise.
13640         * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
13641         (edge_set_predicate): Likewise.
13642         (evaluate_conditions_for_known_args): Likewise.
13643         (evaluate_properties_for_edge): Likewise.
13644         (ipa_fn_summary::reset): Likewise.
13645         (ipa_fn_summary_t::duplicate): Likewise.
13646         (dump_ipa_call_summary): Likewise.
13647         (ipa_dump_fn_summary): Likewise.
13648         (analyze_function_body): Likewise.
13649         (compute_fn_summary): Likewise.
13650         (estimate_edge_devirt_benefit): Likewise.
13651         (estimate_edge_size_and_time): Likewise.
13652         (estimate_calls_size_and_time): Likewise.
13653         (estimate_node_size_and_time): Likewise.
13654         (inline_update_callee_summaries): Likewise.
13655         (remap_edge_change_prob): Likewise.
13656         (remap_edge_summaries): Likewise.
13657         (ipa_merge_fn_summary_after_inlining): Likewise.
13658         (ipa_update_overall_fn_summary): Likewise.
13659         (read_ipa_call_summary): Likewise.
13660         (inline_read_section): Likewise.
13661         (write_ipa_call_summary): Likewise.
13662         (ipa_fn_summary_write): Likewise.
13663         (ipa_free_fn_summary): Likewise.
13664         * ipa-hsa.c (process_hsa_functions): Likewise.
13665         (ipa_hsa_write_summary): Likewise.
13666         (ipa_hsa_read_section): Likewise.
13667         * ipa-icf.c (sem_function::merge): Likewise.
13668         * ipa-inline-analysis.c (simple_edge_hints): Likewise.
13669         (do_estimate_edge_time): Likewise.
13670         (estimate_size_after_inlining): Likewise.
13671         (estimate_growth): Likewise.
13672         (growth_likely_positive): Likewise.
13673         * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
13674         (inline_call): Likewise.
13675         * ipa-inline.c (caller_growth_limits): Likewise.
13676         (can_inline_edge_p): Likewise.
13677         (can_inline_edge_by_limits_p): Likewise.
13678         (compute_uninlined_call_time): Likewise.
13679         (compute_inlined_call_time): Likewise.
13680         (want_inline_small_function_p): Likewise.
13681         (edge_badness): Likewise.
13682         (update_caller_keys): Likewise.
13683         (update_callee_keys): Likewise.
13684         (recursive_inlining): Likewise.
13685         (inline_small_functions): Likewise.
13686         (inline_to_all_callers_1): Likewise.
13687         (dump_overall_stats): Likewise.
13688         (early_inline_small_functions): Likewise.
13689         (early_inliner): Likewise.
13690         * ipa-inline.h (estimate_edge_growth): Likewise.
13691         * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
13692         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
13693         * ipa-prop.h (IPA_NODE_REF): Likewise.
13694         (IPA_EDGE_REF): Likewise.
13695         * ipa-pure-const.c (malloc_candidate_p): Likewise.
13696         (propagate_malloc): Likewise.
13697         * ipa-split.c (execute_split_functions): Likewise.
13698         * symbol-summary.h: Rename get to get_create.
13699         (get): Likewise.
13700         (get_create): Likewise.
13701         * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
13703 2018-06-08  Martin Liska  <mliska@suse.cz>
13705         * symbol-summary.h (release): Move definition out of class
13706         declaration.
13707         (symtab_removal): Likewise.
13708         (symtab_duplication): Likewise.
13710 2018-06-08  Martin Liska  <mliska@suse.cz>
13712         * symbol-summary.h (function_summary): Move constructor
13713         implementation out of class declaration.
13714         (release): Likewise.
13715         (symtab_insertion): Likewise.
13716         (symtab_removal): Likewise.
13717         (symtab_duplication): Likewise.
13718         (get): Likewise.
13720 2018-06-08  Martin Liska  <mliska@suse.cz>
13722         * Makefile.in: Remove support for MPX (macros, related functions,
13723         fields in cgraph_node, ...).
13724         * builtin-types.def (BT_BND): Likewise.
13725         (BT_FN_BND_CONST_PTR): Likewise.
13726         (BT_FN_CONST_PTR_BND): Likewise.
13727         (BT_FN_VOID_PTR_BND): Likewise.
13728         (BT_FN_BND_CONST_PTR_SIZE): Likewise.
13729         (BT_FN_VOID_CONST_PTR_BND_CONST_PTR): Likewise.
13730         * builtins.c (expand_builtin_memcpy_with_bounds): Likewise.
13731         (expand_builtin_mempcpy_with_bounds): Likewise.
13732         (expand_builtin_memset_with_bounds): Likewise.
13733         (expand_builtin_memset_args): Likewise.
13734         (std_expand_builtin_va_start): Likewise.
13735         (expand_builtin): Likewise.
13736         (expand_builtin_with_bounds): Likewise.
13737         * builtins.def (DEF_BUILTIN_CHKP): Likewise.
13738         (DEF_LIB_BUILTIN_CHKP): Likewise.
13739         (DEF_EXT_LIB_BUILTIN_CHKP): Likewise.
13740         (DEF_CHKP_BUILTIN): Likewise.
13741         (BUILT_IN_MEMCPY): Likewise.
13742         (BUILT_IN_MEMMOVE): Likewise.
13743         (BUILT_IN_MEMPCPY): Likewise.
13744         (BUILT_IN_MEMSET): Likewise.
13745         (BUILT_IN_STPCPY): Likewise.
13746         (BUILT_IN_STRCAT): Likewise.
13747         (BUILT_IN_STRCHR): Likewise.
13748         (BUILT_IN_STRCPY): Likewise.
13749         (BUILT_IN_STRLEN): Likewise.
13750         (BUILT_IN_MEMCPY_CHK): Likewise.
13751         (BUILT_IN_MEMMOVE_CHK): Likewise.
13752         (BUILT_IN_MEMPCPY_CHK): Likewise.
13753         (BUILT_IN_MEMSET_CHK): Likewise.
13754         (BUILT_IN_STPCPY_CHK): Likewise.
13755         (BUILT_IN_STRCAT_CHK): Likewise.
13756         (BUILT_IN_STRCPY_CHK): Likewise.
13757         * calls.c (store_bounds): Likewise.
13758         (emit_call_1): Likewise.
13759         (special_function_p): Likewise.
13760         (maybe_warn_nonstring_arg): Likewise.
13761         (initialize_argument_information): Likewise.
13762         (finalize_must_preallocate): Likewise.
13763         (compute_argument_addresses): Likewise.
13764         (expand_call): Likewise.
13765         * cfgexpand.c (expand_call_stmt): Likewise.
13766         (expand_return): Likewise.
13767         (expand_gimple_stmt_1): Likewise.
13768         (pass_expand::execute): Likewise.
13769         * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
13770         (cgraph_node::remove): Likewise.
13771         (cgraph_node::dump): Likewise.
13772         (cgraph_node::verify_node): Likewise.
13773         * cgraph.h (chkp_function_instrumented_p): Likewise.
13774         (symtab_node::get_alias_target): Likewise.
13775         (cgraph_node::can_remove_if_no_direct_calls_and_refs_p): Likewise.
13776         (cgraph_local_p): Likewise.
13777         * cgraphbuild.c (cgraph_edge::rebuild_edges): Likewise.
13778         (cgraph_edge::rebuild_references): Likewise.
13779         * cgraphunit.c (varpool_node::finalize_decl): Likewise.
13780         (walk_polymorphic_call_targets): Likewise.
13781         (cgraph_node::expand_thunk): Likewise.
13782         (symbol_table::output_weakrefs): Likewise.
13783         * common/config/i386/i386-common.c (OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET): Likewise.
13784         (ix86_handle_option): Likewise.
13785         * config/i386/constraints.md: Likewise.
13786         * config/i386/i386-builtin-types.def (BND): Likewise.
13787         (VOID): Likewise.
13788         (PVOID): Likewise.
13789         (ULONG): Likewise.
13790         * config/i386/i386-builtin.def (BDESC_END): Likewise.
13791         (BDESC_FIRST): Likewise.
13792         (BDESC): Likewise.
13793         * config/i386/i386-c.c (ix86_target_macros_internal): Likewise.
13794         * config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): Likewise.
13795         * config/i386/i386.c (enum reg_class): Likewise.
13796         (ix86_target_string): Likewise.
13797         (ix86_option_override_internal): Likewise.
13798         (ix86_conditional_register_usage): Likewise.
13799         (ix86_valid_target_attribute_inner_p): Likewise.
13800         (ix86_set_indirect_branch_type): Likewise.
13801         (ix86_set_current_function): Likewise.
13802         (ix86_function_arg_regno_p): Likewise.
13803         (init_cumulative_args): Likewise.
13804         (ix86_function_arg_advance): Likewise.
13805         (ix86_function_arg): Likewise.
13806         (ix86_pass_by_reference): Likewise.
13807         (ix86_function_value_regno_p): Likewise.
13808         (ix86_function_value_1): Likewise.
13809         (ix86_function_value_bounds): Likewise.
13810         (ix86_return_in_memory): Likewise.
13811         (ix86_setup_incoming_vararg_bounds): Likewise.
13812         (ix86_va_start): Likewise.
13813         (indirect_thunk_need_prefix): Likewise.
13814         (print_reg): Likewise.
13815         (ix86_print_operand): Likewise.
13816         (ix86_expand_call): Likewise.
13817         (ix86_output_function_return): Likewise.
13818         (reg_encoded_number): Likewise.
13819         (BDESC_VERIFYS): Likewise.
13820         (ix86_init_mpx_builtins): Likewise.
13821         (ix86_init_builtins): Likewise.
13822         (ix86_emit_cmove): Likewise.
13823         (ix86_emit_move_max): Likewise.
13824         (ix86_expand_builtin): Likewise.
13825         (ix86_builtin_mpx_function): Likewise.
13826         (ix86_get_arg_address_for_bt): Likewise.
13827         (ix86_load_bounds): Likewise.
13828         (ix86_store_bounds): Likewise.
13829         (ix86_load_returned_bounds): Likewise.
13830         (ix86_store_returned_bounds): Likewise.
13831         (ix86_class_likely_spilled_p): Likewise.
13832         (ix86_hard_regno_mode_ok): Likewise.
13833         (x86_order_regs_for_local_alloc): Likewise.
13834         (ix86_mitigate_rop): Likewise.
13835         (ix86_bnd_prefixed_insn_p): Likewise.
13836         (ix86_mpx_bound_mode): Likewise.
13837         (ix86_make_bounds_constant): Likewise.
13838         (ix86_initialize_bounds): Likewise.
13839         (TARGET_LOAD_BOUNDS_FOR_ARG): Likewise.
13840         (TARGET_STORE_BOUNDS_FOR_ARG): Likewise.
13841         (TARGET_LOAD_RETURNED_BOUNDS): Likewise.
13842         (TARGET_STORE_RETURNED_BOUNDS): Likewise.
13843         (TARGET_CHKP_BOUND_MODE): Likewise.
13844         (TARGET_BUILTIN_CHKP_FUNCTION): Likewise.
13845         (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): Likewise.
13846         (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): Likewise.
13847         (TARGET_CHKP_INITIALIZE_BOUNDS): Likewise.
13848         * config/i386/i386.h (TARGET_MPX): Likewise.
13849         (TARGET_MPX_P): Likewise.
13850         (VALID_BND_REG_MODE): Likewise.
13851         (FIRST_BND_REG): Likewise.
13852         (LAST_BND_REG): Likewise.
13853         (enum reg_class): Likewise.
13854         (BND_REG_P): Likewise.
13855         (BND_REGNO_P): Likewise.
13856         (BNDmode): Likewise.
13857         (ADJUST_INSN_LENGTH): Likewise.
13858         * config/i386/i386.md: Likewise.
13859         * config/i386/i386.opt: Likewise.
13860         * config/i386/linux-common.h (LIBMPX_LIBS): Likewise.
13861         (defined): Likewise.
13862         (LINK_MPX): Likewise.
13863         (MPX_SPEC): Likewise.
13864         (LIBMPX_SPEC): Likewise.
13865         (LIBMPXWRAPPERS_SPEC): Likewise.
13866         (CHKP_SPEC): Likewise.
13867         * config/i386/predicates.md: Likewise.
13868         * dbxout.c (dbxout_type): Likewise.
13869         * doc/extend.texi: Likewise.
13870         * doc/invoke.texi: Likewise.
13871         * doc/md.texi: Likewise.
13872         * doc/tm.texi: Likewise.
13873         * doc/tm.texi.in: Likewise.
13874         * dwarf2out.c (is_base_type): Likewise.
13875         (gen_formal_types_die): Likewise.
13876         (gen_subprogram_die): Likewise.
13877         (gen_type_die_with_usage): Likewise.
13878         (gen_decl_die): Likewise.
13879         (dwarf2out_late_global_decl): Likewise.
13880         * expr.c (expand_assignment): Likewise.
13881         (emit_storent_insn): Likewise.
13882         (store_expr_with_bounds): Likewise.
13883         (store_expr): Likewise.
13884         (expand_expr_real_1): Likewise.
13885         * expr.h (store_expr_with_bounds): Likewise.
13886         * function.c (use_register_for_decl): Likewise.
13887         (struct bounds_parm_data): Likewise.
13888         (assign_parms_augmented_arg_list): Likewise.
13889         (assign_parm_find_entry_rtl): Likewise.
13890         (assign_parm_is_stack_parm): Likewise.
13891         (assign_parm_load_bounds): Likewise.
13892         (assign_bounds): Likewise.
13893         (assign_parms): Likewise.
13894         (expand_function_start): Likewise.
13895         * gcc.c (CHKP_SPEC): Likewise.
13896         * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
13897         * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Likewise.
13898         (wrestrict_dom_walker::check_call): Likewise.
13899         * gimple.c (gimple_build_call_from_tree): Likewise.
13900         * gimple.h (enum gf_mask): Likewise.
13901         (gimple_call_with_bounds_p): Likewise.
13902         (gimple_call_set_with_bounds): Likewise.
13903         * gimplify.c (gimplify_init_constructor): Likewise.
13904         * ipa-cp.c (initialize_node_lattices): Likewise.
13905         (propagate_constants_across_call): Likewise.
13906         (find_more_scalar_values_for_callers_subset): Likewise.
13907         * ipa-hsa.c (process_hsa_functions): Likewise.
13908         * ipa-icf-gimple.c (func_checker::compare_gimple_call): Likewise.
13909         * ipa-icf.c (sem_function::merge): Likewise.
13910         * ipa-inline.c (early_inliner): Likewise.
13911         * ipa-pure-const.c (warn_function_noreturn): Likewise.
13912         (warn_function_cold): Likewise.
13913         (propagate_pure_const): Likewise.
13914         * ipa-ref.h (enum GTY): Likewise.
13915         * ipa-split.c (find_retbnd): Likewise.
13916         (consider_split): Likewise.
13917         (split_function): Likewise.
13918         * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
13919         * ipa.c (walk_polymorphic_call_targets): Likewise.
13920         (symbol_table::remove_unreachable_nodes): Likewise.
13921         (process_references): Likewise.
13922         (cgraph_build_static_cdtor_1): Likewise.
13923         * lto-cgraph.c (lto_output_node): Likewise.
13924         (output_refs): Likewise.
13925         (compute_ltrans_boundary): Likewise.
13926         (input_overwrite_node): Likewise.
13927         (input_node): Likewise.
13928         (input_cgraph_1): Likewise.
13929         * params.def (PARAM_CHKP_MAX_CTOR_SIZE): Likewise.
13930         * passes.c (pass_manager::execute_early_local_passes): Likewise.
13931         (class pass_chkp_instrumentation_passes): Likewise.
13932         (make_pass_chkp_instrumentation_passes): Likewise.
13933         * passes.def: Likewise.
13934         * rtl.h (struct GTY): Likewise.
13935         (CALL_EXPR_WITH_BOUNDS_P): Likewise.
13936         * stor-layout.c (layout_type): Likewise.
13937         * symtab.c: Likewise.
13938         * target.def: Likewise.
13939         * targhooks.c (default_chkp_bound_type): Likewise.
13940         (default_chkp_bound_mode): Likewise.
13941         (default_builtin_chkp_function): Likewise.
13942         (default_chkp_function_value_bounds): Likewise.
13943         (default_chkp_make_bounds_constant): Likewise.
13944         (default_chkp_initialize_bounds): Likewise.
13945         * targhooks.h (default_chkp_bound_type): Likewise.
13946         (default_chkp_bound_mode): Likewise.
13947         (default_builtin_chkp_function): Likewise.
13948         (default_chkp_function_value_bounds): Likewise.
13949         (default_chkp_make_bounds_constant): Likewise.
13950         (default_chkp_initialize_bounds): Likewise.
13951         * toplev.c (compile_file): Likewise.
13952         (process_options): Likewise.
13953         * tree-core.h (DEF_BUILTIN): Likewise.
13954         (DEF_BUILTIN_CHKP): Likewise.
13955         * tree-inline.c (declare_return_variable): Likewise.
13956         (remap_gimple_stmt): Likewise.
13957         (copy_bb): Likewise.
13958         (initialize_inlined_parameters): Likewise.
13959         (expand_call_inline): Likewise.
13960         * tree-pass.h (make_pass_ipa_chkp_versioning): Likewise.
13961         (make_pass_ipa_chkp_early_produce_thunks): Likewise.
13962         (make_pass_ipa_chkp_produce_thunks): Likewise.
13963         (make_pass_chkp): Likewise.
13964         (make_pass_chkp_opt): Likewise.
13965         (make_pass_chkp_instrumentation_passes): Likewise.
13966         * tree-pretty-print.c (dump_generic_node): Likewise.
13967         * tree-ssa-ccp.c (insert_clobber_before_stack_restore): Likewise.
13968         * tree-ssa-dce.c (propagate_necessity): Likewise.
13969         (eliminate_unnecessary_stmts): Likewise.
13970         * tree-ssa-pre.c (create_expression_by_pieces): Likewise.
13971         * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
13972         * tree-ssa-sccvn.h: Likewise.
13973         * tree-ssa-strlen.c (get_string_length): Likewise.
13974         (valid_builtin_call): Likewise.
13975         (adjust_last_stmt): Likewise.
13976         (handle_builtin_strchr): Likewise.
13977         (handle_builtin_strcpy): Likewise.
13978         (handle_builtin_stxncpy): Likewise.
13979         (handle_builtin_memcpy): Likewise.
13980         (handle_builtin_strcat): Likewise.
13981         (strlen_check_and_optimize_stmt): Likewise.
13982         * tree-stdarg.c (expand_ifn_va_arg_1): Likewise.
13983         * tree-streamer-in.c: Likewise.
13984         * tree-streamer.c (record_common_node): Likewise.
13985         * tree.c (tree_code_size): Likewise.
13986         (wide_int_to_tree_1): Likewise.
13987         (type_contains_placeholder_1): Likewise.
13988         (build_common_tree_nodes): Likewise.
13989         * tree.def (POINTER_BOUNDS_TYPE): Likewise.
13990         * tree.h (POINTER_BOUNDS_TYPE_P): Likewise.
13991         (POINTER_BOUNDS_P): Likewise.
13992         (BOUNDED_TYPE_P): Likewise.
13993         (BOUNDED_P): Likewise.
13994         (CALL_WITH_BOUNDS_P): Likewise.
13995         (pointer_bounds_type_node): Likewise.
13996         * value-prof.c (gimple_ic): Likewise.
13997         * var-tracking.c (vt_add_function_parameters): Likewise.
13998         * varasm.c (make_decl_rtl): Likewise.
13999         (assemble_start_function): Likewise.
14000         (output_constant): Likewise.
14001         (maybe_assemble_visibility): Likewise.
14002         * varpool.c (ctor_for_folding): Likewise.
14003         * chkp-builtins.def: Remove.
14004         * ipa-chkp.c: Remove.
14005         * ipa-chkp.h: Remove.
14006         * rtl-chkp.c: Remove.
14007         * rtl-chkp.h: Remove.
14008         * tree-chkp-opt.c: Remove.
14009         * tree-chkp.c: Remove.
14010         * tree-chkp.h: Remove.
14012 2018-06-07  Carl Love  <cel@us.ibm.com>
14014         * config/rs6000/vsx.md (vextract_fp_from_shorth,
14015         vextract_fp_from_shortl): Add BE support.
14017 2018-06-07  Paul Koning  <ni1d@arrl.net>
14019         * compare-elim.c (try_merge_compare): Don't merge compare if
14020         address contains a side effect.
14021         (try_eliminate_compare): Likewise.
14023 2018-06-07  Olga Makhotina  <olga.makhotina@intel.com>
14025         * config.gcc: Support "tremont".
14026         * config/i386/driver-i386.c (host_detect_local_cpu): Detect "tremont".
14027         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
14028         PROCESSOR_TREMONT.
14029         * config/i386/i386.c (m_TREMONT): Define.
14030         (processor_target_table): Add "tremont".
14031         (PTA_TREMONT): Define.
14032         (ix86_lea_outperforms): Add TARGET_TREMONT.
14033         (get_builtin_code_for_version): Handle PROCESSOR_TREMONT.
14034         (fold_builtin_cpu): Add M_INTEL_TREMONT, replace M_INTEL_GOLDMONT
14035         and M_INTEL_GOLDMONT_PLUS.
14036         (fold_builtin_cpu): Add "tremont".
14037         (ix86_add_stmt_cost): Add TARGET_TREMONT.
14038         (ix86_option_override_internal): Add "tremont".
14039         * config/i386/i386.h (processor_costs): Define TARGET_TREMONT.
14040         (processor_type): Add PROCESSOR_TREMONT.
14041         * config/i386/x86-tune.def: Add m_TREMONT.
14042         * doc/invoke.texi: Add tremont as x86 -march=/-mtune= CPU type.
14044 2018-06-07  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
14046         * config/msp430/msp430.c (msp430_mcu_name): Set the "i" in the
14047         symbol defined for msp430i* devices to be lower case.
14049 2018-06-07  Richard Biener  <rguenther@suse.de>
14051         * graphite-sese-to-poly.c (extract_affine): Avoid unneded
14052         wrapping.  Properly wrap the result of a BIT_NOT_EXPR.
14053         Properly wrap signed arithmetic if overflow wraps.
14055 2018-06-07  Jakub Jelinek  <jakub@redhat.com>
14057         PR tree-optimization/69615
14058         * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If rhs2 is lhs
14059         of a cast from a same precision integral SSA_NAME in a bb dominated
14060         by first_bb, retry with rhs2 set to the rhs1 of the cast.  Don't emit
14061         cast to utype if rhs2 has already a compatible type.
14063 2018-06-07  Richard Biener  <rguenther@suse.de>
14065         PR tree-optimization/85935
14066         * graphite-scop-detection.c (find_params_in_bb): Analyze
14067         condition operands with respect to the correct loop.  Assert
14068         the analysis doesn't fail.
14070 2018-06-04  Carl Love  <cel@us.ibm.com>
14072         * config/rs6000/vsx.md (first_match_index_<mode>): Calculate index
14073         using natural element order.  Use gen_lshrsi3 instead of gen_ashrsi3
14074         as it is slightly cheaper.
14075         (first_match_or_eos_index_<mode>):
14076         Calculate index using natural element order.
14077         (first_match_index_<mode>):
14078         Calculate index using natural element order.
14079         (first_match_or_eos_index_<mode>):
14080         Calculate index using natural order.
14081         (define_insn vclzlsbb): Change to define_insn vclzlsbb_<mode>.
14082         for BE and LE modes.
14083         * config/rs6000/rs6000-c.c: Rename P9V_BUILTIN_VCLZLSBB,
14084         P9V_BUILTIN_VCLZLSBB_V16QI.
14085         * config/rs6000/rs6000-builtin.def: Make VCLZLSBB mode
14086         specific.
14088 2018-06-06  Kelvin Nilsen  <kelvin@gcc.gnu.org>
14090         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
14091         indentation and line wrap for many prototypes.  Add missing
14092         @smallexample directives around block of prototypes for vec_xl and
14093         vec_xst.
14095 2018-06-05  Michael Meissner  <meissner@linux.ibm.com>
14097         * config/rs6000/rs6000.c (rs6000_passes_ieee128): New boolean to
14098         track if we pass or return IEEE 128-bit floating point.
14099         (ieee128_mangling_gcc_8_1): New boolean to say whether to generate
14100         C++ mangling that is compatible with GCC 8.1.
14101         (TARGET_ASM_GLOBALIZE_DECL_NAME): Override target hook.
14102         (init_cumulative_args): Note if we pass or return IEEE 128-bit
14103         floating point types.
14104         (rs6000_function_arg_advance_1): Likewise.
14105         (rs6000_mangle_type): Optionally generate mangled names that match
14106         what GCC 8.1 generated for IEEE 128-bit floating point types.
14107         (rs6000_globalize_decl_name): If we have an external function that
14108         passes or returns IEEE 128-bit types, generate a weak reference
14109         from the mangled name used in GCC 8.1 to the current mangled
14110         name.
14111         (rs6000_init_builtins): Make __ibm128 use the long double type if
14112         long double is IBM extended double.  Make __float128 use the long
14113         double type if long double is IEEE 128-bit.
14115         PR target/85657
14116         * config/rs6000/rs6000-builtin.def (BU_IBM128_2): New helper
14117         macro for __ibm128 built-in functions.
14118         (PACK_IF): Add __ibm128 pack/unpack functions.
14119         (UNPACK_IF): Likewise.
14120         * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Do not
14121         enable long double built-in functions if long double is IEEE
14122         128-bit floating point.
14123         (rs6000_invalid_builtin): Update long double built-in function
14124         error message.
14125         (rs6000_expand_builtin): For PACK_IF and UNPACK_IF built-in
14126         functions, adjust the built-in function to use the long double
14127         built-in function if __ibm128 and long double are the same type.
14128         * doc/extend.texi (PowerPC builtins): Update documention for
14129         __builtin_{,un}pack_longdouble.  Add documentation for
14130         __builtin_{,un}pack_ibm128.
14132 2018-06-06  Jim Wilson  <jimw@sifive.com>
14134         * config/riscv/riscv.c (enum riscv_privilege_levels): New.
14135         (struct machine_function): New field interrupt_mode.
14136         (riscv_handle_type_attribute): New function.  Add forward declaration.
14137         (riscv_attribute_table) <interrupt>: Use riscv_handle_type_attribute.
14138         (riscv_expand_epilogue): Check interrupt_mode field.
14139         (riscv_set_current_function): Check interrupt attribute args and
14140         set interrupt_mode field.
14141         * config/riscv/riscv.md (UNSPECV_SRET, UNSPECV_URET): New.
14142         (riscv_sret, riscv_uret): New.
14143         * doc/extend.texi (RISC-V Function Attributes) <interrupt>: Document
14144         new arguments to interrupt attribute.
14146 2018-06-06  Peter Bergner  <bergner@vnet.ibm.com>
14148         PR target/63177
14149         * /config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for -mpower9.
14150         Don't handle -mcpu=power8 if -mpower9-vector is also used.
14152 2018-06-06  Kelvin Nilsen  <kelvin@gcc.gnu.org>
14154         * config/rs6000/rs6000-builtin.def (VSX_BUILTIN_VEC_LD,
14155         VSX_BUILTIN_VEC_ST): Add comment to explain non-traditional uses.
14156         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
14157         several redundant entries.
14159 2018-06-06  David Malcolm  <dmalcolm@redhat.com>
14161         * config/i386/i386-protos.h (ix86_expand_call): Strengthen return
14162         type from "rtx" to "rtx_insn *".
14163         * config/i386/i386.c (ix86_expand_split_stack_prologue): Likewise
14164         for local "call_insn", removing cast.
14165         (ix86_expand_call): Likewise, introducing a "call_insn" local.
14167 2018-06-06  Eric Botcazou  <ebotcazou@adacore.com>
14169         PR tree-optimization/86066
14170         * gimple-ssa-store-merging.c (process_store): Do not bypass BIT_NOT_EXPR
14171         for BIT_INSERT_EXPR stores.
14173 2018-06-06  Richard Biener  <rguenther@suse.de>
14175         PR tree-optimization/86062
14176         * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
14177         component refs ontop
14178         of to be offsetted base.
14180 2018-06-06  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
14182         * config/msp430/msp430.c (msp430_attr): Allow interrupt handlers
14183         to be static and remove check on interrupt attribute name.
14185 2018-06-05  Kelvin Nilsen  <kelvin@gcc.gnu.org>
14187         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
14188         volatile qualifier from vec_lvsl and vec_lvsr argument prototypes.
14190 2018-06-05  Steve Ellcey  <sellcey@cavium.com>
14192         PR target/79924
14193         * config/aarch64/aarch64-protos.h (aarch64_err_no_fpadvsimd): Remove
14194         second argument.
14195         * config/aarch64/aarch64-protos..c (aarch64_err_no_fpadvsimd):
14196         Remove second argument, change how error is called.
14197         (aarch64_layout_arg): Remove second argument from
14198         aarch64_err_no_fpadvsimd call.
14199         (aarch64_init_cumulative_args): Ditto.
14200         (aarch64_gimplify_va_arg_expr): Ditto.
14201         * config/aarch64/aarch64.md (mov<mode>): Ditto.
14203 2018-06-05  Uros Bizjak  <ubizjak@gmail.com>
14205         * config/i386/i386.md (simple_return_indirect_internal): New expander.
14206         (*simple_return_indirect_internal<mode>): Rename from
14207         simple_return_indirect_internal.  Use W mode iterator.
14208         (rstorssp): New expander.
14209         (*rstorssp<mode>): Rename from rstorssp.  Use P mode iterator.
14210         (clrssbsy): New expander.
14211         (*clrssbsy<mode>): Rename from clrssbsy.  Use P mode iterator.
14213 2018-06-05  Andre Vieira  <andre.simoesdiasvieira@arm.com>
14215         * config/arm/arm_cmse.h (cmse_nsfptr_create): Change typeof to
14216         __typeof__.
14217         (cmse_check_pointed_object): Likewise.
14219 2018-06-05  Martin Liska  <mliska@suse.cz>
14221         PR gcov-profile/47618
14222         * doc/invoke.texi: Document how -fprofile-dir format
14223         is extended.
14225 2018-06-05  Richard Biener  <rguenther@suse.de>
14227         * tree-cfgcleanup.c (cleanup_control_flow_pre): For edge
14228         removal pretend DOM info isn't available so we do not update
14229         it and only remove edges, not dominated blocks.  Actually free
14230         DOM info in case we removed something.  Remove unreachable blocks.
14231         (mfb_keep_latches): Work with either DOM info or marked backedges.
14232         (cleanup_tree_cfg_noloop): Do not remove unreachable blocks
14233         first.  Mark backedges if DOM info isn't available.
14234         (Re-)compute DOM info after cleanup_control_flow_pre.
14236 2018-06-05  Richard Biener  <rguenther@suse.de>
14238         * tree-cfg.c (struct locus_discrim_map): Store line, not location.
14239         (locus_discrim_hasher::hash): Adjust.
14240         (locus_discrim_hasher::equal): Likewise.
14241         (next_discriminator_for_locus): Work on line directly.
14242         (same_line_p): Pass in expanded locus1 as well.
14243         (assign_discriminators): Avoid redundant location expansions.
14245 2018-06-05  Richard Biener  <rguenther@suse.de>
14247         PR tree-optimization/86046
14248         * tree-ssa.c (maybe_optimize_var): Clear DECL_GIMPLE_REG_P
14249         if required after clearing TREE_ADDRESSABLE.
14251 2018-06-05  Richard Biener  <rguenther@suse.de>
14253         PR tree-optimization/86047
14254         * tree-ssa-loop.c (for_each_index): Glob handling of all
14255         decls and constants and really handle all of them.
14257 2018-06-05  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
14259         PR target/81497
14260         * config/arm/arm-builtins.c (arm_type_qualifiers): Add
14261         qualifier_void_pointer and qualifier_const_void_pointer.
14262         (arm_ldc_qualifiers, arm_stc_qualifiers): Use the above.
14263         (arm_init_builtins): Handle the above.
14264         * config/arm/arm_acle.h (__arm_cdp, __arm_ldc, __arm_ldcl, __arm_stc,
14265         __arm_stcl, __arm_mcr, __arm_cdp2, __arm_ldc2, __arm_ldcl2, __arm_stc2,
14266         __arm_stcl2,__arm_mcr2, __arm_mcrr, __arm_mcrr2): Remove return for
14267         void intrinsics.
14269 2018-06-05  Martin Liska  <mliska@suse.cz>
14271         * auto-profile.c (read_autofdo_file): Do not use
14272         gcov_ctr_summary struct.
14273         (afdo_callsite_hot_enough_for_early_inline): Likewise.
14274         * coverage.c (struct counts_entry): Likewise.
14275         (read_counts_file): Read just single summary entry.
14276         (get_coverage_counts): Use gcov_summary struct.
14277         * coverage.h (get_coverage_counts): Likewise.
14278         * gcov-dump.c (dump_working_sets): Likewise.
14279         (tag_summary): Dump just single summary.
14280         * gcov-io.c (gcov_write_summary): Write just histogram
14281         summary.
14282         (gcov_read_summary): Read just single summary.
14283         (compute_working_sets): Use gcov_summary struct.
14284         * gcov-io.h (GCOV_TAG_SUMMARY_LENGTH): Remove usage
14285         of GCOV_COUNTERS_SUMMABLE.
14286         (GCOV_COUNTERS_SUMMABLE): Remove.
14287         (GCOV_FIRST_VALUE_COUNTER): Replace with
14288         GCOV_COUNTER_V_INTERVAL.
14289         (struct gcov_ctr_summary): Remove.
14290         (struct gcov_summary): Directly use fields of former
14291         gcov_ctr_summary.
14292         (compute_working_sets): Use gcov_summary struct.
14293         * gcov.c (read_count_file): Do not use ctrs fields.
14294         * lto-cgraph.c (merge_profile_summaries): Use gcov_summary
14295         struct.
14296         * lto-streamer.h (struct GTY): Make profile_info gcov_summary
14297         struct.
14298         * profile.c: Likewise.
14299         * profile.h: Likewise.
14301 2018-06-05  Martin Liska  <mliska@suse.cz>
14303         PR gcov-profile/84846
14304         * gcov.c (output_lines): Print working directory only
14305         in intermediate format.
14307 2018-06-05  Andreas Krebbel  <krebbel@linux.ibm.com>
14309         * config/s390/s390-builtin-types.def: Add void function type.
14310         * config/s390/s390-builtins.def: Use the function type for the
14311         tbeginc builtin.
14313 2018-06-04  Jim Wilson  <jimw@sifive.com>
14315         * config/riscv/riscv-protos.h (riscv_expand_epilogue): Change bool arg
14316         to int.
14317         * config/riscv/riscv.c (riscv_for_each_saved_reg): New args epilogue
14318         and maybe_eh_return.  Change regno to unsigned int.  Use new args to
14319         handle EH_RETURN_DATA_REGNO registers properly.
14320         (riscv_expand_prologue): Pass new args to riscv_for_each_saved_reg.
14321         (riscv_expand_epilogue): Update comment.  Change argument name and
14322         type.  Update code to use new name and type.  Pass new args to
14323         riscv_for_each_saved_reg.  Only use EH_RETURN_STACKADJ_RTX when
14324         EXCEPTION_RETURN.
14325         * config/riscv/riscv.md (NORMAL_RETURN): New.
14326         (SIBCALL_RETURN, EXCEPTION_RETURN): New.
14327         (epilogue, sibcall_epilogue): Update riscv_expand_epilogue arg.
14328         (eh_return): Call gen_eh_return_internal and emit barrier.
14329         (eh_return_internal): Call riscv_expand_epilogue.
14331 2018-06-04  Eric Botcazou  <ebotcazou@adacore.com>
14333         * gimple-ssa-store-merging.c (struct merged_store_group): Move up
14334         bit_insertion field and declare can_be_merged_into method.
14335         (merged_store_group::can_be_merged_into): New method.
14336         (imm_store_chain_info::coalesce_immediate): Call it to decide whether
14337         consecutive non-overlapping stores can be merged.  Turn MEM_REF stores
14338         into BIT_INSERT_EXPR stores if the group contains a non-MEM_REF store.
14340 2018-06-04  Richard Biener  <rguenther@suse.de>
14342         PR tree-optimization/85955
14343         * builtins.c (fold_builtin_sincos): Convert pointers to
14344         destination to appropriate type before dereferencing.
14346 2018-06-04  Segher Boessenkool  <segher@kernel.crashing.org>
14348         * config/rs6000/rs6000.md (abs<mode>2 for FLOAT128): Handle IFmode.
14350 2018-06-04  Richard Sandiford  <richard.sandiford@linaro.org>
14352         * expr.c (expand_expr_real_1): Force the operand into memory if
14353         its TYPE_MODE is BLKmode and if there is no integer mode for
14354         the number of bits being extracted.
14356 2018-06-04  Jakub Jelinek  <jakub@redhat.com>
14358         PR target/85832
14359         PR target/86036
14360         * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
14361         Use vptestnm rather than vptestm in (=Yc,v,C) variant.
14363 2018-06-04  Richard Biener  <rguenther@suse.de>
14365         * tree-cfgcleanup.c (cleanup_tree_cfg_1): Fold into...
14366         (cleanup_tree_cfg_noloop): ... single caller.  Do
14367         start_recording_case_labels later.
14369 2018-06-04  Sebastian Peryt  <sebastian.peryt@intel.com>
14371         * config/i386/cldemoteintrin.h: Change define from _X86INTRIN_H_INCLUDED
14372         to _IMMINTRIN_H_INCLUDED.
14373         * config/i386/pconfigintrin.h: Ditto.
14374         * config/i386/waitpkgintrin.h: Ditto.
14375         * config/i386/immintrin.h: Add includes for sgxintrin.h,
14376         pconfigintrin.h, waitpkgintrin.h and cldemoteintrin.h.
14377         * config/i386/x86intrin.h: Remove includes for mintrin.h, xmmintrin.h,
14378         emmintrin.h, pmmintrin.h, tmmintrin.h, smmintrin.h, wmmintrin.h,
14379         bmiintrin.h, bmi2intrin.h, lzcntintrin.h, sgxintrin.h, pconfigintrin.h,
14380         waitpkgintrin.h and cldemoteintrin.h.
14382 2018-06-04  Richard Biener  <rguenther@suse.de>
14384         PR tree-optimization/86038
14385         * tracer.c (find_best_successor): Check probability for
14386         being initialized, bail out if not.
14388 2018-06-04  Richard Earnshaw  <rearnsha@arm.com>
14390         PR target/86003
14391         * config/arm/arm-cpus.in (ALL_QUIRKS): Add xscale feature to the list
14392         of bits to ignore when comparing architectures.
14394 2018-06-04  Jakub Jelinek  <jakub@redhat.com>
14396         PR tree-optimization/69615
14397         * fold-const.c (merge_ranges): If range1 is - [x, x] and x is the
14398         maximum or minimum of the type, try to merge it also as if
14399         range1 is + [-, x - 1] or + [x + 1, -].
14401         PR c++/86025
14402         * tree.c (inchash::add_expr): Handle IDENTIFIER_NODE.
14404 2018-06-03  Eric Botcazou  <ebotcazou@adacore.com>
14406         PR tree-optimization/86034
14407         * gimple-ssa-store-merging.c (output_merged_store): Convert the RHS to
14408         the unsigned bitfield type in a bit insertion sequence if it does not
14409         have a larger precision than the bitfield size.
14410         (process_store): Also bypass widening conversions for BIT_INSERT_EXPR.
14412 2018-06-03  Kito Cheng  <kito.cheng@gmail.com>
14414         * config/nds32/nds32-peephole2.md: Add new patterns for code size.
14416 2018-06-03  Chung-Ju Wu  <jasonwucj@gmail.com>
14418         * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3J.
14419         * config/nds32/nds32.c (nds32_option_override): Consider ARCH_V3J.
14420         * config/nds32/nds32.h (TARGET_ISA_V3): Add ARCH_V3J checking.
14421         * config/nds32/nds32.opt (march): Add enum value Value(ARCH_V3J).
14423 2018-06-03  Chung-Ju Wu  <jasonwucj@gmail.com>
14425         * common/config/nds32/nds32-common.c (nds32_option_optimization_table):
14426         Disable -fdelete-null-pointer-checks for ELF toolchain.
14428 2018-06-02  Chung-Ju Wu  <jasonwucj@gmail.com>
14429             Kito Cheng  <kito.cheng@gmail.com>
14431         * config.gcc (nds32*): Use nds32-linux.opt and nds32-elf.opt.
14432         (nds32le-*-*, nds32be-*-*): Integrate checking process.
14433         (nds32*-*-*): Add glibc and uclibc conditions.
14434         * common/config/nds32/nds32-common.c (nds32_except_unwind_info): New.
14435         (TARGET_EXCEPT_UNWIND_INFO): Define.
14436         * config/nds32/elf.h: New file.
14437         * config/nds32/linux.h: New file.
14438         * config/nds32/nds32-elf.opt: New file.
14439         * config/nds32/nds32-linux.opt: New file.
14440         * config/nds32/nds32-fp-as-gp.c
14441         (pass_nds32_fp_as_gp::gate): Consider TARGET_LINUX_ABI.
14442         * config/nds32/nds32.c (nds32_conditional_register_usage): Consider
14443         TARGET_LINUX_ABI.
14444         (nds32_asm_file_end): Ditto.
14445         (nds32_print_operand): Ditto.
14446         (nds32_insert_attributes): Ditto.
14447         (nds32_init_libfuncs): New function.
14448         (TARGET_HAVE_TLS): Define.
14449         (TARGET_INIT_LIBFUNCS): Define.
14450         * config/nds32/nds32.h (TARGET_DEFAULT_RELAX): Apply different relax
14451         spec content.
14452         (TARGET_ELF): Apply different mcmodel setting.
14453         (LINK_SPEC, LIB_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): The content has
14454         been migrated into elf.h and linux.h files.
14455         * config/nds32/nds32.md (add_pc): Consider TARGET_LINUX_ABI.
14456         * config/nds32/nds32.opt (mvh): Consider TARGET_LINUX_ABI.
14457         (mcmodel): The content has been migrated into nds32-elf.opt and
14458         nds32-linux.opt files.
14459         * config/nds32/t-elf: New file.
14460         * config/nds32/t-linux: New file.
14462 2018-06-02  Chung-Ju Wu  <jasonwucj@gmail.com>
14463             Shiva Chen  <shiva0217@gmail.com>
14465         * config/nds32/constants.md (unspec_volatile_element): Add
14466         UNSPEC_VOLATILE_OMIT_FP_BEGIN and UNSPEC_VOLATILE_OMIT_FP_END.
14467         * config/nds32/nds32-fp-as-gp.c: New implementation of fp_as_gp
14468         optimization.
14469         * config/nds32/nds32-protos.h (nds32_naked_function_p): Declare.
14470         (make_pass_nds32_fp_as_gp): Declare.
14471         * config/nds32/nds32.c (nds32_register_passes): Add fp_as_gp as one
14472         optmization pass.
14473         (nds32_asm_function_end_prologue): Remove unused asm output.
14474         (nds32_asm_function_begin_epilogue): Remove unused asm output.
14475         (nds32_asm_file_start): Output necessary fp_as_gp information.
14476         (nds32_option_override): Adjust register usage.
14477         (nds32_expand_prologue): Consider fp_as_gp situation.
14478         (nds32_expand_prologue_v3push): Consider fp_as_gp situation.
14479         * config/nds32/nds32.md (prologue): Check fp_as_gp_p and naked_p.
14480         (epilogue): Ditto.
14481         (return): Ditto.
14482         (simple_return): Ditto.
14483         (omit_fp_begin): Output special directive for fp_as_gp.
14484         (omit_fp_end): Output special directive for fp_as_gp.
14485         * config/nds32/nds32.opt (mfp-as-gp, mno-fp-as-gp, mforce-fp-as-gp,
14486         mforbid-fp-as-gp): New options.
14488 2018-06-01  Mark Wielaard  <mark@klomp.org>
14490         * dwarf2out.c (dwarf2out_finish): Remove generation of
14491         DW_AT_loclists_base.
14493 2018-06-01  Eric Botcazou  <ebotcazou@adacore.com>
14495         * gimple-ssa-store-merging.c: Include gimple-fold.h.
14496         (struct store_immediate_info): Document BIT_INSERT_EXPR stores.
14497         (struct merged_store_group): Add bit_insertion field.
14498         (dump_char_array): Use standard hexadecimal format.
14499         (merged_store_group::merged_store_group): Set bit_insertion to false.
14500         (merged_store_group::apply_stores): Use optimal buffer size.  Deal
14501         with BIT_INSERT_EXPR stores.  Move up code updating the mask and
14502         also print the mask in the dump file.
14503         (pass_store_merging::gate): Minor tweak.
14504         (imm_store_chain_info::coalesce_immediate): Fix wrong association
14505         of stores with groups in dump.  Allow coalescing of BIT_INSERT_EXPR
14506         stores with INTEGER_CST stores.
14507         (count_multiple_uses) <BIT_INSERT_EXPR>: New case.
14508         (imm_store_chain_info::output_merged_store): Add try_bitpos variable
14509         and use it throughout.  Generate bit insertion sequences if need be.
14510         (pass_store_merging::process_store): Remove redundant condition.
14511         Record stores from a SSA name to a bit-field with BIT_INSERT_EXPR.
14513 2018-06-01  Segher Boessenkool  <segher@kernel.crashing.org>
14515         * config/rs6000/rs6000.c (rs6000_mangle_type): Change the mangling of
14516         the 128-bit floating point types.  Fix function comment.
14518 2018-06-01  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
14520         * config/aarch64/aarch64-simd.md
14521         (aarch64_simd_vec_unpack<su>_lo_<mode>): Use UXTL and SXTL assembler
14522         mnemonics.
14523         (aarch64_simd_vec_unpack<su>_hi_<mode>): Use UXTL2 and SXTL2 assembler
14524         mnemonics.
14526 2018-06-01  Richard Sandiford  <richard.sandiford@linaro.org>
14528         PR tree-optimization/85989
14529         * gimple-ssa-backprop.c (backprop::m_visited_phis): New member
14530         variable.
14531         (backprop::intersect_uses): Check it when deciding whether this
14532         is a backedge reference.
14533         (backprop::process_block): Add each phi to m_visited_phis
14534         after visiting it, then clear it at the end.
14536 2018-06-01  Richard Biener  <rguenther@suse.de>
14538         * tree-vectorizer.h (vect_dr_stmt): New function.
14539         (vect_get_load_cost): Adjust.
14540         (vect_get_store_cost): Likewise.
14541         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
14542         Use vect_dr_stmt instead of DR_SMTT.
14543         (vect_record_base_alignments): Likewise.
14544         (vect_calculate_target_alignment): Likewise.
14545         (vect_compute_data_ref_alignment): Likewise and make static.
14546         (vect_update_misalignment_for_peel): Likewise.
14547         (vect_verify_datarefs_alignment): Likewise.
14548         (vector_alignment_reachable_p): Likewise.
14549         (vect_get_data_access_cost): Likewise.  Pass down
14550         vinfo to vect_get_load_cost/vect_get_store_cost instead of DR.
14551         (vect_get_peeling_costs_all_drs): Likewise.
14552         (vect_peeling_hash_get_lowest_cost): Likewise.
14553         (vect_enhance_data_refs_alignment): Likewise.
14554         (vect_find_same_alignment_drs): Likewise.
14555         (vect_analyze_data_refs_alignment): Likewise.
14556         (vect_analyze_group_access_1): Likewise.
14557         (vect_analyze_group_access): Likewise.
14558         (vect_analyze_data_ref_access): Likewise.
14559         (vect_analyze_data_ref_accesses): Likewise.
14560         (vect_vfa_segment_size): Likewise.
14561         (vect_small_gap_p): Likewise.
14562         (vectorizable_with_step_bound_p): Likewise.
14563         (vect_prune_runtime_alias_test_list): Likewise.
14564         (vect_analyze_data_refs): Likewise.
14565         (vect_supportable_dr_alignment): Likewise.
14566         * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
14567         (vect_gen_prolog_loop_niters): Likewise.
14568         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
14569         * tree-vect-patterns.c (vect_recog_bool_pattern): Do not
14570         modify DR_STMT.
14571         (vect_recog_mask_conversion_pattern): Likewise.
14572         (vect_try_gather_scatter_pattern): Likewise.
14573         * tree-vect-stmts.c (vect_model_store_cost): Pass stmt_info
14574         to vect_get_store_cost.
14575         (vect_get_store_cost): Get stmt_info instead of DR.
14576         (vect_model_load_cost): Pass stmt_info to vect_get_load_cost.
14577         (vect_get_load_cost): Get stmt_info instead of DR.
14579 2018-06-01  Richard Biener  <rguenther@suse.de>
14581         PR middle-end/86017
14582         * gimple-fold.c (var_decl_component_p): Also allow offsetted
14583         vars wrapped in MEM_REFs.
14585 2018-06-01  Richard Sandiford  <richard.sandiford@linaro.org>
14587         * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
14588         Fix subreg tests so that we only return a choice between
14589         GENERAL_REGS and FP_REGS if the original classes included both.
14591 2018-06-01  Richard Biener  <rguenther@suse.de>
14593         PR ipa/85960
14594         * tree-ssa-structalias.c (get_function_part_constraint):
14595         Handle NULL fi->decl.
14596         (find_func_aliases_for_call): Properly handle indirect
14597         fi from direct call.
14598         (find_func_clobbers): Likewise.
14599         (ipa_pta_execute): Likewise.
14600         (create_variable_info_for): For functions that are ifunc_resolver
14601         resolve to a varinfo that contains the result of the resolver call.
14602         (associate_varinfo_to_alias): Do not treat ifunc resolvers as
14603         aliases.
14605 2018-05-31  Michael Collison  <michael.collison@arm.com>
14607         * config/aarch64/aarch64.md:
14608         (*fix_to_zero_extenddfdi2): New pattern.
14609         * gcc.target/aarch64/fix_extend1.c: New testcase.
14611 2018-05-31  Qing Zhao <qing.zhao@oracle.com>
14613         PR middle-end/78809
14614         PR middle-end/83026
14615         * builtins.c (expand_builtin): Add the handling of BUILT_IN_STRCMP_EQ
14616         and BUILT_IN_STRNCMP_EQ.
14617         * builtins.def: Add new builtins BUILT_IN_STRCMP_EQ and
14618         BUILT_IN_STRNCMP_EQ.
14619         * gimple-fold.c (gimple_fold_builtin_string_compare): Add the
14620         handling of BUILTIN_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
14621         (gimple_fold_builtin): Likewise.
14622         * tree-ssa-strlen.c (compute_string_length): New function.
14623         (determine_min_obsize): New function.
14624         (handle_builtin_string_cmp): New function to handle calls to
14625         string compare functions.
14626         (strlen_optimize_stmt): Add handling to builtin string compare
14627         calls.
14628         * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
14629         Add the handling of BUILT_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
14630         * tree.c (build_common_builtin_nodes): Add new defines of
14631         BUILT_IN_STRNCMP_EQ and BUILT_IN_STRCMP_EQ.
14633 2018-05-31  Jakub Jelinek  <jakub@redhat.com>
14635         PR target/85984
14636         * bb-reorder.c (pass_partition_blocks::gate): Return false for
14637         functions with naked attribute.
14639 2018-05-31  Uros Bizjak  <ubizjak@gmail.com>
14641         * config/i386/sse.md (avx_vec_concat<mode>):
14642         Substitute concat_tg_mode mode attribute with xtg_mode.
14643         (<mask_codefor>avx512dq_broadcast<mode><mask_name>_1): Ditto.
14644         (concat_tg_mode): Remove mode attribute.
14646 2018-05-31  Martin Sebor  <msebor@redhat.com>
14648         PR c/82063
14649         * calls.c (alloc_max_size): Correct a logic error/typo.
14650         Treat excessive arguments as infinite.  Warn for invalid arguments.
14651         * doc/invoke.texi (-Walloc-size-larger-than): Update.
14653 2018-05-31  H.J. Lu  <hongjiu.lu@intel.com>
14655         PR target/85829
14656         * config/i386/x86-tune.def: Re-enable partial_reg_dependency
14657         and movx for Haswell.
14659 2018-05-31  Chung-Lin Tang  <cltang@codesourcery.com>
14660             Cesar Philippidis  <cesar@codesourcery.com>
14662         PR middle-end/85879
14663         * gimplify.c (gimplify_adjust_omp_clauses): Add 'remove = true'
14664         when emitting error on private/firstprivate reductions.
14665         * omp-low.c (lower_omp_target): Avoid reference-type processing
14666         on pointers for firstprivate clause.
14668 2018-05-31  Sameera Deshpande <sameera.deshpande@linaro.org>
14670         * config/aarch64/aarch64-simd-builtins.def (ld1x3): New.
14671         (st1x2): Likewise.
14672         (st1x3): Likewise.
14673         * config/aarch64/aarch64-simd.md
14674         (aarch64_ld1x3<VALLDIF:mode>): New pattern.
14675         (aarch64_ld1_x3_<mode>): Likewise
14676         (aarch64_st1x2<VALLDIF:mode>): Likewise
14677         (aarch64_st1_x2_<mode>): Likewise
14678         (aarch64_st1x3<VALLDIF:mode>): Likewise
14679         (aarch64_st1_x3_<mode>): Likewise
14680         * config/aarch64/arm_neon.h (vld1_u8_x3): New function.
14681         (vld1_s8_x3): Likewise.
14682         (vld1_u16_x3): Likewise.
14683         (vld1_s16_x3): Likewise.
14684         (vld1_u32_x3): Likewise.
14685         (vld1_s32_x3): Likewise.
14686         (vld1_u64_x3): Likewise.
14687         (vld1_s64_x3): Likewise.
14688         (vld1_f16_x3): Likewise.
14689         (vld1_f32_x3): Likewise.
14690         (vld1_f64_x3): Likewise.
14691         (vld1_p8_x3): Likewise.
14692         (vld1_p16_x3): Likewise.
14693         (vld1_p64_x3): Likewise.
14694         (vld1q_u8_x3): Likewise.
14695         (vld1q_s8_x3): Likewise.
14696         (vld1q_u16_x3): Likewise.
14697         (vld1q_s16_x3): Likewise.
14698         (vld1q_u32_x3): Likewise.
14699         (vld1q_s32_x3): Likewise.
14700         (vld1q_u64_x3): Likewise.
14701         (vld1q_s64_x3): Likewise.
14702         (vld1q_f16_x3): Likewise.
14703         (vld1q_f32_x3): Likewise.
14704         (vld1q_f64_x3): Likewise.
14705         (vld1q_p8_x3): Likewise.
14706         (vld1q_p16_x3): Likewise.
14707         (vld1q_p64_x3): Likewise.
14708         (vst1_s64_x2): Likewise.
14709         (vst1_u64_x2): Likewise.
14710         (vst1_f64_x2): Likewise.
14711         (vst1_s8_x2): Likewise.
14712         (vst1_p8_x2): Likewise.
14713         (vst1_s16_x2): Likewise.
14714         (vst1_p16_x2): Likewise.
14715         (vst1_s32_x2): Likewise.
14716         (vst1_u8_x2): Likewise.
14717         (vst1_u16_x2): Likewise.
14718         (vst1_u32_x2): Likewise.
14719         (vst1_f16_x2): Likewise.
14720         (vst1_f32_x2): Likewise.
14721         (vst1_p64_x2): Likewise.
14722         (vst1q_s8_x2): Likewise.
14723         (vst1q_p8_x2): Likewise.
14724         (vst1q_s16_x2): Likewise.
14725         (vst1q_p16_x2): Likewise.
14726         (vst1q_s32_x2): Likewise.
14727         (vst1q_s64_x2): Likewise.
14728         (vst1q_u8_x2): Likewise.
14729         (vst1q_u16_x2): Likewise.
14730         (vst1q_u32_x2): Likewise.
14731         (vst1q_u64_x2): Likewise.
14732         (vst1q_f16_x2): Likewise.
14733         (vst1q_f32_x2): Likewise.
14734         (vst1q_f64_x2): Likewise.
14735         (vst1q_p64_x2): Likewise.
14736         (vst1_s64_x3): Likewise.
14737         (vst1_u64_x3): Likewise.
14738         (vst1_f64_x3): Likewise.
14739         (vst1_s8_x3): Likewise.
14740         (vst1_p8_x3): Likewise.
14741         (vst1_s16_x3): Likewise.
14742         (vst1_p16_x3): Likewise.
14743         (vst1_s32_x3): Likewise.
14744         (vst1_u8_x3): Likewise.
14745         (vst1_u16_x3): Likewise.
14746         (vst1_u32_x3): Likewise.
14747         (vst1_f16_x3): Likewise.
14748         (vst1_f32_x3): Likewise.
14749         (vst1_p64_x3): Likewise.
14750         (vst1q_s8_x3): Likewise.
14751         (vst1q_p8_x3): Likewise.
14752         (vst1q_s16_x3): Likewise.
14753         (vst1q_p16_x3): Likewise.
14754         (vst1q_s32_x3): Likewise.
14755         (vst1q_s64_x3): Likewise.
14756         (vst1q_u8_x3): Likewise.
14757         (vst1q_u16_x3): Likewise.
14758         (vst1q_u32_x3): Likewise.
14759         (vst1q_u64_x3): Likewise.
14760         (vst1q_f16_x3): Likewise.
14761         (vst1q_f32_x3): Likewise.
14762         (vst1q_f64_x3): Likewise.
14763         (vst1q_p64_x3): Likewise.
14765 2018-05-30  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
14767         * config/msp430/msp430.c (msp430_output_labelref): Prepend
14768         user_label_prefix to name.
14770         * tree-core.h: Update comment about the format of NAME string
14771         passed to handler in attribute_spec.
14773         * config/msp430/msp430.md: Remove erroneous subreg expression from
14774         zero_extendqisi2 insn pattern. Remove msp430x ISA restriction on
14775         zero_extend{q,h}isi2.
14777 2018-05-30  Borislav Petkov  <bp@suse.de>
14779         * doc/extend.texi: Document some architecture specific
14780         constraints and sort entries.
14782 2018-05-30  Martin Sebor  <msebor@redhat.com>
14784         PR middle-end/85369
14785         * builtins.c (expand_builtin_stpcpy_1): New function.
14786         (expand_builtin_stpcpy): Call it, and call maybe_warn_nonstring_arg
14787         only if the former succeeds.
14789 2018-05-31  Sameera Deshpande <sameera.deshpande@linaro.org>
14791         * config/aarch64/aarch64-cores.def (saphira) : Add support for ARMv8.4
14792         in saphira.
14794 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
14796         * doc/invoke.texi (-flinker-output): Document
14798 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
14800         * passes.c (ipa_write_summaries): Only modify statements if body
14801         is in memory.
14802         * cgraphunit.c (ipa_passes): Also produce intermeidate code when
14803         incrementally linking.
14804         (ipa_passes): Likewise.
14805         * lto-cgraph.c (lto_output_node): When incrementally linking do not
14806         pass down resolution info.
14807         * common.opt (flag_incremental_link): Update info.
14808         * gcc.c (plugin specs): Turn flinker-output=* to
14809         -plugin-opt=-linker-output-known
14810         * toplev.c (compile_file): Also cut compilation when doing incremental
14811         link.
14812         * flag-types. (enum lto_partition_model): Add
14813         LTO_LINKER_OUTPUT_NOLTOREL.
14814         (invoke.texi): Add -flinker-output docs.
14815         * ipa.c (symbol_table::remove_unreachable_nodes): Handle LTO incremental
14816         link same way as WPA; do not stream in dead initializers.
14818         * dwarf2out.c (dwarf2out_die_ref_for_decl,
14819         darf2out_register_external_decl): Support incremental link.
14821 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
14823         * lto-opts.c (lto_write_options): Skip OPT_dumpdir, OPT_fresolution_.
14825 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
14827         * lto-wrapper.c (debug_objcopy): Add rename parameter; pass
14828         it down to simple_object_copy_lto_debug_sections.
14829         (run_gcc): Determine incremental LTO link time and configure
14830         lto1 into non-wpa mode, disable renaming of debug sections.
14832 2018-05-30  Kelvin Nilsen  <kelvin@gcc.gnu.org>
14834         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
14835         descriptions of various incorrectly documented functions.
14837 2018-05-30  Andre Vieira  <andre.simoesdiasvieira@arm.com>
14839         Revert:
14840         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
14841         address check not strict.
14843 2018-05-30  Richard Biener  <rguenther@suse.de>
14845         PR tree-optimization/85964
14846         * tracer.c (better_p): Drop initialized count check, we only
14847         call the function with initialized counts now.
14848         (find_best_successor): Do find a best edge if one
14849         has uninitialized count.
14850         (find_best_predecessor): Likewise.  Do BB frequency check only
14851         if count is initialized.
14853 2017-05-30  Jackson Woodruff  <jackson.woodruff@arm.com>
14855         * config/aarch64/aarch64.c (aarch64_host_wide_int_compare): New.
14856         (aarch64_ldrstr_offset_compare): New.
14857         (aarch64_operands_adjust_ok_for_ldpstp): Update to consider all
14858         load/store orderings.
14859         (aarch64_gen_adjusted_ldpstp): Likewise.
14861 2018-05-30  Wilco Dijkstra  <wdijkstr@arm.com>
14863         * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
14864         Check for subset of GENERAL_REGS and FP_REGS.
14865         * config/aarch64/aarch64-simd.md (aarch64_get_lane): Increase cost of
14866         r=w alternative.
14868 2018-05-30  Richard Sandiford  <richard.sandiford@linaro.org>
14870         * alias.c (adjust_offset_for_component_ref): Use poly_int_tree_p
14871         and wi::to_poly_offset.  Add the current offset and then check
14872         whether the sum fits, rather than using an unchecked addition of
14873         a checked term.  Check for a shwi rather than a uhwi.
14874         * expr.c (get_bit_range): Use tree_to_poly_uint64.
14875         (store_constructor): Use poly_int_tree_p.
14876         (expand_expr_real_1): Likewise.
14877         * function.c (assign_temp): Likewise.
14878         * fold-const.c (const_binop): Use poly_int_tree_p and
14879         wi::to_poly_offset.
14880         (fold_indirect_ref_1): Likewise.  Use multiple_p to attempt an exact
14881         division.
14882         * ipa-icf-gimple.c (func_checker::compare_operand): Use
14883         to_poly_offset for MEM offsets.
14884         * ipa-icf.c (sem_variable::equals): Likewise.
14885         * stor-layout.c (compute_record_mode): Use poly_int_tree_p.
14886         * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use
14887         wi::to_poly_offset for BIT_FIELD_REF offsets.
14888         (vn_reference_maybe_forwprop_address): Use poly_int_tree_p and
14889         wi::to_poly_offset.
14890         * var-tracking.c (emit_note_insn_var_location): Use
14891         tree_to_poly_uint64.
14893 2018-05-29  Jim Wilson  <jimw@sifive.com>
14895         * config/riscv/riscv.c (riscv_interrupt_type): Fix comment typo.
14897 2018-05-29  Uros Bizjak  <ubizjak@gmail.com>
14899         PR target/85950
14900         * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
14901         Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
14902         sequence.
14903         (sse4_1_round<mode>2): Use nonimmediate_operand
14904         for operand 1 predicate.
14906 2018-05-29  Martin Sebor  <msebor@redhat.com>
14907             Richard Biener  <rguenther@suse.de>
14909         PR testsuite/85888
14910         * calls.c (get_size_range): Call determine_value_range instead
14911         of get_value_range..
14912         * tree-vrp.h (determine_value_range): Declared new function.
14913         * tree-vrp.c (determine_value_range_1, determine_value_range): New.
14915 2018-05-29  Richard Biener  <rguenther@suse.de>
14917         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Make
14918         sure to use non-pattern stmts for get_earlier_stmt arguments.
14919         * tree-vectorizer.h (get_earlier_stmt): Assert we do not get
14920         called on pattern stmts.
14921         (get_later_stmt): Likewise.
14923 2018-05-29  Martin Liska  <mliska@suse.cz>
14925         PR gcov-profile/85759
14926         * doc/gcov.texi: Document GCOV_ERROR_FILE and GCOV_EXIT_AT_ERROR
14927         env variables.
14929 2018-05-29  Jakub Jelinek  <jakub@redhat.com>
14931         * tree-cfg.c (verify_gimple_assign_unary): Add checking for
14932         VEC_UNPACK_*_EXPR.
14933         (verify_gimple_assign_binary): Check TYPE_VECTOR_SUBPARTS for
14934         VEC_PACK_*_EXPR.
14936         PR target/85918
14937         * tree.def (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
14938         VEC_PACK_FLOAT_EXPR): New tree codes.
14939         * tree-pretty-print.c (op_code_prio): Handle
14940         VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR.
14941         (dump_generic_node): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
14942         VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
14943         * tree-inline.c (estimate_operator_cost): Likewise.
14944         * gimple-pretty-print.c (dump_binary_rhs): Handle VEC_PACK_FLOAT_EXPR.
14945         * fold-const.c (const_binop): Likewise.
14946         (const_unop): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR and
14947         VEC_UNPACK_FIX_TRUNC_LO_EXPR.
14948         * tree-cfg.c (verify_gimple_assign_unary): Likewise.
14949         (verify_gimple_assign_binary): Handle VEC_PACK_FLOAT_EXPR.
14950         * cfgexpand.c (expand_debug_expr): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
14951         VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
14952         * expr.c (expand_expr_real_2): Likewise.
14953         * optabs.def (vec_packs_float_optab, vec_packu_float_optab,
14954         vec_unpack_sfix_trunc_hi_optab, vec_unpack_sfix_trunc_lo_optab,
14955         vec_unpack_ufix_trunc_hi_optab, vec_unpack_ufix_trunc_lo_optab): New
14956         optabs.
14957         * optabs.c (expand_widen_pattern_expr): For
14958         VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR use
14959         sign from result type rather than operand's type.
14960         (expand_binop_directly): For vec_packu_float_optab and
14961         vec_packs_float_optab allow result type to be different from operand's
14962         type.
14963         * optabs-tree.c (optab_for_tree_code): Handle
14964         VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
14965         VEC_PACK_FLOAT_EXPR.  Formatting fixes.
14966         * tree-vect-generic.c (expand_vector_operations_1):  Handle
14967         VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
14968         VEC_PACK_FLOAT_EXPR.
14969         * tree-vect-stmts.c (supportable_widening_operation): Handle
14970         FIX_TRUNC_EXPR.
14971         (supportable_narrowing_operation): Handle FLOAT_EXPR.
14972         * config/i386/i386.md (fixprefix, floatprefix): New code attributes.
14973         * config/i386/sse.md (*float<floatunssuffix>v2div2sf2): Rename to ...
14974         (float<floatunssuffix>v2div2sf2): ... this.  Formatting fix.
14975         (vpckfloat_concat_mode, vpckfloat_temp_mode, vpckfloat_op_mode): New
14976         mode attributes.
14977         (vec_pack<floatprefix>_float_<mode>): New expander.
14978         (vunpckfixt_mode, vunpckfixt_model, vunpckfixt_extract_mode): New mode
14979         attributes.
14980         (vec_unpack_<fixprefix>fix_trunc_lo_<mode>,
14981         vec_unpack_<fixprefix>fix_trunc_hi_<mode>): New expanders.
14982         * doc/md.texi (vec_packs_float_@var{m}, vec_packu_float_@var{m},
14983         vec_unpack_sfix_trunc_hi_@var{m}, vec_unpack_sfix_trunc_lo_@var{m},
14984         vec_unpack_ufix_trunc_hi_@var{m}, vec_unpack_ufix_trunc_lo_@var{m}):
14985         Document.
14986         * doc/generic.texi (VEC_UNPACK_FLOAT_HI_EXPR,
14987         VEC_UNPACK_FLOAT_LO_EXPR): Fix pasto in description.
14988         (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
14989         VEC_PACK_FLOAT_EXPR): Document.
14991 2018-05-29  Richard Biener  <rguenther@suse.de>
14993         * tree-vectorizer.h (struct vec_info): Add stmt_vec_infos
14994         member.
14995         (stmt_vec_info_vec): Make pointer.
14996         (init_stmt_vec_info_vec): Remove.
14997         (free_stmt_vec_info_vec): Likewise.
14998         (set_stmt_vec_info_vec): New function.
14999         (free_stmt_vec_infos): Likewise.
15000         (vinfo_for_stmt): Adjust for stmt_vec_info_vec indirection.
15001         (set_vinfo_for_stmt): Likewise.
15002         (get_earlier_stmt): Likewise.
15003         (get_later_stmt): Likewise.
15004         * tree-vectorizer.c (stmt_vec_info_vec): Make pointer.
15005         (vec_info::vec_info): Allocate stmt_vec_infos and set the global.
15006         (vec_info::~vec_info): Free stmt_vec_infos.
15007         (vectorize_loops): Set the global stmt_vec_info_vec to NULL.
15008         Remove old init_stmt_vec_info_vec/free_stmt_vec_info_vec calls.
15009         (pass_slp_vectorize::execute): Likewise.
15010         * tree-vect-stmts.c (init_stmt_vec_info_vec): Remove.
15011         (free_stmt_vec_info_vec): Likewise.
15012         (set_stmt_vec_info_vec): New function.
15013         (free_stmt_vec_infos): Likewise.
15014         * tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Set
15015         the global stmt_vec_info_vec.
15016         * tree-parloops.c (gather_scalar_reductions): Use
15017         set_stmt_vec_info_vec/free_stmt_vec_infos and maintain a local
15018         vector.
15020 2018-05-29  Richard Biener  <rguenther@suse.de>
15022         * dominance.c (iterate_fix_dominators): Push/pop TV_DOMINANCE.
15024 2018-05-29  Martin Liska  <mliska@suse.cz>
15025             David Malcolm  <dmalcolm@redhat.com>
15027         * vec.c (test_reverse): New.
15028         (vec_c_tests): Add new test.
15029         * vec.h (vl_ptr>::reverse): New function.
15031 2018-05-29  Gerald Pfeifer  <gerald@pfeifer.com>
15033         * config.gcc: Identify FreeBSD 3.x and 4.x as unsupported.
15035         * config/freebsd-spec.h (FBSD_LIB_SPEC): Only consider FreeBSD 5
15036         and later.
15038 2018-05-28  Bernd Edlinger  <bernd.edlinger@hotmail.de>
15040         * tree-dump.c (dump_node): Use splay_tree_delete_pointers.
15042 2018-05-28  Richard Biener  <rguenther@suse.de>
15044         PR tree-optimization/85933
15045         * tree-vect-data-refs.c (vect_record_base_alignments): Only
15046         look at stmts marked as vectorizable.
15048 2018-05-28  Richard Biener  <rguenther@suse.de>
15050         PR tree-optimization/85934
15051         * tree-vect-generic.c (expand_vector_operations_1): Hoist
15052         vector boolean check before scalar optimization.
15054 2018-05-28  Jakub Jelinek  <jakub@redhat.com>
15056         * doc/invoke.texi (ARM Options): Use @item instead of @itemx
15057         for armv5te.
15059 2018-05-28  Mark Wielaard  <mark@klomp.org>
15061         * dwarf2asm.c (dw2_asm_output_delta_uleb128): Add brackets around lab2
15062         if it is an expression containing a minus sign.
15064 2018-05-27  John David Anglin  <danglin@gcc.gnu.org>
15066         * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
15068 2018-05-27  Paul Koning  <ni1d@arrl.net>
15070         * config/pdp11/pdp11.md (truncsihi2): Remove.
15072 2018-05-27  Monk Chiang  <sh.chiang04@gmail.com>
15073             Chung-Ju Wu  <jasonwucj@gmail.com>
15075         * config/nds32/nds32-intrinsic.md (unaligned_storedi): Modify patterns
15076         implementation.
15077         (unaligned_store_dw): Ditto.
15078         * config/nds32/nds32-memory-manipulation.c
15079         (nds32_expand_movmemsi_loop_known_size): Refactoring implementation.
15080         (nds32_gen_dup_4_byte_to_word_value): Rename to ...
15081         (nds32_gen_dup_4_byte_to_word_value_aux): ... this.
15082         (emit_setmem_word_loop): Rename to ...
15083         (emit_setmem_doubleword_loop): ... this.
15084         (nds32_gen_dup_4_byte_to_word_value): New function.
15085         (nds32_gen_dup_8_byte_to_double_word_value): New function.
15086         (nds32_expand_setmem_loop): Refine implementation.
15087         (nds32_expand_setmem_loop_v3m): Ditto.
15088         * config/nds32/nds32-multiple.md (unaligned_store_update_base_dw): New
15089         pattern.
15091 2018-05-27  Chung-Ju Wu  <jasonwucj@gmail.com>
15093         * config/nds32/nds32.md (bswapsi2, bswaphi2): New patterns.
15095 2018-05-27  Chung-Ju Wu  <jasonwucj@gmail.com>
15097         * config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
15098         (nds32_init_machine_status): Initialize machine->attr_naked_p and
15099         machine->attr_no_prologue_p.
15100         (nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
15101         (nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
15102         (nds32_expand_epilogue): Consider attr_naked_p.
15103         (nds32_expand_epilogue_v3pop): Likewise.
15104         (nds32_can_use_return_insn): Likewise.
15105         * config/nds32/nds32.h (machine_function): Add attr_naked_p and
15106         attr_no_prologue_p fields.
15107         * config/nds32/nds32.opt (mret-in-naked-func): New option.
15109 2018-05-27  Jakub Jelinek  <jakub@redhat.com>
15111         PR target/85918
15112         * config/i386/i386.md (fixunssuffix, floatunssuffix): New code
15113         attributes.
15114         * config/i386/sse.md
15115         (<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>):
15116         Rename to ...
15117         (float<floatunssuffix><sseintvecmodelower><mode>2<mask_name><round_name>):
15118         ... this.
15119         (<floatsuffix>float<sselongvecmodelower><mode>2<mask_name><round_name>):
15120         Rename to ...
15121         (float<floatunssuffix><sselongvecmodelower><mode>2<mask_name><round_name>):
15122         ... this.
15123         (*<floatsuffix>floatv2div2sf2): Rename to ...
15124         (*float<floatunssuffix>v2div2sf2): ... this.
15125         (<floatsuffix>floatv2div2sf2_mask): Rename to ...
15126         (float<floatunssuffix>v2div2sf2_mask): ... this.
15127         (*<floatsuffix>floatv2div2sf2_mask_1): Rename to ...
15128         (*float<floatunssuffix>v2div2sf2_mask_1): ... this.
15129         (<fixsuffix>fix_truncv8dfv8si2<mask_name><round_saeonly_name>): Rename
15130         to ...
15131         (fix<fixunssuffix>_truncv8dfv8si2<mask_name><round_saeonly_name>):
15132         ... this.
15133         (<fixsuffix>fix_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
15134         Rename to ...
15135         (fix<fixunssuffix>_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
15136         ... this.
15137         (<fixsuffix>fix_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
15138         Rename to ...
15139         (fix<fixunssuffix>_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
15140         ... this.
15141         (<fixsuffix>fix_truncv2sfv2di2<mask_name>): Rename to ...
15142         (fix<fixunssuffix>_truncv2sfv2di2<mask_name>): ... this.
15143         (vec_pack_ufix_trunc_<mode>): Use gen_fixuns_truncv8dfv8si2 instead of
15144         gen_ufix_truncv8dfv8si2.
15145         * config/i386/i386-builtin.def (__builtin_ia32_cvttpd2uqq256_mask,
15146         __builtin_ia32_cvttpd2uqq128_mask, __builtin_ia32_cvttps2uqq256_mask,
15147         __builtin_ia32_cvttps2uqq128_mask, __builtin_ia32_cvtuqq2ps256_mask,
15148         __builtin_ia32_cvtuqq2ps128_mask, __builtin_ia32_cvtuqq2pd256_mask,
15149         __builtin_ia32_cvtuqq2pd128_mask, __builtin_ia32_cvttpd2udq512_mask,
15150         __builtin_ia32_cvtuqq2ps512_mask, __builtin_ia32_cvtuqq2pd512_mask,
15151         __builtin_ia32_cvttps2uqq512_mask, __builtin_ia32_cvttpd2uqq512_mask):
15152         Use fixuns instead ufix or floatuns instead ufloat in CODE_FOR_ names.
15154 2018-05-24  H.J. Lu  <hongjiu.lu@intel.com>
15156         PR target/85900
15157         PR target/85345
15158         * varasm.c (assemble_alias): Lookup ifunc attribute on error.
15160 2018-05-25  Jim Wilson  <jimw@sifive.com>
15162         * config/riscv/riscv-protos.h (riscv_epilogue_uses): New.
15163         * config/riscv/riscv.c (struct machine_function): Add
15164         interrupt_handler_p and attribute_checked_p fields.
15165         (riscv_attribute_table): Add interrupt.
15166         (riscv_interrupt_type_p): New.
15167         (riscv_save_reg_p): Save extra regs for interrupt handler.
15168         (riscv_use_save_libcall): Return false  for interrupt handler.
15169         (riscv_first_stack_step): Add forward declaration.
15170         (riscv_compute_frame_info): New local interrupt_save_t1.  Set it
15171         for interrupt handler with large frame.  Use it for saved reg list.
15172         (riscv_expand_prologue): Move flag_stack_usage_info support to
15173         eliminate duplication.
15174         (riscv_expand_epilogue): Generate mret for interrupt handler.
15175         (riscv_epilogue_uses): New.
15176         (riscv_can_use_return_insn): Return false for interrupt handler.
15177         (riscv_function_ok_for_sibcall): Likewise.
15178         (riscv_set_current_function): Add interrupt handler support.
15179         * config/riscv/riscv.h (EPILOGUE_USES): Call riscv_epilogue_uses.
15180         * config/riscv/riscv.md (UNSPECV_MRET): New.
15181         (GP_REGNUM): New.
15182         (riscv_frflags, riscv_fsflags): Use tab after opcode.
15183         (riscv_mret): New.
15184         * doc/extend.texi (RISC-V Function Attributes) <interrupt>: New.
15186 2018-05-25  Bill Schmidt  <wschmidt@linux.ibm.com>
15188         PR tree-optimization/85712
15189         * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
15190         this candidate has already been replaced in-situ by a copy.
15192 2018-05-25  Jason Merrill  <jason@redhat.com>
15194         PR c++/80485 - inline function non-zero address.
15195         * symtab.c (nonzero_address): Check DECL_COMDAT.
15197 2018-05-25  Uros Bizjak  <ubizjak@gmail.com>
15199         PR target/83628
15200         * config/alpha/alpha.md (ashlsi3): New insn pattern.
15201         (*ashlsi_se): Rename from *ashldi_se.  Define as sign
15202         extension of SImode operation.  Use const123_operand predicate.
15203         (*saddsi_1): Remove.
15204         (*saddl_se_1): Ditto.
15205         (*ssubsi_1): Ditto.
15206         (*ssubl_se_1): Ditto.
15207         * config/alpha/predicates.md (const123_operand): New predicate.
15208         * config/alpha/constraints.md (P): Use IN_RANGE.
15210 2018-05-25  Richard Biener  <rguenther@suse.de>
15212         * tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
15213         defaulted to true.
15214         (ref_maybe_used_by_stmt_p): Likewise.
15215         (stmt_may_clobber_ref_p): Likewise.
15216         (stmt_may_clobber_ref_p_1): Likewise.
15217         * tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
15218         and pass it along.
15219         (ref_maybe_used_by_stmt_p): Likewise.
15220         (stmt_may_clobber_ref_p): Likewise.
15221         (stmt_may_clobber_ref_p_1): Likewise.
15222         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
15223         the alias oracle to disambiguate DRs with stmts DR analysis
15224         couldn't handle.
15225         (vect_analyze_data_refs): Do not give up on not analyzable
15226         DRs for BB vectorization.  Remove code truncating the dataref
15227         vector.
15229 2018-05-25  Jakub Jelinek  <jakub@redhat.com>
15231         PR target/85832
15232         * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
15233         Add (=Yk,v,C) variant using vptestm insn.  Use TARGET_AVX512BW
15234         in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
15236 2018-05-25  Richard Biener  <rguenther@suse.de>
15238         * tree-vect-data-refs.c (vect_find_stmt_data_reference): New
15239         function, combining stmt data ref gathering and fatal analysis
15240         parts.
15241         (vect_analyze_data_refs): Remove now redudnant code and simplify.
15242         * tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
15243         vect_analyze_loop_2 and use vect_find_stmt_data_reference.
15244         * tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
15245         * tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
15247 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
15249         PR tree-optimization/85720
15250         * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
15251         SCC if all partitions are builtins.
15252         (version_loop_by_alias_check): New parameter.  Generate cancelable
15253         runtime alias check if all partitions are builtins.
15254         (distribute_loop): Update call to above function.
15256 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
15258         * tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
15259         (create_default_def, for_all_parms): Moved from tree-ssa-coalesce.c.
15260         (parm_default_def_partition_arg): Ditto.
15261         (set_parm_default_def_partition): Ditto.
15262         (get_parm_default_def_partitions): Ditto and make it static.
15263         (get_undefined_value_partitions): Ditto and make it static.
15264         (remove_ssa_form): Refactor call to init_var_map here.
15265         * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
15266         computation for loop region.
15267         (coalesce_partitions, compute_optimized_partition_bases): Ditto.
15268         (register_default_def): Delete.
15269         (for_all_parms, create_default_def): Move to tree-outof-ssa.c.
15270         (parm_default_def_partition_arg): Ditto.
15271         (set_parm_default_def_partition): Ditto.
15272         (get_parm_default_def_partitions): Ditto and make it static.
15273         (get_undefined_value_partitions): Ditto and make it static.
15274         (coalesce_with_default, coalesce_with_default): Update comment.
15275         (create_coalesce_list_for_region): New func factored out from
15276         create_outofssa_var_map.
15277         (populate_coalesce_list_for_outofssa): New func factored out from
15278         create_outofssa_var_map and coalesce_ssa_name.
15279         (create_outofssa_var_map): Delete.
15280         (coalesce_ssa_name): Refactor to support live range computation.
15281         * tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
15282         (get_parm_default_def_partitions): Delete.
15283         (get_undefined_value_partitions): Ditto.
15284         * tree-ssa-live.c (init_var_map, delete_var_map): Support live range
15285         computation for loop region.
15286         (new_tree_live_info, loe_visit_block): Ditto.
15287         (live_worklist, set_var_live_on_entry): Ditto.
15288         (calculate_live_on_exit, verify_live_on_entry): Ditto.
15289         * tree-ssa-live.h (struct _var_map): New fields.
15290         (init_var_map): Change decl.
15291         (region_contains_p): New.
15293 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
15295         * tree-ssa-live.h (live_merge_and_clear): Delete.
15297 2018-05-25  Richard Biener  <rguenther@suse.de>
15299         PR c++/85912
15300         * tree-dump.c (dequeue_and_dump): Remove access to removed
15301         operand 2 of a SWITCH_EXPR.
15303 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
15305         * doc/sourcebuild.texi (vect_double_cond_arith): Include
15306         multiplication and division.
15307         * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
15308         (cond_udiv@var{m}, cond_umod@var{m}): Document.
15309         * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
15310         (cond_udiv_optab, cond_umod_optab): New optabs.
15311         * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
15312         (IFN_COND_RDIV): New internal functions.
15313         * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
15314         TRUNC_MOD_EXPR and RDIV_EXPR.
15315         * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
15316         * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
15317         New unspecs.
15318         (SVE_INT_BINARY): Include mult.
15319         (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
15320         (optab, sve_int_op): Handle mult.
15321         (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
15322         UNSPEC_COND_DIV.
15323         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
15324         for SVE_INT_BINARY_SD.
15326 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
15328         * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
15329         (optab, sve_int_op): Handle div and udiv.
15330         * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
15331         for SVE_INT_BINARY_SD.
15332         (*<optab><mode>3): New insn for the same.
15334 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
15336         * tree-vect-patterns.c: Include predict.h.
15337         (vect_recog_divmod_pattern): Restrict check for division support
15338         to when optimizing for size.
15340 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
15342         * doc/sourcebuild.texi (vect_double_cond_arith: Document.
15343         * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
15344         (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
15345         (gimple_match_op::set_op): Likewise.
15346         (gimple_resimplify4): Declare.
15347         * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
15348         (expr::gen_transform): Likewise.
15349         (decision_tree::gen): Generate a simplification routine for 4 operands.
15350         * gimple-match-head.c (gimple_simplify): Add an overload for
15351         4 operands.  In the top-level function, handle up to 4 call
15352         arguments and call gimple_resimplify4.
15353         (gimple_resimplify4): New function.
15354         (build_call_internal): Pass a fourth operand.
15355         (maybe_push_to_seq): Likewise.
15356         * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
15357         Fold VEC_COND_EXPRs of an operation and a default value into
15358         an IFN_COND_* function if possible.
15359         * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
15360         New unspecs.
15361         (SVE_COND_FP_BINARY): Include them.
15362         (optab, sve_fp_op): Handle them.
15363         (SVE_INT_BINARY_REV): New code iterator.
15364         (SVE_COND_FP_BINARY_REV): New int iterator.
15365         (commutative): New int attribute.
15366         * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
15367         Declare.
15368         * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
15369         function.
15370         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
15371         (*cond_<optab><mode>): New patterns for reversed operands.
15373 2018-05-25  Richard Biener  <rguenther@suse.de>
15375         * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
15376         (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
15377         (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
15378         (STMT_VINFO_GROUPED_ACCESS): Adjust.
15379         * tree-vect-data-refs.c (everywhere): Adjust users.
15380         * tree-vect-loop.c (everywhere): Likewise.
15381         * tree-vect-slp.c (everywhere): Likewise.
15382         * tree-vect-stmts.c (everywhere): Likewise.
15383         * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
15385 2018-05-25  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
15387         * configure.ac (gcc_cv_as_section_has_e): Move to common section.
15388         Rename to...
15389         (gcc_cv_as_section_exclude): ... this.
15390         Try Solaris as #exclude syntax.
15391         * configure: Regenerate.
15392         * config.in: Regenerate.
15393         * config/i386/i386.c (i386_solaris_elf_named_section): Handle
15394         SECTION_EXCLUDE.
15395         * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
15396         [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
15398         * varasm.c (default_elf_asm_named_section): Don't check if
15399         HAVE_GAS_SECTION_EXCLUDE is defined.
15401 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
15403         * doc/md.texi: Update the documentation of the cond_* optabs
15404         to mention the new final operand.  Fix GET_MODE_NUNITS call.
15405         Describe the scalar case too.
15406         * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
15407         * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
15408         instead of 2.
15409         (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
15410         (get_conditional_internal_fn): Update comment.
15411         * tree-vect-loop.c (vectorizable_reduction): Pass the original
15412         accumulator value as a final argument to conditional functions.
15413         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
15414         a define_expand and add an "else" operand.  Assert for now that
15415         the else operand is equal to operand 2.  Use SVE_INT_BINARY and
15416         SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
15417         (*cond_<optab><mode>): New patterns.
15418         * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
15419         (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
15420         (UNSPEC_COND_EOR): Delete.
15421         (optab): Remove associated mappings.
15422         (SVE_INT_BINARY): New code iterator.
15423         (sve_int_op): Remove int attribute and add "minus" to the code
15424         attribute.
15425         (SVE_COND_INT_OP): Delete.
15426         (SVE_COND_FP_OP): Rename to...
15427         (SVE_COND_FP_BINARY): ...this.
15429 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
15431         * optabs.c (can_reuse_operands_p): New function.
15432         (maybe_legitimize_operands): Try to reuse the results for
15433         earlier operands.
15435 2018-05-24  Uros Bizjak  <ubizjak@gmail.com>
15437         * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
15438         Add {q} suffix to insn mnemonic.
15440 2018-05-23  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
15442         * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
15443         (msp430_warn_func_return): New.
15445 2018-05-24  Roger Sayle  <roger@nextmovesoftware.com>
15447         * fold-const.c (tree_nonzero_bits): New function.
15448         * fold-const.h (tree_nonzero_bits): Likewise.
15449         * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
15450         friends.  POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
15452 2018-05-24  H.J. Lu  <hongjiu.lu@intel.com>
15454         PR target/85900
15455         PR target/85345
15456         * varasm.c (assemble_alias): Check ifunc_resolver only on
15457         FUNCTION_DECL.
15459 2018-05-24  Uros Bizjak  <ubizjak@gmail.com>
15461         PR target/85903
15462         * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
15463         when memory input operand is handled.
15465 2018-05-24  Luis Machado  <luis.machado@linaro.org>
15467         * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
15468         global.
15469         (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
15471 2018-05-24  Richard Sandiford  <richard.sandiford@linaro.org>
15473         * match.pd: Delay FMA folds until after vectorization.
15475 2018-05-24  Andre Vieira  <andre.simoesdiasvieira@arm.com>
15477         PR target/83009
15478         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
15479         address check not strict.
15481 2018-05-24  Richard Sandiford  <richard.sandiford@linaro.org>
15483         * gimple-match.h (gimple_match_op): New class.
15484         (mprts_hook): Replace parameters with a gimple_match_op *.
15485         (maybe_build_generic_op): Likewise.
15486         (gimple_simplified_result_is_gimple_val): Replace parameters with
15487         a const gimple_match_op *.
15488         (gimple_simplify): Replace code_helper * and tree * parameters with
15489         a gimple_match_op * parameter.
15490         (gimple_resimplify1): Replace code_helper *, tree and tree *
15491         parameters with a gimple_match_op * parameter.
15492         (gimple_resimplify2): Likewise.
15493         (gimple_resimplify3): Likewise.
15494         (maybe_push_res_to_seq): Replace code_helper, tree and tree *
15495         parameters with a gimple_match_op * parameter.
15496         * gimple-match-head.c (gimple_simplify): Change prototypes of
15497         auto-generated functions to take a gimple_match_op * instead of
15498         separate code_helper * and tree * parameters.  Make the same
15499         change in the top-level overload and update calls to the
15500         gimple_resimplify routines.  Update calls to the auto-generated
15501         functions and to maybe_push_res_to_seq in the publicly-facing
15502         operation-specific gimple_simplify overloads.
15503         (gimple_match_op::MAX_NUM_OPS): Define.
15504         (gimple_resimplify1): Replace rcode and ops with a single res_op
15505         parameter.  Update call to gimple_simplify.
15506         (gimple_resimplify2): Likewise.
15507         (gimple_resimplify3): Likewise.
15508         (mprts_hook): Replace parameters with a gimple_match_op *.
15509         (maybe_build_generic_op): Likewise.
15510         (build_call_internal): Replace type, nargs and ops with
15511         a gimple_match_op *.
15512         (maybe_push_res_to_seq): Replace res_code, type and ops parameters
15513         with a single gimple_match_op *.  Update calls to mprts_hook,
15514         build_call_internal and gimple_simplified_result_is_gimple_val.
15515         Factor out code that is common to the tree_code and combined_fn cases.
15516         * genmatch.c (expr::gen_transform): Replace tem_code and
15517         tem_ops with a gimple_match_op called tem_op.  Update calls
15518         to the gimple_resimplify functions and maybe_push_res_to_seq.
15519         (dt_simplify::gen_1): Manipulate res_op instead of res_code and
15520         res_ops.  Update call to the gimple_resimplify functions.
15521         (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
15522         (decision_tree::gen): Make the functions take a gimple_match_op *
15523         called res_op instead of separate res_code and res_ops parameters.
15524         Update call accordingly.
15525         * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
15526         and ops with a single res_op parameter.  Update calls to
15527         maybe_build_generic_op and maybe_push_res_to_seq.
15528         (fold_stmt_1): Update calls to gimple_simplify and
15529         replace_stmt_with_simplification.
15530         (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
15531         and gimple_simplified_result_is_gimple_val.
15532         * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
15533         gimple_simplify.
15534         * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
15535         with a gimple_match_op *.
15536         (vn_nary_build_or_lookup): Likewise.  Update call to
15537         vn_nary_build_or_lookup_1.
15538         (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
15539         gimple_match_op *.  Update calls to the gimple_resimplify routines
15540         and to gimple_simplified_result_is_gimple_val.
15541         (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
15542         Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
15543         (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
15544         (visit_nary_op): Likewise.
15545         (visit_reference_op_load): Likewise.
15547 2018-05-23  Luis Machado  <luis.machado@linaro.org>
15549         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
15550         modifier for printing the step amount.
15552 2018-05-23  Jozef Lawrynowicz  <jozef.l@somniumtech.com>
15554         PR target/78849
15555         * tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
15556         types.
15558 2018-05-23  Segher Boessenkool  <segher@kernel.crashing.org>
15560         * doc/sourcebuild.texi (Endianness): New subsubsection.
15562 2018-05-23  Luis Machado  <luis.machado@linaro.org>
15564         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
15565         <prefetch_dynamic_strides>: New const bool field.
15566         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
15567         prefetch_dynamic_strides.
15568         (exynosm1_prefetch_tune): Likewise.
15569         (thunderxt88_prefetch_tune): Likewise.
15570         (thunderx_prefetch_tune): Likewise.
15571         (thunderx2t99_prefetch_tune): Likewise.
15572         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
15573         false.
15574         (aarch64_override_options_internal): Update to set
15575         PARAM_PREFETCH_DYNAMIC_STRIDES.
15576         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
15577         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
15578         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
15579         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
15580         prefetch-dynamic-strides setting.
15582 2018-05-23  Luis Machado  <luis.machado@linaro.org>
15584         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
15585         <minimum_stride>: New const int field.
15586         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
15587         minimum_stride field defaulting to -1.
15588         (exynosm1_prefetch_tune): Likewise.
15589         (thunderxt88_prefetch_tune): Likewise.
15590         (thunderx_prefetch_tune): Likewise.
15591         (thunderx2t99_prefetch_tune): Likewise.
15592         (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
15593         <default_opt_level>: Set to 3.
15594         (aarch64_override_options_internal): Update to set
15595         PARAM_PREFETCH_MINIMUM_STRIDE.
15596         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
15597         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
15598         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
15599         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
15600         stride is constant and is below the minimum stride threshold.
15602 2018-05-23  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
15604         * config/arm/arm-cpus.in (mode26): Delete.
15605         (armv4): Delete mode26 reference.
15606         * config/arm/arm.c (arm_configure_build_target): Delete use of
15607         isa_bit_mode26.
15609 2018-05-23  Uros Bizjak  <ubizjak@gmail.com>
15611         * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
15612         New insn pattern.
15613         (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
15614         Rewrite expander pattern.  Emit gen_floatunssi<mode>2_i387_with_xmm
15615         for non-SSE modes.
15616         (floatunsdisf2): Rewrite expander pattern.  Hanlde TARGET_AVX512F.
15617         (floatunsdidf2): Ditto.
15619 2018-05-23  Uros Bizjak  <ubizjak@gmail.com>
15621         * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
15622         (fixuns_trunc<mode>si2_avx512f): Ditto.
15623         (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
15624         (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
15625         Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
15627 2018-05-23  Alexander Monakov  <amonakov@ispras.ru>
15629         PR rtl-optimization/79985
15630         * df-scan.c (df_insn_refs_collect): Remove special case for
15631         global registers and asm statements.
15633 2018-05-23  Alexander Monakov  <amonakov@ispras.ru>
15635         * extend.texi (Global Register Variables): Rewrite the bullet list.
15636         Note that the register is available for allocation. Note that access
15637         via inline asm must use constraints. Add note about async-signal
15638         handlers. Remove paragraph about automagic register selection.
15640 2018-05-23  Richard Biener  <rguenther@suse.de>
15642         * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
15643         of fixed offset from memset VN.
15645 2018-05-23  Bill Schmidt  <wschmidt@linux.ibm.com>
15647         * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
15648         first_interp field.
15649         (alloc_cand_and_find_basis): Initialize first_interp field.
15650         (slsr_process_mul): Modify first_interp field.
15651         (slsr_process_add): Likewise.
15652         (slsr_process_cast): Modify first_interp field for each new
15653         interpretation.
15654         (slsr_process_copy): Likewise.
15655         (dump_candidate): Dump first_interp field.
15656         (replace_mult_candidate): Process all interpretations, not just
15657         subsequent ones.
15658         (replace_rhs_if_not_dup): Likewise.
15659         (replace_one_candidate): Likewise.
15661 2018-05-23  Wilco Dijkstra  <wdijkstr@arm.com>
15663         * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
15664         Add new boolean.
15665         (aarch64_needs_frame_chain): New function.
15666         (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
15668 2018-05-23  Sudakshina Das  <sudi.das@arm.com>
15670         PR target/84882
15671         * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
15672         Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
15673         * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
15674         * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
15675         as true for strict-align.
15676         (aarch64_can_inline_p): Perform checks even when callee has no
15677         attributes to check for strict alignment.
15678         * doc/extend.texi (AArch64 Function Attributes): Document
15679         no-strict-align.
15680         * doc/invoke.texi: (AArch64 Options): Likewise.
15682 2018-05-23  Richard Sandiford  <richard.sandiford@linaro.org>
15684         PR tree-optimization/85853
15685         * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
15686         the handling of the root of the node to...
15687         (vect_slp_analyze_node_operations_1): ...this new function,
15688         and run the whole thing with the child nodes' def types
15689         set according to their SLP node's def type.
15691 2018-05-23  Richard Biener  <rguenther@suse.de>
15693         PR middle-end/85874
15694         * tree-data-ref.c (create_runtime_alias_checks): Defer
15695         and ignore overflow warnings.
15697 2018-05-23  Yury Gribov  <tetra2005@gmail.com>
15699         PR tree-optimization/85822
15700         * tree-vrp.c (is_masked_range_test): Fix handling of negative
15701         constants.
15703 2018-05-23  Richard Biener  <rguenther@suse.de>
15705         * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
15706         memset constants via native_interpret_expr.
15708 2018-05-22  H.J. Lu  <hongjiu.lu@intel.com>
15710         PR target/85345
15711         * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
15712         attribute.
15713         (cgraph_node::create_alias): Likewise.
15714         (cgraph_node::get_availability): Check ifunc_resolver instead
15715         of looking up ifunc attribute.
15716         * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
15717         * varasm.c (do_assemble_alias): Likewise.
15718         (assemble_alias): Likewise.
15719         (default_binds_local_p_3): Likewise.
15720         * cgraph.h (cgraph_node): Add ifunc_resolver.
15721         (cgraph_node::only_called_directly_or_aliased_p): Return false
15722         for IFUNC resolver.
15723         * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
15724         attribute.
15725         * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
15726         is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
15727         (symtab_node::binds_to_current_def_p): Check ifunc_resolver
15728         instead of looking up ifunc attribute.
15730 2018-05-22  Luis Machado  <luis.machado@linaro.org>
15732         * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
15734 2018-05-22  Martin Sebor  <msebor@redhat.com>
15736         PR middle-end/85359
15737         * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
15738         only when expasion succeeds.
15739         (expand_builtin_strcmp): Same.
15740         (expand_builtin_strncmp): Same.
15742 2018-05-22  Martin Sebor  <msebor@redhat.com>
15744         * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
15746 2018-05-22  Jackson Woodruff  <jackson.woodruff@arm.com>
15747             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
15749         * config/aarch64/aarch64-ldpstp.md: Replace uses of
15750         aarch64_mem_pair_operand with memory_operand and delete operand swapping
15751         code.
15752         * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
15753         Add check for legitimate_address.
15754         (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
15755         (aarch64_swap_ldrstr_operands): New.
15756         * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
15757         Define prototype.
15759 2018-05-22  Jackson Woodruff  <jackson.woodruff@arm.com>
15760             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
15762         * config/aarch64/aarch64.md: New patterns to generate stp
15763         and ldp.
15764         (store_pair_sw, store_pair_dw): New patterns to generate stp for
15765         single words and double words.
15766         (load_pair_sw, load_pair_dw): Likewise.
15767         (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
15768         Delete.
15769         (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
15770         Delete.
15771         * config/aarch64/aarch64-ldpstp.md: Modify peephole
15772         for different mode ldpstp and add peephole for merged zero stores.
15773         Likewise for loads.
15774         * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
15775         Add size check.
15776         (aarch64_gen_store_pair): Rename calls to match new patterns.
15777         (aarch64_gen_load_pair): Rename calls to match new patterns.
15778         * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
15779         (load_pair<DREG:mode><DREG2:mode>): ... This.
15780         (store_pair<mode>): Rename to...
15781         (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
15782         * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
15783         New mode iterators.
15784         (V_INT_EQUIV): Handle SImode.
15785         * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
15786         New predicate.
15788 2018-05-22  Martin Sebor  <msebor@redhat.com>
15790         PR c/85623
15791         * calls.c (maybe_warn_nonstring_arg): Use string length to set
15792         or ajust the presumed bound on an operation to avoid unnecessary
15793         warnings.
15795 2018-05-22  Martin Sebor  <msebor@redhat.com>
15797         PR tree-optimization/85826
15798         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
15799         assuming that a DECL necesarily has a constant size.
15801 2018-05-22  Richard Sandiford  <richard.sandiford@linaro.org>
15803         PR middle-end/85862
15804         * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
15806 2018-05-22  Richard Biener  <rguenther@suse.de>
15808         PR tree-optimization/85834
15809         * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
15810         non-constant and non-zero memset arguments.
15812 2018-05-22  Martin Liska  <mliska@suse.cz>
15814         PR ipa/85607
15815         * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
15817 2018-05-22  Richard Biener  <rguenther@suse.de>
15819         PR tree-optimization/85863
15820         * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
15821         comparisons when vectype is specified.
15822         (vectorizable_condition): Do not specify vectype for
15823         vect_is_simple_cond when SLP vectorizing.
15825 2018-05-21  Michael Meissner  <meissner@linux.ibm.com>
15827         PR target/85657
15828         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
15829         define __ibm128 as long double.
15830         * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
15831         as a distinct type when IEEE 128-bit support is enabled.
15832         (init_float128_ieee): Fix up conversions between IFmode and IEEE
15833         128-bit types to use the correct functions.
15834         (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
15835         convert between 128-bit floating point types that have different
15836         modes but the same representation, instead of using gen_lowpart to
15837         makean alias.
15838         * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
15839         KFmode.
15840         (IFKF_reg): New attributes to give the register constraints for
15841         IFmode and KFmode.
15842         (extend<mode>tf2_internal): New insns to mark an explicit
15843         conversion between 128-bit floating point types that have a
15844         different mode but share the same representation.
15846 2018-05-21  Richard Sandiford  <richard.sandiford@linaro.org>
15848         PR tree-optimization/85814
15849         * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
15850         a null return from get_strinfo when unsharing the next
15851         strinfo in the chain.
15853 2018-05-21  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
15855         PR gcc/84923
15856         * varasm.c (weak_finish): Clean up weak_decls.
15858 2018-05-21  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
15860         * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
15861         UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
15862         UNSPEC_UADALP values.
15863         * config/aarch64/iterators.md (ABAL): New int iterator.
15864         (ABDL2): Likewise.
15865         (ADALP): Likewise.
15866         (sur): Add mappings for the above.
15867         * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
15868         New define_insn.
15869         (aarch64_<sur>abal<mode>_4): Likewise.
15870         (aarch64_<sur>adalp<mode>_3): Likewise.
15871         (<sur>sadv16qi): New define_expand.
15873 2018-05-21  Alexander Nesterovskiy  <alexander.nesterovskiy@intel.com>
15875         * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
15876         (*movdf_internal): Ditto.
15877         (*rcpsf2_sse): Ditto.
15878         (*rsqrtsf2_sse): Ditto.
15879         (*sqrt<mode>2_sse): Ditto.
15881 2018-05-21  Tamar Christina  <tamar.christina@arm.com>
15883         * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
15884         eor3q<mode>4.
15885         (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
15886         * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
15887         veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
15888         vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
15889         vbcaxq_s64): New.
15890         * config/aarch64/arm_neon.h: Likewise.
15891         * config/aarch64/iterators.md (VQ_I): New.
15893 2018-05-21  Alexey Brodkin <abrodkin@synopsys.com>
15895         * config.gcc: Add arc/t-multilib-linux to tmake_file for
15896         arc*-*-linux*.
15897         * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
15898         MULTILIB_DIRNAMES
15900 2018-05-20  Chung-Ju Wu  <jasonwucj@gmail.com>
15902         * config/nds32/constraints.md (S): New constraint.
15903         * config/nds32/nds32.md (call_internal): Use constraint S.
15904         (call_value_internal): Likewise.
15905         (sibcall_internal): Likewise.
15906         (sibcall_value_internal): Likewise.
15908 2018-05-20  Kito Cheng  <kito.cheng@gmail.com>
15909             Chung-Ju Wu  <jasonwucj@gmail.com>
15911         * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
15912         into consideration.
15914 2018-05-20  Kito Cheng  <kito.cheng@gmail.com>
15915             Chung-Ju Wu  <jasonwucj@gmail.com>
15917         * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
15918         (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
15919         (nds32_rtx_costs_impl): Simplify.
15920         (nds32_address_cost_impl): Simplify.
15921         (nds32_init_rtx_costs): New function.
15922         (nds32_rtx_costs_speed_prefer): Likewise.
15923         (nds32_rtx_costs_size_prefer): Likewise.
15924         (nds32_address_cost_speed_prefer): Likewise.
15925         (nds32_address_cost_speed_fwprop): Likewise.
15926         (nds32_address_cost_size_prefer): Likewise.
15927         * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
15928         * config/nds32/nds32.c (nds32_option_override): Use
15929         nds32_init_rtx_costs function.
15931 2018-05-20  Chung-Ju Wu  <jasonwucj@gmail.com>
15933         * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
15934         * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
15935         (TARGET_PIPELINE_N8): Likewise.
15936         (TARGET_PIPELINE_N10): Likewise.
15937         (TARGET_PIPELINE_N13): Likewise.
15938         (TARGET_PIPELINE_GRAYWOLF): Likewise.
15940 2018-05-19  Monk Chiang  <sh.chiang04@gmail.com>
15942         * config/nds32/nds32-fpu.md: Update copyright year.
15944 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
15946         * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
15948 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
15950         * config/nds32/nds32.c
15951         (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
15952         * config/nds32/nds32.opt (minline-asm-r15): New option.
15954 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
15956         * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
15957         MASK_HW_ABS.
15958         * config/nds32/nds32.md (abssi2): New pattern.
15960 2018-05-19  Uros Bizjak  <ubizjak@gmail.com>
15962         * config/i386/i386.md (rex64namesuffix): New mode attribute.
15963         * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
15964         Merge insn pattern from sse_cvtsi2ss<round_name> and
15965         sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
15966         (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
15967         from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
15968         using SWI48 mode iterator.
15969         (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
15970         sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
15971         (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
15972         pattern from sse_cvttss2si<round_saeonly_name>
15973         and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
15974         (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
15975         from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
15976         using SWI48 mode iterator.
15977         (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
15978         insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
15979         avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
15980         (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
15981         from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
15982         using SWI48 mode iterator.
15983         (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
15984         insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
15985         avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
15986         (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
15987         sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
15988         SWI48 mode iterator.
15989         (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
15990         sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
15991         (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
15992         pattern from sse_cvttsd2si<round_saeonly_name>
15993         and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
15995 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
15997         * config/nds32/nds32-md-auxiliary.c
15998         (nds32_valid_smw_lwm_base_p): Refine.
15999         (nds32_output_smw_single_word): Refine.
16000         (nds32_output_smw_double_word): New.
16001         * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
16003 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
16005         * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
16006         (nds32_output_stack_pop): Refine.
16007         (nds32_expand_unaligned_load): Refine.
16008         (nds32_expand_unaligned_store): Refine.
16010 2018-05-19  Kuan-Lin Chen <kuanlinchentw@gmail.com>
16011             Chung-Ju Wu  <jasonwucj@gmail.com>
16013         * config/nds32/constants.md: Add TP_REGNUM constant.
16014         (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
16015         UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
16016         UNSPEC_ADD32.
16017         * config/nds32/nds32-doubleword.md: Consider flag_pic.
16018         * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
16019         * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
16020         * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
16021         and PIC code generation.
16022         * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
16023         code generation.
16024         * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
16025         optimization.
16026         * config/nds32/nds32.md: Support TLS and PIC.
16027         * config/nds32/nds32.c: Support TLS and PIC.
16028         * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
16029         * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
16030         predicate.
16032 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
16034         * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
16035         mode with E_ prefix.
16037 2018-05-19  Kuan-Lin Chen <kuanlinchentw@gmail.com>
16038             Chung-Ju Wu  <jasonwucj@gmail.com>
16040         * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
16041         * config/nds32/nds32-md-auxiliary.c
16042         (symbolic_reference_mentioned_p): New.
16043         (nds32_legitimize_ict_address): New.
16044         (nds32_expand_ict_move): New.
16045         (nds32_indirect_call_referenced_p): New.
16046         (nds32_symbol_binds_local_p): Delete.
16047         (nds32_long_call_p): Modify.
16048         * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
16049         * config/nds32/nds32-protos.h
16050         (symbolic_reference_mentioned_p): Declare.
16051         (nds32_legitimize_ict_address): Declare.
16052         (nds32_expand_ict_move): Declare.
16053         (nds32_indirect_call_referenced_p): Declare.
16054         * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
16055         (nds32_relax_group): Use nds32_ict_const_p as condition.
16056         * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
16057         (nds32_asm_file_start): Output ict_model directive in asm code.
16058         (nds32_legitimate_address_p): Consider indirect call.
16059         (nds32_print_operand): Consider indirect call.
16060         (nds32_print_operand_address): Consider indirect call.
16061         (nds32_insert_attributes): Handle "indirect_call" attribute.
16062         (TARGET_LEGITIMATE_ADDRESS_P): Define.
16063         (TARGET_LEGITIMATE_CONSTANT_P): Define.
16064         (TARGET_CANNOT_FORCE_CONST_MEM): Define.
16065         (TARGET_DELEGITIMIZE_ADDRESS): Define.
16066         (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
16067         * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
16068         (TARGET_ICT_MODEL_SMALL): Define.
16069         (TARGET_ICT_MODEL_LARGE): Define.
16070         * config/nds32/nds32.md (movsi): Consider ict model.
16071         (call, call_value): Consider ict model.
16072         (sibcall, sibcall_value): Consider ict model.
16073         * config/nds32/nds32.opt (mict-model): New option.
16074         * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
16075         model.
16077 2018-05-18  Kito Cheng  <kito.cheng@gmail.com>
16078             Monk Chiang  <sh.chiang04@gmail.com>
16079             Jim Wilson <jimw@sifive.com>
16081         * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
16082         Add support to parse rv32e*.  Clear MASK_RVE for rv32i and rv64i.
16083         * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
16084         * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
16085         __riscv_32e when TARGET_RVE.  Handle ABI_ILP32E as soft-float ABI.
16086         * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
16087         * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
16088         compute save_libcall_adjustment properly.
16089         (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
16090         (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
16091         * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
16092         (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
16093         (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
16094         (ABI_SPEC): Handle mabi=ilp32e.
16095         * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
16096         (RVE): Add RVE mask.
16097         * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
16098         <-march>: Add rv32e as an example.
16100 2018-05-18  Marc Glisse  <marc.glisse@inria.fr>
16102         PR c++/82899
16103         * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
16104         (intra_create_variable_infos): Handle C++ constructors.
16106 2018-05-18  Martin Liska  <mliska@suse.cz>
16108         * passes.def: Remove a redundant pass.
16110 2018-05-18  Eric Botcazou  <ebotcazou@adacore.com>
16112         PR bootstrap/85838
16113         * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
16115 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
16117         * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
16118         (ARMv4): Update.
16119         (ARMv2, ARMv3, ARMv3m): Delete fgroups.
16120         (ARMv6m): Update.
16121         (armv2, armv2a, armv3, armv3m): Delete architectures.
16122         (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
16123         arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
16124         arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
16125         Delete cpus.
16126         * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
16127         (*mulsidi3adddi): Likewise.
16128         (mulsidi3): Likewise.
16129         (*mulsidi3_nov6): Likewise.
16130         (umulsidi3): Likewise.
16131         (umulsidi3_nov6): Likewise.
16132         (umaddsidi4): Likewise.
16133         (*umulsidi3adddi): Likewise.
16134         (smulsi3_highpart): Likewise.
16135         (*smulsi3_highpart_nov6): Likewise.
16136         (umulsi3_highpart): Likewise.
16137         (*umulsi3_highpart_nov6): Likewise.
16138         * config/arm/arm.h (arm_arch3m): Delete.
16139         * config/arm/arm.c (arm_arch3m): Delete.
16140         (arm_option_override_internal): Update armv3-related comment.
16141         (arm_configure_build_target): Delete use of isa_bit_mode32.
16142         (arm_option_reconfigure_globals): Delete set of arm_ach3m.
16143         (arm_rtx_costs_internal): Delete check of arm_arch3m.
16144         * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
16145         (mulsa3): Likewise.
16146         (mulusa3): Likewise.
16147         * config/arm/arm-protos.h (arm_arch3m): Delete.
16148         * config/arm/arm-tables.opt: Regenerate.
16149         * config/arm/arm-tune.md: Likewise.
16150         * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
16151         deleted architectures.
16153 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
16155         * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
16156         (armv5t, armv5te): New features.
16157         (ARMv5, ARMv5e): Delete fgroups.
16158         (ARMv5t, ARMv5te): Adjust for above changes.
16159         (ARMv6m): Likewise.
16160         (armv5, armv5e): Delete arches.
16161         * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
16162         arm_arch5.
16163         (*call_reg_arm): Likewise.
16164         (*call_value_reg_armv5): Likewise.
16165         (*call_value_reg_arm): Likewise.
16166         (*call_symbol): Likewise.
16167         (*call_value_symbol): Likewise.
16168         (*sibcall_insn): Likewise.
16169         (*sibcall_value_insn): Likewise.
16170         (clzsi2): Likewise.
16171         (prefetch): Likewise.
16172         (define_split and define_peephole2 dependent on arm_arch5):
16173         Likewise.
16174         * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
16175         arm_arch5e.
16176         (TARGET_ARM_QBIT): Likewise.
16177         (TARGET_DSP_MULTIPLY): Likewise.
16178         (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
16179         (arm_arch5, arm_arch5e): Delete.
16180         (arm_arch5t, arm_arch5te): Declare.
16181         * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
16182         (arm_arch5t): Declare.
16183         (arm_option_reconfigure_globals): Update for the above.
16184         (arm_options_perform_arch_sanity_checks): Update comment, replace
16185         use of arm_arch5 with arm_arch5t.
16186         (use_return_insn): Likewise.
16187         (arm_emit_call_insn): Likewise.
16188         (output_return_instruction): Likewise.
16189         (arm_final_prescan_insn): Likewise.
16190         (arm_coproc_builtin_available): Likewise.
16191         * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
16192         arm_arch5e with arm_arch5t and arm_arch5te.
16193         * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
16194         (arm_arch5t, arm_arch5te): Declare.
16195         * config/arm/arm-tables.opt: Regenerate.
16196         * config/arm/t-arm-elf: Remove references to armv5, armv5e.
16197         * config/arm/t-multilib: Likewise.
16198         * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
16199         instead of arm_arch5.
16200         (*call_reg_thumb1): Likewise.
16201         (*call_value_reg_thumb1_v5): Likewise.
16202         (*call_value_reg_thumb1): Likewise.
16203         * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
16204         unreachable path.
16205         * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
16207 2018-05-18  Martin Liska  <mliska@suse.cz>
16209         PR gcov-profile/84846
16210         * doc/gcov.texi: Document -t option of gcov tool.
16212 2018-05-18  Martin Liska  <mliska@suse.cz>
16214         PR gcov-profile/84846
16215         * gcov.c (print_usage): Add new -t option.
16216         (process_args): Handle the option.
16217         (generate_results): Use stdout as output when requested by
16218         the option.
16220 2018-05-18  Martin Liska  <mliska@suse.cz>
16222         PR gcov-profile/84846
16223         * coverage.c (coverage_init): Write PWD to .gcno file.
16224         * doc/gcov.texi: Document how working directory is printed.
16225         * gcov-dump.c (dump_gcov_file): Print PWD.
16226         * gcov.c (output_intermediate_file): Likewise.
16227         (read_graph_file): Read PWD string.
16228         (output_lines): Print PWD.
16230 2018-05-18  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
16232         PR middle-end/85817
16233         * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
16234         for retval and return false if all args to phi are zero.
16236 2018-05-18  Richard Biener  <rguenther@suse.de>
16238         * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
16239         method.
16240         (evrp_dom_walker::before_dom_children): Call it.
16242 2018-05-18  Richard Biener  <rguenther@suse.de>
16244         * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
16245         results when processing array refs with variable index.
16247 2018-05-18  Toon Moene  <toon@moene.org>
16249         * doc/invoke.texi: Move -floop-unroll-and-jam documentation
16250         directly after that of -floop-interchange. Indicate that both
16251         options are enabled by default when specifying -O3.
16253 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
16255         * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
16256         iterator.  Delete separate integer-mode vec_set<mode> expander.
16257         (aarch64_simd_vec_setv2di): Delete.
16258         (vec_setv2di): Delete.
16259         (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
16260         Use VALL_F16 mode iterator.  Add LD1 alternative and use vwcore for
16261         the "w, r" alternative.
16263 2018-05-18  Martin Liska  <mliska@suse.cz>
16265         * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
16266         * tree-pass.h (make_pass_lower_switch_O0): New function.
16267         * tree-switch-conversion.c (node_has_low_bound): Remove.
16268         (node_has_high_bound): Likewise.
16269         (node_is_bounded): Likewise.
16270         (class pass_lower_switch): Make it a template type and create
16271         two instances.
16272         (pass_lower_switch::execute): Add template argument.
16273         (make_pass_lower_switch): New function.
16274         (make_pass_lower_switch_O0): New function.
16275         (do_jump_if_equal): Remove.
16276         (emit_case_nodes): Simplify to just handle all 3 cases and leave
16277         all the hard work to tree optimization passes.
16279 2018-05-18  Martin Liska  <mliska@suse.cz>
16281         * dbgcnt.c (limit_low): Renamed from limit.
16282         (limit_high): New variable.
16283         (dbg_cnt_is_enabled): Check for upper limit.
16284         (dbg_cnt): Adjust dumping.
16285         (dbg_cnt_set_limit_by_index): Add new argument for high
16286         value.
16287         (dbg_cnt_set_limit_by_name): Likewise.
16288         (dbg_cnt_process_single_pair): Parse new format.
16289         (dbg_cnt_process_opt): Use strtok.
16290         (dbg_cnt_list_all_counters): Remove 'value' and add
16291         'limit_high'.
16292         * doc/invoke.texi: Document changes.
16294 2018-05-18  Richard Sandiford  <richard.sandiford@linaro.org>
16296         * doc/sourcebuild.texi (scalar_all_fma): Document.
16297         * tree.def (FMA_EXPR): Delete.
16298         * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
16299         * internal-fn.c (ternary_direct): New macro.
16300         (expand_ternary_optab_fn): Likewise.
16301         (direct_ternary_optab_supported_p): Likewise.
16302         * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
16303         * builtins.c (fold_builtin_fma): Delete.
16304         (fold_builtin_3): Don't call it.
16305         * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
16306         * expr.c (expand_expr_real_2): Likewise.
16307         * fold-const.c (operand_equal_p): Likewise.
16308         (fold_ternary_loc): Likewise.
16309         * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
16310         * gimple.c (DEFTREECODE): Likewise.
16311         * gimplify.c (gimplify_expr): Likewise.
16312         * optabs-tree.c (optab_for_tree_code): Likewise.
16313         * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
16314         * tree-eh.c (operation_could_trap_p): Likewise.
16315         (stmt_could_throw_1_p): Likewise.
16316         * tree-inline.c (estimate_operator_cost): Likewise.
16317         * tree-pretty-print.c (dump_generic_node): Likewise.
16318         (op_code_prio): Likewise.
16319         * tree-ssa-loop-im.c (stmt_cost): Likewise.
16320         * tree-ssa-operands.c (get_expr_operands): Likewise.
16321         * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
16322         * fold-const-call.h (fold_fma): Delete.
16323         * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
16324         CFN_FNMA and CFN_FNMS.
16325         (fold_fma): Delete.
16326         * genmatch.c (combined_fn): New enum.
16327         (commutative_ternary_tree_code): Remove FMA_EXPR handling.
16328         (commutative_op): New function.
16329         (commutate): Use it.  Handle more than 2 operands.
16330         (dt_operand::gen_gimple_expr): Use commutative_op.
16331         (parser::parse_expr): Allow :c to be used with non-binary
16332         operators if the commutative operand is known.
16333         * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
16334         CFN_FMS, CFN_FNMA and CFN_FNMS.
16335         (backprop::process_assign_use): Remove FMA_EXPR handling.
16336         * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
16337         (gen_hsa_fma): New function.
16338         (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
16339         IFN_FNMA and IFN_FNMS.
16340         * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
16341         * gimple-fold.h (follow_all_ssa_edges): Declare.
16342         * gimple-fold.c (follow_all_ssa_edges): New function.
16343         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
16344         gimple_build interface and use follow_all_ssa_edges to fold the result.
16345         (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
16346         instead of checking for optabs directly.
16347         * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
16348         rather than FMA_EXPRs.
16349         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
16350         call to IFN_FMA instead of an FMA_EXPR.
16352 2018-05-17  Jim Wilson  <jimw@sifive.com>
16354         * expr.c (do_tablejump): When converting index to Pmode, if we have a
16355         sign extended promoted subreg, and the range does not have the sign bit
16356         set, then do a sign extend.
16358         * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
16359         test, check for sign extended subreg and/or constant operands, and
16360         do a sign extend in that case.
16362 2018-05-17  Steve Ellcey  <sellcey@cavium.com>
16364         * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
16365         (thunderx2t99_multiple): Delete psuedo-units from used cpus.
16366         Add untyped.
16367         (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
16368         Change logics_shift_reg to logics_shift_imm.
16369         (thunderx2t99_fp_loadpair_basic): Delete.
16370         (thunderx2t99_fp_storepair_basic): Delete.
16371         (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
16372         (thunderx2t99_asimd_polynomial): Delete.
16373         (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
16374         and neon_fp_mul_d_scalar_q.
16375         (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
16376         (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
16377         (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
16378         (thunderx2t99_asimd_lut): Add missing tbl types.
16379         (thunderx2t99_asimd_ext): Delete.
16380         (thunderx2t99_asimd_load1_1_mult): Delete.
16381         (thunderx2t99_asimd_load1_2_mult): Delete.
16382         (thunderx2t99_asimd_load1_ldp): New.
16383         (thunderx2t99_asimd_load1): New.
16384         (thunderx2t99_asimd_load2): Add missing *load2* types.
16385         (thunderx2t99_asimd_load3): New.
16386         (thunderx2t99_asimd_load4): New.
16387         (thunderx2t99_asimd_store1_1_mult): Delete.
16388         (thunderx2t99_asimd_store1_2_mult): Delete.
16389         (thunderx2t99_asimd_store2_mult): Delete.
16390         (thunderx2t99_asimd_store2_onelane): Delete.
16391         (thunderx2t99_asimd_store_stp): New.
16392         (thunderx2t99_asimd_store1): New.
16393         (thunderx2t99_asimd_store2): New.
16394         (thunderx2t99_asimd_store3): New.
16395         (thunderx2t99_asimd_store4): New.
16397 2018-05-17  Jerome Lambourg  <lambourg@adacore.com>
16399         * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
16400         #include <stdint.h>.  Replace intptr_t with __INTPTR_TYPE__.
16402 2018-05-17  Pat Haugen  <pthaugen@us.ibm.com>
16403             Segher Boessenkool  <segher@kernel.crashing.org>
16405         PR target/85698
16406         * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
16407         operand.
16409 2018-05-17  Richard Biener  <rguenther@suse.de>
16411         * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
16412         for pruning loop and prune defs feeding only already visited PHIs.
16414 2018-05-17  Richard Biener  <rguenther@suse.de>
16416         * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
16418 2018-05-17  Bin Cheng  <bin.cheng@arm.com>
16419             Richard Biener  <rguenther@suse.de>
16421         PR tree-optimization/85793
16422         * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
16423         for VMAT_ELEMENTWISE.
16425 2018-05-17  Richard Sandiford  <richard.sandiford@linaro.org>
16427         * internal-fn.h (lookup_internal_fn): Declare
16428         * internal-fn.c (lookup_internal_fn): New function.
16429         * gimple.c (gimple_build_call_from_tree): Handle calls to
16430         internal functions.
16431         * gimple-pretty-print.c (dump_gimple_call): Print "." before
16432         internal function names.
16433         * tree-pretty-print.c (dump_generic_node): Likewise.
16434         * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
16436 2018-05-17  Richard Sandiford  <richard.sandiford@linaro.org>
16438         * gimple-fold.h (gimple_build): Make the function forms take
16439         combined_fn rather than built_in_function.
16440         (gimple_simplify): Likewise.
16441         * gimple-match-head.c (gimple_simplify): Likewise.
16442         * gimple-fold.c (gimple_build): Likewise.
16443         * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
16444         rather than gimple_build_call_internal.
16445         (get_initial_defs_for_reduction): Likewise.
16446         (vect_create_epilog_for_reduction): Likewise.
16447         (vectorizable_live_operation): Likewise.
16449 2018-05-17  Martin Liska  <mliska@suse.cz>
16451         * gimple-ssa-sprintf.c (format_directive): Do not use
16452         space in between 'G_' and '('.
16454 2018-05-17  Jakub Jelinek  <jakub@redhat.com>
16456         PR target/85323
16457         * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
16458         even if the mask is not all ones.
16460         PR target/85323
16461         * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
16462         vector.
16463         (ix86_gimple_fold_builtin): Likewise.
16465         PR target/85323
16466         * config/i386/i386.c: Include tree-vector-builder.h.
16467         (ix86_vector_shift_count): New function.
16468         (ix86_fold_builtin): Fold shift builtins by scalar count.
16469         (ix86_gimple_fold_builtin): Likewise.
16471         * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
16472         _mm512_setzero): New intrinsics.
16474 2018-05-17  James Greenhalgh  <james.greenhalgh@arm.com>
16475             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
16477         * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
16478         code generation for cases where splatting a value is not useful.
16479         * simplify-rtx.c (simplify_ternary_operation): Simplify
16480         vec_merge across a vec_duplicate and a paradoxical subreg forming
16481         a vector mode to a vec_concat.
16483 2018-05-17  Olga Makhotina  <olga.makhotina@intel.com>
16485         * config.gcc: Support "goldmont-plus".
16486         * config/i386/driver-i386.c (host_detect_local_cpu): Detect
16487         "goldmont-plus".
16488         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
16489         PROCESSOR_GOLDMONT_PLUS.
16490         * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
16491         (processor_target_table): Add "goldmont-plus".
16492         (PTA_GOLDMONT_PLUS): Define.
16493         (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
16494         (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
16495         (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
16496         (fold_builtin_cpu): Add "goldmont-plus".
16497         (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
16498         (ix86_option_override_internal): Add "goldmont-plus".
16499         * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
16500         (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
16501         * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
16502         * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
16504 2018-05-17  Richard Biener  <rguenther@suse.de>
16506         PR tree-optimization/85757
16507         * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
16508         remove defs that only feed that PHI from further processing.
16510 2018-05-16  Jim Wilson  <jimw@sifive.com>
16512         * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
16513         asterisk to name.
16514         (<optab>di3_mask, <optab>di3_mask_1): Likewise.
16516 2018-05-16  Mark Wielaard  <mark@klomp.org>
16518         * dwarf2out.c (count_index_strings): New function.
16519         (output_indirect_strings): Call count_index_strings and generate
16520         header for dwarf_version >= 5.
16522 2018-05-16  Mark Wielaard  <mark@klomp.org>
16524         * dwarf2out.c (dwarf_FORM): New function.
16525         (set_indirect_string): Use dwarf_FORM.
16526         (reset_indirect_string): Likewise.
16527         (size_of_die): Likewise.
16528         (value_format): Likewise.
16529         (output_die): Likewise.
16530         (add_skeleton_AT_string): Likewise.
16531         (output_macinfo_op): Likewise.
16532         (index_string): Likewise.
16533         (output_index_string_offset): Likewise.
16534         (output_index_string): Likewise.
16535         (count_index_strings): Likewise.
16537 2018-05-16  Carl Love  <cel@us.ibm.com>
16539         * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
16540         dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
16542 2018-05-16  Martin Jambor  <mjambor@suse.cz>
16544         * ipa-prop.c (ipa_free_all_edge_args): Remove.
16545         * ipa-prop.h (ipa_free_all_edge_args): Likewise.
16547 2018-05-16  Wilco Dijkstra  <wdijkstr@arm.com>
16549         * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
16550         (fnma<mode>4): Likewise.
16551         (fms<mode>4): Likewise.
16552         (fnms<mode>4): Likewise.
16553         (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
16554         (aarch64_fnma<mode>4): Likewise.
16555         (aarch64_fms<mode>4): Likewise.
16556         (aarch64_fnms<mode>4): Likewise.
16557         (aarch64_fnmadd<mode>4): Likewise.
16559 2018-05-16  Jason Merrill  <jason@redhat.com>
16561         * tree.c (warn_deprecated_use): Return bool.  Simplify logic.
16563 2018-05-16  Richard Biener  <rguenther@suse.de>
16565         * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
16566         (dump_stmt_cost): Declare.
16567         (add_stmt_cost): Dump cost we add.
16568         (add_stmt_costs): New function.
16569         (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
16570         No longer exported.
16571         (vect_analyze_stmt): Adjust prototype.
16572         (vectorizable_condition): Likewise.
16573         (vectorizable_live_operation): Likewise.
16574         (vectorizable_reduction): Likewise.
16575         (vectorizable_induction): Likewise.
16576         * tree-vect-loop.c (vect_analyze_loop_operations): Create local
16577         cost vector to pass to vectorizable_ and record afterwards.
16578         (vect_model_reduction_cost): Take cost vector argument and adjust.
16579         (vect_model_induction_cost): Likewise.
16580         (vectorizable_reduction): Likewise.
16581         (vectorizable_induction): Likewise.
16582         (vectorizable_live_operation): Likewise.
16583         * tree-vect-slp.c (vect_create_new_slp_node): Initialize
16584         SLP_TREE_NUMBER_OF_VEC_STMTS.
16585         (vect_analyze_slp_cost_1): Remove.
16586         (vect_analyze_slp_cost): Likewise.
16587         (vect_slp_analyze_node_operations): Take visited args and
16588         a target cost vector.  Avoid processing already visited stmt sets.
16589         (vect_slp_analyze_operations): Use a local cost vector to gather
16590         costs and register those of non-discarded instances.
16591         (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
16592         (vect_schedule_slp_instance): Remove copying of
16593         SLP_TREE_NUMBER_OF_VEC_STMTS.  Instead assert that it is not
16594         zero.
16595         * tree-vect-stmts.c (record_stmt_cost): Remove path directly
16596         adding cost.  Record cost entry location.
16597         (vect_prologue_cost_for_slp_op): Function to compute cost of
16598         a constant or invariant generated for SLP vect in the prologue,
16599         split out from vect_analyze_slp_cost_1.
16600         (vect_model_simple_cost): Make static.  Adjust for SLP costing.
16601         (vect_model_promotion_demotion_cost): Likewise.
16602         (vect_model_store_cost): Likewise, make static.
16603         (vect_model_load_cost): Likewise.
16604         (vectorizable_bswap): Add cost vector arg and adjust.
16605         (vectorizable_call): Likewise.
16606         (vectorizable_simd_clone_call): Likewise.
16607         (vectorizable_conversion): Likewise.
16608         (vectorizable_assignment): Likewise.
16609         (vectorizable_shift): Likewise.
16610         (vectorizable_operation): Likewise.
16611         (vectorizable_store): Likewise.
16612         (vectorizable_load): Likewise.
16613         (vectorizable_condition): Likewise.
16614         (vectorizable_comparison): Likewise.
16615         (can_vectorize_live_stmts): Likewise.
16616         (vect_analyze_stmt): Likewise.
16617         (vect_transform_stmt): Adjust calls to vectorizable_*.
16618         * tree-vectorizer.c: Include gimple-pretty-print.h.
16619         (dump_stmt_cost): New function.
16621 2018-05-16  Richard Biener  <rguenther@suse.de>
16623         * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
16624         * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
16625         * tree-ssa-dse.c: Include tree-ssa-loop.h.
16626         (check_name): New callback.
16627         (dse_classify_store): Track cycles via a visited bitmap of PHI
16628         defs and simplify handling of in-loop and across loop dead stores
16629         and properly fail for loop-variant refs.  Handle byte-tracking with
16630         multiple defs.  Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
16631         limiting the walk.
16633 2018-05-16  Richard Sandiford  <richard.sandiford@linaro.org>
16635         * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
16636         (vect_get_mask_type_for_stmt): Likewise.
16637         * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
16638         split out from...
16639         (vect_build_slp_tree_1): ...here.  Use vect_get_vector_types_for_stmt
16640         to determine the statement's vector type and the vector type that
16641         should be used for calculating nunits.  Deal with cases in which
16642         the type has to be deferred.
16643         (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
16644         and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
16645         * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
16646         (vect_determine_vf_for_stmt): New functions, split out from...
16647         (vect_determine_vectorization_factor): ...here.
16648         * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
16649         (vect_get_mask_type_for_stmt): New functions, split out from
16650         vect_determine_vectorization_factor.
16652 2018-05-16  Richard Biener  <rguenther@suse.de>
16654         * tree-cfg.c (verify_gimple_assign_ternary): Properly
16655         verify the [VEC_]COND_EXPR embedded comparison.
16657 2018-05-15  Martin Sebor  <msebor@redhat.com>
16659         PR tree-optimization/85753
16660         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
16661         RECORD_TYPE in addition to ARRAY_TYPE.
16663 2018-05-15  Martin Sebor  <msebor@redhat.com>
16665         PR middle-end/85643
16666         * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
16668 2018-05-15  Richard Biener  <rguenther@suse.de>
16670         * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
16671         add by_clobber_p one.  Change algorithm to collect all defs
16672         representing uses we need to walk and try reducing them to
16673         a single one before failing.
16674         (dse_dom_walker::dse_optimize_stmt): Adjust.
16676 2018-05-13  Mark Wielaard  <mark@klomp.org>
16678         * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
16679         (size_of_loc_descr): Likewise.
16680         (output_loc_operands): Likewise.
16681         (output_loc_operands_raw): Likewise.
16682         (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
16683         (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
16684         (hash_loc_operands): Likewise.
16685         (compare_loc_operands): Likewise.
16687 2018-05-14  Mark Wielaard  <mark@klomp.org>
16689         * dwarf2out.c (count_index_addrs): New function.
16690         (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
16692 2018-05-15  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
16694         PR tree-optimization/83648
16695         * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
16696         return value as malloc candidate.
16698 2018-05-15  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
16700         PR ipa/85734
16701         * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite
16702         param as true in call to suggest_attribute.
16704 2018-05-14  Segher Boessenkool  <segher@kernel.crashing.org>
16706         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
16707         -mreadonly-in-sdata.
16709 2018-05-14  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
16711         * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
16712         New pattern.
16713         (aarch64_crypto_aesd_fused): Likewise.
16715 2018-05-14  Wilco Dijkstra  <wdijkstr@arm.com>
16717         * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
16718         (movsi_aarch64): Likewise.
16719         (load_pairsi): Likewise.
16720         (load_pairdi): Likewise.
16721         (store_pairsi): Likewise.
16722         (store_pairdi): Likewise.
16723         (load_pairsf): Likewise.
16724         (load_pairdf): Likewise.
16725         (store_pairsf): Likewise.
16726         (store_pairdf): Likewise.
16727         (zero_extend): Likewise.
16728         (trunc): Swap alternatives.
16729         (fcvt_target): Add '?' to prefer w over r.
16731 2018-05-14  Jakub Jelinek  <jakub@redhat.com>
16733         PR target/85756
16734         * config/i386/i386.md: Disallow non-commutative arithmetics in
16735         last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
16736         optimization.  Use COMMUTATIVE_ARITH_P test rather than != MINUS
16737         in the peephole2 before it.
16739 2018-05-14  Sebastian Peryt  <sebastian.peryt@intel.com>
16741         * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
16742         OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
16743         (ix86_handle_option): Handle -mcldemote.
16744         * config.gcc: New header.
16745         * config/i386/cldemoteintrin.h: New file.
16746         * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
16747         * config/i386/driver-i386.c (host_detect_local_cpu): Detect
16748         -mcldemote.
16749         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
16750         OPTION_MASK_ISA_CLDEMOTE.
16751         * config/i386/i386.c (ix86_target_string): Add -mcldemote.
16752         (ix86_valid_target_attribute_inner_p): Ditto.
16753         (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
16754         (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
16755         (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
16756         * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
16757         * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
16758         (cldemote): New.
16759         * config/i386/i386.opt: Add -mcldemote.
16760         * config/i386/x86intrin.h: New header.
16761         * doc/invoke.texi: Add -mcldemote.
16763 2018-05-14  Richard Biener  <rguenther@suse.de>
16765         * doc/match-and-simplify.texi: Adjust :s documentation.
16767 2018-05-14  Alexander Monakov  <amonakov@ispras.ru>
16769         * sort.cc (REORDER_23): Pass the type for the temporaries instead of
16770         intended memcpy size.
16771         (REORDER_45): Likewise.
16773 2018-05-13  Alexander Monakov  <amonakov@ispras.ru>
16775         * sort.cc: New file.
16776         * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
16777         * vec.c (qsort_chk): Use gcc_qsort.
16778         * Makefile.in (OBJS-libcommon): Add sort.o.
16779         (build/sort.o): New target.  Use it...
16780         (BUILD_RTL): ... here, and...
16781         (build/gencfn-macros): ... here, and...
16782         (build/genmatch): ... here.
16784 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
16785             Chung-Ju Wu  <jasonwucj@gmail.com>
16787         * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
16788         * config/nds32/nds32-graywolf.md: New file.
16789         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
16790         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
16791         pipeline.
16792         * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
16793         * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
16794         * config/nds32/nds32.md (pipeline_model): Add graywolf.
16795         * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
16796         * config/nds32/pipelines.md: Include n15 settings.
16798 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
16799             Chung-Ju Wu  <jasonwucj@gmail.com>
16801         * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
16802         * config/nds32/nds32-n13.md: New file.
16803         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
16804         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
16805         pipeline.
16806         * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
16807         * config/nds32/nds32.md (pipeline_model): Add n13.
16808         * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
16809         * config/nds32/pipelines.md: Include n13 settings.
16811 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
16812             Chung-Ju Wu  <jasonwucj@gmail.com>
16814         * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
16815         * config/nds32/nds32-n10.md: New file.
16816         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
16817         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
16818         pipeline.
16819         * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
16820         * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
16821         * config/nds32/nds32.md (pipeline_model): Add n10.
16822         * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
16823         * config/nds32/pipelines.md: Include n10 settings.
16825 2018-05-13  Monk Chiang  <sh.chiang04@gmail.com>
16826             Kito Cheng  <kito.cheng@gmail.com>
16827             Chung-Ju Wu  <jasonwucj@gmail.com>
16829         * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
16830         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
16831         Add enum values for DSP extension instructions.
16832         * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
16833         New constraints.
16834         * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
16835         sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
16836         New code iterators.
16837         (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
16838         * config/nds32/nds32-dspext.md: New file for DSP implementation.
16839         * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
16840         * config/nds32/nds32-intrinsic.md: Likewise.
16841         * config/nds32/nds32_intrinsic.h: Likewise.
16842         * config/nds32/nds32-md-auxiliary.c: Likewise.
16843         * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
16844         * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
16845         (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
16846         (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
16847         * config/nds32/nds32-protos.h: New declarations for DSP extension.
16848         * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
16849         TYPE_DMAC in switch statement.
16850         * config/nds32/nds32.c: New checking and implementation for DSP
16851         extension instructions.
16852         * config/nds32/nds32.h: Likewise.
16853         * config/nds32/nds32.md: Likewise.
16854         * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
16855         * config/nds32/predicates.md: Implement new predicates for DSP
16856         extension.
16858 2018-05-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
16860         * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
16861         Reformat alternatives and attributes so it is easier to identify
16862         which constraints/attributes go with which instruction.
16863         (mov<mode>_hardfloat32, FMOVE64): Likewise.
16864         (mov<mode>_softfloat32, FMOVE64): Likewise.
16865         (mov<mode>_hardfloat64, FMOVE64): Likewise.
16866         (mov<mode>_softfloat64, FMOVE64): Likewise.
16868 2018-05-11  Kelvin Nilsen  <kelvin@gcc.gnu.org>
16870         * doc/extend.texi (PowerPC Built-in Functions): Rename this
16871         subsection.
16872         (Basic PowerPC Built-in Functions): The new name of the
16873         subsection previously known as "PowerPC Built-in Functions".
16874         (Basic PowerPC Built-in Functions Available on all Configurations):
16875         New subsubsection.
16876         (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
16877         (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
16878         (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
16879         (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
16881 2018-05-11  Martin Jambor  <mjambor@suse.cz>
16883         PR ipa/85655
16884         * ipa-cp.c (intersect_with_plats): Check that the lattice contains
16885         single const.
16887 2018-05-11  Richard Earnshaw  <rearnsha@arm.com>
16889         PR target/85733
16890         * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
16892 2018-05-11  Sebastian Peryt  <sebastian.peryt@intel.com>
16894         * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
16895         OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
16896         (ix86_handle_option): Handle -mwaitpkg.
16897         * config.gcc: New header.
16898         * config/i386/cpuid.h (bit_WAITPKG): New bit.
16899         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
16900         * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
16901         function type.
16902         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
16903         OPTION_MASK_ISA_WAITPKG.
16904         * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
16905         (ix86_option_override_internal): Add PTA_WAITPKG.
16906         (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
16907         (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
16908         IX86_BUILTIN_TPAUSE.
16909         (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
16910         __builtin_ia32_umwait and __builtin_ia32_tpause.
16911         (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
16912         IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
16913         * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
16914         * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
16915         UNSPECV_TPAUSE): New.
16916         (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
16917         * config/i386/i386.opt: Add -mwaitpkg.
16918         * config/i386/waitpkgintrin.h: New file.
16919         * config/i386/x86intrin.h: New header.
16920         * doc/invoke.texi: Add -mwaitpkg.
16922 2018-05-11  Richard Earnshaw  <rearnsha@arm.com>
16924         PR target/85606
16925         * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
16926         equivalent.
16927         (cortex-m0): Use armv6s-m isa.
16928         (cortex-m0plus): Likewise.
16929         (cortex-m1): Likewise.
16930         (cortex-m0.small-multiply): Likewise.
16931         (cortex-m0plus.small-multiply): Likewise.
16932         (cortex-m1.small-multiply): Likewise.
16934 2018-05-11  Allan Sandfeld Jensen  <allan.jensen@qt.io>
16935             Jakub Jelinek  <jakub@redhat.com>
16937         PR tree-optimization/85692
16938         * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
16939         source permute as well.
16941 2018-05-11  Martin Liska  <mliska@suse.cz>
16943         PR sanitizer/85556
16944         * doc/extend.texi: Document LLVM style format for no_sanitize
16945         attribute.
16947 2018-05-10  Michael Meissner  <meissner@linux.vnet.ibm.com>
16949         * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
16950         mode_supports_vsx_dform_quad to mode_supports_dq_form.
16951         (mode_supports_vsx_dform_quad): Likewise.
16952         (mode_supports_vmx_dform): Move these functions to be next to the
16953         other mode_supports functions.
16954         (mode_supports_dq_form): Likewise.
16955         (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
16956         mode_supports_dq_form.
16957         (reg_offset_addressing_ok_p): Likewise.
16958         (offsettable_ok_by_alignment): Likewise.
16959         (rs6000_legitimate_offset_address_p): Likewise.
16960         (legitimate_lo_sum_address_p): Likewise.
16961         (rs6000_legitimize_address): Likewise.
16962         (rs6000_legitimize_reload_address): Likewise.
16963         (rs6000_secondary_reload_inner): Likewise.
16964         (rs6000_preferred_reload_class): Likewise.
16965         (rs6000_output_move_128bit): Likewise.
16967 2018-05-10  Uros Bizjak  <ubizjak@gmail.com>
16969         * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
16970         Generate SImode target register for null target.
16971         <case IX86_BUILTIN_XGETBV>: Ditto.
16972         <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
16973         * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
16975 2018-05-10  Carl Love  <cel@us.ibm.com>
16977         * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
16978         dcbtt and dcbtstt if operands[2] is 0.
16980 2018-05-10  Uros Bizjak  <ubizjak@gmail.com>
16982         PR target/85693
16983         * config/i386/sse.md (usadv64qi): New expander.
16985 2018-05-10  Segher Boessenkool  <segher@kernel.crashing.org>
16987         * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
16988         altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
16989         -maltivec=be support.
16990         (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
16991         vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
16992         vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
16993         vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
16994         vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
16995         vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
16996         altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
16997         altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
16998         altivec_vsumsws): Adjust.
16999         (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
17000         *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
17001         altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
17002         support.
17003         (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
17004         altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
17005         altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
17006         (altivec_lve<VI_char>x): Delete expand.
17007         (*altivec_lve<VI_char>x_internal): Rename to...
17008         (altivec_lve<VI_char>x): ... this.
17009         (altivec_lvxl_<mode>): Delete expand.
17010         (*altivec_lvxl_<mode>_internal): Rename to ...
17011         (altivec_lvxl_<mode>): ... this.
17012         (altivec_stvxl_<mode>): Delete expand.
17013         (*altivec_stvxl_<mode>_internal): Rename to ...
17014         (altivec_stvxl_<mode>): ... this.
17015         (altivec_stve<VI_char>x): Delete expand.
17016         (*altivec_stve<VI_char>x_internal): Rename to ...
17017         (altivec_stve<VI_char>x): ... this.
17018         (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
17019         doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
17020         reduc_plus_scal_<mode>): Adjust.
17021         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
17022         comment.
17023         (rs6000_cpu_cpp_builtins): Adjust.
17024         (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
17025         * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
17026         altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
17027         * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
17028         -maltivec=be support.
17029         (rs6000_split_vec_extract_var): Adjust.
17030         (rs6000_split_v4si_init): Adjust.
17031         (swap_selector_for_mode): Delete.
17032         (altivec_expand_lvx_be, altivec_expand_stvx_be,
17033         altivec_expand_stvex_be): Delete.
17034         (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
17035         -maltivec=be support.
17036         (rs6000_gimple_fold_builtin): Ditto.
17037         (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
17038         Adjust.
17039         * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
17040         (TARGET_DIRECT_MOVE_64BIT): Adjust.
17041         * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
17042         * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
17043         * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
17044         unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
17045         vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
17046         *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
17047         *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
17048         *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
17049         anonymous split): Adjust.
17050         (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
17051         (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
17053 2018-05-10  Eric Botcazou  <ebotcazou@adacore.com>
17055         * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
17056         when --with-gxx-include-dir is also specified.
17057         * configure: Regenerate.
17059 2018-05-09  Jim Wilson  <jimw@sifive.com>
17061         PR target/84797
17062         * config.gcc (riscv*-*-*): Handle --with-multilib-list.
17063         * config/riscv/t-withmultilib: New.
17064         * config/riscv/withmultilib.h: New.
17065         * doc/install.texi: Document RISC-V --with-multilib-list support.
17067 2018-05-09  Richard Biener  <rguenther@suse.de>
17069         * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
17070         vector.
17071         (vect_bb_vectorization_profitable_p): Adjust.  Compute
17072         actual scalar cost using the cost vector and the add_stmt_cost
17073         machinery.
17075 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
17077         PR rtl-optimization/85645
17078         * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
17079         in the REG_CFA_REGISTER note for LR, don't leave it empty.
17081 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
17083         PR rtl-optimization/85645
17084         * shrink-wrap.c (spread_components): Return a boolean saying if
17085         anything was changed.
17086         (try_shrink_wrapping_separate): Iterate spread_components until
17087         nothing changes anymore.
17089 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
17091         PR rtl-optimization/85645
17092         * regrename.c (build_def_use): Also kill the chains that include the
17093         destination of a REG_CFA_REGISTER note.
17095 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
17097         PR rtl-optimization/85645
17098         *  regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
17099         insn that has a REG_CFA_REGISTER note.
17101 2018-05-09  Richard Sandiford  <richard.sandiford@linaro.org>
17103         * cfgexpand.c (expand_clobber): New function.
17104         (expand_gimple_stmt_1): Use it.
17105         * tree-vect-stmts.c (vect_clobber_variable): New function,
17106         split out from...
17107         (vectorizable_simd_clone_call): ...here.
17108         (vectorizable_store): Emit a clobber either side of an
17109         IFN_STORE_LANES sequence.
17110         (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
17112 2018-05-09  Tom de Vries  <tom@codesourcery.com>
17114         PR target/85626
17115         * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
17116         (define_insn "trap_if_false"): Add exit after trap.
17118 2018-05-09  Eric Botcazou  <ebotcazou@adacore.com>
17120         PR rtl-optimization/85638
17121         * bb-reorder.c: Include common/common-target.h.
17122         (create_forwarder_block): New function extracted from...
17123         (fix_up_crossing_landing_pad): ...here.  Rename into...
17124         (dw2_fix_up_crossing_landing_pad): ...this.
17125         (sjlj_fix_up_crossing_landing_pad): New function.
17126         (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
17127         call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
17128         from both partitions and exit the loop after one iteration.
17130 2018-05-08  Kelvin Nilsen  <kelvin@gcc.gnu.org>
17132         Revert:
17133         * doc/extend.texi (PowerPC Built-in Functions): Rename this
17134         subsection.
17135         (Basic PowerPC Built-in Functions): The new name of the
17136         subsection previously known as "PowerPC Built-in Functions".
17137         (Basic PowerPC Built-in Functions Available on all Configurations):
17138         New subsubsection.
17139         (Basic PowerPC Built-in Functions Available on ISA 2.05): New
17140         subsubsection.
17141         (Basic PowerPC Built-in Functions Available on ISA 2.06): New
17142         subsubsection.
17143         (Basic PowerPC Built-in Functions Available on ISA 2.07): New
17144         subsubsection.
17145         (Basic PowerPC Built-in Functions Available on ISA 3.0): New
17146         subsubsection.
17148 2018-05-08  Jim Wilson  <jimw@sifive.com>
17150         * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
17151         (LD_EMUL_SUFFIX): New.
17152         (LINK_SPEC): Use it.
17154 2018-05-08  Kelvin Nilsen  <kelvin@gcc.gnu.org>
17156         * doc/extend.texi (PowerPC Built-in Functions): Rename this
17157         subsection.
17158         (Basic PowerPC Built-in Functions): The new name of the
17159         subsection previously known as "PowerPC Built-in Functions".
17160         (Basic PowerPC Built-in Functions Available on all Configurations):
17161         New subsubsection.
17162         (Basic PowerPC Built-in Functions Available on ISA 2.05): New
17163         subsubsection.
17164         (Basic PowerPC Built-in Functions Available on ISA 2.06): New
17165         subsubsection.
17166         (Basic PowerPC Built-in Functions Available on ISA 2.07): New
17167         subsubsection.
17168         (Basic PowerPC Built-in Functions Available on ISA 3.0): New
17169         subsubsection.
17171 2018-05-08  Jakub Jelinek  <jakub@redhat.com>
17173         PR target/85683
17174         * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
17175         after cmpelim optimization.
17177 2018-05-08  Olga Makhotina  <olga.makhotina@intel.com>
17179         * config.gcc: Support "goldmont".
17180         * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
17181         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
17182         PROCESSOR_GOLDMONT.
17183         * config/i386/i386.c (m_GOLDMONT): Define.
17184         (processor_target_table): Add "goldmont".
17185         (PTA_GOLDMONT): Define.
17186         (ix86_lea_outperforms): Add TARGET_GOLDMONT.
17187         (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
17188         (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
17189         (fold_builtin_cpu): Add "goldmont".
17190         (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
17191         (ix86_option_override_internal): Add "goldmont".
17192         * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
17193         (processor_type): Add PROCESSOR_GOLDMONT.
17194         * config/i386/i386.md: Add CPU "glm".
17195         * config/i386/glm.md: New file.
17196         * config/i386/x86-tune.def: Add m_GOLDMONT.
17197         * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
17199 2018-05-08  Jakub Jelinek  <jakub@redhat.com>
17201         PR target/85572
17202         * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
17203         E_V4DImode.
17204         * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
17205         VI1248_AVX512VL_AVX512BW.  Handle V2DImode and V4DImode if not
17206         TARGET_AVX512VL using ix86_expand_sse2_abs.  Formatting fixes.
17208         PR target/85317
17209         * config/i386/i386.c (ix86_fold_builtin): Handle
17210         IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
17212         PR target/85480
17213         * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
17214         (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
17216 2018-05-08  Richard Earnshaw  <rearnsha@arm.com>
17218         PR target/85658
17219         * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
17220         (check_arch): Likewise.
17221         (check_fpu): Return the result rather than printing it.
17222         (end arch): Fix operator precedence.
17223         (end cpu): Likewise.
17224         (END): Print the result from check_fpu.
17226 2018-05-08  Richard Sandiford  <richard.sandiford@linaro.org>
17227             Alan Hayward  <alan.hayward@arm.com>
17228             David Sherwood  <david.sherwood@arm.com>
17230         * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
17231         (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
17232         (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
17233         (*fcmuo<mode>_and): New patterns.
17235 2018-05-08  Richard Sandiford  <richard.sandiford@linaro.org>
17237         * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
17238         (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
17239         (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
17240         (cmp_op, sve_imm_con): New code attributes.
17241         (SVE_COND_INT_CMP, imm_con): Delete.
17242         (cmp_op): Remove above unspecs from int attribute.
17243         * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
17244         to...
17245         (*cmp<cmp_op><mode>): ...this.  Use UNSPEC_MERGE_PTRUE instead of
17246         comparison-specific unspecs.
17247         (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
17248         (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
17249         (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
17250         (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
17251         (*vec_fcm<cmp_op><mode>): Rename to...
17252         (*fcm<cmp_op><mode>): ...this and adjust likewise.
17253         (*vec_fcmuo<mode>): Rename to...
17254         (*fcmuo<mode>): ...this and adjust likewise.
17255         (*pred_fcm<cmp_op><mode>): New pattern.
17256         * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
17257         (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
17258         functions.
17259         (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
17260         and UNORDERED.
17261         (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
17262         (aarch64_emit_sve_predicated_cond): New function.
17263         (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
17264         (aarch64_emit_unspec_cond_or): Replace with...
17265         (aarch64_emit_sve_or_conds): ...this new function.  Use
17266         aarch64_emit_sve_ptrue_op for the individual comparisons and
17267         aarch64_emit_binop to OR them together.
17268         (aarch64_emit_inverted_unspec_cond): Replace with...
17269         (aarch64_emit_sve_inverted_cond): ...this new function.  Use
17270         aarch64_emit_sve_ptrue_op for the comparison and
17271         aarch64_emit_unop to invert the result.
17272         (aarch64_expand_sve_vec_cmp_float): Update after the above
17273         changes.  Use aarch64_emit_sve_ptrue_op for native comparisons.
17275 2018-05-07  Nathan Sidwell  <nathan@acm.org>
17277         * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
17278         * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
17279         (Backwards Compatibility): Likewise.
17281 2018-05-07  Luis Machado  <luis.machado@linaro.org>
17283         PR bootstrap/85681
17284         Revert:
17285         2018-05-07  Luis Machado  <luis.machado@linaro.org>
17287         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
17288         <prefetch_dynamic_strides>: New const bool field.
17289         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
17290         prefetch_dynamic_strides.
17291         (exynosm1_prefetch_tune): Likewise.
17292         (thunderxt88_prefetch_tune): Likewise.
17293         (thunderx_prefetch_tune): Likewise.
17294         (thunderx2t99_prefetch_tune): Likewise.
17295         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
17296         to false.
17297         (aarch64_override_options_internal): Update to set
17298         PARAM_PREFETCH_DYNAMIC_STRIDES.
17299         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
17300         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
17301         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
17302         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
17303         prefetch-dynamic-strides setting.
17305         2018-05-07  Luis Machado  <luis.machado@linaro.org>
17307         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
17308         <minimum_stride>: New const int field.
17309         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
17310         minimum_stride field.
17311         (exynosm1_prefetch_tune): Likewise.
17312         (thunderxt88_prefetch_tune): Likewise.
17313         (thunderx_prefetch_tune): Likewise.
17314         (thunderx2t99_prefetch_tune): Likewise.
17315         (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
17316         (aarch64_override_options_internal): Update to set
17317         PARAM_PREFETCH_MINIMUM_STRIDE.
17318         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
17319         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
17320         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
17321         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
17322         stride is constant and is below the minimum stride threshold.
17324 2018-05-07  Luis Machado  <luis.machado@linaro.org>
17326         * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
17327         to 512.
17329 2018-05-07  Luis Machado  <luis.machado@linaro.org>
17331         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
17332         <prefetch_dynamic_strides>: New const bool field.
17333         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
17334         prefetch_dynamic_strides.
17335         (exynosm1_prefetch_tune): Likewise.
17336         (thunderxt88_prefetch_tune): Likewise.
17337         (thunderx_prefetch_tune): Likewise.
17338         (thunderx2t99_prefetch_tune): Likewise.
17339         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
17340         to false.
17341         (aarch64_override_options_internal): Update to set
17342         PARAM_PREFETCH_DYNAMIC_STRIDES.
17343         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
17344         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
17345         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
17346         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
17347         prefetch-dynamic-strides setting.
17349 2018-05-07  Luis Machado  <luis.machado@linaro.org>
17351         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
17352         <minimum_stride>: New const int field.
17353         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
17354         minimum_stride field.
17355         (exynosm1_prefetch_tune): Likewise.
17356         (thunderxt88_prefetch_tune): Likewise.
17357         (thunderx_prefetch_tune): Likewise.
17358         (thunderx2t99_prefetch_tune): Likewise.
17359         (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
17360         (aarch64_override_options_internal): Update to set
17361         PARAM_PREFETCH_MINIMUM_STRIDE.
17362         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
17363         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
17364         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
17365         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
17366         stride is constant and is below the minimum stride threshold.
17368 2018-05-06  Jakub Jelinek  <jakub@redhat.com>
17370         PR c++/85659
17371         * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
17372         the type is addressable.  Don't force op into register if it has
17373         BLKmode.
17375 2018-05-05  Roland McGrath  <mcgrathr@google.com>
17377         PR other/77609
17378         * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
17379         any section for which we don't know a specific type it should have,
17380         regardless of name.  Previously this was done only for the exact
17381         names ".init_array", ".fini_array", and ".preinit_array".
17382         (default_elf_asm_named_section): Add comment about
17383         relationship with default_section_type_flags and SECTION_NOTYPE.
17384         (get_section): Don't consider it a type conflict if one side has
17385         SECTION_NOTYPE and the other doesn't, as long as neither has the
17386         SECTION_BSS et al used in the default_section_type_flags logic.
17388 2018-05-05  Tom de Vries  <tom@codesourcery.com>
17390         PR target/85653
17391         * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
17392         (workaround_barsyncs): New function.
17393         (nvptx_reorg): Use workaround_barsyncs.
17394         * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
17395         (define_expand "nvptx_membar_cta"): New define_expand.
17396         (define_insn "*nvptx_membar_cta"): New insn.
17398 2018-05-04  Pekka Jääskeläinen  <pekka.jaaskelainen@parmance.com>
17400         * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
17401         To improve optimization opportunities.
17402         * builtin-types.def: The new needed builtin types for the above.
17404 2018-05-04  Richard Biener  <rguenther@suse.de>
17406         * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
17407         * gimple-ssa-store-merging.c
17408         (imm_store_chain_info::output_merged_store): Remove redundant create,
17409         release split_store vector contents on failure.
17410         * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
17411         scalar stmt vector on cache hit.
17413 2018-05-04  Segher Boessenkool  <segher@kernel.crashing.org>
17415         * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
17416         Xilinx FP support.
17417         * config.gcc (powerpc-xilinx-eabi*): Remove.
17418         * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
17419         support.
17420         (fusion_addis_mem_combo_load): Ditto.
17421         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
17422         FP support.
17423         (rs6000_cpu_cpp_builtins): Ditto.
17424         * config/rs6000/rs6000-linux.c
17425         (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
17426         * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
17427         * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
17428         support.
17429         (rs6000_setup_reg_addr_masks): Ditto.
17430         (rs6000_init_hard_regno_mode_ok): Ditto.
17431         (rs6000_option_override_internal): Ditto.
17432         (legitimate_lo_sum_address_p): Ditto.
17433         (rs6000_legitimize_address): Ditto.
17434         (rs6000_legitimize_reload_address): Ditto.
17435         (rs6000_legitimate_address_p): Ditto.
17436         (abi_v4_pass_in_fpr): Ditto.
17437         (setup_incoming_varargs): Ditto.
17438         (rs6000_gimplify_va_arg): Ditto.
17439         (rs6000_split_multireg_move): Ditto.
17440         (rs6000_savres_strategy): Ditto.
17441         (rs6000_emit_prologue_components): Ditto.
17442         (rs6000_emit_epilogue_components): Ditto.
17443         (rs6000_emit_prologue): Ditto.
17444         (rs6000_emit_epilogue): Ditto.
17445         (rs6000_elf_file_end): Ditto.
17446         (rs6000_function_value): Ditto.
17447         (rs6000_libcall_value): Ditto.
17448         * config/rs6000/rs6000.h: Ditto.
17449         (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
17450         (TARGET_MINMAX): ... this.  New.
17451         (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
17452         * config/rs6000/rs6000.md: Remove Xilinx FP support.
17453         (*movsi_internal1_single): Delete.
17454         * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
17455         mfpu=, mxilinx-fpu): Delete.
17456         * config/rs6000/singlefp.h: Delete.
17457         * config/rs6000/sysv4.h: Remove Xilinx FP support.
17458         * config/rs6000/t-rs6000: Ditto.
17459         * config/rs6000/t-xilinx: Delete.
17460         * config/rs6000/titan.md: Adjust for fp_type removal.
17461         * config/rs6000/vsx.md: Remove Xilinx FP support.
17462         (VStype_simple): Delete.
17463         (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
17464         * config/rs6000/xfpu.h: Delete.
17465         * config/rs6000/xfpu.md: Delete.
17466         * config/rs6000/xilinx.h: Delete.
17467         * config/rs6000/xilinx.opt: Delete.
17468         * doc/invoke.texi (RS/6000 and PowerPC Options): Remove
17469         -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
17471 2018-05-04  Tom de Vries  <tom@codesourcery.com>
17473         PR libgomp/85639
17474         * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
17475         if ignore == 0.
17477 2018-05-04  Richard Biener  <rguenther@suse.de>
17479         PR middle-end/85627
17480         * tree-complex.c (update_complex_assignment): We are always in SSA form.
17481         (expand_complex_div_wide): Likewise.
17482         (expand_complex_operations_1): Likewise.
17483         (expand_complex_libcall): Preserve EH info of the original stmt.
17484         (tree_lower_complex): Handle removed blocks.
17485         * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
17486         on complex multiplication and division libcall builtins.
17488 2018-05-04  Richard Biener  <rguenther@suse.de>
17490         PR middle-end/85574
17491         * fold-const.c (negate_expr_p): Restrict negation of operand
17492         zero of a division to when we know that can happen without
17493         overflow.
17494         (fold_negate_expr_1): Likewise.
17496 2018-05-04  Jakub Jelinek  <jakub@redhat.com>
17498         PR libstdc++/85466
17499         * real.h (real_nextafter): Declare.
17500         * real.c (real_nextafter): New function.
17501         * fold-const-call.c (fold_const_nextafter): New function.
17502         (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
17503         CASE_CFN_NEXTTOWARD.
17504         (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
17505         even when arg1_mode is different from arg0_mode.
17507 2018-05-03  Nathan Sidwell  <nathan@acm.org>
17509         * doc/extend.texi (Deprecated Features): Remove
17510         -ffriend-injection.
17511         (Backwards Compatibility): Likewise.
17512         * doc/invoke.texi (C++ Language Options): Likewise.
17513         (C++ Dialect Options): Likewise.
17515 2018-05-03  Jakub Jelinek  <jakub@redhat.com>
17517         PR target/85530
17518         * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
17519         _mm512_mask_mullox_epi64): New intrinsics.
17521 2018-05-03  Tom de Vries  <tom@codesourcery.com>
17523         PR testsuite/85106
17524         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
17525         dump files): Add offload-tree.
17527 2018-05-03  Richard Biener  <rguenther@suse.de>
17529         PR tree-optimization/85615
17530         * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
17531         to loops not nested in BBs loop father to avoid creating multi-entry
17532         loops.
17534 2018-05-03  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
17536         PR tree-optimization/70291
17537         * tree-complex.c (expand_complex_libcall): Add type, inplace_p
17538         arguments.  Change return type to tree.  Emit libcall as a new
17539         statement rather than replacing existing one when inplace_p is true.
17540         (expand_complex_multiplication_components): New function.
17541         (expand_complex_multiplication): Expand floating-point complex
17542         multiplication using the above.
17543         (expand_complex_division): Rename inner_type parameter to type.
17544         Update expand_complex_libcall call-site.
17545         (expand_complex_operations_1): Update expand_complex_multiplication
17546         and expand_complex_division call-sites.
17548 2018-05-02  Jakub Jelinek  <jakub@redhat.com>
17550         PR target/85582
17551         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
17552         *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
17553         *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
17554         the highest significant bit of the shift count mask is clear.  In
17555         check whether and[sq]i3 is needed verify that all significant bits
17556         of the shift count other than the highest are set.
17558 2018-05-02  Tom de Vries  <tom@codesourcery.com>
17560         PR libgomp/82428
17561         * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
17562         * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
17563         (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
17564         * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
17565         (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
17566         * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
17567         __builtin_goacc_parlevel_size.
17569 2018-05-02  Richard Biener  <rguenther@suse.de>
17571         PR tree-optimization/85597
17572         * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
17573         do not use split vect_get_vec_defs call but call vect_get_slp_defs
17574         directly.
17576 2018-05-02  Tom de Vries  <tom@codesourcery.com>
17578         PR testsuite/85106
17579         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
17580         dump files): Add ltrans-tree.
17582 2018-05-02  Tom de Vries  <tom@codesourcery.com>
17584         PR testsuite/85106
17585         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
17586         dump files): Add wpa-ipa.
17588 2018-05-02  Segher Boessenkool  <segher@kernel.crashing.org>
17590         * config.gcc (powerpc*-*-*): Remove paired.h.  Unsupport the
17591         powerpc*-*-linux*paired* target.
17592         * config/rs6000/750cl.h: Delete.
17593         * config/rs6000/paired.h: Delete.
17594         * config/rs6000/paired.md: Delete.
17595         * config/rs6000/predicates.md (easy_vector_constant): Remove paired
17596         float support.
17597         * config/rs6000/rs6000-builtin.def: Remove paired float support.
17598         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
17599         comment.  Remove paired float support.
17600         * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
17601         * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
17602         VECTOR_PAIRED.
17603         * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
17604         paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
17605         declarations.
17606         * config/rs6000/rs6000.c: Remove paired float support.
17607         (paired_expand_vector_init, paired_expand_vector_move,
17608         paired_emit_vector_compare, paired_emit_vector_cond_expr,
17609         (paired_expand_lv_builtin, paired_expand_stv_builtin,
17610         paired_expand_builtin, paired_expand_predicate_builtin,
17611         paired_init_builtins): Delete.
17612         * config/rs6000/rs6000.h: Remove paired float support.
17613         * config/rs6000/rs6000.md: Remove paired float support.
17614         (move_from_CR_ov_bit): Delete.
17615         * config/rs6000/rs6000.opt (mpaired): Delete.
17616         * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
17617         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
17619 2018-05-02  Richard Biener  <rguenther@suse.de>
17621         PR middle-end/85567
17622         * gimplify.c (gimplify_save_expr): When in SSA form allow
17623         SAVE_EXPRs to compute to SSA vars.
17625 2018-05-02  Jakub Jelinek  <jakub@redhat.com>
17627         PR target/85582
17628         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
17629         *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
17630         *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
17631         clobber operands[2], instead use a new pseudo.  Formatting fixes.
17633 2018-05-02  Richard Sandiford  <richard.sandiford@linaro.org>
17635         PR tree-optimization/85586
17636         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
17637         exit early for statements in the same group if the accesses are
17638         not strided.
17640 2018-05-02  Tom de Vries  <tom@codesourcery.com>
17642         PR lto/85451
17643         * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
17644         error message.
17646 2018-05-01  Marc Glisse  <marc.glisse@inria.fr>
17648         PR tree-optimization/85143
17649         * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
17651 2018-05-01  Tom de Vries  <tom@codesourcery.com>
17653         PR lto/85451
17654         * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
17655         not found" error message.
17657 2018-05-01  Tom de Vries  <tom@codesourcery.com>
17659         PR other/83786
17660         * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
17661         * vec.c (test_ordered_remove_if): New function.
17662         (vec_c_tests): Call test_ordered_remove_if.
17663         * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
17664         * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
17665         * tree-vect-patterns.c (vect_pattern_recog_1): Use
17666         VEC_ORDERED_REMOVE_IF.
17668 2018-05-01  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
17670         PR tree-optimization/82665
17671         * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
17672         pointer subtraction where arguments come from a memchr call.
17674 2018-05-01  Jakub Jelinek  <jakub@redhat.com>
17676         * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
17677         --push-state --as-needed and --pop-state instead of --as-needed and
17678         --no-as-needed if ld supports it.
17679         * configure: Regenerated.
17681         PR web/85578
17682         * doc/install.texi2html: Replace _002d with - and _002a with * in
17683         generated html files using sed.
17685 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
17687         PR c++/85523
17688         * gcc-rich-location.c (blank_line_before_p): New function.
17689         (use_new_line): New function.
17690         (gcc_rich_location::add_fixit_insert_formatted): New function.
17691         * gcc-rich-location.h
17692         (gcc_rich_location::add_fixit_insert_formatted): New function.
17694 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
17696         * selftest.c (assert_streq): Rename "expected" and "actual" to
17697         "val1" and "val2".  Extend NULL-handling to cover both inputs
17698         symmetrically, while still requiring both to be non-NULL for a pass.
17699         * selftest.h (assert_streq): Rename "expected" and "actual" to
17700         "val1" and "val2".
17701         (ASSERT_EQ): Likewise.
17702         (ASSERT_EQ_AT): Likewise.
17703         (ASSERT_KNOWN_EQ): Likewise.
17704         (ASSERT_KNOWN_EQ_AT): Likewise.
17705         (ASSERT_NE): Likewise.
17706         (ASSERT_MAYBE_NE): Likewise.
17707         (ASSERT_MAYBE_NE_AT): Likewise.
17708         (ASSERT_STREQ): Likewise.  Clarify that both must be non-NULL for
17709         the assertion to pass.
17710         (ASSERT_STREQ_AT): Likewise.
17712 2018-04-30  Jonathan Wakely  <jwakely@redhat.com>
17714         * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
17715         interaction with -pie.
17717 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
17719         * selftest.h: Fix alphabetization of per-source-file selftest
17720         declarations.
17722 2018-04-30  Jason Merrill  <jason@redhat.com>
17724         PR c++/61982 - dead stores to destroyed objects.
17725         * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
17726         of clobber.
17728 2018-04-30  Jason Merrill  <jason@redhat.com>
17730         * tree.c (build_clobber): New.
17731         * tree.h: Declare it.
17732         * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
17734 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
17736         * diagnostic-show-locus.c (layout::layout): Update for
17737         location_get_source_line returning a char_span.
17738         (struct char_span): Move to input.h.
17739         (struct correction): Update for fields in char_span becoming
17740         private.
17741         (struct source_line): Update for location_get_source_line
17742         returning a char_span.
17743         (layout::print_line): Likewise.
17744         * edit-context.c (edited_file::print_content): Likewise.
17745         (edited_file::print_diff_hunk): Likewise.
17746         (edited_file::print_run_of_changed_lines): Likewise.
17747         (edited_file::get_num_lines): Likewise.
17748         (edited_line::edited_line): Likewise.
17749         * final.c (asm_show_source): Likewise.
17750         * input.c (location_get_source_line): Convert return type
17751         from const char * to char_span, losing the final "line_len"
17752         param.
17753         (dump_location_info): Update for the above.
17754         (get_substring_ranges_for_loc): Likewise.  Use a char_span
17755         when handling the literal within the line.
17756         (test_reading_source_line): Update for location_get_source_line
17757         returning a char_span.
17758         * input.h (class char_span): Move here from
17759         diagnostic-show-locus.c, converting from a struct to a class.
17760         Make data members private.
17761         (char_span::operator bool): New.
17762         (char_span::length): New.
17763         (char_span::get_buffer): New.
17764         (char_span::operator[]): New.
17765         (char_span::subspan): Make const.
17766         (char_span::xstrdup): New.
17767         (location_get_source_line): Convert return type from const char *
17768         to char_span, losing the final "line_size" param.
17770 2018-04-30  Jan Hubicka  <jh@suse.cz>
17772         * lto-wrapper.c (ltrans_priorities): New static var.
17773         (cmp_priority): New.
17774         (run_gcc): Read priorities and if doing parallel build order
17775         the Makefile by them.
17777 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
17779         * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
17781 2018-04-30  Richard Biener  <rguenther@suse.de>
17783         * tree-cfg.c (verify_address): Remove base argument, add
17784         flag whether to check TREE_ADDRESSABLE and do that.
17785         (verify_expr): Remove.
17786         (verify_types_in_gimple_reference): Add pieces from verify_expr.
17787         (verify_gimple_assign_single): Likewise.
17788         (verify_gimple_switch): Likewise.
17789         (verify_expr_location_1): Dereference tp once.  Add (disabled)
17790         piece from verify_expr.
17791         (verify_gimple_in_cfg): Do not call verify_expr on all ops.
17793 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
17795         * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
17797 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
17799         * config/arc/arc-protos.h (prepare_extend_operands): Remove.
17800         (small_data_pattern): Likewise.
17801         (arc_rewrite_small_data): Likewise.
17802         * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
17803         (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
17804         (get_symbol_alignment): New function.
17805         (legitimate_small_data_address_p): Likewise.
17806         (legitimate_scaled_address): Update, call
17807         legitimate_small_data_address_p.
17808         (output_sdata): New static variable.
17809         (arc_print_operand): Update how we handle small data operands.
17810         (arc_print_operand_address): Likewise.
17811         (arc_legitimate_address_p): Update, use
17812         legitimate_small_data_address_p.
17813         (arc_rewrite_small_data_p): Remove.
17814         (arc_rewrite_small_data_1): Likewise.
17815         (arc_rewrite_small_data): Likewise.
17816         (small_data_pattern): Likewise.
17817         (compact_sda_memory_operand): Update to use
17818         legitimate_small_data_address_p and get_symbol_alignment.
17819         (prepare_move_operands): Don't rewite sdata pattern.
17820         (prepare_extend_operands): Remove.
17821         * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
17822         pattern.
17823         (zero_extendqisi2): Likewise.
17824         (zero_extendhisi2): Likewise.
17825         (extendqihi2): Likewise.
17826         (extendqisi2): Likewise.
17827         (extendhisi2): Likewise.
17828         (addsi3): Likewise.
17829         (subsi3): Likewise.
17830         (andsi3): Likewise.
17831         * config/arc/constraints.md (Usd): Change it to memory constraint.
17833 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
17835         * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
17836         as source of std instructions.
17837         * config/arc/arc.md (movsi_insn): Update pattern predicate to
17838         allow 6-bit constants as source for store instructions.
17839         (movdi_insn): Update instruction pattern to allow 6-bit constants
17840         as source for store instructions.
17842 2018-04-30  Jonathan Wakely  <jwakely@redhat.com>
17844         * doc/invoke.texi (-fdebug-types-section): Fix grammar.
17846 2018-04-30  Nathan Sidwell  <nathan@acm.org>
17847             Sandra Loosemore <sandra@codesourcery.com>
17849         * dumpfile.c (dump_open): Allow '-' for stdout.
17850         * doc/invoke.texi (Developer Options): Document dump filename
17851         determination early.  Document stdin/stdout selection.
17853 2018-04-30  Andrew Sadek  <andrew.sadek.se@gmail.com>
17855         Microblaze Target: PIC data text relative
17857         * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
17858         * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
17859         Add declaration.
17860         * config/microblaze/microblaze.h (microblaze_constant_address_p):
17861         CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
17862         * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
17863         New addressing mode for data-text relative position indepenedent code.
17864         (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
17865         'ADDRESS_SYMBOLIC_TXT_REL'.
17866         (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
17867         (microblaze_legitimate_pic_operand): Exclude function calls from
17868         pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
17869         (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
17870         addresses cases.
17871         (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
17872         (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
17873         (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
17874         for 'address + offset'.
17875         (microblaze_expand_prologue): Add new function prologue call for
17876         'r20' assignation.
17877         (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
17878         'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
17879         table in case of TARGET_PIC_DATA_TEXT_REL.
17880         (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
17881         * config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
17882         Add new macros 'UNSPEC_TEXT',
17883         'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
17884         + exclude function calls from 'UNSPEC_PLT' in case of data text
17885         relative mode.
17886         * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
17887         new target hook for generating address diff vector tables in case of
17888         flag_pic.
17889         * doc/tm.texi : Regenerate.
17890         * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
17891         'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
17892         of addr diff vector generation.
17893         * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
17894         target hook definition.
17895         * targhooks.h, targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
17896         Add default function for generate_pic_addr_diff_vec -> flag_pic.
17897         * doc/invoke.texi (Add new pic option): Add new microblaze pic
17898         option for data text relative.
17900 2018-04-30  Richard Biener  <rguenther@suse.de>
17902         * tree-chrec.h (evolution_function_is_constant_p): Remove
17903         redundant check.
17904         * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
17906 2018-04-30  Richard Biener  <rguenther@suse.de>
17908         PR bootstrap/85571
17909         * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
17911 2018-04-30  Richard Biener  <rguenther@suse.de>
17913         PR tree-optimization/28364
17914         PR tree-optimization/85275
17915         * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
17916         copying first exit test.
17918 2018-04-28  Mark Wielaard  <mark@klomp.org>
17920         * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
17921         dwarf_version >= 5.
17922         (dwarf_AT): Handle DW_AT_addr_base.
17923         (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
17925 2018-04-28  Uros Bizjak  <ubizjak@gmail.com>
17927         PR target/84431
17928         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
17929         (*ashl<dwi>3_doubleword_mask_1): Ditto.
17930         (*<shift_insn><dwi>3_doubleword_mask): Ditto.
17931         (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
17933 2018-04-28  Richard Biener  <rguenther@suse.de>
17935         * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
17936         (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
17937         to reflect use.  Only add interesting stmts.
17939 2018-04-27  Martin Jambor  <mjambor@suse.cz>
17941         PR ipa/85549
17942         * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
17943         the jump function allows for passing through aggregate values.
17945 2018-04-27  David Malcolm  <dmalcolm@redhat.com>
17947         * input.h (in_system_header_at): Convert from macro to inline
17948         function.
17949         (from_macro_expansion_at): Likewise.
17950         (from_macro_definition_at): Likewise.
17952 2018-04-27  Jeff Law  <law@redhat.com>
17954         * config.gcc: Mark tile* targets as deprecated/obsolete.
17956 2018-04-27  Richard Biener  <rguenther@suse.de>
17958         * config/aarch64/aarch64.c: Simplify ap.__stack advance and
17959         fix for ILP32.
17961 2018-04-27  Richard Biener  <rguenther@suse.de>
17963         * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
17965 2018-04-27  Uros Bizjak  <ubizjak@gmail.com>
17967         * config/i386/i386.md (*movti_internal): Substitute Ye constraint
17968         with Yd constraint. Set "preferred_for_speed" attribute from
17969         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
17970         with Yd constraint.
17971         (*movdi_internal): Ditto.
17972         (movti_interunit splitters): Remove
17973         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
17974         (movdi_interunit splitters): Ditto.
17975         * config/i386/constraints.md (Ye): Remove.
17976         (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
17978 2018-04-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
17980         PR target/85512
17981         * config/aarch64/constraints.md (Usg): Limit to 31.
17982         (Usj): Limit to 63.
17984 2018-04-27  Jakub Jelinek  <jakub@redhat.com>
17986         PR tree-optimization/85529
17987         * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
17988         argument.  Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
17989         rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
17990         zero extension or masking of the MSB bit.
17991         (optimize_range_tests): Add FIRST_BB argument, pass it through
17992         to optimize_range_tests_var_bound.
17993         (maybe_optimize_range_tests, reassociate_bb): Adjust
17994         optimize_range_tests callers.
17996 2018-04-26  Richard Biener  <rguenther@suse.de>
17997             Jakub Jelinek  <jakub@redhat.com>
17999         * cgraph.h (symbol_table): Just declare debug method here.
18000         * symtab.c (symbol_table::debug): Define.
18002 2018-04-26  Eric Botcazou  <ebotcazou@adacore.com>
18004         * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
18006 2018-04-26  Uros Bizjak  <ubizjak@gmail.com>
18008         * config/i386/i386.md ("isa" attribute): Add x64_sse2.
18009         ("enabled" attribute): Handle x64_sse2 "isa" attribute.
18010         (*movdi_internal): Substitute Yi and Yj constraint with x
18011         and Ym and Yn constraint with y constraint.  Update "isa"
18012         attribute and set "preferred_for_speed" attribute from
18013         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
18014         (*movsi_internal): Ditto.
18015         (*movdf_internal): Ditto.
18016         (*movsf_internal): Ditto.
18017         (*zero_extendsidi2): Ditto.
18018         * config/i386/sse.md (vec_set<mode>_0): Ditto.
18019         (sse2_loadld): Ditto.
18020         (*vec_extract<ssevecmodelower>_0): Ditto.
18021         (*vec_extractv4si_0_zext_sse4): Ditto.
18022         (vec_concatv2di): Ditto.
18023         (*vec_dup<mode>): Ditto.
18024         * config/i386/mmx.md (*mov<mode>_internal): Ditto.
18025         * config/i386/constraints.md (Yi): Remove.
18026         (Yj): Remove.
18027         (Ym): Remove.
18028         (Yn): Remove.
18030 2018-04-26  Nathan Sidwell  <nathan@acm.org>
18032         * dumpfile.c (dump_open): New.
18033         (dump_open_alternate_stream, dump_start, dump_begin): Call it.
18034         (dump_finish): Detect stdio/stderr by value not name.
18036 2018-04-26  Jonathan Wakely  <jwakely@redhat.com>
18038         * doc/invoke.texi (-Wreturn-type): Document default status for C++.
18040 2018-04-26  Tom de Vries  <tom@codesourcery.com>
18042         PR target/84952
18043         * config/nvptx/nvptx.c (verify_neutering_jumps)
18044         (verify_neutering_labels): New function
18045         (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
18047 2018-04-26  Tom de Vries  <tom@codesourcery.com>
18049         PR target/84025
18050         * config/nvptx/nvptx.c (needs_neutering_p): New function.
18051         (nvptx_single): Use needs_neutering_p to skip over insns that do not
18052         need neutering.
18054 2018-04-26  Richard Biener <rguenther@suse.de>
18055             Tom de Vries  <tom@codesourcery.com>
18057         PR lto/85422
18058         * lto-streamer-out.c (output_function): Fixup loops if required to match
18059         discovery done in the reader.
18061 2018-04-26  Richard Biener  <rguenther@suse.de>
18063         PR tree-optimization/85116
18064         * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
18065         have a loop exit from the single latch predecessor.  Remove
18066         case of header with just condition.
18067         (ch_base::copy_headers): Exclude infinite loops from any
18068         processing.
18069         (pass_ch::execute): Record exits.
18071 2018-04-26  Richard Biener  <rguenther@suse.de>
18073         * tree-vect-data-refs.c (vect_get_data_access_cost): Get
18074         prologue cost vector and pass it to vect_get_load_cost.
18075         (vect_get_peeling_costs_all_drs): Likewise.
18076         (vect_peeling_hash_get_lowest_cost): Likewise.
18077         (vect_enhance_data_refs_alignment): Likewise.
18079 2018-04-26  Richard Biener  <rguenther@suse.de>
18081         PR middle-end/85450
18082         * tree-cfg.c (verify_gimple_assign_unary): Restore proper
18083         checking of integer<->pointer conversions.
18084         * omp-expand.c (expand_omp_for_static_nochunk): Avoid
18085         sign-/zero-extending pointer types.
18086         (expand_omp_for_static_chunk): Likewise.
18088 2018-03-22  Hans-Peter Nilsson  <hp@axis.com>
18089             Jean Lee  <xiaoyur347@gmail.com>
18091         * config/mips/mips.c (mips_asan_shadow_offset): New function.
18092         (TARGET_ASAN_SHADOW_OFFSET): Define.
18093         * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
18094         true for -fsanitize=address.
18096 2018-04-25  Mark Wielaard  <mark@klomp.org>
18098         * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
18099         shorter ones.
18101 2018-04-25  Jakub Jelinek  <jakub@redhat.com>
18103         * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
18104         than "alu", remove explicit "memory" and "imm_disp" attributes.
18105         (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
18107         PR middle-end/85414
18108         * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
18109         case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
18110         gen_lowpart_no_emit.
18112 2018-04-25  Sebastian Peryt  <sebastian.peryt@intel.com>
18114         PR target/85473
18115         * config/i386/i386.c (ix86_expand_builtin): Change memory
18116         operand to XI, extend p0 to Pmode.
18117         * config/i386/i386.md: Change unspec volatile and operand
18118         1 mode to XI, change operand 0 mode to P.
18120 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
18122         * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
18123         GET_MODE_MASK before any checking.
18124         (nds32_can_use_bset_p): Likewise.
18125         (nds32_can_use_btgl_p): Likewise.
18127 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
18129         * config/nds32/nds32-doubleword.md: New define_split pattern for
18130         illegal register number.
18132 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
18134         * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
18136 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
18138         * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
18140 2018-04-25  Richard Biener  <rguenther@suse.de>
18142         * lto-streamer.h (LTO_major_version): Bump to 8.
18144 2018-04-25  Jakub Jelinek  <jakub@redhat.com>
18146         * BASE-VER: Set to 9.0.0.
18148 2018-04-24  Segher Boessenkool  <segher@kernel.crashing.org>
18150         * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
18151         in __abskf2 and __powikf2.
18153 2018-04-24  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
18155         PR target/85512
18156         * config/aarch64/constraints.md (Usg, Usj): New constraints.
18157         * config/aarch64/iterators.md (cmode_simd): New mode attribute.
18158         * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
18159         Use the above on operand 2.  Reindent.
18160         (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
18162 2018-04-24  H.J. Lu  <hongjiu.lu@intel.com>
18164         PR target/85485
18165         * common/config/i386/i386-common.c (ix86_handle_option): Don't
18166         handle OPT_mcet.
18167         * config/i386/i386.opt (mcet): Removed.
18168         * doc/install.texi: Remove -mcet documentation.
18169         * doc/invoke.texi: Likewise.
18171 2018-04-24  H.J. Lu  <hongjiu.lu@intel.com>
18173         PR target/85485
18174         * doc/install.texi: Remove -mcet from bootstrap-cet.
18176 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
18178         PR target/85511
18179         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
18180         __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
18181         if TARGET_64BIT.
18183         PR target/85503
18184         * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
18185         const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
18186         containing a CONST_VECTOR.
18188 2018-04-24  Cesar Philippidis  <cesar@codesourcery.com>
18190         * doc/install.texi: Update newlib dependency for nvptx.
18192 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
18194         PR target/85508
18195         * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
18196         instead of INTVAL when shifting x left.
18198 2018-04-24  Andreas Krebbel  <krebbel@linux.ibm.com>
18200         PR tree-optimization/85478
18201         * tree-vect-loop.c (vect_analyze_loop_2): Do not call
18202         vect_grouped_store_supported for single element vectors.
18204 2018-04-24  Richard Biener  <rguenther@suse.de>
18206         PR target/85491
18207         * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
18208         load cost increase to the case of non-constant step.
18210 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
18212         PR target/84828
18213         * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
18214         destination if any_malformed_asm.
18216 2018-04-23  Eric Botcazou  <ebotcazou@adacore.com>
18218         PR middle-end/85496
18219         * expr.c (store_field): In the bitfield case, if the value comes from
18220         a function call and is returned in registers by means of a PARALLEL,
18221         do not change the mode of the temporary unless BLKmode and VOIDmode.
18223 2018-04-23  Andrey Belevantsev  <abel@ispras.ru>
18225         PR rtl-optimization/85423
18226         * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
18227         dependencies to debug insns when the previous insn is non-debug.
18229 2018-04-23  Claudiu Zissulescu  <claziss@synopsys.com>
18231         * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
18232         enums into a single definition.
18233         (fls): Fix predicates and printing.
18234         (seti): Likewise.
18236 2018-04-23  Claudiu Zissulescu  <claziss@synopsys.com>
18238         * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
18239         * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
18240         and short u6 immediate.
18241         (check_if_valid_sleep_operand): Remove.
18242         * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
18244 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
18246         * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
18247         flag_always_save_lp condition.
18248         * config/nds32/nds32.opt (malways-save-lp): New option.
18250 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
18252         * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
18253         * config/nds32/nds32.c (nds32_use_load_post_increment): New.
18254         * config/nds32/nds32.h
18255         (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
18256         (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
18258 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
18260         * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
18261         * config/nds32/nds32.c (nds32_ls_333_p): Remove.
18263 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
18264             Chung-Ju Wu  <jasonwucj@gmail.com>
18266         * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
18267         Declare.
18268         * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
18269         * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
18271 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
18273         * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
18275 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
18277         * config/nds32/nds32-protos.h (nds32_data_alignment,
18278         nds32_local_alignment): Declare.
18279         * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
18280         nds32_local_alignment): New functions.
18281         (TARGET_CONSTANT_ALIGNMENT): Define.
18282         * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
18284 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
18286         * config/nds32/nds32.c
18287         (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
18288         (TARGET_MODES_TIEABLE_P): Likewise.
18290 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
18292         * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
18293         level Ofast and Og.
18295 2018-04-22  Monk Chiang  <sh.chiang04@gmail.com>
18296             Chung-Ju Wu  <jasonwucj@gmail.com>
18298         * config/nds32/constants.md (unspec_volatile_element): Add enum values
18299         for unaligned access.
18300         * config/nds32/nds32-intrinsic.c: Implementation of expanding
18301         unaligned access.
18302         * config/nds32/nds32-intrinsic.md: Likewise.
18303         * config/nds32/nds32_intrinsic.h: Likewise.
18304         * config/nds32/nds32.h (nds32_builtins): Likewise.
18305         * config/nds32/nds32.opt (munaligned-access): New option.
18306         * config/nds32/nds32.c (nds32_asm_file_start): Display
18307         flag_unaligned_access status.
18309 2018-04-20  Kito Cheng  <kito.cheng@gmail.com>
18311         * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
18312         -mno-relax is present.
18313         * config/riscv/linux.h (LINK_SPEC): Ditto.
18315 2018-04-20  Martin Sebor  <msebor@redhat.com>
18317         PR c/85365
18318         * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
18319         for null pointers.
18320         (gimple_fold_builtin_stxcpy_chk): Same.
18321         * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
18323 2018-04-20  Michael Meissner  <meissner@linux.ibm.com>
18325         PR target/85456
18326         * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
18327         __powikf2 when long double is IEEE 128-bit.
18329 2018-04-20  Kito Cheng  <kito.cheng@gmail.com>
18331         * config/riscv/riscv.c (riscv_first_stack_step): Round up min
18332         step to make sure stack always aligned.
18334 2018-04-20  Carl Love  <cel@us.ibm.com>
18336         PR target/83402
18337         * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
18338         size check for arg0.
18340 2018-04-20  Nathan Sidwell  <nathan@codesourcery.com>
18341             Tom de Vries  <tom@codesourcery.com>
18343         PR target/85445
18344         * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
18345         Emit insns for calls too.
18346         (nvptx_find_par): Always look for worker-level predecessor insn.
18347         (nvptx_propagate): Add is_call parm, return bool.  Copy frame for
18348         calls.
18349         (nvptx_vpropagate, nvptx_wpropagate): Adjust.
18350         (nvptx_process_pars): Propagate frames for calls.
18352 2018-04-20  H.J. Lu  <hongjiu.lu@intel.com>
18354         PR target/85469
18355         * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
18356         Removed.
18357         (OPTION_MASK_ISA_IBT_UNSET): Likewise.
18358         (ix86_handle_option): Don't handle OPT_mibt.
18359         * config/i386/cet.h: Check __CET__ instead of __IBT__ and
18360         __SHSTK__.
18361         * config/i386/driver-i386.c (host_detect_local_cpu): Remove
18362         has_ibt and ibt.
18363         * config/i386/i386-c.c (ix86_target_macros_internal): Don't
18364         check OPTION_MASK_ISA_IBT nor flag_cf_protection.
18365         (ix86_target_macros): Define __CET__ with flag_cf_protection
18366         for -fcf-protection.
18367         * config/i386/i386.c (isa2_opts): Remove -mibt.
18368         * config/i386/i386.h (TARGET_IBT): Removed.
18369         (TARGET_IBT_P): Likewise.
18370         (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
18371         * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
18372         * config/i386/i386.opt (mcet): Update help message.
18373         (mshstk): Likewise.
18374         (mibt): Removed.
18375         * doc/invoke.texi: Remove -mibt.  Document __CET__.  Document
18376         -mcet as an alias for -mshstk.
18378 2018-04-20  Richard Biener <rguenther@suse.de>
18380         PR middle-end/85475
18381         * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
18382         complexity by forcing a single use of the multiply operand.
18384 2018-04-20  Martin Jambor  <mjambor@suse.cz>
18386         ipa/85449
18387         * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
18388         recursion dependency to only apply to non-clones.
18390 2018-04-20  Martin Jambor  <mjambor@suse.cz>
18392         ipa/85447
18393         * ipa-cp.c (create_specialized_node): Check that clones of
18394         self-recursive edges exist during IPA-CP.
18396 2018-04-19  Toon Moene  <toon@moene.org>
18398         * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
18399         by -O3.
18401 2018-04-19  Jakub Jelinek  <jakub@redhat.com>
18403         PR tree-optimization/85467
18404         * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
18405         VECTOR_TYPE_P macro.  If type is vector type, VIEW_CONVERT_EXPR the
18406         VECTOR_CST element to type.
18408 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
18410         PR target/85397
18411         * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
18412         * config/i386/i386.md (builtin_setjmp_setup): Removed.
18413         (builtin_longjmp): Likewise.
18414         (save_stack_nonlocal): New pattern.
18415         (restore_stack_nonlocal): Likewise.
18417 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
18419         PR target/85404
18420         * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
18421         Replace ASM_OUTPUT_LABEL with fprintf.
18423 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
18425         PR target/85417
18426         * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
18427         Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
18428         * config/i386/i386-c.c (ix86_target_macros_internal): Also
18429         define __IBT__ and __SHSTK__ for -fcf-protection.
18430         * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
18431         TARGET_IBT.
18432         (ix86_trampoline_init): Likewise.
18433         (x86_output_mi_thunk): Likewise.
18434         (ix86_notrack_prefixed_insn_p): Likewise.
18435         (ix86_option_override_internal): Don't disallow -fcf-protection.
18436         * config/i386/i386.md (rdssp<mode>): Also enable for
18437         -fcf-protection.
18438         (incssp<mode>): Likewise.
18439         (nop_endbr): Likewise.
18440         * config/i386/i386.opt (mcet): Change help message to built-in
18441         functions only.
18442         (mibt): Likewise.
18443         (mshstk): Likewise.
18444         * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
18445         on -fcf-protection.  Change -mcet, -mibt and -mshstk to only
18446         enable CET built-in functions.
18448 2018-04-19  Sebastian Peryt  <sebastian.peryt@intel.com>
18450         * common/config/i386/i386-common.c
18451         (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
18452         OPTION_MASK_ISA_MOVDIRI_UNSET,
18453         OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
18454         (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
18455         * config.gcc (movdirintrin.h): New header.
18456         * config/i386/cpuid.h (bit_MOVDIRI,
18457         bit_MOVDIR64B): New bits.
18458         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
18459         and -mmvodir64b.
18460         * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
18461         (VOID, PVOID, PCVOID)): New function types.
18462         * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
18463         __builtin_ia32_directstoreu_u64,
18464         __builtin_ia32_movdir64b): New builtins.
18465         * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
18466         * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
18467         and -mmovdiri.
18468         (ix86_valid_target_attribute_inner_p): Ditto.
18469         (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
18470         and VOID_FTYPE_PUNSIGNED_UNSIGNED.
18471         (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
18472         * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
18473         TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
18474         * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
18475         (movdiri<mode>, movdir64b_<mode>): New.
18476         * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
18477         * config/i386/immintrin.h: Include movdirintrin.h.
18478         * config/i386/movdirintrin.h: New file.
18479         * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
18481 2018-04-19  Richard Biener  <rguenther@suse.de>
18483         PR middle-end/85455
18484         * cfg.c (clear_bb_flags): When loop state says we have
18485         marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
18487 2018-04-19  Richard Biener  <rguenther@suse.de>
18489         PR tree-optimization/84737
18490         * tree-vect-data-refs.c (vect_copy_ref_info): New function
18491         copying restrict info.
18492         (vect_setup_realignment): Use it.
18493         * tree-vectorizer.h (vect_copy_ref_info): Declare.
18494         * tree-vect-stmts.c (vectorizable_store): Copy ref info from
18495         the first DR to all generated stores.
18496         (vectorizable_load): Likewise for loads.
18498 2018-04-19  Jakub Jelinek  <jakub@redhat.com>
18500         PR tree-optimization/85446
18501         * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
18502         the integral and pointer types to have the same precision.
18504         * doc/install.texi: Document --disable-cet being the default and
18505         --enable-cet=auto.
18507 2018-04-18  Martin Liska  <mliska@suse.cz>
18509         * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
18510         style.
18512 2018-04-18  Martin Liska  <mliska@suse.cz>
18514         Revert
18515         2018-03-02  Eric Botcazou  <ebotcazou@adacore.com>
18517         PR ipa/83983
18518         * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
18519         arguments if they are comparable.
18521 2018-04-18  Martin Liska  <mliska@suse.cz>
18523         Revert
18524         2018-03-13  Eric Botcazou  <ebotcazou@adacore.com>
18526         PR lto/84805
18527         * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
18528         incomplete types.
18530 2018-04-18  H.J. Lu  <hongjiu.lu@intel.com>
18532         PR target/85388
18533         * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
18534         ENDBR after calling __morestack.
18536 2018-04-18  David Malcolm  <dmalcolm@redhat.com>
18538         PR jit/85384
18539         * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
18540         by using gcc_base_ver to generate a gcc_driver_version, and use
18541         it when generating GCC_DRIVER_NAME.
18542         * configure: Regenerate.
18544 2018-04-18  Jakub Jelinek  <jakub@redhat.com>
18546         PR target/81084
18547         * config.gcc: Obsolete powerpc*-*-*spe*.
18549 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
18551         PR debug/84637
18552         * dbxout.c (dbxout_int): Perform negation in unsigned int type.
18553         (stabstr_D): Change type of unum from unsigned int to
18554         unsigned HOST_WIDE_INT.  Perform negation in unsigned HOST_WIDE_INT
18555         type.
18557 2018-04-17  Jim Wilson  <jimw@sifive.com>
18559         PR 84856
18560         * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
18561         RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
18562         Set arg_pointer_offset after using pretend_args_size.
18564 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
18566         PR rtl-optimization/85431
18567         * dse.c (record_store): Ignore zero width stores.
18569         PR sanitizer/85230
18570         * asan.c (handle_builtin_stack_restore): Adjust comment.  Emit
18571         __asan_allocas_unpoison call and last_alloca_addr = new_sp before
18572         __builtin_stack_restore rather than after it.
18573         * builtins.c (expand_asan_emit_allocas_unpoison): Pass
18574         arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
18575         argument instead of virtual_dynamic_stack_rtx.
18577 2018-04-17  Kelvin Nilsen  <kelvin@gcc.gnu.org>
18579         * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
18580         New prototype.
18581         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
18582         Add note to error message to explain internal mapping of overloaded
18583         built-in function name to non-overloaded built-in function name.
18584         * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
18585         function.
18587 2018-04-17  Michael Meissner  <meissner@linux.vnet.ibm.com>
18589         PR target/85424
18590         * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
18591         where the inputs overlap with the output.
18593 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
18595         * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
18596         (=v, v) alternative and explicit "memory" attribute.
18597         (vec_extract_lo_<mode><mask_name>): Likewise.  Also add
18598         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
18599         attributes.
18600         (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
18601         "sselog1" type instead of "sselog".
18602         (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
18603         "sselog".  Remove explicit "memory" attribute.
18604         (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
18605         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
18606         attributes.
18607         (vec_extract_hi_v32hi): Merge all alternatives into one, use
18608         "sselog1" type instead of "sselog".  Remove explicit "memory"
18609         attribute.
18610         (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
18611         use "sselog1" type instead of "sselog".  Remove explicit "memory"
18612         attribute.
18613         (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
18614         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
18615         attributes.
18616         (vec_extract_hi_v64qi): Merge all alternatives into one, use
18617         "sselog1" type instead of "sselog".  Remove explicit "memory"
18618         attribute.
18619         (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
18620         use "sselog1" type instead of "sselog".  Remove explicit "memory"
18621         attribute.
18623         PR target/85430
18624         * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
18626         PR middle-end/85414
18627         * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
18628         on a SUBREG.
18630 2018-04-17  Martin Jambor  <mjambor@suse.cz>
18632         PR ipa/85421
18633         * ipa-cp.c (create_specialized_node): Call
18634         expand_all_artificial_thunks if necessary.
18636 2018-04-17  Martin Liska  <mliska@suse.cz>
18638         PR lto/85405
18639         * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
18640         in message, remote space in between '_G' and '('.
18642 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
18644         PR target/85281
18645         * config/i386/sse.md (reduces<mode><mask_scalar_name>,
18646         avx512f_vmcmp<mode>3<round_saeonly_name>,
18647         avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
18648         avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
18649         avx512f_rndscale<mode><round_saeonly_name>,
18650         avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
18651         avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
18652         Use %<iptr>2 instead of %2 for -masm=intel.
18653         (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
18654         avx512f_vcvttss2usi<round_saeonly_name>,
18655         avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
18656         -masm=intel.
18657         (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
18658         avx512f_vcvttsd2usi<round_saeonly_name>,
18659         avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
18660         Use %q1 instead of %1 for -masm=intel.
18661         (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
18662         avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
18663         of %3 for -masm=intel.
18664         (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
18665         -masm=intel.
18666         (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
18667         -masm=intel.
18668         (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
18669         -masm=intel.
18670         (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
18671         %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
18672         %g1.
18673         (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
18674         -masm=intel.
18675         (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
18676         %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
18677         %g1 and one with %0 and %1.
18678         (avx512er_vmrcp28<mode><round_saeonly_name>,
18679         avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
18680         %1 for -masm=intel.
18681         (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
18682         avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
18683         avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
18684         of %0 and %{%4%} for -masm=intel.
18685         (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
18686         avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
18687         avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
18688         order of %0 and %{%5%}%{z%} for -masm=intel.
18690 2018-04-17  Jan Hubicka  <jh@suse.cz>
18692         PR lto/85405
18693         * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
18695 2018-04-17  Martin Liska  <mliska@suse.cz>
18697         PR ipa/85329
18698         * multiple_target.c (create_dispatcher_calls): Set apostrophes
18699         for target_clone error message.  Make default implementation
18700         clone to be a local declaration.
18701         (separate_attrs): Add new argument and check for an empty
18702         string.
18703         (expand_target_clones): Handle it.
18704         (ipa_target_clone): Make redirection just for target_clones
18705         functions.
18707 2018-04-16  Cesar Philippidis  <cesar@codesourcery.com>
18708             Tom de Vries  <tom@codesourcery.com>
18710         PR middle-end/84955
18711         * omp-expand.c (expand_oacc_for): Add dummy false branch for
18712         tiled basic blocks without omp continue statements.
18714 2018-04-16  Aaron Sawdey  <acsawdey@linux.ibm.com>
18716         PR target/83660
18717         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
18718         vec_extract expression as having side effects to make sure it gets
18719         a cleanup point.
18721 2018-04-16  H.J. Lu  <hongjiu.lu@intel.com>
18723         PR target/85403
18724         * config/i386/i386.c (get_builtin_code_for_version): Check
18725         error_mark_node.
18727 2018-04-16  Olga Makhotina  <olga.makhotina@intel.com>
18729         PR target/84331
18730         * config.gcc: Support "skylake".
18731         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
18732         PROCESSOR_SKYLAKE.
18733         * config/i386/i386.c (m_SKYLAKE): Define.
18734         (processor_target_table): Add "skylake".
18735         (ix86_option_override_internal): Add "skylake".
18736         (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
18737         PROCESSOR_CANNONLAKE.
18738         (get_builtin_code_for_version): Fix priority for
18739         PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
18740         PROCESSOR_SKYLAKE-AVX512.
18741         * config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
18742         (processor_type): Add PROCESSOR_SKYLAKE.
18744 2018-04-16  Paolo Carlini  <paolo.carlini@oracle.com>
18745             Jason Merrill  <jason@redhat.com>
18747         PR c++/85112
18748         * convert.c (convert_to_integer_1): Use direct recursion for
18749         enumeral types and types with a precision less than the number
18750         of bits in their mode.
18752 2018-04-16  Julia Koval  <julia.koval@intel.com>
18754         PR target/84413
18755         * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
18756         X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
18758 2018-04-14  Segher Boessenkool  <segher@kernel.crashing.org>
18760         PR target/85293
18761         * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
18762         * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
18763         and -mno-direct-move.
18765 2018-04-13  Paul A. Clarke  <pc@us.ibm.com>
18767         PR target/83402
18768         * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
18769         Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
18770         Ensure negative shifts result in {0}.
18772 2018-04-13  Vladimir Makarov  <vmakarov@redhat.com>
18774         PR rtl-optimization/79916
18775         * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
18776         regs (if any) to define how to gnerate SD moves when LRA is in
18777         progress.
18779 2018-04-13  Jakub Jelinek  <jakub@redhat.com>
18781         PR rtl-optimization/85393
18782         * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
18783         * except.c (expand_dw2_landing_pad_for_region): Make static.
18784         * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
18785         a label and unconditional jump to old_bb, rather than
18786         expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
18787         basic block.
18789         PR rtl-optimization/85376
18790         * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
18791         zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
18792         instead of a specific value.
18794 2018-04-13  Jan Hubicka  <hubicka@ucw.cz>
18795             Bin Cheng  <bin.cheng@arm.com>
18797         PR tree-optimization/82965
18798         PR tree-optimization/83991
18799         * cfgloopanal.c (expected_loop_iterations_unbounded): Add
18800         by_profile_only parameter.
18801         * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
18802         information if the loop was predicted to iterate too many times.
18803         * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
18805 2018-04-13  Jan Hubicka  <hubicka@ucw.cz>
18807         PR lto/71991
18808         * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
18809         always inline.
18811 2018-04-13  Martin Liska  <mliska@suse.cz>
18812             Jakub Jelinek  <jakub@redhat.com>
18814         PR middle-end/81657
18815         * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
18816         * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
18817         * builtins.c (expand_builtin_memory_copy_args): Use
18818         BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
18819         handle dest_addr == pc_rtx.
18821 2018-04-12  Segher Boessenkool  <segher@kernel.crashing.org>
18823         PR target/85291
18824         * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
18825         asked to not generate direct moves.
18826         (fix_trunc<mode>si2_stfiwx): Similar.
18827         (fix_trunc<mode>si2_internal): Similar.
18829 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
18831         PR debug/83157
18832         * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
18833         * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
18834         lookup if dest in some wider mode is known to be const0_rtx and
18835         if so, record permanent equivalence for it to be ZERO_EXTEND of
18836         the narrower mode destination.
18838 2018-04-12  Cesar Philippidis  <cesar@codesourcery.com>
18840         * lto-streamer-out.c (output_function): Revert 259346.
18841         * omp-expand.c (expand_oacc_for): Likewise.
18843 2018-04-12  Alexander Monakov  <amonakov@ispras.ru>
18845         PR rtl-optimization/85354
18846         * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
18847         * sel-sched.c (sel_global_init): ... here.
18849 2018-04-12  Eric Botcazou  <ebotcazou@adacore.com>
18851         PR target/85238
18852         * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
18853         * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
18854         mode for PE-COFF targets.
18855         * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
18856         (i386_pe_asm_lto_end): Likewise.
18857         * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
18858         (TARGET_ASM_LTO_END): Likewise.
18859         * config/i386/winnt.c (saved_debug_info_level): New static variable.
18860         (i386_pe_asm_lto_start): New function.
18861         (i386_pe_asm_lto_end): Likewise.
18863 2018-04-12  Cesar Philippidis  <cesar@codesourcery.com>
18864             Richard Biener  <rguenther@suse.de>
18866         PR middle-end/84955
18867         * lto-streamer-out.c (output_function): Fix CFG loop state before
18868         streaming out.
18869         * omp-expand.c (expand_oacc_for): Handle calls to internal
18870         functions like regular functions.
18872 2018-04-12  Richard Biener  <rguenther@suse.de>
18874         PR lto/85371
18875         * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
18876         for the early LTO debug to properly generate references to it
18877         during DIE emission.  Do not re-use that for the skeleton for
18878         split-dwarf.
18879         (dwarf2out_early_finish): Likewise.
18881 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
18883         PR target/85328
18884         * config/i386/sse.md
18885         (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
18886         <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
18887         vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
18888         vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
18889         and output is a reg, avoid creating invalid lowpart subreg, but
18890         instead split into a 512-bit move.  Don't split if not AVX512VL,
18891         input is xmm16+ reg and output is a mem.
18892         (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
18893         vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
18894         xmm16+ reg and output is a mem.
18896 2018-04-12  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
18898         * config/s390/s390.c (s390_output_indirect_thunk_function): Check
18899         also for flag_dwarf2_cfi_asm.
18901 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
18903         PR rtl-optimization/85342
18904         * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
18905         a bool scalar var inside of the loop instead.  Don't try to update
18906         recog_data.operand after failed apply_change_group.
18908 2018-04-12  Tom de Vries  <tom@codesourcery.com>
18910         PR target/85296
18911         * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
18912         (nvptx_assemble_decl_begin): Add undefined param.  Declare undefined
18913         array with flexible array member as array without given dimension.
18914         (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
18915         argument for undefined param to true.
18917 2018-04-11  Aaron Sawdey  <acsawdey@linux.ibm.com>
18919         PR target/85321
18920         * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
18921         -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
18922         from PowerPC section.
18923         * config/rs6000/sysv4.opt (mcall-): Improve help text.
18924         * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
18925         help text that is too long.
18926         * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
18927         help text that is too long.
18928         * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
18929         help text that is too long.
18931 2018-04-11  Uros Bizjak  <ubizjak@gmail.com>
18933         * config/alpha/alpha.md (stack_probe_internal): Rename
18934         from "probe_stack".  Update all callers.
18936 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
18938         PR rtl-optimization/84566
18939         * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
18940         sched_macro_fuse_insns.
18942 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
18944         PR target/84301
18945         * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
18946         (compute_block_dependences): ... from here.
18948 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
18950         PR tree-optimization/85331
18951         * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
18952         from int to HOST_WIDE_INT.
18954 2018-04-11  Martin Jambor  <mjambor@suse.cz>
18956         PR ipa/84149
18957         * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
18958         (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
18959         not the same as the source val.
18960         (cgraph_edge_brings_value_p): New parameter.
18961         (gather_edges_for_value): Pass destination value to
18962         cgraph_edge_brings_value_p.
18963         (perhaps_add_new_callers): Likewise.
18964         (get_info_about_necessary_edges): Likewise and exclude values brought
18965         only by self-recursive edges.
18966         (create_specialized_node): Redirect only clones of self-calling edges.
18967         (+self_recursive_pass_through_p): New function.
18968         (find_more_scalar_values_for_callers_subset): Use it.
18969         (find_aggregate_values_for_callers_subset): Likewise.
18970         (known_aggs_to_agg_replacement_list): Removed.
18971         (decide_whether_version_node): Re-calculate known constants for all
18972         remaining context clones.
18974 2018-04-11  Richard Biener  <rguenther@suse.de>
18976         PR lto/85339
18977         * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
18978         from early DWARF output.
18979         (dwarf2out_early_finish): Output line info unconditionally into
18980         early DWARF and add reference to it.
18982 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
18984         PR target/85281
18985         * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
18986         (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
18987         other than V2DFmode using iptr mode attribute.
18988         (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
18990 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
18992         PR rtl-optimization/84659
18993         * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
18995 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
18997         PR debug/85302
18998         * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
18999         SIZEP is NULL.
19000         (output_loc_list): Pass address of a dummy size variable even in the
19001         locview handling loop.
19002         (index_location_lists): Add comment on why skip_loc_list_entry can't
19003         call size_of_locs.
19005 2018-04-11  Thomas Preud'homme  <thomas.preudhomme@arm.com>
19007         PR target/85261
19008         * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
19009         into register.
19011 2018-04-10  Aaron Sawdey  <acsawdey@linux.ibm.com>
19013         PR target/85321
19014         * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
19015         -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
19016         and -mstring-compare-inline-limit.
19018 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
19020         PR target/85287
19021         * config/rs6000/rs6000.md (allocate_stack): Put the residual size
19022         for stack clash protection in a register whenever we need it to be in
19023         a register.
19025 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
19027         * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
19028         Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
19030 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
19032         PR target/85321
19033         * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
19034         the help text.
19035         (mlong-double-): Ditto.
19036         * config/rs6000/sysv4.opt (msdata=): Ditto.
19037         (mtls-size=): Ditto.
19039 2018-04-10  Kelvin Nilsen  <kelvin@gcc.gnu.org>
19041         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
19042         erroneous entries for
19043         "vector int vec_ldl (int, long int *)", and
19044         "vector unsigned int vec_ldl (int, unsigned long int *)".
19045         Add comments and entries for
19046         "vector bool char vec_ldl (int, bool char *)",
19047         "vector bool short vec_ldl (int, bool short *)",
19048         "vector bool int vec_ldl (int, bool int *)",
19049         "vector bool long long vec_ldl (int, bool long long *)",
19050         "vector pixel vec_ldl (int, pixel *)",
19051         "vector long long vec_ldl (int, long long *)",
19052         "vector unsigned long long vec_ldl (int, unsigned long long *)".
19053         * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
19054         type tree bool_long_long_type_node and correct definition of
19055         bool_V2DI_type_node to make reference to this new type tree.
19056         (rs6000_mangle_type): Replace erroneous reference to
19057         bool_long_type_node with bool_long_long_type_node.
19058         * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
19059         comments to emphasize sign distinctions for char and int types and
19060         replace RS6000_BTI_bool_long constant with
19061         RS6000_BTI_bool_long_long constant.  Also add comment to restrict
19062         use of RS6000_BTI_pixel.
19063         (bool_long_type_node): Remove this macro definition.
19064         (bool_long_long_type_node): New macro definition
19066 2018-04-10  Jakub Jelinek  <jakub@redhat.com>
19068         PR rtl-optimization/85300
19069         * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
19070         into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
19071         simplify_unary_operation fails.
19073 2018-04-10  Martin Liska  <mliska@suse.cz>
19075         * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
19076         cgraph_edge and ipa_ref.
19078 2018-04-10  Jakub Jelinek  <jakub@redhat.com>
19080         PR target/85177
19081         PR target/85255
19082         * config/i386/sse.md
19083         (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
19084         computation of the VEC_MERGE selector from mask.
19085         (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
19086         Fix decoding of the VEC_MERGE selector into mask.
19088 2018-04-10  Richard Sandiford  <richard.sandiford@linaro.org>
19090         PR tree-optimization/85286
19091         * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
19093 2018-04-10  Richard Sandiford  <richard.sandiford@linaro.org>
19095         * final.c (final_1): Set insn_last_address as well as
19096         insn_current_address.
19098 2018-04-10  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
19100         PR target/85173
19101         * explow.c (emit_stack_probe): Call validize_mem on memory location
19102         before passing it to gen_probe_stack.  Create address operand and
19103         legitimize it for the probe_stack_address case.
19105 2018-04-09  Jan Hubicka  <jh@suse.cz>
19107         PR lto/85078
19108         * ipa-devirt.c (rebuild_type_inheritance-hash): New.
19109         * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
19110         * tree.c (free_lang_data_in_type): Fix handling of binfos;
19111         walk basetypes.
19112         (free_lang_data): Rebuild type inheritance graph.
19114 2018-04-09  Martin Sebor  <msebor@redhat.com>
19116         * invoke.texi (-finline-small-functions): Mention other optimization
19117         options.
19118         (-findirect-inlining, -fpartial-inlining): Same.
19119         (-finline-functions-called-once): Same.
19120         (-freorder-blocks-and-partition): Same.
19122 2018-04-09  Jan Hubicka  <jh@suse.cz>
19124         PR rtl/84058
19125         * cfgcleanup.c (try_forward_edges): Do not give up on crossing
19126         jumps; choose last target that matches the criteria (i.e.
19127         no partition changes for non-crossing jumps).
19128         * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
19129         support for redirecting crossing jumps to non-crossing.
19131 2018-04-09  Alexey Brodkin  <abrodkin@synopsys.com>
19133         * config/arc/arc.c (arc_expand_prologue): Set stack usage info
19134         also for naked functions.
19136 2018-04-09  Claudiu Zissulescu  <claziss@synopsys.com>
19138         * config/arc/arc.md (add_shift): New pattern.
19139         (add_shift2): Likewise.
19140         (sub_shift): Likewise.
19141         (sub_shift_cmp0_noout): Likewise.
19142         (compare_si_ashiftsi): Likewise.
19143         (xbfu_cmp0_noout): New combine pattern.
19144         (xbfu_cmp0"): Likewise.
19145         (movsi_set_cc_insn): Place the predicable variant first.
19146         (commutative_binary_cmp0_noout): Remove clobber.
19147         (commutative_binary_cmp0): New pattern.
19148         (noncommutative_binary_cmp0): Likewise.
19149         (noncommutative_binary_cmp0_noout): Likewise.
19150         (noncommutative_binary_comparison_result_used): Removed.
19151         (rsub_cmp0): New pattern.
19152         (rsub_cmp0_noout): Likewise.
19153         (extzvsi): Changed, keep only meaningful variants.
19154         (SQH, SEZ): New iterators.
19155         (SQH_postfix): New mode attribute.
19156         (SEZ_prefix): New code attribute.
19157         (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
19158         (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
19159         * config/arc/predicates.md (cc_set_register): Use CC_REG instead
19160         of numerical value.
19161         (noncommutative_operator): Check the availability of barrel
19162         shifter option.
19164 2018-04-09  Richard Biener  <rguenther@suse.de>
19166         PR tree-optimization/85284
19167         * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
19168         Only use the niter constraining form of simple_iv when the exit
19169         is always executed.
19171 2018-04-09  Tom de Vries  <tom@codesourcery.com>
19173         PR target/84041
19174         * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
19175         (define_expand "*memory_barrier"): New define_expand.
19176         (define_insn "memory_barrier"): New insn.
19178 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
19180         PR rtl-optimization/80463
19181         PR rtl-optimization/83972
19182         PR rtl-optimization/83480
19184         * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
19185         correct producer for the insn.
19186         (tidy_control_flow): Fixup seqnos in case of debug insns.
19188 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
19190         PR rtl-optimization/83913
19192         * sel-sched-ir.c (merge_expr_data): Choose the middle between two
19193         different sched-times when merging exprs.
19195 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
19197         PR rtl-optimization/83962
19199         * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
19200         tidy_fallthru_edge and tidy_control_flow.
19202 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
19204         PR rtl-optimization/83530
19206         * sel-sched.c (force_next_insn): New global variable.
19207         (remove_insn_for_debug): When force_next_insn is true, also leave only
19208         next insn in the ready list.
19209         (sel_sched_region): When the region wasn't scheduled, make another pass
19210         over it with force_next_insn set to 1.
19212 2018-04-08  Monk Chiang  <sh.chiang04@gmail.com>
19214         * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
19215         into tm_file.
19216         * config/nds32/constants.md (unspec_volatile_element): Add enum values
19217         for interrupt control.
19218         * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
19219         functions for interrupt control.
19220         * config/nds32/nds32-intrinsic.md: Likewise.
19221         * config/nds32/nds32_intrinsic.h: Likewise.
19222         * config/nds32/nds32.h (nds32_builtins): Likewise.
19224 2018-04-08  Chung-Ju Wu  <jasonwucj@gmail.com>
19226         * config/nds32/nds32.c (nds32_init_machine_status,
19227         nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
19228         strict_aligned_p field.
19229         (nds32_expand_to_rtl_hook): New function.
19230         (TARGET_EXPAND_TO_RTL_HOOK): Define.
19231         * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
19233 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
19234             Chung-Ju Wu  <jasonwucj@gmail.com>
19236         * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
19237         * config/nds32/nds32-n7.md: New file.
19238         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
19239         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
19240         pipeline.
19241         * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
19242         * config/nds32/nds32.md (pipeline_model): Add n7.
19243         * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
19244         * config/nds32/pipelines.md: Include n7 settings.
19246 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
19247             Chung-Ju Wu  <jasonwucj@gmail.com>
19249         * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
19250         * config/nds32/nds32-e8.md: New file.
19251         * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
19252         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
19253         pipeline.
19254         * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
19255         * config/nds32/nds32.md (pipeline_model): Add e8.
19256         * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
19257         * config/nds32/pipelines.md: Include e8 settings.
19259 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
19260             Chung-Ju Wu  <jasonwucj@gmail.com>
19262         * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
19263         * config/nds32/nds32-n8.md: New file.
19264         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
19265         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
19266         pipeline.
19267         * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
19268         * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
19269         * config/nds32/nds32.md (pipeline_model): Add n8.
19270         * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
19271         * config/nds32/pipelines.md: Include n8 settings.
19273 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
19274             Chung-Ju Wu  <jasonwucj@gmail.com>
19276         * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
19277         * config/nds32/nds32-n9-2r1w.md: New file.
19278         * config/nds32/nds32-n9-3r2w.md: New file.
19279         * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
19280         nds32_register_ports): New or modify for cpu n9.
19281         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
19282         pipeline.
19283         * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
19284         * config/nds32/nds32-utils.c: New file.
19285         * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
19286         TARGET_MUL_SLOW): Define.
19287         * config/nds32/nds32.md (pipeline_model): New attribute.
19288         * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
19289         New options that support cpu n9.
19290         * config/nds32/pipelines.md: Include n9 settings.
19291         * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
19293 2018-04-08  Chung-Ju Wu  <jasonwucj@gmail.com>
19295         * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
19296         information if necessary.
19297         (output_cond_branch_compare_zero): Likewise.
19298         * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
19299         (nds32_target_alignment): Refine for alignment.
19300         * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
19301         (FUNCTION_BOUNDARY): Modify.
19302         * config/nds32/nds32.md (call_internal, call_value_internal): Consider
19303         align case.
19304         * config/nds32/nds32.opt (malways-align, malign-functions): New.
19306 2018-04-08  Monk Chiang  <sh.chiang04@gmail.com>
19308         * config/nds32/constants.md (unspec_volatile_element): Add values for
19309         TLB operation and data prefetch.
19310         * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
19311         functions for TLB operation and data prefetch.
19312         * config/nds32/nds32-intrinsic.md: Likewise.
19313         * config/nds32/nds32_intrinsic.h: Likewise.
19314         * config/nds32/nds32.c (nds32_dpref_names): Likewise.
19315         (nds32_print_operand): Likewise.
19316         * config/nds32/nds32.h (nds32_builtins): Likewise.
19318 2018-04-07  Thomas Koenig  <tkoenig@gcc.gnu.org>
19319         Andrew Pinski <pinsika@gcc.gnu.org>
19321         PR middle-end/82976
19322         * match.pd: Use constant_boolean_node of correct type instead of
19323         boolean_true_node or boolean_false_node for simplifying
19324         pointer comparisons to zero.
19326 2018-04-07  Jakub Jelinek  <jakub@redhat.com>
19328         PR tree-optimization/80021
19329         * tree.c (verify_type_variant): Make error call in verify_variant_match
19330         translatable and remove final full stop.
19332 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
19334         * config/nds32/constants.md (unspec_volatile_element): Add
19335         UNSPEC_VOLATILE_EH_RETURN.
19336         * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
19337         nds32_output_stack_pop): Support dwarf exception handling process.
19338         * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
19339         * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
19340         exception handling process.
19341         (nds32_compute_stack_frame): Likewise.
19342         (nds32_return_addr_rtx): Likewise.
19343         (nds32_initial_elimination_offset): Likewise.
19344         (nds32_expand_prologue): Likewise.
19345         (nds32_expand_epilogue): Likewise.
19346         (nds32_dynamic_chain_address): New function.
19347         * config/nds32/nds32.h (machine_function): Add fields for dwarf
19348         exception handling.
19349         (DYNAMIC_CHAIN_ADDRESS): Define.
19350         (EH_RETURN_DATA_REGNO): Define.
19351         (EH_RETURN_STACKADJ_RTX): Define.
19352         * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
19353         patterns for dwarf exception handling.
19355 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
19357         * config/nds32/nds32.h: Clean up obsolete macros.
19359 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
19361         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
19362         Add enum values for particular instructions.
19363         * config/nds32/nds32-intrinsic.c: Implementation of expanding
19364         particular intrinsic functions.
19365         * config/nds32/nds32-intrinsic.md: Likewise.
19366         * config/nds32/nds32_intrinsic.h: Likewise.
19367         * config/nds32/nds32.h (nds32_builtins): Likewise.
19368         * config/nds32/nds32.md (type): Add pbsad and pbsada.
19369         (btst, ave): New patterns for particular instructions.
19371 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
19373         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
19374         Add enum values for atomic load/store and memory sync.
19375         * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
19376         and memory sync.
19377         * config/nds32/nds32-intrinsic.md: Likewise.
19378         * config/nds32/nds32_intrinsic.h: Likewise.
19379         * config/nds32/nds32.h (nds32_builtins): Likewise.
19381 2018-04-07  Jakub Jelinek  <jakub@redhat.com>
19383         PR tree-optimization/85257
19384         * fold-const.c (native_encode_vector): If not all elts could fit
19385         and off is -1, return 0 rather than offset.
19386         * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
19387         (offseti - offset2) / BITS_PER_UNIT as 4th argument to
19388         native_encode_expr.  Verify len * BITS_PER_UNIT >= maxsizei.  Don't
19389         adjust buffer in native_interpret_expr call.
19391 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
19393         * config/nds32/constants.md (unspec_volatile_element): Add cache
19394         control enum values.
19395         * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
19396         * config/nds32/nds32-intrinsic.md: Add cache control patterns.
19397         * config/nds32/nds32.c (nds32_cctl_names): New.
19398         (nds32_print_operand): Handle cache control register names.
19399         * config/nds32/nds32.h (nds32_builtins): New enum values.
19400         * config/nds32/nds32_intrinsic.h: Add cache control enum types and
19401         macros.
19402         * config/nds32/nds32.md (type): Add mmu.
19403         * config/nds32/pipelines.md (simple_insn): Add mmu.
19405 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
19407         * config/nds32/nds32.md (type): Remove call.
19408         * config/nds32/pipelines.md (simple_insn): Likewise.
19410 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
19412         * config/nds32/constants.md (unspec_volatile_element): Add
19413         UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
19414         UNSPEC_VOLATILE_FMFCFG.
19415         * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
19416         description for fmfcfg and fmfcsr.
19417         (bdesc_1arg): Add fmtcsr.
19418         (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
19419         (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
19420         * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
19421         unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
19422         unspec_fmfcfg): New patterns.
19423         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
19424         NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
19425         NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
19426         * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
19427         __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
19428         __nds32__fmfcfg): Define.
19430 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
19432         * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
19433         intrinsic register names.
19434         * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
19435         intrinsic register enum values and macros.
19437 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
19439         * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
19440         for load/store addressing form.
19441         (nds32_print_operand_address): Likewise.
19443 2018-04-06  Eric Botcazou  <ebotcazou@adacore.com>
19445         PR target/85196
19446         * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
19447         based on LABEL_REF.  Remove useless assertion.
19448         (pic_address_needs_scratch): Fix formatting.
19449         (sparc_legitimize_pic_address): Minor tweaks.
19450         (sparc_delegitimize_address): Adjust assertion accordingly.
19451         * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
19452         into symbolic_operand.
19453         (movsi_high_pic_label_ref): Likewise.
19454         (movsi_lo_sum_pic_label_ref): Likewise.
19455         (movdi_pic_label_ref): Likewise.
19456         (movdi_high_pic_label_ref): Likewise.
19457         (movdi_lo_sum_pic_label_ref): Likewise.
19459 2018-04-06  Amaan Cheval  <amaan.cheval@gmail.com>
19461         * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
19462         custom LIB_SPEC setup.
19464 2018-04-06  Ruslan Bukin  <br@bsdpad.com>
19465             Kito Cheng  <kito.cheng@gmail.com>
19467         * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
19468         * config/riscv/freebsd.h: New.
19470 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
19472         * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
19473         * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
19474         file.
19476 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
19477             Kito Cheng  <kito.cheng@gmail.com>
19479         * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
19480         nds32_output_call, nds32_symbol_binds_local_p): New functions.
19481         * config/nds32/nds32-protos.h (nds32_output_call,
19482         nds32_output_return): Declare.
19483         * config/nds32/nds32.md: Refine all the call and return patterns.
19485 2018-04-06  Jakub Jelinek  <jakub@redhat.com>
19487         PR debug/85252
19488         * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
19489         build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
19491         PR rtl-optimization/84872
19492         * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
19493         nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
19494         EDGE_CROSSING edge.
19496 2018-04-06  Tamar Christina  <tamar.christina@arm.com>
19498         * expr.c (copy_blkmode_to_reg): Revert 254862.
19499         * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
19501 2018-04-06  Richard Biener  <rguenther@suse.de>
19503         PR middle-end/85244
19504         * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
19505         after seeing a component reference with an adjacent field.  Treat
19506         refs to arrays at struct end of external decls similar to
19507         refs to unconstrained commons.
19509 2018-04-06  Jakub Jelinek  <jakub@redhat.com>
19511         PR sanitizer/85213
19512         * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
19513         look through SAVE_EXPRs with non-side-effects argument.  Adjust
19514         recursive calls.
19515         (fold_comparison): Adjust twoval_comparison_p caller, don't handle
19516         save_p here.
19518 2018-04-06  Richard Biener  <rguenther@suse.de>
19520         PR middle-end/85180
19521         * alias.c (find_base_term): New wrapper around find_base_term
19522         unwinding CSELIB_VAL_PTR changes.
19523         (find_base_term): Do not restore CSELIB_VAL_PTR during the
19524         recursion.
19526 2018-04-06  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
19528         * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
19529         instructions.
19530         * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
19531         constant definitions.
19532         ("nop"): lr 0,0 -> nopr r0
19533         ("nop_lr0", "nop_lr1"): New insn definitions.
19535 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
19537         * config/nds32/nds32.md (*stack_push, *stack_pop): Use
19538         NDS32_V3PUSH_AVAILABLE_P macro.
19540 2018-04-06  Monk Chiang  <sh.chiang04@gmail.com>
19541             Chung-Ju Wu  <jasonwucj@gmail.com>
19543         * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
19544         (nds32*-*-*): Add float and fpu_config into supported_defaults.
19545         * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
19546         Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
19547         * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
19548         UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
19549         * config/nds32/constraints.md: New constraints and checking for hard
19550         float configuration.
19551         * config/nds32/iterators.md: New mode iterator and attribute for hard
19552         float configuration.
19553         * config/nds32/nds32-doubleword.md: Use hard float alternatives and
19554         patterns.
19555         * config/nds32/nds32-fpu.md: New file.
19556         * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
19557         deal with hard float code generation.
19558         * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
19559         ARCH_V3S.
19560         (abi_type, float_reg_number): New enum type.
19561         * config/nds32/nds32-predicates.c: New predicates for hard float.
19562         * config/nds32/nds32-protos.h: Declare functions for hard float.
19563         * config/nds32/nds32.c: Implementation for hard float configuration.
19564         * config/nds32/nds32.h: Definitions for hard float configuration.
19565         * config/nds32/nds32.md: Include hard float machine description and
19566         modify patterns for hard float configuration.
19567         * config/nds32/nds32.opt: New options for hard float configuration.
19568         * config/nds32/predicates.md: New predicates for hard float
19569         configuration.
19571 2018-04-06  Kuan-Lin Chen  <kuanlinchentw@gmail.com>
19573         * common/config/nds32/nds32-common.c
19574         (nds32_option_optimization_table): Enable -mreleax-hint by default.
19576 2018-04-05  Jakub Jelinek  <jakub@redhat.com>
19578         PR middle-end/85195
19579         * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
19580         CONSTRUCTOR_ELT (ctor, ...)->value.
19582 2018-04-05  Uros Bizjak  <ubizjak@gmail.com>
19584         PR target/85193
19585         * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
19587 2018-04-05  Tom de Vries  <tom@codesourcery.com>
19589         PR target/85204
19590         * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
19591         cond jump.
19593 2018-04-05  Shiva Chen  <shiva0217@gmail.com>
19594             Kito Cheng  <kito.cheng@gmail.com>
19596         * config/nds32/constraints.md (U33): Fine-tune checking condition.
19597         * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
19598         * config/nds32/nds32.h (nds32_16bit_address_type): Add
19599         ADDRESS_POST_MODIFY_LO_REG_IMM3U.
19601 2018-04-05  Shiva Chen  <shiva0217@gmail.com>
19602             Kito Cheng  <kito.cheng@gmail.com>
19604         * config/nds32/constraints.md (Ufe): New memory constraint.
19605         * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
19606         nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
19607         * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
19608         operands.
19609         * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
19610         * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
19612 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
19614         * config/nds32/nds32.md: Use optimize_size in the condition for
19615         alu-shift instructions.
19617 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
19619         * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
19621 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
19623         * config/nds32/nds32.md (negsi2): Refine pattern.
19625 2018-04-05  Kito Cheng  <kito.cheng@gmail.com>
19626             Chung-Ju Wu  <jasonwucj@gmail.com>
19628         * config/nds32/iterators.md (shift_rotate): New code iterator.
19629         (shift): New code attribute.
19630         * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
19631         * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
19632         * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
19633         * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
19634         bit-wise operations.
19635         (andsi3, *andsi3): Ditto.
19636         (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
19637         (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
19638         (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
19639         * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
19640         nds32_ior_operand, nds32_xor_operand): New predicates.
19642 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
19644         * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
19645         (addsi3, subsi3): ... this.
19647 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
19649         * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
19651 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
19653         * config/nds32/nds32.md: Adjust indention.
19655 2018-04-05  Kito Cheng  <kito.cheng@gmail.com>
19657         * config/nds32/nds32.md (feature): New attribute.
19659 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
19661         * config/nds32/nds32.md (subtype): New attribute.
19663 2018-04-04  Thomas Preud'homme  <thomas.preudhomme@arm.com>
19665         PR target/85203
19666         * config/arm/arm-builtins.c (arm_expand_builtin): Change
19667         expansion to perform a bitwise AND of the argument followed by a
19668         boolean negation of the result.
19670 2018-04-04  Peter Bergner  <bergner@vnet.ibm.com>
19672         PR rtl-optimization/84878
19673         * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
19674         the basic block.  Assert the use reference is not artificial and that
19675         it has an associated insn.
19677 2018-04-04  Michael Matz  <matz@suse.de>
19679         * builtins.c (compute_objsize): Pass correct operand
19680         to array_at_struct_end_p.
19682 2018-04-04  Richard Biener  <rguenther@suse.de>
19684         PR lto/85176
19685         * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
19686         from contexts for DINFO_LEVEL_TERSE and below.
19688 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
19690         * config/nds32/nds32-doubleword.md (move_<mode>): Require
19691         resiter_operand condition.
19692         * config/nds32/nds32.md (*move<mode>): Ditto.
19694 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
19695             Monk Chiang  <sh.chiang04@gmail.com>
19697         * config/nds32/nds32.md (movmisalign<mode>): New pattern.
19699 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
19701         * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
19703 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
19704             Kito Cheng  <kito.cheng@gmail.com>
19706         * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
19707         nds32_cond_code_str, output_cond_branch,
19708         output_cond_branch_compare_zero, nds32_expand_cbranch,
19709         nds32_expand_cstore, nds32_expand_movcc,
19710         nds32_output_cbranchsi4_equality_zero,
19711         nds32_output_cbranchsi4_equality_reg,
19712         nds32_output_cbranchsi4_equality_reg_or_const_int,
19713         nds32_output_cbranchsi4_greater_less_zero: New functions.
19714         * config/nds32/nds32-protos.h (nds32_expand_cbranch,
19715         nds32_expand_cstore, nds32_expand_movcc,
19716         nds32_output_cbranchsi4_equality_zero,
19717         nds32_output_cbranchsi4_equality_reg,
19718         nds32_output_cbranchsi4_equality_reg_or_const_int,
19719         nds32_output_cbranchsi4_greater_less_zero): Declare.
19720         * config/nds32/predicates.md (nds32_movecc_comparison_operator,
19721         nds32_rimm11s_operand): New predicates.
19722         * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
19723         * config/nds32/nds32.md: Rewrite all the branch and conditional move
19724         patterns.
19726 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
19728         * config/nds32/nds32-doubleword.md: Refine all the instruction type.
19729         * config/nds32/nds32.md: Ditto.
19730         * config/nds32/pipelines.md: Ditto.
19732 2018-04-04  Richard Biener  <rguenther@suse.de>
19734         PR tree-optimization/85168
19735         * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
19736         propagating abnormals.
19738 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
19740         * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
19742 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
19743             Kito Cheng  <kito.cheng@gmail.com>
19745         * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
19746         * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
19747         * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
19748         (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
19749         * config/nds32/nds32.md (sibcall_internal): New.
19750         (sibcall_register): Remove.
19751         (sibcall_immediate): Remove.
19752         (sibcall_value_internal): New.
19753         (sibcall_value_register): Remove.
19754         (sibcall_value_immediate): Remove.
19755         * config/nds32/predicates.md (nds32_general_register_operand): New.
19756         (nds32_call_address_operand): New.
19758 2018-04-03  Jakub Jelinek  <jakub@redhat.com>
19760         PR rtl-optimization/85167
19761         * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
19762         bb_defs if *split_p, instead preinitialize it to NULL.
19764         PR tree-optimization/85156
19765         * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
19766         evaluating the argument multiple times.
19768 2018-04-03  Bill Schmidt  <wschmidt@linux.ibm.com>
19770         * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
19771         than vector.
19772         (_mm_cvtpd_ps): Likewise.
19773         (_mm_cvttpd_epi32): Likewise.
19774         * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
19775         * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
19776         vector, pixel, and bool following altivec.h include.
19778 2018-04-03  Martin Sebor  <msebor@redhat.com>
19780         * doc/extend.texi (Common Function Attributes): Clarify.
19781         (const attribute): Likewise.
19782         (pure attribute): Likewise.
19784 2018-04-03  Jakub Jelinek  <jakub@redhat.com>
19786         PR target/85169
19787         * config/i386/i386.c (ix86_expand_vector_set): Use
19788         HOST_WIDE_INT_1U << elt instead of 1 << elt.  Formatting fix.
19790 2018-04-03  Uros Bizjak  <ubizjak@gmail.com>
19792         * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
19793         instructions when changing rounding bits to preserve precision bits
19794         in the x87 control word.
19796 2018-04-03  Martin Liska  <mliska@suse.cz>
19798         PR tree-optimization/82491
19799         * rtl.h (strip_offset_and_add): Replace += suboffset with
19800         poly_uint64 () + suboffset.
19802 2018-03-29  Martin Liska  <mliska@suse.cz>
19803             Martin Jambor  <mjambor@suse.cz>
19805         PR ipa/84947
19806         * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
19807         param_type is not an integral or pointer type.
19809 2018-04-03  Richard Biener  <rguenther@suse.de>
19811         * sese.h (recompute_all_dominators): Remove.
19813 2018-04-02  Martin Sebor  <msebor@redhat.com>
19815         * doc/invoke.texi (-Wrestrict): Fix typos.
19817 2018-04-02  Jim Wilson  <jimw@sifive.com>
19819         * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
19820         * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
19821         (<optab>di3, <optab>si3_extend): Likewise.
19822         (<optab>si3_mask, <optab>si3_mask_1): New.
19823         (<optab>di3_mask, <optab>di3_mask_1): New.
19824         (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
19825         (lshrsi3_zero_extend_1): Use VOIDmode shift count.
19826         * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
19828 2018-04-02  Gerald Pfeifer  <gerald@pfeifer.com>
19830         * doc/cpp.texi (Variadic Macros): Fix line continuation in an
19831         example.
19833 2018-04-02  Chung-Ju Wu  <jasonwucj@gmail.com>
19835         * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
19836         (nds32_canonicalize_comparison): New function.
19838 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
19839             Kito Cheng  <kito.cheng@gmail.com>
19840             Kuan-Lin Chen  <kuanlinchentw@gmail.com>
19842         * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
19843         * config/nds32/constants.md (unspec_volatile_element): Add
19844         UNSPEC_VOLATILE_RELAX_GROUP.
19845         * config/nds32/nds32-relax-opt.c: New file.
19846         * config/nds32/nds32-predicates.c
19847         (nds32_symbol_load_store_p): New function.
19848         * config/nds32/nds32-protos.h
19849         (nds32_symbol_load_store_p): Declare function.
19850         (make_pass_nds32_relax_opt): Declare new rtl pass function.
19851         * config/nds32/nds32.c
19852         (nds32_register_pass): New function to register pass.
19853         (nds32_register_passes): New function to register passes.
19854         * config/nds32/nds32.md (relax_group): New pattern.
19855         * config/nds32/nds32.opt (mrelax-hint): New option.
19856         * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
19858 2018-04-01  Kito Cheng  <kito.cheng@gmail.com>
19860         * config/nds32/t-nds32: Modify files dependency.
19862 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
19864         * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
19865         (PROFILE_HOOK): Define its implementation.
19867 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
19869         * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
19870         type and 32-bit size.
19872 2018-04-01  Jakub Jelinek  <jakub@redhat.com>
19874         PR middle-end/85090
19875         * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
19876         (V_128_256): New mode iterator.
19877         (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
19878         (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
19879         (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
19880         of V.
19881         * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
19882         V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
19884 2018-03-31  Segher Boessenkool  <segher@kernel.crashing.org>
19886         PR target/83315
19887         * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
19888         NaN inputs correctly.
19890 2018-03-30  Peter Bergner  <bergner@vnet.ibm.com>
19892         PR target/80546
19893         * config/rs6000/vsx.md (??r): New mode attribute.
19894         (*vsx_mov<mode>_64bit): Use it.
19895         (*vsx_mov<mode>_32bit): Likewise.
19897 2018-03-30  Martin Sebor  <msebor@redhat.com>
19899         PR tree-optimization/84818
19900         * builtins.c (check_access): Use warning_n.
19902 2018-03-30  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
19904         PR target/83822
19905         * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
19906         condition.
19907         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
19908         condition.
19910 2018-03-30  Julia Koval  <julia.koval@intel.com>
19912         PR target/84413
19913         * x86-tune.def (movx, partial_reg_dependency): Enable for
19914         m_SKYLAKE_AVX512.
19916 2018-03-29  Vladimir Makarov  <vmakarov@redhat.com>
19918         PR inline-asm/84985
19919         * lra-constraints.c (process_alt_operands): Move setting
19920         this_alternative_matches below.
19922 2018-03-29  Martin Liska  <mliska@suse.cz>
19924         PR lto/84995.
19925         * doc/invoke.texi: Document how LTO works with debug info.
19926         Describe auto-load support of binutils.  Mention 'x86-64'
19927         as valid option value of -march option.
19929 2018-03-29  Jakub Jelinek  <jakub@redhat.com>
19931         * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
19933         PR c/85094
19934         * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
19935         For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
19936         OEP_NO_HASH_CHECK for recursive call, to avoid exponential
19937         checking.
19939 2018-03-28  Peter Bergner  <bergner@vnet.ibm.com>
19941         PR target/84912
19942         * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
19943         (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
19944         * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
19945         for RS6000_BTM_POWERPC64.
19946         (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
19947         (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
19948         * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
19949         definition.
19950         (DIVDE): Use it.
19951         (DIVDEU): Likewise.
19953 2018-03-28  Carl Love  <cel@us.ibm.com>
19955         Revert
19956         2017-09-27  Carl Love  <cel@us.ibm.com>
19958         * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
19959         (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
19960         * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
19961         fctiw instruction.
19963 2018-03-28  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
19965         * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
19966         instead of __vector bool.
19967         (_mm_max_pu8): Likewise.
19968         (_mm_min_pi16): Likewise.
19970 2018-03-28  Peter Bergner  <bergner@vnet.ibm.com>
19972         PR target/84912
19973         * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
19974         (DIVWEUO): Likewise.
19975         (DIVDEO): Likewise.
19976         (DIVDEUO): Likewise.
19977         * config/rs6000/rs6000.c (builtin_function_type): Remove support for
19978         DIVWEUO and DIVDEUO.
19979         * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
19980         (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
19981         (div_extend): Likewise.
19982         * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
19983         builtin function.
19984         (__builtin_divweuo): Likewise.
19985         (__builtin_divdeo): Likewise.
19986         (__builtin_divdeuo): Likewise.
19988 2018-03-28  Jakub Jelinek  <jakub@redhat.com>
19990         PR target/85095
19991         * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
19992         *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
19994         PR tree-optimization/82004
19995         * gimple-match-head.c (optimize_pow_to_exp): New function.
19996         * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
19997         Don't fold to exp if optimize_pow_to_exp is false.
19999 2018-03-28  Martin Liska  <mliska@suse.cz>
20001         PR other/84819
20002         * calls.c (initialize_argument_information): Fix trailing space.
20003         * common.opt: Fix typo and provide better explanation for
20004         -fsanitize-coverage option.
20005         * config/i386/i386.opt: Fix typo.
20007 2018-03-28  Jakub Jelinek  <jakub@redhat.com>
20008             Martin Liska  <mliska@suse.cz>
20010         PR sanitizer/85081
20011         * gimplify.c (asan_poison_variable): Don't do the check for
20012         gimplify_omp_ctxp here.
20013         (gimplify_decl_expr): Do it here.
20014         (gimplify_target_expr): Likewise.
20016 2018-03-28  Martin Liska  <mliska@suse.cz>
20018         PR target/84988
20019         * config/i386/i386.c (ix86_function_arg_advance): Do not call
20020         chkp_type_bounds_count if MPX is not enabled.
20022 2018-03-27  Chung-Ju Wu  <jasonwucj@gmail.com>
20024         * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
20026 2018-03-27  Michael Meissner  <meissner@linux.vnet.ibm.com>
20028         PR target/84914
20029         * config/rs6000/rs6000.c (create_complex_muldiv): New helper
20030         function to create the function decl for complex long double
20031         multiply and divide for -mabi=ieeelongdouble.
20032         (init_float128_ieee): Call it.
20034 2018-03-27  H.J. Lu  <hongjiu.lu@intel.com>
20036         PR target/85044
20037         * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
20038         -fcf-protection=branch -mibt.
20039         * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
20041 2018-03-27  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
20043         PR target/81863
20044         * config/arm/arm.c (arm_valid_symbolic_address): Handle
20045         arm_word_relocations.
20047 2018-03-27  Cesar Philippidis  <cesar@codesourcery.com>
20049         PR target/85056
20050         * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
20051         extern array declarations.
20053 2018-03-27  Richard Biener  <rguenther@suse.de>
20055         PR middle-end/84067
20056         * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
20057         explicit single_use checks.
20059 2018-03-27  Richard Biener  <rguenther@suse.de>
20061         PR tree-optimization/85082
20062         * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
20063         Valueize the VUSE.
20065 2018-03-27  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
20067         * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
20068         * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
20069         Turn on fasynchronous-unwind-tables and funwind-tables.
20071 2018-03-26  Uros Bizjak  <ubizjak@gmail.com>
20073         PR target/85073
20074         * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
20075         (*bmi_blsr_<mode>_ccz): Ditto.
20077 2018-03-26  Tom de Vries  <tom@codesourcery.com>
20079         PR tree-optimization/85063
20080         * omp-general.c (offloading_function_p): New function.  Factor out
20081         of ...
20082         * omp-offload.c (pass_omp_target_link::gate): ... here.
20083         * omp-general.h (offloading_function_p): Declare.
20084         * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
20085         with attribute omp declare target for offloading functions.
20087 2018-03-24  Richard Sandiford  <richard.sandiford@linaro.org>
20089         PR tree-optimization/84005
20090         * tree-data-ref.h (get_base_for_alignment): Declare.
20091         * tree-data-ref.c (get_base_for_alignment_1): New function.
20092         (get_base_for_alignment): Likewise.
20093         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
20094         get_base_for_alignment to find a suitable base object, instead
20095         of always using drb->base_address.
20097 2018-03-23  Jakub Jelinek  <jakub@redhat.com>
20099         PR inline-asm/85022
20100         * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
20101         known size by default.
20103 2018-03-23  Vladimir Makarov  <vmakarov@redhat.com>
20105         PR inline-asm/85030
20106         * lra-constraints.c (process_alt_operands): Don't match BLKmode
20107         and non BLKmode operands.
20109 2018-03-23  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
20111         PR target/85026
20112         * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
20113         Clean up attributes.
20115 2018-03-23  Richard Biener  <rguenther@suse.de>
20117         PR debug/85020
20118         * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
20119         we are going to emit early debug for LTO.
20121 2018-03-23  Jakub Jelinek  <jakub@redhat.com>
20123         PR inline-asm/85034
20124         * function.c (match_asm_constraints_1): Don't optimize if input
20125         doesn't satisfy general_operand predicate for output's mode.
20127         PR inline-asm/85022
20128         * alias.c (write_dependence_p): Don't require for x_canonicalized
20129         non-VOIDmode if x has VOIDmode.
20131         PR sanitizer/85029
20132         * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
20133         just don't try to optimize it rather than assert it never happens.
20135 2018-03-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
20137         * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
20138         macro expansions for definition of ST_INTERNAL_<mode> and
20139         LD_INTERNAL_<mode> builtins.
20140         * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
20141         Remove prototype.
20142         * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
20143         function.
20144         (altivec_expand_st_builtin): Likewise.
20145         (altivec_expand_builtin): Remove calls to deleted functions.
20146         (rs6000_address_for_altivec): Delete this function.
20147         * config/rs6000/vector.md: Remove expands for
20148         vector_altivec_load_<mode> and vector_altivec_store_<mode>.
20150 2018-03-22  Sudakshina Das  <sudi.das@arm.com>
20152         PR target/84826
20153         * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
20154         * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
20155         re-computing once computed.
20156         (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
20157         (arm_init_machine_status): Initialize
20158         machine->static_chain_stack_bytes.
20160 2018-03-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
20162         PR target/84760
20163         * doc/extend.texi: Add four new prototypes for vec_ld.
20164         * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
20165         definitions for more logical presentation.
20166         * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
20167         entries for V1TI variants of __builtin_altivec_ld builtin.
20168         * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
20169         handling of V1TI variant of LVX icode pattern.
20170         (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
20171         (rs6000_gimple_fold_builtin): Likewise.
20172         (altivec_init_builtins): Add code to define
20173         __builtin_altivec_lvx_v1ti function.
20175 2018-03-22  Jakub Jelinek  <jakub@redhat.com>
20177         PR inline-asm/84941
20178         * function.c (match_asm_constraints_1): Don't do the optimization
20179         if input isn't a REG, SUBREG, MEM or constant.
20181 2018-03-22  Tom de Vries  <tom@codesourcery.com>
20183         PR tree-optimization/84956
20184         * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
20185         bb_has_abnormal_pred.
20187 2018-03-22  Jakub Jelinek  <jakub@redhat.com>
20189         PR sanitizer/85018
20190         * dwarf2asm.c (dw2_output_indirect_constant_1): Set
20191         DECL_INITIAL (decl) to decl at the end.
20192         * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
20193         adjust the comment.
20195 2018-03-21  Joseph Myers  <joseph@codesourcery.com>
20197         * doc/extend.texi (__builtin_tgmath): Document when complex
20198         integer types are treated as _Complex _Float64.
20200 2018-03-21  Tom de Vries  <tom@codesourcery.com>
20202         * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
20204 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
20206         PR tree-optimization/84960
20207         * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
20208         if it is ENTRY block, move them into single succ of ENTRY in that case.
20210 2018-03-21  Richard Sandiford  <richard.sandiford@linaro.org>
20212         PR tree-optimization/84811
20213         * poly-int.h (poly_span_traits): Remove the T3 parameter and
20214         promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
20215         (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
20216         (known_subrange_p): Update accordingly.  Cast each value involved
20217         in the size comparison, rather than casting the result of the
20218         subtraction.
20220 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
20222         PR tree-optimization/84982
20223         * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
20224         by flipping the least significant bit rather than all bits from
20225         bitpos to bitpos + bitsize - 1.
20227 2018-03-21  Nathan Sidwell  <nathan@acm.org>
20229         * doc/extend.texi (Deprecated Features): Remove mention of
20230         long-deleted deprecations.
20232 2018-03-21  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
20234         PR jit/84288
20235         * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
20236         * configure: Regenerate.
20238 2018-03-21  Tom de Vries  <tom@codesourcery.com>
20240         PR tree-optimization/83126
20241         * tree-parloops.c (num_phis): New function.
20242         (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
20244 2018-03-21  Nathan Sidwell  <nathan@acm.org>
20246         * doc/extend.texi (Deprecated Features): Update deprecated flags,
20247         mention anon-struct/union members and trailing attributes.
20249 2018-03-21  Bin Cheng  <bin.cheng@arm.com>
20251         PR tree-optimization/84969
20252         * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
20253         builtin memset partitions if they set different rhs values.
20255 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
20257         PR rtl-optimization/84989
20258         * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
20259         VEC_DUPLICATE with scalar result mode.
20261 2018-03-21  Martin Liska  <mliska@suse.cz>
20263         PR ipa/84963
20264         * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
20265         not intended return statement.
20267 2018-03-21  Martin Liska  <mliska@suse.cz>
20269         PR target/84988
20270         * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
20271         (chkp_find_bound_slots_1): Limit number of iterations.
20273 2018-03-20  David H. Gutteridge  <dhgutteridge@sympatico.ca>
20275         PR target/84838
20276         * Minor grammar fixes for x86 options.
20278 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
20280         PR debug/84875
20281         * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
20282         holding REG_CFA_RESTORE notes, instead turn them into a USE.
20284 2018-03-20  Peter Bergner  <bergner@vnet.ibm.com>
20286         PR target/83789
20287         * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
20288         (altivec_lvx_<mode>_1op): Likewise.
20289         (altivec_stvx_<mode>_2op): Likewise.
20290         (altivec_stvx_<mode>_1op): Likewise.
20291         (altivec_lvx_<VM2:mode>): New define_expand.
20292         (altivec_stvx_<VM2:mode>): Likewise.
20293         (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
20294         (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
20295         (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
20296         (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
20297         * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
20298         (rs6000_gen_lvx): Likewise.
20299         * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
20300         (altivec_expand_stv_builtin): Likewise.
20301         (altivec_expand_builtin): Likewise.
20302         * config/rs6000/vector.md: Likewise.
20304 2018-03-20  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
20306         PR target/82518
20307         * config/arm/arm.c (arm_array_mode_supported_p): Return false for
20308         BYTES_BIG_ENDIAN.
20310 2018-03-20  Richard Biener  <rguenther@suse.de>
20312         PR target/84986
20313         * config/i386/i386.c (ix86_add_stmt_cost): Only cost
20314         sign-conversions as zero, fall back to standard scalar_stmt
20315         cost for the rest.
20317 2018-03-20  Martin Liska  <mliska@suse.cz>
20319         PR ipa/84825
20320         * predict.c (rebuild_frequencies): Handle case when we have
20321         PROFILE_ABSENT, but flag_guess_branch_prob is false.
20323 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
20325         PR target/84990
20326         * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
20327         flag_section_anchors.
20328         * varasm.c (use_blocks_for_decl_p): Remove hack for
20329         dw2_force_const_mem.
20331         PR target/84845
20332         * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
20333         to ...
20334         (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this.  If pseudos can't
20335         be created, use lowpart_subreg of operands[0] rather than operands[0]
20336         itself.
20337         (*aarch64_reg_<mode>3_minus_mask): Rename to ...
20338         (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
20339         (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
20340         and n constraint instead of aarch64_shift_imm_di and Usd.
20341         (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
20342         (*aarch64_<optab>_reg_minus<mode>3): ... this.
20344 2018-03-20  Sudakshina Das  <sudi.das@arm.com>
20346         PR target/82989
20347         * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
20348         to favor GPR over NEON registers.
20349         (<shift>di3_neon): Likewise.
20351 2018-03-20  Tom de Vries  <tom@codesourcery.com>
20353         PR target/84952
20354         * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
20355         (nvptx_process_pars): Emit bar.sync asap and alap.
20357 2018-03-20  Tom de Vries  <tom@codesourcery.com>
20359         PR target/84954
20360         * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
20361         seen_label if seen_label is already set.
20363 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
20365         PR target/84945
20366         * config/i386/i386.c (fold_builtin_cpu): For features above 31
20367         use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
20368         Use 1U instead of 1.  Formatting fixes.
20370         PR c/84953
20371         * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
20372         instead of TREE_TYPE (s1) for the return value.
20374 2018-03-19  Jakub Jelinek  <jakub@redhat.com>
20376         PR tree-optimization/84946
20377         * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
20378         bitsize + bitsize in poly_uint64 rather than poly_int64.
20380         PR sanitizer/78651
20381         * dwarf2asm.c: Include fold-const.c.
20382         (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
20383         of decl rather than decl itself.
20385         PR rtl-optimization/84643
20386         * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
20388 2018-03-19  Maxim Ostapenko  <m.ostapenko@samsung.com>
20390         PR sanitizer/78651
20391         * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
20392         calling assemble_variable.
20394 2018-03-19  Sudakshina Das  <sudi.das@arm.com>
20396         PR target/81647
20397         * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
20398         instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
20400 2018-03-19  Jim Wilson  <jimw@sifive.com>
20402         PR bootstrap/84856
20403         * config/riscv/riscv.c (riscv_function_arg_boundary): Use
20404         PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
20405         (riscv_first_stack_step): Likewise.
20406         (riscv_option_override): Use STACK_BOUNDARY instead of
20407         MIN_STACK_BOUNDARY.
20408         * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
20409         MIN_STACK_BOUNDARY.
20410         (BIGGEST_ALIGNMENT): Set to 128.
20411         (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
20412         (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
20413         STACK_BOUNDARY.
20415 2018-03-19  Richard Biener  <rguenther@suse.de>
20417         PR tree-optimization/84933
20418         * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
20419         values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
20421 2018-03-19  Richard Biener  <rguenther@suse.de>
20423         PR tree-optimization/84859
20424         * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
20425         (cond_if_else_store_replacement): Perform sinking operation on
20426         single-store BBs regardless of MAX_STORES_TO_SINK setting.
20427         Generalize what a BB with a single eligible store is.
20429 2018-03-19  Richard Biener  <rguenther@suse.de>
20431         PR tree-optimization/84929
20432         * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
20433         chrec_is_positive against non-chrec arg.
20435 2018-03-19  Tamar Christina  <tamar.christina@arm.com>
20437         PR target/84711
20438         * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
20440 2018-03-18  Martin Liska  <mliska@suse.cz>
20442         PR rtl-optimization/84635
20443         * regrename.c (build_def_use): Use matches_mode only when
20444         matches >= 0.
20446 2018-03-18  Richard Sandiford  <richard.sandiford@linaro.org>
20448         PR tree-optimization/84913
20449         * tree-vect-loop.c (vectorizable_reduction): Don't try to
20450         vectorize chains of COND_EXPRs.
20452 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
20454         * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
20456 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
20458         * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
20460 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
20462         * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
20464 2018-03-17  Chung-Ju Wu  <jasonwucj@gmail.com>
20465             Kito Cheng  <kito.cheng@gmail.com>
20467         * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
20468         * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
20469         (nds32_adjust_reg_alloc_order): New function.
20470         * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
20472 2018-03-17  Kito Cheng  <kito.cheng@gmail.com>
20474         * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
20475         nds32_print_operand, nds32_print_operand_address): Use
20476         HOST_WIDE_INT_PRINT_DEC instead.
20478 2018-03-17  Chung-Ju Wu  <jasonwucj@gmail.com>
20480         * config/nds32/nds32.c (nds32_register_priority): Modify cost.
20482 2018-03-17  Jakub Jelinek  <jakub@redhat.com>
20484         PR target/84902
20485         * config/i386/i386.c (initial_ix86_tune_features,
20486         initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
20487         unsigned long long.
20488         (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
20489         to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
20490         rather than 1u << ix86_tune.  Formatting fix.
20491         (ix86_option_override_internal): Change ix86_arch_mask from
20492         unsigned int to unsigned HOST_WIDE_INT, initialize to
20493         HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
20494         (ix86_function_specific_restore): Likewise.
20496 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
20498         PR target/84899
20499         * postreload.c (reload_combine_recognize_pattern): Perform
20500         INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
20501         truncate_int_for_mode the result for the destination's mode.
20503         PR c/84909
20504         * hsa-gen.c (mem_type_for_type): Fix comment typo.
20505         * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
20506         Likewise.
20507         * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
20508         Likewise.
20510 2018-03-16  Vladimir Makarov  <vmakarov@redhat.com>
20512         PR target/84876
20513         * lra-assigns.c (lra_split_hard_reg_for): Don't use
20514         regno_allocno_class_array and sorted_pseudos.
20515         * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
20516         insns where regno is used.
20518 2018-03-16  Martin Liska  <mliska@suse.cz>
20520         PR ipa/84833
20521         * multiple_target.c (create_dispatcher_calls): Redirect
20522         reference in the symbol table.
20524 2018-03-16  Martin Liska  <mliska@suse.cz>
20526         PR ipa/84722
20527         * multiple_target.c (create_dispatcher_calls): Redirect also
20528         an alias.
20530 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
20532         PR c++/79937
20533         PR c++/82410
20534         * tree.h (TARGET_EXPR_NO_ELIDE): Define.
20535         * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
20536         TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
20538 2018-03-16  Julia Koval  <julia.koval@intel.com>
20540         * doc/invoke.texi (Skylake Server): Add CLWB.
20541         Cannonlake): Remove CLWB.
20543 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
20545         PR tree-optimization/84841
20546         * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
20547         1 << 3.
20548         (FLOAT_ONE_CONST_TYPE): Define.
20549         (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
20550         (sort_by_operand_rank): Put entries with higher constant_type last
20551         rather than first to match comments.
20553 2018-03-15  Sandra Loosemore  <sandra@codesourcery.com>
20555         * config/nios2/nios2.md (movsi_internal): Fix thinko in
20556         split predicate.
20558 2018-03-15  Jakub Jelinek  <jakub@redhat.com>
20560         PR c++/79085
20561         * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
20562         check and use address of target always.
20564 2018-03-15  H.J. Lu  <hongjiu.lu@intel.com>
20566         PR target/84574
20567         * config/i386/i386.c (indirect_thunk_needed): Update comments.
20568         (indirect_thunk_bnd_needed): Likewise.
20569         (indirect_thunks_used): Likewise.
20570         (indirect_thunks_bnd_used): Likewise.
20571         (indirect_return_needed): New.
20572         (indirect_return_bnd_needed): Likewise.
20573         (output_indirect_thunk_function): Add a bool argument for
20574         function return.
20575         (output_indirect_thunk_function): Don't generate alias for
20576         function return thunk.
20577         (ix86_code_end): Call output_indirect_thunk_function to generate
20578         function return thunks.
20579         (ix86_output_function_return): Set indirect_return_bnd_needed
20580         and indirect_return_needed instead of indirect_thunk_bnd_needed
20581         and indirect_thunk_needed.
20583 2018-03-15  Olga Makhotina  <olga.makhotina@intel.com>
20585         * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
20586         (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
20587         (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
20589 2018-03-15  David Malcolm  <dmalcolm@redhat.com>
20590             Paul Hua <paul.hua.gm@gmail.com>
20592         PR c/84852
20593         * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
20595 2018-03-15  Segher Boessenkool  <segher@kernel.crashing.org>
20597         * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
20598         TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
20599         resp. SFmode cases.
20601 2018-03-15  Tamar Christina  <tamar.christina@arm.com>
20603         PR target/84711
20604         * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
20605         instead of GET_MODE_SIZE when comparing Units.
20607 2018-03-15  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
20609         PR target/68256
20610         * varasm.c (hash_section): Return an unchangeble hash value
20611         * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
20612         Return !aarch64_can_use_per_function_literal_pools_p ().
20614 2018-03-15  Jakub Jelinek  <jakub@redhat.com>
20616         PR target/84860
20617         * optabs.c (emit_conditional_move): Pass address of cmode's copy
20618         rather than address of cmode as last argument to prepare_cmp_insn.
20620 2018-03-15  Julia Koval  <julia.koval@intel.com>
20622         * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
20623         F_AVX512VNNI, F_AVX512BITALG): New.
20625 2018-03-14  John David Anglin  <danglin@gcc.gnu.org>
20627         PR target/83451
20628         * config/pa/pa.c (pa_emit_move_sequence):  Always emit secondary reload
20629         insn for floating-point loads and stores.
20631 2018-03-14  Carl Love  <cel@us.ibm.com>
20633         * config/rs6000/rs6000-c.c: Add macro definitions for
20634         ALTIVEC_BUILTIN_VEC_PERMXOR.
20635         * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
20636         * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
20637         * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
20638         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
20639         UNSPEC_VPERMXOR.
20640         * config/doc/extend.texi: Add prototypes for vec_permxor.
20642 2018-03-14  David Malcolm  <dmalcolm@redhat.com>
20644         PR c/84852
20645         * diagnostic-show-locus.c (class layout_point): Convert m_line
20646         from int to linenum_type.
20647         (line_span::comparator): Use linenum "compare" function when
20648         comparing line numbers.
20649         (test_line_span): New function.
20650         (layout_range::contains_point): Convert param "row" from int to
20651         linenum_type.
20652         (layout_range::intersects_line_p): Likewise.
20653         (layout::will_show_line_p): Likewise.
20654         (layout::print_source_line): Likewise.
20655         (layout::should_print_annotation_line_p): Likewise.
20656         (layout::print_annotation_line): Likewise.
20657         (layout::print_leading_fixits): Likewise.
20658         (layout::annotation_line_showed_range_p): Likewise.
20659         (struct line_corrections): Likewise for field m_row.
20660         (line_corrections::line_corrections): Likewise for param "row".
20661         (layout::print_trailing_fixits): Likewise.
20662         (layout::get_state_at_point): Likewise.
20663         (layout::get_x_bound_for_row): Likewise.
20664         (layout::print_line): Likewise.
20665         (diagnostic_show_locus): Likewise for locals "last_line" and "row".
20666         (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
20667         * input.c (selftest::test_linenum_comparisons): New function.
20668         (selftest::input_c_tests): Call it.
20669         * selftest.c (selftest::test_assertions): Test ASSERT_GT,
20670         ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
20671         * selftest.h (ASSERT_GT): New macro.
20672         (ASSERT_GT_AT): New macro.
20673         (ASSERT_LT): New macro.
20674         (ASSERT_LT_AT): New macro.
20676 2018-03-14  Segher Boessenkool  <segher@kernel.crashing.org>
20678         PR rtl-optimization/84780
20679         * combine.c (distribute_links): Don't make a link based on pc_rtx.
20681 2018-03-14  Martin Liska  <mliska@suse.cz>
20683         * tree.c (record_node_allocation_statistics): Use
20684         get_stats_node_kind.
20685         (get_stats_node_kind): New function extracted from
20686         record_node_allocation_statistics.
20687         (free_node): Use get_stats_node_kind.
20689 2018-03-14  Richard Biener  <rguenther@suse.de>
20691         * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
20692         that the value-set of ANTIC_IN doesn't grow.
20694         Revert
20695         * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
20696         member.
20697         (BB_VISITED_WITH_VISITED_SUCCS): New define.
20698         (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
20700 2018-03-14  Julia Koval  <julia.koval@intel.com>
20702         * config.gcc (icelake-client, icelake-server): New.
20703         (icelake): Remove.
20704         * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
20705         (initial_ix86_arch_features): Ditto.
20706         (PTA_SKYLAKE): Add SGX.
20707         (PTA_ICELAKE): Remove.
20708         (PTA_ICELAKE_CLIENT): New.
20709         (PTA_ICELAKE_SERVER): New.
20710         (ix86_option_override_internal): Split up icelake on icelake client and
20711         icelake server.
20712         (get_builtin_code_for_version): Ditto.
20713         (fold_builtin_cpu): Ditto.
20714         * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
20715         * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
20716         * config/i386/i386.h (processor_type): Ditto.
20717         * doc/invoke.texi: Ditto.
20719 2018-03-14  Jakub Jelinek  <jakub@redhat.com>
20721         PR sanitizer/83392
20722         * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
20723         INTEGER_CST offset, add it together with bitpos / 8 and
20724         sign extend based on POINTER_SIZE.
20726         PR target/84844
20727         Revert
20728         2017-04-20  Uros Bizjak  <ubizjak@gmail.com>
20730         PR target/78090
20731         * config/i386/constraints.md (Yc): New register constraint.
20732         * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
20733         Use Yc constraint for alternative 2 of operand 0.  Remove
20734         preferred_for_speed attribute.
20736 2018-03-14  Richard Biener  <rguenther@suse.de>
20738         PR tree-optimization/84830
20739         * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
20740         with the old one to avoid oscillations.
20742 2018-03-13  Vladimir Makarov  <vmakarov@redhat.com>
20744         PR target/83712
20745         * lra-assigns.c (find_all_spills_for): Ignore uninteresting
20746         pseudos.
20747         (assign_by_spills): Return a flag of reload assignment failure.
20748         Do not process the reload assignment failures.  Do not spill other
20749         reload pseudos if they has the same reg class.  Update n if
20750         necessary.
20751         (lra_assign): Add a return arg.  Set up from the result of
20752         assign_by_spills call.
20753         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
20754         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
20755         usage_insns if it is not NULL.
20756         (spill_hard_reg_in_range): New function.
20757         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
20758         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
20759         function prototypes.
20760         (lra_assign): Change prototype.
20761         * lra.c (lra): Add code to deal with fails by splitting hard reg
20762         live ranges.
20764 2018-03-01  Palmer Dabbelt  <palmer@sifive.com>
20766         * config/riscv/riscv.opt (mrelax): New option.
20767         * config/riscv/riscv.c (riscv_file_start): Emit ".option
20768         "norelax" when riscv_mrelax is disabled.
20769         * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
20771 2018-03-13  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
20773         PR target/84743
20774         * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
20775         reassociation for int modes.
20777 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
20779         * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
20780         Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
20781         for big-endian.
20782         * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
20783         * config/aarch64/aarch64-sve.md
20784         (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
20785         (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
20786         (*extend<mode><Vwide>2): Rename to...
20787         (aarch64_sve_extend<mode><Vwide>2): ...this.
20788         (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
20789         renaming the old pattern to...
20790         (aarch64_sve_punpk<perm_hilo>_<mode>): ...this.  Only define
20791         unsigned packs.
20792         (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
20793         define_expand, renaming the old pattern to...
20794         (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
20795         (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
20796         (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
20797         account when deciding which SVE instruction the optab should use.
20798         (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
20800 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
20802         * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
20803         (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
20804         (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
20805         (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
20806         (tlsdesc_small_<mode>): Turn a define_expand and use
20807         tlsdesc_small_sve_<mode> for SVE.  Rename original define_insn to...
20808         (tlsdesc_small_advsimd_<mode>): ...this.
20809         (tlsdesc_small_sve_<mode>): New pattern.
20811 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
20813         * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
20814         (UNSPEC_UMUL_HIGHPART): New constants.
20815         (MUL_HIGHPART): New int iteraor.
20816         (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
20817         * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
20818         define_expand.
20819         (*<su>mul<mode>3_highpart): New define_insn.
20821 2018-03-13  Eric Botcazou  <ebotcazou@adacore.com>
20823         PR lto/84805
20824         * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
20825         incomplete types.
20827 2018-03-13  Martin Liska  <mliska@suse.cz>
20829         PR ipa/84658.
20830         * (sem_item_optimizer::sem_item_optimizer): Initialize new
20831         vector.
20832         (sem_item_optimizer::~sem_item_optimizer): Release it.
20833         (sem_item_optimizer::merge_classes): Register variable aliases.
20834         (sem_item_optimizer::fixup_pt_set): New function.
20835         (sem_item_optimizer::fixup_points_to_sets): Likewise.
20836         * ipa-icf.h: Declare new variables and functions.
20838 2018-03-13  Jakub Jelinek  <jakub@redhat.com>
20840         PR middle-end/84834
20841         * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
20842         integer_pow2p@2 and test integer_pow2p in condition.
20843         (A < 0 ? C : 0): Similarly for @1.
20845         PR middle-end/84831
20846         * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
20847         characters starting at p contain '\0' character, don't look beyond
20848         that.
20850         PR target/84827
20851         * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
20852         pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
20854         PR target/84828
20855         * reg-stack.c (change_stack): Change update_end var from int to
20856         rtx_insn *, if non-NULL don't update just BB_END (current_block), but
20857         also call set_block_for_insn on the newly added insns and rescan.
20859         PR target/84786
20860         * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
20861         on the last operand.
20863         PR c++/84704
20864         * tree.c (stabilize_reference_1): Return save_expr (e) for
20865         STATEMENT_LIST even if it doesn't have side-effects.
20867 2018-03-12  Jonathan Wakely  <jwakely@redhat.com>
20869         * doc/invoke.texi (-mclflushopt): Fix spelling of option.
20871 2018-03-12  Renlin Li  <renlin.li@arm.com>
20873         * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
20874         aarch64_output_scalar_simd_mov_immediate.
20876 2018-03-12  Martin Sebor  <msebor@redhat.com>
20878         PR tree-optimization/83456
20879         * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
20880         for perfectly overlapping calls to memcpy.
20881         (gimple_fold_builtin_memory_chk): Same.
20882         (gimple_fold_builtin_strcpy): Handle no-warning.
20883         (gimple_fold_builtin_stxcpy_chk): Same.
20884         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
20886 2018-03-12  Segher Boessenkool  <segher@kernel.crashing.org>
20888         * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
20889         parameter.  Use it for SFmode.
20890         (rs6000_function_arg_advance_1): Adjust.
20891         (rs6000_function_arg): Adjust.
20892         (rs6000_gimplify_va_arg): Pass false for that new parameter.
20894 2018-03-12  Segher Boessenkool  <segher@kernel.crashing.org>
20896         PR rtl-optimization/84169
20897         PR rtl-optimization/84780
20898         * combine.c (can_combine_p): Check for a 2-insn combination whether
20899         the destination register is used between the two insns, too.
20901 2018-03-12  Richard Biener  <rguenther@suse.de>
20903         PR tree-optimization/84803
20904         * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
20905         for refs DR analysis didn't process.
20907 2018-03-12  Richard Biener  <rguenther@suse.de>
20909         PR tree-optimization/84777
20910         * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
20911         force-vectorize loops ignore whether we are optimizing for size.
20913 2018-03-12  Chung-Ju Wu  <jasonwucj@gmail.com>
20915         * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
20916         (TARGET_MD_ASM_ADJUST): Define.
20918 2018-03-12  Monk Chiang  <sh.chiang04@gmail.com>
20919             Kito Cheng  <kito.cheng@gmail.com>
20920             Chung-Ju Wu  <jasonwucj@gmail.com>
20922         * config/nds32/nds32.c (nds32_compute_stack_frame,
20923         nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
20924         nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
20925         nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
20926         nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
20927         * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
20928         NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
20929         * config/nds32/nds32.md (prologue, epilogue): Use macro
20930         NDS32_V3PUSH_AVAILABLE_P to do checking.
20932 2018-03-11  Jakub Jelinek  <jakub@redhat.com>
20934         PR debug/58150
20935         * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
20936         DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
20937         but on TYPE_SIZE.  Don't do anything for ENUM_IS_OPAQUE if not creating
20938         a new die.  Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE.  Guard
20939         addition of most attributes on !orig_type_die or the attribute not
20940         being present already.  Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
20942 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
20943             Chung-Ju Wu  <jasonwucj@gmail.com>
20945         * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
20946         __NDS32_VH__ macro.
20947         * config/nds32/nds32.opt (mvh): New option.
20949 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
20950             Chung-Ju Wu  <jasonwucj@gmail.com>
20952         * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
20953         function.
20954         * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
20955         * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
20956         definition.
20958 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
20959             Chung-Ju Wu  <jasonwucj@gmail.com>
20961         * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
20962         function.
20963         * config/nds32/nds32-multiple.md (strlensi): New pattern.
20964         * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
20966 2018-03-11  Monk Chiang  <sh.chiang04@gmail.com>
20967             Kito Cheng  <kito.cheng@gmail.com>
20968             Chung-Ju Wu  <jasonwucj@gmail.com>
20970         * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
20971         UNSPEC_FFMISM and UNSPEC_FLMISM.
20972         * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
20973         for ffb, ffmism and flmism.
20974         * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
20975         (unspec_ffmism): Ditto.
20976         (unspec_flmism): Ditto.
20977         (nds32_expand_builtin_impl): Check if string extension is available.
20978         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
20979         NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
20981 2018-03-10  Vladimir Makarov  <vmakarov@redhat.com>
20983         Reverting patch:
20984         2018-03-09  Vladimir Makarov  <vmakarov@redhat.com>
20986         PR target/83712
20987         * lra-assigns.c (assign_by_spills): Return a flag of reload
20988         assignment failure.  Do not process the reload assignment
20989         failures.  Do not spill other reload pseudos if they has the same
20990         reg class.
20991         (lra_assign): Add a return arg.  Set up from the result of
20992         assign_by_spills call.
20993         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
20994         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
20995         usage_insns if it is not NULL.
20996         (spill_hard_reg_in_range): New function.
20997         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
20998         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
20999         function prototypes.
21000         (lra_assign): Change prototype.
21001         * lra.c (lra): Add code to deal with fails by splitting hard reg
21002         live ranges.
21004 2018-03-10  H.J. Lu  <hongjiu.lu@intel.com>
21006         PR target/84807
21007         * config/i386/i386.opt: Replace Enforcment with Enforcement.
21009 2018-03-10  Alexandre Oliva  <aoliva@redhat.com>
21011         PR debug/84620
21012         * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
21013         (dw_val_node): Add val_symbolic_view.
21014         * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
21015         (symview_upper_bound): New.
21016         (new_line_info_table): Initialize symviews_since_reset.
21017         (dwarf2out_source_line): Count symviews_since_reset and set
21018         symview_upper_bound.
21019         (dw_val_equal_p): Handle symview.
21020         (add_AT_symview): New.
21021         (print_dw_val): Handle symview.
21022         (attr_checksum, attr_checksum_ordered): Likewise.
21023         (same_dw_val_p, size_of_die): Likewise.
21024         (value_format, output_die): Likewise.
21025         (add_high_low_attributes): Use add_AT_symview for entry_view.
21026         (dwarf2out_finish): Reset symview_upper_bound, clear
21027         zero_view_p.
21029 2018-03-09  Peter Bergner  <bergner@vnet.ibm.com>
21031         PR target/83969
21032         * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
21033         Add strict argument and use it.
21034         (rs6000_split_multireg_move): Update for new strict argument.
21035         (mem_operand_gpr): Disallow all non-offsettable addresses.
21036         * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
21038 2018-03-09  Jakub Jelinek  <jakub@redhat.com>
21040         PR target/84772
21041         * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
21042         temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
21043         * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
21045         PR c++/84767
21046         * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
21047         decl, use remap_type if we want to use the type.
21049 2018-03-09  Martin Sebor  <msebor@redhat.com>
21051         PR tree-optimization/84526
21052         * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
21053         Remove dead code.
21054         (builtin_access::generic_overlap): Be prepared to handle non-array
21055         base objects.
21057 2018-03-09  Alexandre Oliva  <aoliva@redhat.com>
21059         PR rtl-optimization/84682
21060         * lra-constraints.c (process_address_1): Check is_address flag
21061         for address constraints.
21062         (process_alt_operands): Likewise.
21063         * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
21064         preprocess_constraints.
21065         * recog.h (preprocess_constraints): Add oploc parameter.
21066         Adjust callers.
21067         * recog.c (preprocess_constraints): Test address_operand for
21068         CT_ADDRESS constraints.
21070 2018-03-09  Vladimir Makarov  <vmakarov@redhat.com>
21072         PR target/83712
21073         * lra-assigns.c (assign_by_spills): Return a flag of reload
21074         assignment failure.  Do not process the reload assignment
21075         failures.  Do not spill other reload pseudos if they has the same
21076         reg class.
21077         (lra_assign): Add a return arg.  Set up from the result of
21078         assign_by_spills call.
21079         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
21080         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
21081         usage_insns if it is not NULL.
21082         (spill_hard_reg_in_range): New function.
21083         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
21084         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
21085         function prototypes.
21086         (lra_assign): Change prototype.
21087         * lra.c (lra): Add code to deal with fails by splitting hard reg
21088         live ranges.
21090 2018-03-09  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
21092         PR target/83193
21093         * common/config/arm/arm-common.c (arm_parse_arch_option_name):
21094         Accept complain bool parameter.  Only emit errors if it is true.
21095         (arm_parse_cpu_option_name): Likewise.
21096         (arm_target_thumb_only): Adjust callers of the above.
21097         * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
21098         prototype to take a default true bool parameter.
21099         (arm_parse_arch_option_name): Likewise.
21101 2018-03-09  David Malcolm  <dmalcolm@redhat.com>
21102             Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
21104         PR jit/64089
21105         PR jit/84288
21106         * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
21107         * configure: Regenerate.
21108         * configure.ac ("linker --version-script option"): New.
21109         ("linker soname option"): New.
21111 2018-03-09  Richard Biener  <rguenther@suse.de>
21113         PR tree-optimization/84775
21114         * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
21115         immediate uses of predicate stmts and mark them modified.
21117         Revert
21118         PR tree-optimization/84178
21119         * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
21120         to caller.
21121         (version_loop_for_if_conversion): Delay update_ssa call.
21122         (tree_if_conversion): Delay update_ssa until after predicate
21123         insertion.
21125 2018-03-09  Eric Botcazou  <ebotcazou@adacore.com>
21127         PR target/84763
21128         * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
21129         when the function accesses prior frames.
21131 2018-03-08  Jakub Jelinek  <jakub@redhat.com>
21133         PR debug/84456
21134         * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
21135         gen_llsym, otherwise call maybe_gen_llsym.
21137         PR inline-asm/84742
21138         * recog.c (asm_operand_ok): Return 0 if multi-character constraint
21139         has ',' character inside of it.
21141 2018-03-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
21143         PR target/84748
21144         * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
21145         as clobbering CC_REGNUM.
21147 2018-03-08  Richard Biener  <rguenther@suse.de>
21149         PR middle-end/84552
21150         * tree-scalar-evolution.c: Include tree-into-ssa.h.
21151         (follow_copies_to_constant): Do not follow SSA names registered
21152         for update.
21154 2018-03-08  Richard Biener  <rguenther@suse.de>
21156         PR tree-optimization/84178
21157         * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
21158         to caller.
21159         (version_loop_for_if_conversion): Delay update_ssa call.
21160         (tree_if_conversion): Delay update_ssa until after predicate
21161         insertion.
21163 2018-03-08  David Malcolm  <dmalcolm@redhat.com>
21165         PR tree-optimization/84178
21166         * tree-if-conv.c (release_bb_predicate): Remove the
21167         the assertion that the stmts have NULL use_ops.
21168         Discard the statements, asserting that they haven't
21169         yet been added to a BB.
21171 2018-03-08  Richard Biener  <rguenther@suse.de>
21173         PR tree-optimization/84746
21174         * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
21175         (phi_translate): Pass in destination ANTIC_OUT set.
21176         (phi_translate_1): Likewise.  For a simplified result lookup
21177         a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
21178         (phi_translate_set): Adjust.
21179         (do_pre_regular_insertion): Likewise.
21180         (do_pre_partial_partial_insertion): Likewise.
21182 2018-03-08  Martin Liska  <mliska@suse.cz>
21184         PR gcov-profile/84735
21185         * doc/gcov.texi: Document usage of profile files.
21186         * gcov-io.h: Document changes in the format.
21188 2018-03-08  Alexandre Oliva  <aoliva@redhat.com>
21190         PR debug/84404
21191         PR debug/84408
21192         * dwarf2out.c (struct dw_line_info_table): Update comments for
21193         view == -1.
21194         (FORCE_RESET_NEXT_VIEW): New.
21195         (FORCE_RESETTING_VIEW_P): New.
21196         (RESETTING_VIEW_P): Check for -1 too.
21197         (ZERO_VIEW_P): Likewise.
21198         (new_line_info_table): Force-reset next view.
21199         (dwarf2out_begin_function): Likewise.
21200         (dwarf2out_source_line): Simplify zero_view_p initialization.
21201         Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
21202         view directly.  Omit view when omitting .loc at line 0.
21204 2018-03-08  Jakub Jelinek  <jakub@redhat.com>
21206         PR tree-optimization/84740
21207         * tree-switch-conversion.c (process_switch): Call build_constructors
21208         only if info.phi_count is non-zero.
21210         PR tree-optimization/84739
21211         * tree-tailcall.c (find_tail_calls): Check call arguments against
21212         DECL_ARGUMENTS (current_function_decl) rather than
21213         DECL_ARGUMENTS (func) when checking for tail recursion.
21215 2018-03-07  Jakub Jelinek  <jakub@redhat.com>
21217         * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
21218         Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
21219         Volker Reichelt's entry and add entries for people that perform
21220         GCC fuzzy testing and report numerous bugs.
21222 2018-03-07  Segher Boessenkool  <segher@kernel.crashing.org>
21224         PR target/82411
21225         * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
21226         readonly data in sdata, if that is disabled.
21227         * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
21228         * doc/invoke.texi (RS/6000 and PowerPC Options): Document
21229         -mreadonly-in-sdata option.
21231 2018-03-07  Martin Sebor  <msebor@redhat.com>
21233         PR tree-optimization/84468
21234         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
21235         basic block when looking for nul assignment.
21237 2018-03-07  Eric Botcazou  <ebotcazou@adacore.com>
21239         PR target/84277
21240         * except.h (output_function_exception_table): Adjust prototype.
21241         * except.c (output_function_exception_table): Remove FNNAME parameter
21242         and add SECTION parameter.  Ouput one part of the table at a time.
21243         * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
21244         the first part of the exception table and emit unwind directives.
21245         * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
21246         (i386_pe_seh_cold_init): Likewise.
21247         * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
21248         (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
21249         * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
21250         (ix86_output_call_insn): Emit a nop in one more case for SEH.
21251         * config/i386/winnt.c: Include except.h.
21252         (struct seh_frame_state): Add reg_offset, after_prologue and
21253         in_cold_section fields.
21254         (i386_pe_seh_end_prologue): Set seh->after_prologue.
21255         (i386_pe_seh_cold_init): New function.
21256         (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
21257         to seh->in_cold_section.
21258         (seh_emit_push): Record the offset of the push.
21259         (seh_emit_save): Record the offet of the save.
21260         (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
21261         Test seh->after_prologue to disregard the epilogue.
21262         (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
21263         (i386_pe_end_cold_function): New function.
21265 2018-03-07  Jakub Jelinek  <jakub@redhat.com>
21267         PR fortran/84565
21268         * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
21269         aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
21271         PR c++/84704
21272         * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
21273         on tmp_var.
21274         * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
21275         don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
21277         PR middle-end/84723
21278         * multiple_target.c: Include tree-inline.h and intl.h.
21279         (expand_target_clones): Diagnose and fail if node->definition and
21280         !tree_versionable_function_p (node->decl).
21282 2018-03-06  John David Anglin  <danglin@gcc.gnu.org>
21284         * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
21285         sprint_ul.
21286         (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
21287         (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
21288         * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
21290 2018-03-06  Jakub Jelinek  <jakub@redhat.com>
21292         PR target/84710
21293         * combine.c (try_combine): Use reg_or_subregno instead of handling
21294         just paradoxical SUBREGs and REGs.
21296 2018-03-06  Claudiu Zissulescu  <claziss@synopsys.com>
21298         * config/arc/arc.c (arc_finalize_pic): Remove function.
21299         (arc_must_save_register): We use single base PIC register, remove
21300         checks to save/restore the PIC register.
21301         (arc_expand_prologue): Likewise.
21302         * config/arc/arc-protos.h (arc_set_default_type_attributes):
21303         Remove.
21304         (arc_verify_short): Likewise.
21305         (arc_attr_type): Likewise.
21306         * config/arc/arc.c (arc_set_default_type_attributes): Remove.
21307         (walk_stores): Likewise.
21308         (arc_address_cost): Make it static.
21309         (arc_verify_short): Likewise.
21310         (branch_dest): Likewise.
21311         (arc_attr_type): Likewise.
21312         * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
21313         (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
21314         (arc_final_prescan_insn): Remove inserting the nops due to
21315         hardware hazards.  It is done in reorg step.
21316         (insn_length_variant_t): Remove.
21317         (insn_length_parameters_t): Likewise.
21318         (arc_insn_length_parameters): Likewise.
21319         (arc_get_insn_variants): Likewise.
21320         * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
21322 2018-03-06  Jakub Jelinek  <jakub@redhat.com>
21324         PR inline-asm/84683
21325         * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
21326         assertion failure.
21328         PR tree-optimization/84687
21329         * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
21330         on new_node->decl.
21331         * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
21333 2018-03-05  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
21335         * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
21336         Rename to ppc_speculation_barrier.
21337         * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
21338         __builtin_ppc_speculation_barrier.
21340 2018-03-05  Jakub Jelinek  <jakub@redhat.com>
21342         PR target/84700
21343         * combine.c (combine_simplify_rtx): Don't try to simplify if
21344         if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
21345         are equal to x.
21347 2018-03-05  Segher Boessenkool  <segher@kernel.crashing.org>
21349         * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
21350         to 32 bytes when compiling for POWER9.
21352 2018-03-05  Jakub Jelinek  <jakub@redhat.com>
21354         PR target/84564
21355         * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
21356         regparm >= 3 with no arg reg available also for calls with
21357         flag_force_indirect_call.  Pass decl to ix86_function_regparm.
21359         PR target/84524
21360         * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
21361         orig,vex.
21362         (*<plusminus_insn><mode>3): Likewise.  Remove <mask_operand3> uses.
21364 2018-03-05  Peter Bergner  <bergner@vnet.ibm.com>
21366         PR target/84264
21367         * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
21369 2018-03-05  Richard Biener  <rguenther@suse.de>
21371         PR tree-optimization/84486
21372         * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
21373         When inserting a __builtin_assume_aligned call set the LHS
21374         SSA name alignment info accordingly.
21376 2018-03-05  Wilco Dijkstra  <wdijkstr@arm.com>
21378         PR tree-optimization/84114
21379         * config/aarch64/aarch64.c (aarch64_reassociation_width)
21380         Avoid reassociation of FLOAT_MODE addition.
21382 2018-03-05  Olga Makhotina  <olga.makhotina@intel.com>
21384         * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
21385         OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
21386         OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
21387         (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
21388         * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
21389         * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
21390         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
21391         and -mwbnoinvd.
21392         * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
21393         __builtin_ia32_wbinvd): New builtins.
21394         (SPECIAL_ARGS2): New.
21395         * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
21396         (SPECIAL_ARGS2): New.
21397         * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
21398         (ix86_valid_target_attribute_inner_p): Ditto.
21399         (ix86_init_mmx_sse_builtins): Add special_args2.
21400         * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
21401         TARGET_WBNOINVD_P): New.
21402         * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
21403         (define_insn "wbinvd", define_insn "wbnoinvd"): New.
21404         * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
21405         * config/i386/immintrin.h (_wbinvd): New intrinsic.
21406         * config/i386/pconfigintrin.h: New file.
21407         * config/i386/wbnoinvdintrin.h: Ditto.
21408         * config/i386/x86intrin.h: Add headers pconfigintrin.h and
21409         wbnoinvdintrin.h.
21410         * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
21412 2018-03-05  Richard Biener  <rguenther@suse.de>
21414         PR tree-optimization/84670
21415         * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
21416         member.
21417         (BB_VISITED_WITH_VISITED_SUCCS): New define.
21418         (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
21419         (compute_antic_aux): Only assert the number of values in ANTIC_IN
21420         doesn't grow if all successors (recursively) were visited at least
21421         once.
21423 2018-03-05  Richard Biener  <rguenther@suse.de>
21425         PR tree-optimization/84650
21426         * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
21427         if executed in the loop pipeline.
21429 2018-03-05  Sandra Loosemore  <sandra@codesourcery.com>
21431         * doc/configfiles.texi (Configuration Files): Move info about
21432         conditionalizing $target-protos.h to...
21433         * doc/sourcebuild.texi (Back End): Here.  Explain how $target.h
21434         differs from $target-protos.h.
21436 2018-03-05  Kito Cheng  <kito.cheng@gmail.com>
21437             Chung-Ju Wu  <jasonwucj@gmail.com>
21439         * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
21440         * config/nds32/nds32-multiple.md (setmemsi): Define.
21441         * config/nds32/nds32-memory-manipulation.c
21442         (nds32_gen_dup_4_byte_to_word_value): New.
21443         (emit_setmem_word_loop): New.
21444         (emit_setmem_byte_loop): New.
21445         (nds32_expand_setmem_loop): New.
21446         (nds32_expand_setmem_loop_v3m): New.
21447         (nds32_expand_setmem_unroll): New.
21448         (nds32_expand_setmem): New.
21450 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
21451             Chung-Ju Wu  <jasonwucj@gmail.com>
21453         * config/nds32/nds32-memory-manipulation.c
21454         (nds32_emit_load_store): New.
21455         (nds32_emit_post_inc_load_store): New.
21456         (nds32_emit_mem_move): New.
21457         (nds32_emit_mem_move_block): New.
21458         (nds32_expand_movmemsi_loop_unknown_size): New.
21459         (nds32_expand_movmemsi_loop_known_size): New.
21460         (nds32_expand_movmemsi_loop): New.
21461         (nds32_expand_movmemsi_unroll): New.
21462         (nds32_expand_movmemqi): Rename ...
21463         (nds32_expand_movmemsi): ... to this.
21464         * config/nds32/nds32-multiple.md (movmemqi): Rename ...
21465         (movmemsi): ... to this.
21466         * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
21467         (nds32_expand_movmemsi): ... to this.
21469 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
21470             Monk Chiang  <sh.chiang04@gmail.com>
21471             Chung-Ju Wu  <jasonwucj@gmail.com>
21473         * config/nds32/nds32-protos.h
21474         (nds32_expand_load_multiple): New arguments.
21475         (nds32_expand_store_multiple): Ditto.
21476         (nds32_valid_multiple_load_store): Rename ...
21477         (nds32_valid_multiple_load_store_p): ... to this.
21478         * config/nds32/nds32-memory-manipulation.c
21479         (nds32_expand_load_multiple): Refine implementation.
21480         (nds32_expand_store_multiple): Ditto.
21481         * config/nds32/nds32-multiple.md
21482         (load_multiple): Update nds32_expand_load_multiple interface.
21483         (store_multiple): Update nds32_expand_store_multiple interface.
21484         * config/nds32/nds32-predicates.c
21485         (nds32_valid_multiple_load_store): Rename ...
21486         (nds32_valid_multiple_load_store_p): ... to this and refine
21487         implementation.
21488         * config/nds32/predicates.md
21489         (nds32_load_multiple_and_update_address_operation): New predicate.
21490         (nds32_store_multiple_and_update_address_operation): New predicate.
21492 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
21493             Chung-Ju Wu  <jasonwucj@gmail.com>
21495         * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
21496         (combo): New attribute.
21497         * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
21499 2018-03-03  Chung-Ju Wu  <jasonwucj@gmail.com>
21501         * config/nds32/nds32.opt: Change -mcmodel= default value.
21503 2018-03-03  Kito Cheng  <kito.cheng@gmail.com>
21504             Monk Chiang  <sh.chiang04@gmail.com>
21505             Chung-Ju Wu  <jasonwucj@gmail.com>
21507         * config/nds32/constants.md (unspec_element): New enum.
21508         * config/nds32/constraints.md (Umw): New constraint.
21509         * config/nds32/nds32-intrinsic.c: Add more builtin functions.
21510         * config/nds32/nds32-intrinsic.md: Likewise.
21511         * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
21512         (nds32_valid_smw_lwm_base_p): New.
21513         (nds32_output_smw_single_word): New.
21514         (nds32_output_lmw_single_word): New.
21515         (nds32_expand_unaligned_load): New.
21516         (nds32_expand_unaligned_store): New.
21517         * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
21518         (nds32_output_smw_single_word): Declare.
21519         (nds32_output_lmw_single_word): Declare.
21520         (nds32_expand_unaligned_load): Declare.
21521         (nds32_expand_unaligned_store): Declare.
21522         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
21523         NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
21524         NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
21525         NDS32_BUILTIN_UASTORE_DW.
21526         * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
21527         predicate.
21529 2018-03-03  Monk Chiang  <sh.chiang04@gmail.com>
21530             Kito Cheng  <kito.cheng@gmail.com>
21531             Chung-Ju Wu  <jasonwucj@gmail.com>
21533         * config/nds32/nds32-intrinsic.c
21534         (nds32_expand_builtin_null_ftype_reg): Delete.
21535         (nds32_expand_builtin_reg_ftype_imm): Ditto.
21536         (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
21537         (nds32_read_argument): New.
21538         (nds32_legitimize_target): Ditto.
21539         (nds32_legitimize_argument): Ditto.
21540         (nds32_check_constant_argument): Ditto.
21541         (nds32_expand_unop_builtin): Ditto.
21542         (nds32_expand_unopimm_builtin): Ditto.
21543         (nds32_expand_binop_builtin): Ditto.
21544         (nds32_builtin_decl_impl): Ditto.
21545         (builtin_description): Ditto.
21546         (nds32_expand_builtin_impl): Rewrite with new infrastructure.
21547         (nds32_init_builtins_impl): Ditto.
21548         * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
21549         (nds32_builtin_decl): New.
21550         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
21551         * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
21553 2018-03-02  Jeff Law  <law@redhat.com>
21555         * reorg.c (stop_search_p): Handle DEBUG_INSN.
21556         (redundant_insn, fill_simple_delay_slots): Likewise.
21557         (fill_slots_from_thread): Likewise.
21558         * resource.c (mark_referenced_resources): Likewise.
21559         (mark_set_resources, find_dead_or_set_registers): Likewise.
21561 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
21563         * substring-locations.h (format_warning_va): Formatting fix for
21564         ATTRIBUTE_GCC_DIAG.
21565         (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
21566         argument.
21567         (format_warning_n_va, format_warning_at_substring_n): New prototypes.
21568         * substring-locations.c: Include intl.h.
21569         (format_warning_va): Turned into small wrapper around
21570         format_warning_n_va, renamed to ...
21571         (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
21572         rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
21573         use ngettext.
21574         (format_warning_at_substring_n): New function.
21575         * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
21576         (fmtwarn): Add ATTRIBUTE_GCC_DIAG.  Turn into a copy of
21577         format_warning_at_substring with just a shorter name instead of
21578         const function pointer.
21579         (fmtwarn_n): New function.
21580         (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
21581         appropriate, get rid of all the fmtstr temporaries, move conditionals
21582         with G_() wrapped string literals directly into fmtwarn arguments,
21583         cast dir.len to (int), formatting fixes.
21585 2018-03-02  Thomas Schwinge  <thomas@codesourcery.com>
21587         * doc/invoke.texi: Remove "Cilk Plus" references.
21589 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
21590             Richard Biener  <rguenther@suse.de>
21592         PR ipa/84628
21593         * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
21594         for error or warning attributes if CALL_FROM_THUNK_P is set.
21595         Formatting fixes.
21597 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
21599         PR target/56540
21600         * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
21601         __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
21603         PR target/56540
21604         * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
21605         __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
21607         * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
21608         instead of -1U in last predictors element's probability member.
21610 2018-03-02  Eric Botcazou  <ebotcazou@adacore.com>
21612         PR ipa/83983
21613         * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
21614         arguments if they are comparable.
21616 2018-03-02  Richard Sandiford  <richard.sandiford@linaro.org>
21618         PR tree-optimization/84634
21619         * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
21620         masks and masked_loop_p with a single loop_masks, making sure it's
21621         null for bb vectorization.
21623 2018-03-02  Richard Sandiford  <richard.sandiford@linaro.org>
21625         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
21626         (vect_analyze_data_ref_access): Use loop->safe_len rather than
21627         loop->force_vectorize to check whether there is no alias.
21629 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
21631         PR target/84614
21632         * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
21633         prototypes.
21634         * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
21635         comments.
21636         (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
21637         * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
21638         instead of a loop around prev_real_insn.
21639         * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
21640         prev_real_insn.
21642         PR inline-asm/84625
21643         * config/i386/i386.c (ix86_print_operand): Use conditional
21644         output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
21645         zero vector.
21647 2018-03-02  Richard Biener  <rguenther@suse.de>
21649         PR tree-optimization/84427
21650         * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
21651         (bitmap_set_subtract_values): Rewrite to handle multiple
21652         exprs per value.
21653         (clean): Likewise.
21654         (prune_clobbered_mems): Likewise.
21655         (phi_translate): Take edge instead of pred/phiblock.
21656         (phi_translate_1): Likewise.
21657         (phi_translate_set): Likewise.  Insert all translated
21658         exprs for a value into the set, keeping possibly multiple
21659         expressions per value.
21660         (compute_antic_aux): Adjust for phi_translate changes.
21661         When intersecting union the expressions and prune those
21662         not in the final value set, keeping possibly multiple
21663         expressions per value.  Do not use value-insertion
21664         for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
21665         all expressions.  Add verification that the value-sets
21666         only shrink during iteration.
21667         (compute_partial_antic_aux): Adjust for the phi_translate changes.
21668         (do_pre_regular_insertion): Likewise.
21669         (do_pre_partial_partial_insertion): Likewise.
21671 2018-03-02  Richard Biener  <rguenther@suse.de>
21673         PR target/82005
21674         * config/darwin.c (saved_debug_info_level): New static global.
21675         (darwin_asm_lto_start): Disable debug info generation for LTO out.
21676         (darwin_asm_lto_end): Restore debug info generation settings.
21678 2018-03-01  Martin Liska  <mliska@suse.cz>
21680         PR sanitizer/82484
21681         * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
21682         volatile arguments.
21684 2018-03-01  Richard Biener  <rguenther@suse.de>
21686         PR debug/84645
21687         * dwarf2out.c (gen_variable_die): Properly handle late VLA
21688         type annotation with LTO when debug was disabled at compile-time.
21690 2018-03-01  Matthew Fortune  <mfortune@gmail.com>
21692         * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
21693         XINT with INTVAL.
21694         (mips_final_postscan_insn): Likewise.
21696 2018-03-01  Richard Sandiford  <richard.sandiford@linaro.org>
21698         PR rtl-optimization/84528
21699         * alias.c (init_alias_target): Add commentary.
21700         (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
21701         a unique base value if the frame pointer is not eliminated
21702         to the stack pointer.
21704 2018-03-01  Tom de Vries  <tom@codesourcery.com>
21706         PR rtl-optimization/83327
21707         * lra-int.h (hard_regs_spilled_into): Declare.
21708         * lra.c (hard_regs_spilled_into): Define.
21709         (init_reg_info): Init hard_regs_spilled_into.
21710         * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
21711         * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
21712         (process_bb_lives): Handle hard_regs_spilled_into.
21713         (lra_create_live_ranges_1): Before doing liveness propagation, clear
21714         regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
21716 2018-02-28  David Edelsohn  <dje.gcc@gmail.com>
21718         * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
21719         (powerpc-ibm-aix[789]*): Default to AIX 7.2.
21720         * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
21721         * config/rs6000/aix72.h: New file.
21723 2018-02-28  Jakub Jelinek  <jakub@redhat.com>
21725         * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
21726         instead of warning_at with conditional singular and plural messages
21727         where possible.
21729         PR target/52991
21730         * stor-layout.c (update_alignment_for_field): For
21731         targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
21732         && !DECL_PACKED (field), do the alignment update, just use
21733         only desired_align instead of MAX (type_align, desired_align)
21734         as the alignment.
21735         (place_field): Don't do known_align < desired_align handling
21736         early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
21737         is non-NULL, instead do it after rli->prev_field handling and
21738         only if not within a bitfield word.  For DECL_PACKED (field)
21739         use type_align of BITS_PER_UNIT.
21741 2018-02-28  Eric Botcazou  <ebotcazou@adacore.com>
21743         * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
21744         superfluous parentheses and trailing spaces.
21746 2018-02-28  Richard Biener  <rguenther@suse.de>
21748         PR tree-optimization/84584
21749         * graphite-scop-detection.c (scop_detection::add_scop): Discard
21750         SCoPs with fake exit edge.
21752 2018-02-28  Martin Liska  <mliska@suse.cz>
21754         PR testsuite/84597
21755         * timevar.c (timer::print): Fix format to properly print 100%
21756         values.
21758 2018-02-28  Richard Biener  <rguenther@suse.de>
21760         PR middle-end/84607
21761         * genmatch.c (capture_info::walk_match): Do not mark
21762         captured expressions without operands as expr_p given
21763         they act more like predicates and should be subject to
21764         "lost tail" side-effect preserving.
21766 2018-02-28  Alexandre Oliva  <aoliva@redhat.com>
21768         PR rtl-optimization/81611
21769         * auto-inc-dec.c (attempt_change): Move dead note from
21770         mem_insn if it's the next use of regno
21771         (find_address): Take address use of reg holding
21772         non-incremented value.  Add parm to limit search to the named
21773         reg only.
21774         (merge_in_block): Attempt to use a mem insn that is the next
21775         use of the original regno.
21777 2018-02-27  Martin Sebor  <msebor@redhat.com>
21779         PR c++/83871
21780         * doc/invoke.texi (-Wmissing-attributes): New option.
21781         * print-tree.c (print_node): Handle DECL_UNINLINABLE.
21783 2018-02-27  Martin Sebor  <msebor@redhat.com>
21785         PR translation/84207
21786         * diagnostic-core.h (warning_n, error_n, inform_n): Change
21787         n argument to unsigned HOST_WIDE_INT.
21788         * diagnostic.c (warning_n, error_n, inform_n): Ditto.
21789         (diagnostic_n_impl): Ditto.  Handle arguments in excess of LONG_MAX.
21790         * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
21791         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
21793 2018-02-27  Richard Biener  <rguenther@suse.de>
21795         PR tree-optimization/84512
21796         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
21797         Do not use the estimate returned from record_stmt_cost for
21798         the scalar iteration cost but sum properly using add_stmt_cost.
21800 2018-02-27  Richard Biener  <rguenther@suse.de>
21802         PR tree-optimization/84466
21803         * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
21804         Adjust last change to less strictly validate use operands.
21806 2018-02-27  Martin Liska  <mliska@suse.cz>
21808         PR gcov-profile/84548
21809         * gcov.c (process_file): Allow partial overlap and consider it
21810         also as group functions.
21811         (output_lines): Properly calculate range of lines for a group.
21813 2018-02-27  Martin Liska  <mliska@suse.cz>
21815         * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
21816         'ggc' suffixes.  Change first column width.
21817         (timer::print): Fix formatting of the column.
21819 2018-02-27  Alexandre Oliva  <aoliva@redhat.com>
21821         * tree-ssa-live.c (remove_unused_scope_block_p): Do not
21822         preserve inline entry blocks for the sake of debug inline
21823         entry point markers alone.
21824         (remove_unused_locals): Suggest in comments a better place to
21825         force the preservation of inline entry blocks that are
21826         otherwise unused, but do not preserve them.
21828 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
21830         * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
21832 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
21834         PR target/84039
21835         * config/i386/constraints.md (Bs): Replace
21836         ix86_indirect_branch_register with
21837         TARGET_INDIRECT_BRANCH_REGISTER.
21838         (Bw): Likewise.
21839         * config/i386/i386.md (indirect_jump): Likewise.
21840         (tablejump): Likewise.
21841         (*sibcall_memory): Likewise.
21842         (*sibcall_value_memory): Likewise.
21843         Peepholes of indirect call and jump via memory: Likewise.
21844         (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
21845         (*sibcall_value_GOT_32): Likewise.
21846         * config/i386/predicates.md (indirect_branch_operand): Likewise.
21847         (GOT_memory_operand): Likewise.
21848         (call_insn_operand): Likewise.
21849         (sibcall_insn_operand): Likewise.
21850         (GOT32_symbol_operand): Likewise.
21851         * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
21853 2018-02-26  Eric Botcazou  <ebotcazou@adacore.com>
21855         PR rtl-optimization/83496
21856         * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
21857         booleans to RTXes.  Call fix_reg_dead_note on every non-null element.
21858         (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
21859         redundant insn, if any.
21860         (relax_delay_slots): Likewise.
21861         (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
21863 2018-02-26  Richard Sandiford  <richard.sandiford@linaro.org>
21865         PR tree-optimization/83965
21866         * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
21867         that grouped statements are part of a reduction chain.  Return
21868         true if the statement is not marked as a reduction itself but
21869         is part of a group.
21870         (vect_recog_dot_prod_pattern): Don't check whether the statement
21871         is part of a group here.
21872         (vect_recog_sad_pattern): Likewise.
21873         (vect_recog_widen_sum_pattern): Likewise.
21875 2018-02-26  Eric Botcazou  <ebotcazou@adacore.com>
21877         PR debug/84545
21878         * final.c (rest_of_clean_state): Also look for calls inside sequences.
21880 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
21882         PR target/84530
21883         * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
21884         the bool argument.
21885         (ix86_output_indirect_function_return): New prototype.
21886         (ix86_split_simple_return_pop_internal): Likewise.
21887         * config/i386/i386.c (indirect_return_via_cx): New.
21888         (indirect_return_via_cx_bnd): Likewise.
21889         (indirect_thunk_name): Handle return va CX_REG.
21890         (output_indirect_thunk_function): Create alias for
21891         __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
21892         (ix86_output_indirect_jmp): Remove the bool argument.
21893         (ix86_output_indirect_function_return): New function.
21894         (ix86_split_simple_return_pop_internal): Likewise.
21895         * config/i386/i386.md (*indirect_jump): Don't pass false
21896         to ix86_output_indirect_jmp.
21897         (*tablejump_1): Likewise.
21898         (simple_return_pop_internal): Change it to define_insn_and_split.
21899         Call ix86_split_simple_return_pop_internal to split it for
21900         -mfunction-return=.
21901         (simple_return_indirect_internal): Call
21902         ix86_output_indirect_function_return instead of
21903         ix86_output_indirect_jmp.
21905 2018-02-26  Jakub Jelinek  <jakub@redhat.com>
21907         PR bootstrap/84405
21908         * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
21909         memset and value initialization afterwards.
21911 2018-02-26  Christophe Lyon  <christophe.lyon@linaro.org>
21913         * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
21915 2018-02-26  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
21917         PR target/84521
21918         * common/config/aarch64/aarch64-common.c
21919         (aarch_option_optimization_table[]): Switch
21920         off fomit-frame-pointer
21922 2018-02-26  Kito Cheng  <kito.cheng@gmail.com>
21923             Chung-Ju Wu  <jasonwucj@gmail.com>
21925         * config/nds32/nds32-multiple.md (load_multiple): Disallow
21926         volatile memory.
21927         (store_multiple): Ditto.
21929 2018-02-26  Kito Cheng  <kito.cheng@gmail.com>
21931         * config.gcc: Add --with-cpu support for nds32 target.
21932         * config/nds32/nds32-opts.h (nds32_cpu_type): New.
21933         * config/nds32/nds32.opt: Add -mcpu= option.
21935 2018-02-25  Segher Boessenkool  <segher@kernel.crashing.org>
21937         * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
21938         isel=yes): Warn for these deprecated options.
21940 2018-02-23  David Edelsohn  <dje.gcc@gmail.com>
21942         * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
21943         ISA_2_5_MASKS_EMBEDDED.
21945 2018-02-23  Jakub Jelinek  <jakub@redhat.com>
21947         * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
21948         p->max as pointers rather than using iterative_hash_expr.
21950 2018-02-23  Carl Love  <cel@us.ibm.com>
21952         * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
21953         macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
21954         BU_P8V_OVERLOAD_2.
21955         * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
21956         P8V_BUILTIN_VEC_VSIGNED2.  Change VSX_BUILTIN_VEC_VUNSIGNED2 to
21957         P8V_BUILTIN_VEC_VUNSIGNED2.
21959 2018-02-22  Vladimir Makarov  <vmakarov@redhat.com>
21961         PR target/81572
21962         * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
21963         * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
21964         LRA_UNKNOWN_ALT.
21965         * lra-constraints.c (curr_insn_transform): Set up
21966         LRA_NON_CLOBBERED_ALT for moves processed on the fast path.  Use
21967         LRA_UNKNOWN_ALT.
21968         (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
21969         * lra-eliminations.c (spill_pseudos): Ditto.
21970         (process_insn_for_elimination): Ditto.
21971         * lra-lives.c (reg_early_clobber_p): Use the new macros.
21972         * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
21973         LRA_NON_CLOBBERED_ALT.
21975 2018-02-22  Martin Sebor  <msebor@redhat.com>
21977         PR tree-optimization/84480
21978         * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
21979         to maybe_diag_stxncpy_trunc.  Call it.
21980         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
21981         from gimple_fold_builtin_strcpy.  Print inlining stack.
21982         (handle_builtin_stxncpy): Print inlining stack.
21983         * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
21985 2018-02-22  H.J. Lu  <hongjiu.lu@intel.com>
21987         PR target/84176
21988         * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
21989         error when -mindirect-branch=thunk-extern, -fcf-protection=branch
21990         and -fcheck-pointer-bounds are used together.
21991         (indirect_thunk_prefix): New enum.
21992         (indirect_thunk_need_prefix): New function.
21993         (indirect_thunk_name): Replace need_bnd_p with need_prefix.  Use
21994         "_nt" instead of "_bnd" for NOTRACK prefix.
21995         (output_indirect_thunk): Replace need_bnd_p with need_prefix.
21996         (output_indirect_thunk_function): Likewise.
21997         (): Likewise.
21998         (ix86_code_end): Update output_indirect_thunk_function calls.
21999         (ix86_output_indirect_branch_via_reg): Replace
22000         ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
22001         (ix86_output_indirect_branch_via_push): Likewise.
22002         (ix86_output_function_return): Likewise.
22003         * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
22004         incompatible with -fcf-protection=branch and
22005         -fcheck-pointer-bounds.
22007 2018-02-22  Steve Ellcey  <sellcey@cavium.com>
22009         PR target/83335
22010         * config/aarch64/aarch64.c (aarch64_print_address_internal):
22011         Change gcc_assert call to output_operand_lossage.
22013 2018-02-22  Steve Ellcey  <sellcey@cavium.com>
22015         * doc/extend.texi (__builtin_extend_pointer): Document builtin.
22017 2018-02-22  DJ Delorie  <dj@redhat.com>
22018             Sebastian Perta  <sebastian.perta@renesas.com>
22019             Oleg Endo  <olegendo@gcc.gnu.org>
22021         * config/rx/rx.c (rx_rtx_costs): New function.
22022         (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
22024 2018-02-22  Thomas Preud'homme  <thomas.preudhomme@arm.com>
22026         * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
22028 2018-02-22  Martin Liska  <mliska@suse.cz>
22030         PR driver/83193
22031         * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
22032         Add "native" as a possible value.
22034 2018-02-22  Martin Liska  <mliska@suse.cz>
22036         PR driver/83193
22037         * config/i386/i386.c (ix86_option_override_internal):
22038         Add "native" as a possible value for -march and -mtune.
22040 2018-02-22  Jakub Jelinek  <jakub@redhat.com>
22042         PR target/84502
22043         * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
22044         to all type variants.
22046         PR tree-optimization/84503
22047         * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
22048         width as info->bitpos + info->bitsize - start.
22049         (merged_store_group::merge_overlapping): Simplify width computation.
22050         (check_no_overlap): New function.
22051         (imm_store_chain_info::try_coalesce_bswap): Compute expected
22052         start + width and last_order of the group, fail if check_no_overlap
22053         fails.
22054         (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
22055         to group if check_no_overlap fails.
22057 2018-02-21  Segher Boessenkool  <segher@kernel.crashing.org>
22059         * config/rs6000/altivec.md: Delete contraint arguments to
22060         define_expand, define_split, and define_peephole2, and in
22061         define_insn_and_split if always unused.
22062         * config/rs6000/darwin.md: Ditto.
22063         * config/rs6000/dfp.md: Ditto.
22064         * config/rs6000/rs6000.md: Ditto.
22065         * config/rs6000/sync.md: Ditto.
22066         * config/rs6000/vector.md: Ditto.
22067         * config/rs6000/vsx.md: Ditto.
22069 2018-02-21  Segher Boessenkool  <segher@kernel.crashing.org>
22071         * config/rs6000/altivec.md: Write output control strings as braced
22072         blocks instead of double-quoted strings.
22073         * config/rs6000/darwin.md: Ditto.
22074         * config/rs6000/rs6000.md: Ditto.
22075         * config/rs6000/vector.md: Ditto.
22076         * config/rs6000/vsx.md: Ditto.
22078 2018-02-21  Jason Merrill  <jason@redhat.com>
22080         PR c++/84314 - ICE with templates and fastcall attribute.
22081         * attribs.c (build_type_attribute_qual_variant): Remove assert.
22083 2018-02-21  Jan Hubicka  <hubicka@ucw.cz>
22085         * ipa-cp.c (determine_versionability): Fix comment typos.
22087 2018-02-21  Jan Hubicka  <hubicka@ucw.cz>
22089         PR c/84229
22090         * ipa-cp.c (determine_versionability): Do not version functions caling
22091         va_arg_pack.
22093 2018-02-21  Martin Liska  <mliska@suse.cz>
22095         PR driver/83193
22096         * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
22097         Add "native" as a possible value.
22098         * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT):  Define
22099         the macro when native cpu detection is available.
22101 2018-02-21  Martin Liska  <mliska@suse.cz>
22103         PR driver/83193
22104         * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
22105         Add "native" as a possible value.
22106         * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
22107         when native cpu detection is available.
22109 2018-02-21  Jakub Jelinek  <jakub@redhat.com>
22110             Martin Sebor  <msebor@redhat.com>
22112         PR tree-optimization/84478
22113         * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
22114         false.
22115         * gimple-fold.c (get_range_strlen): Make minlen const and assume it
22116         can't be NULL.  Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
22117         support which is conservatively correct, for 2 only stay conservative
22118         for maxlen.  Formatting and comment capitalization fixes.  Add STRICT
22119         argument to the 2 argument get_range_strlen, adjust 6 arg
22120         get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
22121         false.
22122         (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
22123         (gimple_fold_builtin_strlen): Pass true as last argument to
22124         get_range_strlen.
22126 2018-02-20  Martin Sebor  <msebor@redhat.com>
22128         PR middle-end/84095
22129         * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
22130         (builtin_memref::set_base_and_offset): Same.  Handle inner references.
22131         (builtin_memref::builtin_memref): Factor out parts into
22132         set_base_and_offset and call it.
22134 2018-02-20  Richard Sandiford  <richard.sandiford@linaro.org>
22136         PR middle-end/84406
22137         * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
22138         is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
22139         greater precision.  If to_mode is a MODE_PARTIAL_INT, stop the
22140         search at the associated MODE_INT.
22142 2018-02-20  Jeff Law  <law@redhat.com>
22144         PR middle-end/82123
22145         PR tree-optimization/81592
22146         PR middle-end/79257
22147         * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
22148         for range data rather than using global data.
22149         * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
22150         range data rather than using global data.
22151         * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
22152         pass it to children as needed.
22153         (struct directive::fmtresult): Similarly.
22154         (struct directive::set_width): Similarly.
22155         (struct directive::set_precision): Similarly.
22156         (format_integer, format_directive, parse_directive): Similarly.
22157         (format_none): Accept unnamed vr_values parameter.
22158         (format_percent, format_floating, format_character): Similarly.
22159         (format_string, format_plain): Similarly.
22160         * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
22161         the EVRP range analyzer for range data rather than using global data.
22162         * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
22163         gimple-ssa-evrp-analyze.h
22164         (class sprintf_dom_walker): Add after_dom_children member function.
22165         Add evrp_range_analyzer member.
22166         (sprintf_dom_walker::before_dom_children): Call into the EVRP
22167         range analyzer as needed.
22168         (sprintf_dom_walker::after_dom_children): New member function.
22169         * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
22170         if not optimizing.
22171         (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
22172         (evrp_range_analyzer::pop_to_marker): Likewise.
22174 2018-02-20  Richard Sandiford  <richard.sandiford@linaro.org>
22176         PR tree-optimization/84419
22177         * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
22178         with the required type if its current type is compatible but
22179         different.
22181 2018-02-20  Jakub Jelinek  <jakub@redhat.com>
22183         PR middle-end/82004
22184         * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
22185         after vectorization.
22187 2018-02-20  Martin Liska  <mliska@suse.cz>
22189         PR driver/83193
22190         * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
22191         possible values if we don't have a hint.
22193 2018-02-20  Martin Liska  <mliska@suse.cz>
22195         PR c/84310
22196         PR target/79747
22197         * final.c (shorten_branches): Build align_tab array with one
22198         more element.
22199         * opts.c (finish_options): Add alignment option limit check.
22200         (MAX_CODE_ALIGN): Likewise.
22201         (MAX_CODE_ALIGN_VALUE): Likewise.
22202         * doc/invoke.texi: Document maximum allowed option value for
22203         all -falign-* options.
22205 2018-02-19  Jakub Jelinek  <jakub@redhat.com>
22207         PR target/84146
22208         * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
22209         * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
22210         * var-tracking.c (emit_note_insn_var_location): Remove all references
22211         to NOTE_INSN_CALL_ARG_LOCATION.
22212         (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
22213         the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
22214         Use copy_rtx_if_shared.
22215         * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
22216         NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
22217         (dwarf2out_var_location): Remove handling of
22218         NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
22219         on call_insn.
22220         * final.c (final_scan_insn): Remove all references to
22221         NOTE_INSN_CALL_ARG_LOCATION.
22222         (rest_of_clean_state): Likewise.  Remove REG_CALL_ARG_LOCATION notes
22223         before dumping final insns.
22224         * except.c (emit_note_eh_region_end): Remove all references to
22225         NOTE_INSN_CALL_ARG_LOCATION.
22226         * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
22227         * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
22228         * config/arc/arc.c (hwloop_optimize): Likewise.
22229         * config/arm/arm.c (create_fix_barrier): Likewise.
22230         * config/s390/s390.c (s390_chunkify_start): Likewise.
22231         * config/sh/sh.c (find_barrier): Likewise.
22232         * config/i386/i386.c (rest_of_insert_endbranch,
22233         ix86_seh_fixup_eh_fallthru): Likewise.
22234         * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
22235         * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
22236         * config/frv/frv.c (frv_function_prologue): Likewise.
22237         * emit-rtl.c (try_split): Likewise.  Copy over REG_CALL_ARG_LOCATION
22238         reg note.
22239         (note_outside_basic_block_p): Remove all references to
22240         NOTE_INSN_CALL_ARG_LOCATION.
22241         * gengtype.c (adjust_field_rtx_def): Likewise.
22242         * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
22243         Likewise.
22244         * jump.c (cleanup_barriers, delete_related_insns): Likewise.
22245         * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
22247         PR c++/84444
22248         * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
22249         is ADDR_EXPR.
22251         PR tree-optimization/84452
22252         * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
22253         expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
22254         is NULL.
22256 2018-02-19  Martin Liska  <mliska@suse.cz>
22258         PR sanitizer/82183
22259         * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
22261 2018-02-19  Martin Liska  <mliska@suse.cz>
22262             Richard Sandiford  <richard.sandiford@linaro.org>
22264         PR tree-optimization/82491
22265         * gimple-fold.c (get_base_constructor): Make earlier bail out
22266         to prevent ubsan.
22268 2018-02-19  Carl Love  <cel@us.ibm.com>
22270         * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
22271         BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
22272         BU_P8V_OVERLOAD_1.
22273         * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
22274         P8V_BUILTIN_VEC_NEG.
22276 2018-02-19  Sebastian Perta  <sebastian.perta@renesas.com>
22278         * config/rl78/rl78.md (movdf): New define expand.
22280 2018-02-19  Martin Liska  <mliska@suse.cz>
22282         PR other/80589
22283         * doc/invoke.texi: Fix typo.
22284         * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
22286 2018-02-18  Segher Boessenkool  <segher@kernel.crashing.org>
22288         * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
22289         handle rs6000_single_float and rs6000_double_float specially for
22290         e500 family CPUs.
22292 2018-02-16  Jeff Law  <law@redhat.com>
22294         * config/rx/rx.c (add_pop_cfi_notes): New function.;
22295         (pop_regs): Use it.
22297 2018-02-16  Jakub Jelinek  <jakub@redhat.com>
22299         PR ipa/84425
22300         * ipa-inline.c (inline_small_functions): Fix a typo.
22302 2018-02-16  Nathan Sidwell  <nathan@acm.org>
22304         * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
22306 2018-02-16  Carl Love  <cel@us.ibm.com>
22308         * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
22309         Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
22310         from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
22311         * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
22312         expansion to P8V_BUILTIN_VEC_FLOAT2.
22314 2018-02-16  Vladimir Makarov  <vmakarov@redhat.com>
22316         PR rtl-optimization/70023
22317         * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
22318         src_regno into account.
22320 2018-02-16  Carl Love  <cel@us.ibm.com>
22322         * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
22323         * config/rs6000/rs6000-builtin.def: Remove macro expansion for
22324         VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
22325         * config/rs6000/rs6000.c: Remove case statements for
22326         P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
22327         P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
22328         and P9V_BUILTIN_VEC_VINSERT4B.
22329         * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
22330         P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
22331         * config/rs6000/vsx.md:
22332         * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
22333         vec_insert4b.
22335 2018-02-16  Carl Love  <cel@us.ibm.com>
22337         * config/rs6000/altivec.h: Add builtin names vec_extract4b
22338         vec_insert4b.
22339         * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
22340         definitions.
22341         * config/rs6000/rs6000-c.c: Add the definitions for
22342         P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
22343         * config/rs6000/rs6000.c (altivec_expand_builtin): Add
22344         P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
22345         * config/rs6000/vsx.md: Add define_insn extract4b.  Add define_expand
22346         definition for insert4b and define insn *insert3b_internal.
22347         * doc/extend.texi: Add documentation for vec_extract4b.
22349 2018-02-16  Nathan Sidwell  <nathan@acm.org>
22351         * doc/extend.texi (Backwards Compatibility): Mention friend
22352         injection.  Note for-scope is deprecated.
22353         * doc/invoke.texi (-ffriend-injection): Deprecate.
22355 2018-02-16  Segher Boessenkool  <segher@kernel.crashing.org>
22357         * combine.c (try_combine): When adjusting LOG_LINKS for the destination
22358         that moved to I2, also allow destinations that are a paradoxical
22359         subreg (instead of a normal reg).
22361 2018-02-16  Oleg Endo  <olegendo@gcc.gnu.org>
22363         PR target/83831
22364         * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
22365         to QImode.
22367 2018-02-16  Richard Biener  <rguenther@suse.de>
22369         PR tree-optimization/84037
22370         PR tree-optimization/84016
22371         PR target/82862
22372         * config/i386/i386.c (ix86_builtin_vectorization_cost):
22373         Adjust vec_construct for the fact we need additional higher latency
22374         128bit inserts for AVX256 and AVX512 vector builds.
22375         (ix86_add_stmt_cost): Scale vector construction cost for
22376         elementwise loads.
22378 2018-02-16  Richard Biener  <rguenther@suse.de>
22380         PR tree-optimization/84417
22381         * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
22382         the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
22383         (non_rewritable_lvalue_p): Likewise, use poly-ints.
22385 2018-02-16  Martin Liska  <mliska@suse.cz>
22387         PR sanitizer/84307
22388         * internal-fn.def (ASAN_CHECK): Set proper flags.
22389         (ASAN_MARK): Likewise.
22391 2018-02-16  Julia Koval  <julia.koval@intel.com>
22393         * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
22394         from PTA_CANNONLAKE.
22396 2018-02-16  Jakub Jelinek  <jakub@redhat.com>
22398         PR target/84272
22399         * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
22400         Use ++iter rather than iter++ for std::list iterators.
22401         (func_fma_steering::dfs): Likewise.  Don't delete nodes right away,
22402         defer deleting them until all nodes in the forest are processed.  Do
22403         free even leaf nodes.  Change to_process into auto_vec.
22405         PR bootstrap/84405
22406         * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
22407         * vec.h (vec_default_construct): Use memset instead of placement new
22408         if BROKEN_VALUE_INITIALIZATION is defined.
22409         * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
22410         memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
22411         is defined.
22413         PR rtl-optimization/83723
22414         * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
22415         * lra.c (lra_substitute_pseudo): Likewise.  If true, use
22416         gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG.  Pass DEBUG_P to
22417         recursive calls.
22418         (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
22419         callers.
22420         * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
22422 2018-02-16  Eric Botcazou  <ebotcazou@adacore.com>
22424         PR rtl-optimization/81443
22425         * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
22426         from inner REGs to paradoxical SUBREGs.
22428 2018-02-16  Richard Biener  <rguenther@suse.de>
22430         PR tree-optimization/84399
22431         * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
22432         For operands we can analyze at their definition make sure we can
22433         analyze them at each use as well.
22435 2018-02-16  Richard Biener  <rguenther@suse.de>
22437         PR tree-optimization/84190
22438         * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
22439         volatile accesses if the decl isn't volatile.
22441 2018-02-15  Jason Merrill  <jason@redhat.com>
22443         PR c++/84314 - ICE with templates and fastcall attribute.
22444         * attribs.c (build_type_attribute_qual_variant): Don't clobber
22445         TYPE_CANONICAL on an existing type.
22447 2018-02-15  Jakub Jelinek  <jakub@redhat.com>
22449         PR tree-optimization/84383
22450         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
22451         dstoff nor call operand_equal_p if dstbase is NULL.
22453         PR tree-optimization/84334
22454         * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
22455         also a CONSTANT_CLASS_P, punt.
22457 2018-02-14  Jim Wilson  <jimw@sifive.com>
22459         * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
22460         first SMALL_OPERAND check.  New local min_second_step.  Move assert
22461         to where locals are set.  Add TARGET_RVC support.
22462         * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
22464 2018-02-14  Indu Bhagat  <indu.bhagat@oracle.com>
22466         * doc/invoke.texi: Correct -Wformat-overflow code sample.
22468 2018-02-14  Martin Sebor  <msebor@redhat.com>
22470         PR tree-optimization/83698
22471         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
22472         arrays constrain the offset range to their bounds.
22473         (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
22474         (builtin_access::overlap): Avoid setting the size of overlap if it's
22475         already been set.
22476         (maybe_diag_overlap): Also consider arrays when deciding what values
22477         of offsets to include in diagnostics.
22479 2018-02-14  Martin Sebor  <msebor@redhat.com>
22481         PR c/84108
22482         * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
22483         that correspond to the kind of a declaration.
22485 2018-02-14  John David Anglin  <danglin@gcc.gnu.org>
22487         PR target/83984
22488         * config/pa/pa.md: Load address of PIC label using the linkage table
22489         if the label is nonlocal.
22491 2018-02-14  Kelvin Nilsen  <kelvin@gcc.gnu.org>
22493         * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
22494         warning message if user requests -maltivec=be.
22495         * doc/invoke.texi: Document deprecation of -maltivec=be.
22497 2018-02-14  Will Schmidt  <will_schmidt@vnet.ibm.com>
22499         PR target/84220
22500         * config/rs6000/rs6000-c.c: Update definitions for
22501         ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
22502         VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
22504 2018-02-14  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
22506         PR target/84239
22507         * config/i386/cetintrin.h: Remove _rdssp[d|q] and
22508         add _get_ssp intrinsics. Remove argument from
22509         __builtin_ia32_rdssp[d|q].
22510         * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
22511         * config/i386/i386-builtin.def: Remove argument from
22512         __builtin_ia32_rdssp[d|q].
22513         * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
22514         ix86_expand_special_args_builtin for _rdssp[d|q].
22515         * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
22516         Clear register before usage.
22517         * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
22518         Add documentation for new _get_ssp and _inc_ssp intrinsics.
22520 2018-02-14  Richard Sandiford  <richard.sandiford@linaro.org>
22522         PR tree-optimization/84357
22523         * tree-data-ref.c (object_address_invariant_in_loop_p): Check
22524         operand 1 of an ARRAY_REF too.
22526 2018-02-14  Oleg Endo  <olegendo@gcc.gnu.org>
22528         PR target/83831
22529         * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
22530         rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
22531         declarations.
22532         (set_of_reg): New struct.
22533         (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
22534         * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
22535         rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
22536         functions.
22537         * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
22538         Split into bitclr, bitset, bitinvert patterns if appropriate.
22539         (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
22540         use rx_fuse_in_memory_bitop.
22541         (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
22542         to named insn, correct maximum insn length.
22544 2018-02-14  Jozef Lawrynowicz  <jozefl.gcc@gmail.com>
22546         PR target/79242
22547         * machmode.def: Define a complex mode for PARTIAL_INT.
22548         * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
22549         MODE_PARTIAL_INT.
22550         * doc/rtl.texi: Document CSPImode.
22551         * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
22552         handling.
22553         (msp430_hard_regno_nregs_with_padding): Likewise.
22555 2018-02-13  Peter Bergner  <bergner@vnet.ibm.com>
22557         PR target/84279
22558         * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
22560 2018-02-13  Segher Boessenkool  <segher@kernel.crashing.org>
22562         PR rtl-optimization/84169
22563         * combine.c (try_combine): New variable split_i2i3.  Set it to true if
22564         we generated a parallel as new i3 and we split that to new i2 and i3
22565         instructions.  Handle split_i2i3 similar to swap_i2i3: scan the
22566         LOG_LINKs of i3 to see which of those need to link to i2 now.  Link
22567         those to i2, not i1.  Partially rewrite this scan code.
22569 2018-02-13  Jakub Jelinek  <jakub@redhat.com>
22571         PR c/82210
22572         * stor-layout.c (place_field): For variable length fields, adjust
22573         offset_align afterwards not just based on the field's alignment,
22574         but also on the size.
22576         PR middle-end/84309
22577         * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
22578         of exps and logs in the use_exp2 case.
22580 2018-02-13  Jeff Law  <law@redhat.com>
22582         * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
22583         entry for "vector".
22585         * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
22586         ARGS as unused.
22588 2018-02-13  Alexandre Oliva  <aoliva@redhat.com>
22590         PR debug/84342
22591         PR debug/84319
22592         * common.opt (gas-loc-support, gas-locview-support): New.
22593         (ginline-points, ginternal-reset-location-views): New.
22594         * doc/invoke.texi: Document them.  Use @itemx where intended.
22595         (gvariable-location-views): Adjust.
22596         * target.def (reset_location_view): New.
22597         * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
22598         (TARGET_RESET_LOCATION_VIEW): New.
22599         * doc/tm.texi: Rebuilt.
22600         * dwarf2out.c (dwarf2out_default_as_loc_support): New.
22601         (dwarf2out_default_as_locview_support): New.
22602         (output_asm_line_debug_info): Use option variables.
22603         (dwarf2out_maybe_output_loclist_view_pair): Likewise.
22604         (output_loc_list): Likewise.
22605         (add_high_low_attributes): Check option variables.
22606         Don't output entry view attribute in strict mode.
22607         (gen_inlined_subroutine_die): Check option variables.
22608         (dwarf2out_inline_entry): Likewise.
22609         (init_sections_and_labels): Likewise.
22610         (dwarf2out_early_finish): Likewise.
22611         (maybe_reset_location_view): New, from...
22612         (dwarf2out_var_location): ... here.  Call it.
22613         * debug.h (dwarf2out_default_as_loc_support): Declare.
22614         (dwarf2out_default_as_locview_support): Declare.
22615         * hooks.c (hook_int_rtx_insn_0): New.
22616         * hooks.h (hook_int_rtx_insn_0): Declare.
22617         * toplev.c (process_options): Take -gas-loc-support and
22618         -gas-locview-support from dwarf2out.  Enable
22619         -gvariable-location-views by default only with locview
22620         assembler support.  Enable -ginternal-reset-location-views by
22621         default only if the target defines the corresponding hook.
22622         Enable -ginline-points by default if location views are
22623         enabled; force it disabled if statement frontiers are
22624         disabled.
22625         * tree-inline.c (expand_call_inline): Check option variables.
22626         * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
22628 2018-02-13  Richard Sandiford  <richard.sandiford@linaro.org>
22630         PR tree-optimization/84321
22631         * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
22632         handling.  Also check whether the anti-range contains any values
22633         that satisfy the mask; switch to a VR_RANGE if not.
22635 2018-02-13  Paolo Bonzini  <bonzini@gnu.org>
22637         PR sanitizer/84340
22638         * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
22640 2018-02-13  Martin Jambor  <mjambor@suse.cz>
22642         PR c++/83990
22643         * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
22644         of call statements, also set location of a load to a temporary.
22646 2018-02-13  Sebastian Perta  <sebastian.perta@renesas.com>
22648         * config/rl78/rl78.c (add_vector_labels): New function.
22649         * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
22650         * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
22651         * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
22652         which checks that no arguments are passed.
22653         * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
22654         * doc/extend.texi: Documentation for the new attribute.
22656 2018-02-13  Andreas Schwab  <schwab@suse.de>
22658         * config/riscv/linux.h (CPP_SPEC): Define.
22660 2018-02-13  Jakub Jelinek  <jakub@redhat.com>
22662         PR target/84335
22663         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
22664         OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
22665         OPTION_MASK_ISA_AES as first argument to def_builtin_const
22666         for AES builtins.  Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
22667         instead of OPTION_MASK_ISA_PCLMUL as first argument to
22668         def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
22669         * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
22670         temporarily for AES and PCLMUL builtins.
22672         PR tree-optimization/84339
22673         * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
22674         ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
22675         Formatting fixes.
22677         PR middle-end/84309
22678         * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
22679         exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
22680         * generic-match-head.c (canonicalize_math_after_vectorization_p): New
22681         inline function.
22682         * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
22683         inline function.
22684         * omp-simd-clone.h: New file.
22685         * omp-simd-clone.c: Include omp-simd-clone.h.
22686         (expand_simd_clones): No longer static.
22687         * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
22688         cgraph.h and omp-simd-clone.h.
22689         (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
22690         (vect_recog_widen_shift_pattern): Formatting fix.
22691         (vect_pattern_recog_1): Don't check optab for calls.
22693         PR target/84336
22694         * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
22695         operands[2] into a REG before using gen_lowpart on it.
22697 2018-02-12  Jeff Law  <law@redhat.com>
22699         PR target/83760
22700         * config/sh/sh.c (find_barrier): Consider a sibling call
22701         a barrier as well.
22703         * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
22704         successfully back substituting a reg.
22706 2018-02-12  Richard Biener  <rguenther@suse.de>
22708         PR tree-optimization/84037
22709         * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
22710         parameter, move visited init to caller.
22711         (vect_slp_analyze_operations): Separate cost from validity
22712         check, initialize visited once for all instances.
22713         (vect_schedule_slp): Analyze map to CSE vectorized nodes once
22714         for all instances.
22715         * tree-vect-stmts.c (vect_model_simple_cost): Make early
22716         out an assert.
22717         (vect_model_promotion_demotion_cost): Likewise.
22718         (vectorizable_bswap): Guard cost modeling with !slp_node
22719         instead of !PURE_SLP_STMT to avoid double-counting on hybrid
22720         SLP stmts.
22721         (vectorizable_call): Likewise.
22722         (vectorizable_conversion): Likewise.
22723         (vectorizable_assignment): Likewise.
22724         (vectorizable_shift): Likewise.
22725         (vectorizable_operation): Likewise.
22726         (vectorizable_store): Likewise.
22727         (vectorizable_load): Likewise.
22728         (vectorizable_condition): Likewise.
22729         (vectorizable_comparison): Likewise.
22731 2018-02-12  Paolo Bonzini  <bonzini@gnu.org>
22733         PR sanitizer/84307
22734         * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
22735         (ASAN_MARK): Fix fnspec to account for return value, change pointer
22736         argument from 'R' to 'W' so that the pointed-to datum is clobbered.
22738 2018-02-08  Jan Hubicka  <hubicka@ucw.cz>
22740         PR middle-end/83665
22741         * params.def (inline-min-speedup): Increase from 8 to 15.
22742         (max-inline-insns-auto): Decrease from 40 to 30.
22743         * ipa-split.c (consider_split): Add some buffer for function to
22744         be considered inlining candidate.
22745         * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
22746         default values.
22748 2018-02-12  Richard Biener  <rguenther@suse.de>
22750         PR tree-optimization/84037
22751         * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
22752         matched stmts if we cannot swap the non-matched ones.
22754 2018-02-12  Olga Makhotina  <olga.makhotina@intel.com>
22756         * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
22757         _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
22758         _mm_maskz_scalef_round_ss): New intrinsics.
22759         (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
22760         * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
22761         __builtin_ia32_scalefss_round): Remove.
22762         (__builtin_ia32_scalefsd_mask_round,
22763         __builtin_ia32_scalefss_mask_round): New intrinsics.
22764         * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
22765         (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
22766         ((match_operand:VF_128 2 "<round_nimm_predicate>"
22767         "<round_constraint>")): Changed to ...
22768         ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
22769         "<round_scalar_constraint>")): ... this.
22770         ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
22771         %0, %1, %2<round_op3>}"): Changed to ...
22772         ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
22773         %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
22774         %2<round_scalar_mask_op3>}"): ... this.
22775         * config/i386/subst.md (round_scalar_nimm_predicate): New.
22777 2018-02-12  Olga Makhotina  <olga.makhotina@intel.com>
22779         * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
22780         (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
22781         (_mm_maskz_sqrt_round_ss): New intrinsics.
22782         (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
22783         (__builtin_ia32_sqrtsd_mask_round)
22784         (__builtin_ia32_sqrtss_mask_round): New builtins.
22785         * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
22786         (__builtin_ia32_sqrtss_round): Remove.
22787         (__builtin_ia32_sqrtsd_mask_round)
22788         (__builtin_ia32_sqrtss_mask_round): New builtins.
22789         * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
22790         (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
22791         ((match_operand:VF_128 1 "vector_operand"
22792         "xBm,<round_constraint>")): Changed to ...
22793         ((match_operand:VF_128 1 "vector_operand"
22794         "xBm,<round_scalar_constraint>")): ... this.
22795         (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
22796         %0, %2, %<iptr>1<round_op3>}): Changed to ...
22797         (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
22798         %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
22799         %<iptr>1<round_scalar_mask_op3>}): ... this.
22800         ((set_attr "prefix" "<round_prefix>")): Changed to ...
22801         ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
22803 2018-02-11  Steven Munroe  <munroesj@gcc.gnu.org>
22805         PR target/84266
22806         * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
22807         Cast vec_cmpeq result to correct type.
22808         * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
22809         Cast vec_cmpgt result to correct type.
22811 2018-02-11  Alexandre Oliva  <aoliva@redhat.com>
22813         * final.c (final_scan_insn_1): Renamed from...
22814         (final_scan_insn): ... this.  New wrapper, to recover
22815         seen from the outermost call in recursive ones.
22816         * config/sparc/sparc.c (output_return): Drop seen from call.
22817         (output_sibcall): Likewise.
22818         * config/visium/visium.c (output_branch): Likewise.
22820 2018-02-10  John David Anglin  <danglin@gcc.gnu.org>
22822         * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
22823         function label.
22825 2018-02-10  Alan Modra  <amodra@gmail.com>
22827         PR target/84300
22828         * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
22829         Specify LR as an input.
22831 2018-02-10  Jakub Jelinek  <jakub@redhat.com>
22833         PR sanitizer/83987
22834         * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
22835         remove_member_access_dummy_vars): New functions.
22836         (lower_omp_for, lower_omp_taskreg, lower_omp_target,
22837         lower_omp_1, execute_lower_omp): Use them.
22839         PR rtl-optimization/84308
22840         * shrink-wrap.c (spread_components): Release todo vector.
22842 2018-02-09  Vladimir Makarov  <vmakarov@redhat.com>
22844         PR rtl-optimization/57193
22845         * ira-color.c (struct allocno_color_data): Add member
22846         conflict_allocno_hard_prefs.
22847         (update_conflict_allocno_hard_prefs): New.
22848         (bucket_allocno_compare_func): Add a preference based on
22849         conflict_allocno_hard_prefs.
22850         (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
22851         (color_allocnos): Remove a dead code.  Initiate
22852         conflict_allocno_hard_prefs.  Call update_costs_from_prefs.
22854 2018-02-09  Jakub Jelinek  <jakub@redhat.com>
22856         PR target/84226
22857         * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
22858         constraint from =wa to wa.  Avoid a subreg on the output operand,
22859         instead use a pseudo and subreg it in a move.
22860         (p9_xxbrd_<mode>): Changed to ...
22861         (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
22862         (p9_xxbrd_v2df): New expander.
22863         (p9_xxbrw_<mode>): Changed to ...
22864         (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
22865         (p9_xxbrw_v4sf): New expander.
22867 2018-02-09  Sebastian Perta  <sebastian.perta@renesas.com>
22869         * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
22871 2018-02-09  Peter Bergner  <bergner@vnet.ibm.com>
22873         PR target/83926
22874         * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
22875         multiply in 32-bit mode.
22876         (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
22877         (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
22878         mode.
22880 2018-02-09  Sebastian Perta  <sebastian.perta@renesas.com>
22882         * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
22883         to allow or block "symbol_ref" depending on the value of TARGET_JSR.
22884         * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
22885         * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
22887 2018-02-09  Pierre-Marie de Rodat  <derodat@adacore.com>
22889         PR lto/84213
22890         * dwarf2out.c (is_trivial_indirect_ref): New function.
22891         (dwarf2out_late_global_decl): Do not generate a location
22892         attribute for variables that have a non-trivial DECL_VALUE_EXPR
22893         and that are not defined in the current unit.
22895 2018-02-09  Eric Botcazou  <ebotcazou@adacore.com>
22897         * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
22898         instead of a libcall for UNORDERED.
22900 2018-02-09  Tamar Christina  <tamar.christina@arm.com>
22902         PR target/82641
22903         * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
22904         __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
22906 2018-02-09  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
22908         PR target/PR84295
22909         * config/s390/s390.c (s390_set_current_function): Invoke
22910         s390_indirect_branch_settings also if fndecl didn't change.
22912 2018-02-09  Alexandre Oliva  <aoliva@redhat.com>
22914         * config/rs6000/rs6000.md (blockage): Set length to zero.
22916 2018-02-09  Eric Botcazou  <ebotcazou@adacore.com>
22918         * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
22920 2018-02-09  Jakub Jelinek  <jakub@redhat.com>
22922         PR sanitizer/84285
22923         * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
22924         STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
22925         -static-lib*san.
22927         PR debug/84252
22928         * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
22929         PARALLEL incoming that failed vt_get_decl_and_offset check.
22931         PR middle-end/84237
22932         * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
22933         * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
22934         TREE_READONLY bit.
22935         (get_variable_section): For decls in named .bss* sections pass true as
22936         second argument to bss_initializer_p.
22938 2018-02-09  Marek Polacek  <polacek@redhat.com>
22939             Jakub Jelinek  <jakub@redhat.com>
22941         PR c++/83659
22942         * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
22943         Formatting fixes.  Verify first that tree_fits_poly_int64_p (op01).
22944         Sync some changes from cxx_fold_indirect_ref.
22946 2018-02-09  Alexandre Oliva  <aoliva@redhat.com>
22948         * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
22949         markers.
22950         * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
22951         (BLOCK_INLINE_ENTRY_LABEL): New.
22952         (dwarf2out_var_location): Disregard inline entry markers.
22953         (inline_entry_data): New struct.
22954         (inline_entry_data_hasher): New hashtable type.
22955         (inline_entry_data_hasher::hash): New.
22956         (inline_entry_data_hasher::equal): New.
22957         (inline_entry_data_table): New variable.
22958         (add_high_low_attributes): Add DW_AT_entry_pc and
22959         DW_AT_GNU_entry_view attributes if a pending entry is found
22960         in inline_entry_data_table.  Add old entry_pc attribute only
22961         if debug nonbinding markers are disabled.
22962         (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
22963         markers are enabled.
22964         (block_within_block_p, dwarf2out_inline_entry): New.
22965         (dwarf2out_finish): Check that no entries remained in
22966         inline_entry_data_table.
22967         * final.c (reemit_insn_block_notes): Handle inline entry notes.
22968         (final_scan_insn, notice_source_line): Likewise.
22969         (rest_of_clean_state): Skip inline entry markers.
22970         * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
22971         markers.
22972         * gimple.c (gimple_build_debug_inline_entry): New.
22973         * gimple.h (enum gimple_debug_subcode): Add
22974         GIMPLE_DEBUG_INLINE_ENTRY.
22975         (gimple_build_debug_inline_entry): Declare.
22976         (gimple_debug_inline_entry_p): New.
22977         (gimple_debug_nonbind_marker_p): Adjust.
22978         * insn-notes.def (INLINE_ENTRY): New.
22979         * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
22980         inline entry marker notes.
22981         (print_insn): Likewise.
22982         * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
22983         (INSN_DEBUG_MARKER_KIND): Likewise.
22984         (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
22985         * tree-inline.c (expand_call_inline): Build and insert
22986         debug_inline_entry stmt.
22987         * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
22988         inline entry blocks early, if nonbind markers are enabled.
22989         (dump_scope_block): Dump fragment info.
22990         * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
22991         * doc/gimple.texi (gimple_debug_inline_entry_p): New.
22992         (gimple_build_debug_inline_entry): New.
22993         * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
22994         Enable/disable inline entry points too.
22995         * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
22996         (DEBUG_INSN): Describe inline entry markers.
22998         * common.opt (gvariable-location-views): New.
22999         (gvariable-location-views=incompat5): New.
23000         * config.in: Rebuilt.
23001         * configure: Rebuilt.
23002         * configure.ac: Test assembler for view support.
23003         * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
23004         * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
23005         * dwarf2out.c (var_loc_view): New typedef.
23006         (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
23007         (dwarf2out_locviews_in_attribute): New.
23008         (dwarf2out_locviews_in_loclist): New.
23009         (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
23010         (enum dw_line_info_opcode): Add LI_adv_address.
23011         (struct dw_line_info_table): Add view.
23012         (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
23013         (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
23014         (zero_view_p): New variable.
23015         (ZERO_VIEW_P): New macro.
23016         (output_asm_line_debug_info): New.
23017         (struct var_loc_node): Add view.
23018         (add_AT_view_list, AT_loc_list): New.
23019         (add_var_loc_to_decl): Add view param.  Test it against last.
23020         (new_loc_list): Add view params.  Record them.
23021         (AT_loc_list_ptr): Handle loc and view lists.
23022         (view_list_to_loc_list_val_node): New.
23023         (print_dw_val): Handle dw_val_class_view_list.
23024         (size_of_die): Likewise.
23025         (value_format): Likewise.
23026         (loc_list_has_views): New.
23027         (gen_llsym): Set vl_symbol too.
23028         (maybe_gen_llsym, skip_loc_list_entry): New.
23029         (dwarf2out_maybe_output_loclist_view_pair): New.
23030         (output_loc_list): Output view list or entries too.
23031         (output_view_list_offset): New.
23032         (output_die): Handle dw_val_class_view_list.
23033         (output_dwarf_version): New.
23034         (output_compilation_unit_header): Use it.
23035         (output_skeleton_debug_sections): Likewise.
23036         (output_rnglists, output_line_info): Likewise.
23037         (output_pubnames, output_aranges): Update version comments.
23038         (output_one_line_info_table): Output view numbers in asm comments.
23039         (dw_loc_list): Determine current endview, pass it to new_loc_list.
23040         Call maybe_gen_llsym.
23041         (loc_list_from_tree_1): Adjust.
23042         (add_AT_location_description): Create view list attribute if
23043         needed, check it's absent otherwise.
23044         (convert_cfa_to_fb_loc_list): Adjust.
23045         (maybe_emit_file): Call output_asm_line_debug_info for test.
23046         (dwarf2out_var_location): Reset views as needed.  Precompute
23047         add_var_loc_to_decl args.  Call get_attr_min_length only if we have the
23048         attribute.  Set view.
23049         (new_line_info_table): Reset next view.
23050         (set_cur_line_info_table): Call output_asm_line_debug_info for test.
23051         (dwarf2out_source_line): Likewise.  Output view resets and labels to
23052         the assembler, or select appropriate line info opcodes.
23053         (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
23054         (optimize_string_length): Catch it.  Adjust.
23055         (resolve_addr): Copy vl_symbol along with ll_symbol.  Handle
23056         dw_val_class_view_list, and remove it if no longer needed.
23057         (hash_loc_list): Hash view numbers.
23058         (loc_list_hasher::equal): Compare them.
23059         (optimize_location_lists): Check whether a view list symbol is
23060         needed, and whether the locview attribute is present, and
23061         whether they match.  Remove the locview attribute if no longer
23062         needed.
23063         (index_location_lists): Call skip_loc_list_entry for test.
23064         (dwarf2out_finish): Call output_asm_line_debug_info for test.
23065         Use output_dwarf_version.
23066         * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
23067         (struct dw_val_node): Add val_view_list.
23068         * final.c (SEEN_NEXT_VIEW): New.
23069         (set_next_view_needed): New.
23070         (clear_next_view_needed): New.
23071         (maybe_output_next_view): New.
23072         (final_start_function): Rename to...
23073         (final_start_function_1): ... this.  Take pointer to FIRST,
23074         add SEEN parameter.  Emit param bindings in the initial view.
23075         (final_start_function): Reintroduce SEEN-less interface.
23076         (final): Rename to...
23077         (final_1): ... this.  Take SEEN parameter.  Output final pending
23078         next view at the end.
23079         (final): Reintroduce seen-less interface.
23080         (final_scan_insn): Output pending next view before switching
23081         sections or ending a block.  Mark the next view as needed when
23082         outputting variable locations.  Notify debug backend of section
23083         changes, and of location view changes.
23084         (rest_of_handle_final): Adjust.
23085         * toplev.c (process_options): Autodetect value for debug variable
23086         location views option.  Warn on incompat5 without -gdwarf-5.
23087         * doc/invoke.texi (gvariable-location-views): New.
23088         (gvariable-location-views=incompat5): New.
23089         (gno-variable-location-views): New.
23091 2018-02-08  David Malcolm  <dmalcolm@redhat.com>
23093         PR tree-optimization/84136
23094         * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
23095         that the result of find_edge is non-NULL.
23097 2018-02-08  Sergey Shalnov  <sergey.shalnov@intel.com>
23099         PR target/83008
23100         * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
23101         storing integer register in SImode.  Fix cost of 256 and 512
23102         byte aligned SSE register store.
23104 2018-02-08  Sergey Shalnov  <sergey.shalnov@intel.com>
23106         * config/i386/i386.c (ix86_multiplication_cost): Fix
23107         multiplication cost for TARGET_AVX512DQ.
23109 2018-02-08  Marek Polacek  <polacek@redhat.com>
23111         PR tree-optimization/84238
23112         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
23113         get_range_strlen.
23115 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
23117         PR tree-optimization/84265
23118         * tree-vect-stmts.c (vectorizable_store): Don't treat
23119         VMAT_CONTIGUOUS accesses as grouped.
23120         (vectorizable_load): Likewise.
23122 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
23124         PR tree-optimization/81635
23125         * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
23126         * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
23127         (test_round_for_mask): New functions.
23128         (wide_int_cc_tests): Call test_round_for_mask.
23129         * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
23130         * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
23131         * tree-data-ref.c (split_constant_offset_1): Use it to refine the
23132         range returned by get_range_info.
23134 2018-02-08  Jan Hubicka  <hubicka@ucw.cz>
23136         PR ipa/81360
23137         * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
23138         * symtab.c: Include builtins.h
23139         (symtab_node::output_to_lto_symbol_table_p): Move here
23140         from lto-streamer-out.c:output_symbol_p.
23141         * lto-streamer-out.c (write_symbol): Turn early exit to assert.
23142         (output_symbol_p): Move all logic to symtab.c
23143         (produce_symtab): Update.
23145 2018-02-08  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
23147         * config/s390/s390-opts.h (enum indirect_branch): Define.
23148         * config/s390/s390-protos.h (s390_return_addr_from_memory)
23149         (s390_indirect_branch_via_thunk)
23150         (s390_indirect_branch_via_inline_thunk): Add function prototypes.
23151         (enum s390_indirect_branch_type): Define.
23152         * config/s390/s390.c (struct s390_frame_layout, struct
23153         machine_function): Remove.
23154         (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
23155         (indirect_branch_table_label_no, indirect_branch_table_name):
23156         Define variables.
23157         (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
23158         (enum s390_indirect_branch_option): Define.
23159         (s390_return_addr_from_memory): New function.
23160         (s390_handle_string_attribute): New function.
23161         (s390_attribute_table): Add new attribute handler.
23162         (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
23163         (s390_indirect_branch_via_thunk): New function.
23164         (s390_indirect_branch_via_inline_thunk): New function.
23165         (s390_function_ok_for_sibcall): When jumping via thunk disallow
23166         sibling call optimization for non z10 compiles.
23167         (s390_emit_call): Force indirect branch target to be a single
23168         register.  Add r1 clobber for non-z10 compiles.
23169         (s390_emit_epilogue): Emit return jump via return_use expander.
23170         (s390_reorg): Handle JUMP_INSNs as execute targets.
23171         (s390_option_override_internal): Perform validity checks for the
23172         new command line options.
23173         (s390_indirect_branch_attrvalue): New function.
23174         (s390_indirect_branch_settings): New function.
23175         (s390_set_current_function): Invoke s390_indirect_branch_settings.
23176         (s390_output_indirect_thunk_function):  New function.
23177         (s390_code_end): Implement target hook.
23178         (s390_case_values_threshold): Implement target hook.
23179         (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
23180         macros.
23181         * config/s390/s390.h (struct s390_frame_layout)
23182         (struct machine_function): Move here from s390.c.
23183         (TARGET_INDIRECT_BRANCH_NOBP_RET)
23184         (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
23185         (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
23186         (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
23187         (TARGET_INDIRECT_BRANCH_NOBP_CALL)
23188         (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
23189         (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
23190         (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
23191         (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
23192         * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
23193         (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
23194         (mnemonic attribute): Add values which aren't recognized
23195         automatically.
23196         ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
23197         pattern for branch conversion.  Fix mnemonic attribute.
23198         ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
23199         indirect branch via thunk if requested.
23200         ("indirect_jump", "<code>"): Expand patterns for branch conversion.
23201         ("*indirect_jump"): Disable for branch conversion using out of
23202         line thunks.
23203         ("indirect_jump_via_thunk<mode>_z10")
23204         ("indirect_jump_via_thunk<mode>")
23205         ("indirect_jump_via_inlinethunk<mode>_z10")
23206         ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
23207         ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
23208         ("casesi_jump_via_inlinethunk<mode>_z10")
23209         ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
23210         ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
23211         ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
23212         ("*indirect2_jump"): Disable for branch conversion.
23213         ("casesi_jump"): Turn into expander and expand patterns for branch
23214         conversion.
23215         ("return_use"): New expander.
23216         ("*return"): Emit return via thunk and rename it to ...
23217         ("*return<mode>"): ... this one.
23218         * config/s390/s390.opt: Add new options and and enum for the
23219         option values.
23221 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
23223         * lra-constraints.c (match_reload): Unconditionally use
23224         gen_lowpart_SUBREG, rather than selecting between that
23225         and equivalent gen_rtx_SUBREG code.
23227 2018-02-08  Richard Biener  <rguenther@suse.de>
23229         PR tree-optimization/84233
23230         * tree-ssa-phiprop.c (propagate_with_phi): Use separate
23231         changed flag instead of boguously re-using phi_inserted.
23233 2018-02-08  Martin Jambor  <mjambor@suse.cz>
23235         * hsa-gen.c (get_symbol_for_decl): Set program allocation for
23236         static local variables.
23238 2018-02-08  Richard Biener  <rguenther@suse.de>
23240         PR tree-optimization/84278
23241         * tree-vect-stmts.c (vectorizable_store): When looking for
23242         smaller vector types to perform grouped strided loads/stores
23243         make sure the mode is supported by the target.
23244         (vectorizable_load): Likewise.
23246 2018-02-08  Wilco Dijkstra  <wdijkstr@arm.com>
23248         * config/aarch64/aarch64.c (aarch64_components_for_bb):
23249         Increase LDP/STP opportunities by adding adjacent callee-saves.
23251 2018-02-08  Wilco Dijkstra  <wdijkstr@arm.com>
23253         PR rtl-optimization/84068
23254         PR rtl-optimization/83459
23255         * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
23257 2018-02-08  Aldy Hernandez  <aldyh@redhat.com>
23259         PR tree-optimization/84224
23260         * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
23261         * calls.c (gimple_alloca_call_p): Only return TRUE when we have
23262         non-zero arguments.
23264 2018-02-07  Iain Sandoe  <iain@codesourcery.com>
23266         PR target/84113
23267         * config/rs6000/altivec.md (*restore_world): Remove LR use.
23268         * config/rs6000/predicates.md (restore_world_operation): Adjust op
23269         count, remove one USE.
23271 2018-02-07  Michael Meissner  <meissner@linux.vnet.ibm.com>
23273         * doc/install.texi (Configuration): Document the
23274         --with-long-double-format={ibm,ieee} PowerPC configuration
23275         options.
23277         PR target/84154
23278         * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
23279         Convert from define_expand to be define_insn_and_split.  Rework
23280         float/double/_Float128 conversions to QI/HI/SImode to work with
23281         both ISA 2.07 (power8) or ISA 3.0 (power9).  Fix regression where
23282         conversions to QI/HImode types did a store and then a load to
23283         truncate the value.  For conversions to VSX registers, don't split
23284         the insn, instead emit the code directly.  Use the code iterator
23285         any_fix to combine signed and unsigned conversions.
23286         (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
23287         (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
23288         (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
23289         (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
23290         (fix_<mode>di2_hw): Likewise.
23291         (fixuns_<mode>di2_hw): Likewise.
23292         (fix_<mode>si2_hw): Likewise.
23293         (fixuns_<mode>si2_hw): Likewise.
23294         (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
23295         (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
23296         (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
23297         fix<uns>_trunc<SFDF:mode>si2_p8.
23298         (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer used.
23299         (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
23300         (fix<uns>_<mode>_mem): Likewise.
23301         (fctiw<u>z_<mode>_mem): Likewise.
23302         (fix<uns>_<mode>_mem): Likewise.
23303         (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
23304         the register allocator from doing a direct move to the GPRs to do
23305         a store, and instead use the ISA 3.0 store byte/half-word from
23306         vector register instruction.  For IEEE 128-bit floating point,
23307         also optimize stores of 32-bit ints.
23308         (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
23310 2018-02-07  Alan Hayward  <alan.hayward@arm.com>
23312         * genextract.c (push_pathstr_operand): New function to support
23313         [a-zA-Z].
23314         (walk_rtx): Call push_pathstr_operand.
23315         (print_path): Support [a-zA-Z].
23317 2018-02-07  Richard Biener  <rguenther@suse.de>
23319         PR tree-optimization/84037
23320         * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
23321         (cse_and_gimplify_to_preheader): Declare.
23322         (vect_get_place_in_interleaving_chain): Likewise.
23323         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
23324         ivexpr_map.
23325         (_loop_vec_info::~_loop_vec_info): Delete it.
23326         (cse_and_gimplify_to_preheader): New function.
23327         * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
23328         * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
23329         (vectorizable_load): Likewise.  For grouped stores always base
23330         the IV on the first element.
23331         * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
23332         condition before gimplifying.
23334 2018-02-07  Jakub Jelinek  <jakub@redhat.com>
23336         * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
23337         *DIV_EXPR and *MOD_EXPR.
23339 2018-02-07  H.J. Lu  <hongjiu.lu@intel.com>
23341         PR target/84248
23342         * config/i386/i386.c (ix86_option_override_internal): Mask out
23343         the CF_SET bit when checking -fcf-protection.
23345 2018-02-07  Tom de Vries  <tom@codesourcery.com>
23347         PR libgomp/84217
23348         * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
23349         enough.
23351 2018-02-07  Richard Biener  <rguenther@suse.de>
23353         PR tree-optimization/84204
23354         * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
23355         this place.
23357         PR tree-optimization/84205
23358         * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
23359         special-case isl_ast_op_zdiv_r.
23361         PR tree-optimization/84223
23362         * graphite-scop-detection.c (gather_bbs::before_dom_children):
23363         Only add conditions from within the region.
23364         (gather_bbs::after_dom_children): Adjust.
23366 2018-02-07  Georg-Johann Lay  <avr@gjlay.de>
23368         PR target/84209
23369         * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
23370         * config/avr/avr.md: Only post-reload split REG-REG moves if
23371         either register is GENERAL_REG_P.
23373 2018-02-07  Jakub Jelinek  <jakub@redhat.com>
23375         PR tree-optimization/84235
23376         * tree-ssa-scopedtables.c
23377         (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
23378         if the subtraction is performed in floating point type where NaNs are
23379         honored.  For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
23380         build 1.  Formatting fix.
23382 2018-02-06  Jakub Jelinek  <jakub@redhat.com>
23384         PR target/84146
23385         * config/i386/i386.c (rest_of_insert_endbranch): Only skip
23386         NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
23387         and skip it regardless of bb boundaries.  Use CALL_P macro,
23388         don't test INSN_P (insn) together with CALL_P or JUMP_P check
23389         unnecessarily, formatting fix.
23391 2018-02-06  Michael Collison  <michael.collison@arm.com>
23393         * config/arm/thumb2.md:
23394         (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
23395         (*thumb_mov_notscc): Ditto.
23397 2018-02-06  Michael Meissner  <meissner@linux.vnet.ibm.com>
23399         PR target/84154
23400         * config/rs6000/rs6000.md (su code attribute): Use "u" for
23401         unsigned_fix, not "s".
23403 2018-02-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
23405         * configure.ac (gcc_fn_eh_frame_ro): New function.
23406         (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
23407         correct .eh_frame permissions.
23408         * configure: Regenerate.
23410 2018-02-06  Andrew Jenner  <andrew@codeourcery.com>
23412         * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
23413         irrelevant options.
23415 2018-02-06  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
23417         * config/rs6000/rs6000.c (rs6000_option_override_internal):
23418         Display warning message for -mno-speculate-indirect-jumps.
23420 2018-02-06  Andrew Jenner  <andrew@codesourcery.com>
23422         * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
23423         Undocumented.
23424         * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
23426 2018-02-06  Aldy Hernandez  <aldyh@redhat.com>
23428         PR tree-optimization/84225
23429         * tree-eh.c (find_trapping_overflow): Only call
23430         operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
23432 2018-02-06  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
23434         PR target/84145
23435         * config/i386/i386.c: Reimplement the check of possible options
23436         -mibt/-mshstk conbination. Change error messages.
23437         * doc/invoke.texi: Fix a typo: remove extra '='.
23439 2018-02-06  Marek Polacek  <polacek@redhat.com>
23441         PR tree-optimization/84228
23442         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
23444 2018-02-06  Tamar Christina  <tamar.christina@arm.com>
23446         PR target/82641
23447         * config/arm/arm.c (arm_print_asm_arch_directives): Record already
23448         emitted arch directives.
23449         * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
23450         __ARM_FEATURE_COPROC before changing architectures.
23452 2018-02-06  Richard Biener  <rguenther@suse.de>
23454         * config/i386/i386.c (print_reg): Fix typo.
23455         (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
23457 2018-02-06  Eric Botcazou  <ebotcazou@adacore.com>
23459         * configure: Regenerate.
23461 2018-02-05  Martin Sebor  <msebor@redhat.com>
23463         PR tree-optimization/83369
23464         * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
23465         inlining context.
23467 2018-02-05  Martin Liska  <mliska@suse.cz>
23469         * doc/invoke.texi: Cherry-pick upstream r323995.
23471 2018-02-05  Richard Sandiford  <richard.sandiford@linaro.org>
23473         * ira.c (ira_init_register_move_cost): Adjust comment.
23475 2018-02-05  Martin Liska  <mliska@suse.cz>
23477         PR gcov-profile/84137
23478         * doc/gcov.texi: Fix typo in documentation.
23480 2018-02-05  Martin Liska  <mliska@suse.cz>
23482         PR gcov-profile/83879
23483         * doc/gcov.texi: Document necessity of --dynamic-list-data when
23484         using dlopen functionality.
23486 2018-02-05  Olga Makhotina  <olga.makhotina@intel.com>
23488         * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
23489         _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
23490         _mm_maskz_range_ss, _mm_mask_range_round_ss,
23491         _mm_maskz_range_round_ss): New intrinsics.
23492         (__builtin_ia32_rangesd128_round)
23493         (__builtin_ia32_rangess128_round): Remove.
23494         (__builtin_ia32_rangesd128_mask_round,
23495         __builtin_ia32_rangess128_mask_round): New builtins.
23496         * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
23497         __builtin_ia32_rangess128_round): Remove.
23498         (__builtin_ia32_rangesd128_mask_round,
23499         __builtin_ia32_rangess128_mask_round): New builtins.
23500         * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
23501         (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
23502         ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
23503         "<round_saeonly_constraint>")): Changed to ...
23504         ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
23505         "<round_saeonly_scalar_constraint>")): ... this.
23506         ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
23507         %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
23508         ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
23509         %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
23510         %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
23512 2018-02-02  Andrew Jenner  <andrew@codesourcery.com>
23514         * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
23515         options.
23516         * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
23517         Remove all values except native, 8540 and 8548.
23519 2018-02-02  H.J. Lu  <hongjiu.lu@intel.com>
23521         * config/i386/i386.c (ix86_output_function_return): Pass
23522         INVALID_REGNUM, instead of -1, as invalid register number to
23523         indirect_thunk_name and output_indirect_thunk.
23525 2018-02-02  Julia Koval  <julia.koval@intel.com>
23527         * config.gcc: Add -march=icelake.
23528         * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
23529         * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
23530         * config/i386/i386.c (processor_costs): Add m_ICELAKE.
23531         (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
23532         PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
23533         (processor_target_table): Add icelake.
23534         (ix86_option_override_internal): Handle new PTAs.
23535         (get_builtin_code_for_version): Handle icelake.
23536         (M_INTEL_COREI7_ICELAKE): New.
23537         (fold_builtin_cpu): Handle icelake.
23538         * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
23539         * doc/invoke.texi: Add -march=icelake.
23541 2018-02-02  Julia Koval  <julia.koval@intel.com>
23543         * config/i386/i386.c (ix86_option_override_internal): Change flags type
23544         to wide_int_bitmask.
23545         * wide-int-bitmask.h: New.
23547 2018-02-02  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
23549         PR target/84066
23550         * config/i386/i386.md: Replace Pmode with word_mode in
23551         builtin_setjmp_setup and builtin_longjmp to support x32.
23553 2018-02-01  Peter Bergner  <bergner@vnet.ibm.com>
23555         PR target/56010
23556         PR target/83743
23557         * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
23558         #include "opts.h".
23559         (rs6000_supported_cpu_names): New static variable.
23560         (linux_cpu_translation_table): Likewise.
23561         (elf_platform) <cpu>: Define new static variable and use it.
23562         Translate kernel AT_PLATFORM name to canonical name if needed.
23563         Error if platform name is unknown.
23565 2018-02-01  Aldy Hernandez  <aldyh@redhat.com>
23567         PR target/84089
23568         * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
23570 2018-02-01  Jeff Law  <law@redhat.com>
23572         PR target/84128
23573         * config/i386/i386.c (release_scratch_register_on_entry): Add new
23574         OFFSET and RELEASE_VIA_POP arguments.  Use SP+OFFSET to restore
23575         the scratch if RELEASE_VIA_POP is false.
23576         (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
23577         If we have to save a temporary register, decrement SIZE appropriately.
23578         Pass new arguments to release_scratch_register_on_entry.
23579         (ix86_adjust_stack_and_probe): Likewise.
23580         (ix86_emit_probe_stack_range): Pass new arguments to
23581         release_scratch_register_on_entry.
23583 2018-02-01  Uros Bizjak  <ubizjak@gmail.com>
23585         PR rtl-optimization/84157
23586         * combine.c (change_zero_ext): Use REG_P predicate in
23587         front of HARD_REGISTER_P predicate.
23589 2018-02-01  Georg-Johann Lay  <avr@gjlay.de>
23591         * config/avr/avr.c (avr_option_override): Move disabling of
23592         -fdelete-null-pointer-checks to...
23593         * common/config/avr/avr-common.c (avr_option_optimization_table):
23594         ...here.
23596 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
23598         PR tree-optimization/81635
23599         * tree-data-ref.c (split_constant_offset_1): For types that
23600         wrap on overflow, try to use range info to prove that wrapping
23601         cannot occur.
23603 2018-02-01  Renlin Li  <renlin.li@arm.com>
23605         PR target/83370
23606         * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
23607         TAILCALL_ADDR_REGS.
23608         (aarch64_register_move_cost): Likewise.
23609         * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
23610         TAILCALL_ADDR_REGS.
23611         (REG_CLASS_NAMES): Likewise.
23612         (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
23613         TAILCALL_ADDR_REGS. Remove IP registers.
23614         * config/aarch64/aarch64.md (Ucs): Update register constraint.
23616 2018-02-01  Richard Biener  <rguenther@suse.de>
23618         * domwalk.h (dom_walker::dom_walker): Add additional constructor
23619         for specifying RPO order and allow NULL for that.
23620         * domwalk.c (dom_walker::dom_walker): Likewise.
23621         (dom_walker::walk): Handle NULL RPO order.
23622         * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
23623         in RPO order.
23624         (rewrite_update_dom_walker): Likewise.
23625         (mark_def_dom_walker): Likewise.
23627 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
23629         * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
23630         (aarch64_maybe_expand_sve_subreg_move): Declare.
23631         * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
23632         * config/aarch64/predicates.md (aarch64_any_register_operand): New
23633         predicate.
23634         * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
23635         that are semantically a reverse operation.
23636         (*aarch64_sve_mov<mode>_subreg_be): New pattern.
23637         * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
23638         (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
23639         functions.
23640         (aarch64_can_change_mode_class): For big-endian, forbid changes
23641         between two SVE modes if they have different element sizes.
23643 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
23645         * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
23646         the TImode handling for big-endian targets.
23648 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
23650         * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
23651         (*sve_ld1rq<Vesize>): ... this new pattern.  Handle all element sizes,
23652         not just bytes.
23653         * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
23654         Remove BSWAP handing for big-endian targets and use the form of
23655         LD1RQ appropariate for the mode.
23657 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
23659         * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
23660         all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
23661         duplicated element.
23663 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
23665         PR tearget/83845
23666         * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
23667         check for operands that need to go through aarch64_sve_reload_be.
23669 2018-02-01  Jakub Jelinek  <jakub@redhat.com>
23671         PR tree-optimization/81661
23672         PR tree-optimization/84117
23673         * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
23674         * tree-eh.c: Include gimplify.h.
23675         (find_trapping_overflow, replace_trapping_overflow,
23676         rewrite_to_non_trapping_overflow): New functions.
23677         * tree-vect-loop.c: Include tree-eh.h.
23678         (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
23679         * tree-data-ref.c: Include tree-eh.h.
23680         (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
23682 2018-01-31  Uros Bizjak  <ubizjak@gmail.com>
23684         PR rtl-optimization/84123
23685         * combine.c (change_zero_ext): Check if hard register satisfies
23686         can_change_dest_mode before calling gen_lowpart_SUBREG.
23688 2018-01-31  Vladimir Makarov  <vmakarov@redhat.com>
23690         PR target/82444
23691         * ira.c (ira_init_register_move_cost): Remove assert.
23693 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
23695         PR rtl-optimization/84071
23696         * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
23697         * doc/tm.texi: Regenerate.
23699 2018-01-31  Richard Biener  <rguenther@suse.de>
23701         PR tree-optimization/84132
23702         * tree-data-ref.c (analyze_miv_subscript): Properly
23703         check whether evolution_function_is_affine_multivariate_p
23704         before calling gcd_of_steps_may_divide_p.
23706 2018-01-31  Julia Koval  <julia.koval@intel.com>
23708         PR target/83618
23709         * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
23710         * config/i386/i386.md (rdpid_rex64) New.
23711         (rdpid): Make 32bit only.
23713 2018-01-29  Aldy Hernandez  <aldyh@redhat.com>
23715         PR lto/84105
23716         * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
23717         an IDENTIFIER_NODE for FUNCTION_TYPE's.
23719 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
23721         Revert
23722         2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
23724         * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
23726 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
23728         PR rtl-optimization/84071
23729         * combine.c (record_dead_and_set_regs_1): Record the source unmodified
23730         for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
23732 2018-01-31  Claudiu Zissulescu  <claziss@synopsys.com>
23734         * config/arc/arc.c (arc_handle_aux_attribute): New function.
23735         (arc_attribute_table): Add 'aux' attribute.
23736         (arc_in_small_data_p): Consider aux like variables.
23737         (arc_is_aux_reg_p): New function.
23738         (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
23739         (arc_get_aux_arg): New function.
23740         (prepare_move_operands): Handle aux-register access.
23741         (arc_handle_aux_attribute): New function.
23742         * doc/extend.texi (ARC Variable attributes): Add subsection.
23744 2018-01-31  Claudiu Zissulescu  <claziss@synopsys.com>
23746         * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
23747         * config/arc/arc.c (arc_handle_uncached_attribute): New function.
23748         (arc_attribute_table): Add 'uncached' attribute.
23749         (arc_print_operand): Print '.di' flag for uncached memory
23750         accesses.
23751         (arc_in_small_data_p): Do not consider for small data the uncached
23752         types.
23753         (arc_is_uncached_mem_p): New function.
23754         * config/arc/predicates.md (compact_store_memory_operand): Check
23755         for uncached memory accesses.
23756         (nonvol_nonimm_operand): Likewise.
23757         * doc/extend.texi (ARC Type Attribute): New subsection.
23759 2018-01-31  Jakub Jelinek  <jakub@redhat.com>
23761         PR c/84100
23762         * common.opt (falign-functions=, falign-jumps=, falign-labels=,
23763         falign-loops=): Add Optimization flag.
23765 2018-01-30  Jeff Law  <law@redhat.com>
23767         PR target/84064
23768         * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
23769         INT_REGISTERS_SAVED.  Check it prior to calling
23770         get_scratch_register_on_entry.
23771         (ix86_adjust_stack_and_probe): Similarly.
23772         (ix86_emit_probe_stack_range): Similarly.
23773         (ix86_expand_prologue): Corresponding changes.
23775 2018-01-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
23777         PR target/40411
23778         * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
23779         -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
23781 2018-01-30  Vladimir Makarov  <vmakarov@redhat.com>
23783         PR target/84112
23784         * lra-constraints.c (curr_insn_transform): Process AND in the
23785         address.
23787 2018-01-30  Jakub Jelinek  <jakub@redhat.com>
23789         PR rtl-optimization/83986
23790         * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
23791         dependence against last_pending_memory_flush in addition to
23792         pending_jump_insns.
23794 2018-01-30  Alexandre Oliva  <aoliva@redhat.com>
23796         PR tree-optimization/81611
23797         * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
23798         copies.
23800 2018-01-30  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
23802         PR target/83758
23803         * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
23804         a reg rtx.
23806 2018-01-30  Richard Biener  <rguenther@suse.de>
23807             Jakub Jelinek  <jakub@redhat.com>
23809         PR tree-optimization/84111
23810         * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
23811         inner loops added during recursion, as they don't have up-to-date
23812         SSA form.
23814 2018-01-30  Jan Hubicka  <hubicka@ucw.cz>
23816         PR ipa/81360
23817         * ipa-inline.c (can_inline_edge_p): Break out late tests to...
23818         (can_inline_edge_by_limits_p): ... here.
23819         (can_early_inline_edge_p, check_callers,
23820         update_caller_keys, update_callee_keys, recursive_inlining,
23821         add_new_edges_to_heap, speculation_useful_p,
23822         inline_small_functions,
23823         inline_small_functions, flatten_function,
23824         inline_to_all_callers_1): Update.
23826 2018-01-30  Jan Hubicka  <hubicka@ucw.cz>
23828         * profile-count.c (profile_count::combine_with_ipa_count): Handle
23829         zeros correctly.
23831 2018-01-30  Richard Biener  <rguenther@suse.de>
23833         PR tree-optimization/83008
23834         * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
23835         invariant and constant vector uses in stmts when they need
23836         more than one stmt.
23838 2018-01-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
23840         PR bootstrap/84017
23841         * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
23842         * configure: Regenerate.
23844 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
23846         * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
23847         pattern.
23848         (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
23849         Use gen_rtx_REG rather than gen_lowpart.
23851 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
23853         * lra-constraints.c (match_reload): Use subreg_lowpart_offset
23854         rather than 0 when creating partial subregs.
23856 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
23858         * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
23859         of usage.
23861 2018-01-29  Michael Meissner  <meissner@linux.vnet.ibm.com>
23863         PR target/81550
23864         * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
23865         and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
23866         -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
23867         flags.  This restores the settings used before the 2017-07-24.
23868         Turning off pre increment/decrement/modify allows IVOPTS to
23869         optimize DF/SF loops where the index is an int.
23871 2018-01-29  Richard Biener  <rguenther@suse.de>
23872             Kelvin Nilsen  <kelvin@gcc.gnu.org>
23874         PR bootstrap/80867
23875         * tree-vect-stmts.c (vectorizable_call): Don't call
23876         targetm.vectorize_builtin_md_vectorized_function if callee is
23877         NULL.
23879 2018-01-22  Carl Love  <cel@us.ibm.com>
23881         * doc/extend.tex: Fix typo in second arg in
23882         __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
23884 2018-01-29  Richard Biener  <rguenther@suse.de>
23886         PR tree-optimization/84086
23887         * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
23888         (flush_ssaname_freelist): When SSA names were released reset
23889         the SCEV hash table.
23891 2018-01-29  Richard Biener  <rguenther@suse.de>
23893         PR tree-optimization/84057
23894         * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
23895         removed paths when removing edges.
23897 2018-01-27  H.J. Lu  <hongjiu.lu@intel.com>
23899         * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
23900         -mfunction-return=@var{choice}.
23902 2018-01-27  Bernd Edlinger  <bernd.edlinger@hotmail.de>
23904         PR diagnostic/84034
23905         * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
23906         Handle CR like TAB.
23907         (layout::print_source_line): Likewise.
23908         (test_get_line_width_without_trailing_whitespace): Add test cases.
23910 2018-01-27  Jakub Jelinek  <jakub@redhat.com>
23912         PR middle-end/84040
23913         * sched-deps.c (sched_macro_fuse_insns): Return immediately for
23914         debug insns.
23916 2018-01-26  Jim Wilson  <jimw@sifive.com>
23918         * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
23920         * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
23921         specified.
23923 2018-01-26  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
23925         * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
23926         and CMP + SUB-immediate -> SUBS.
23928 2018-01-26  Martin Sebor  <msebor@redhat.com>
23930         PR tree-optimization/83896
23931         * tree-ssa-strlen.c (get_string_len): Rename...
23932         (get_string_cst_length): ...to this.  Return HOST_WIDE_INT.
23933         Avoid assuming length is constant.
23934         (handle_char_store): Use HOST_WIDE_INT for string length.
23936 2018-01-26  Uros Bizjak  <ubizjak@gmail.com>
23938         PR target/81763
23939         * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
23940         to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
23942 2018-01-26  Richard Biener  <rguenther@suse.de>
23944         PR rtl-optimization/84003
23945         * dse.c (record_store): Only record redundant stores when
23946         the earlier store aliases at least all accesses the later one does.
23948 2018-01-26  Jakub Jelinek  <jakub@redhat.com>
23950         PR rtl-optimization/83985
23951         * dce.c (deletable_insn_p): Return false for separate shrink wrapping
23952         REG_CFA_RESTORE insns.
23953         (delete_unmarked_insns): Don't ignore separate shrink wrapping
23954         REG_CFA_RESTORE insns here.
23956         PR c/83989
23957         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
23958         use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
23960 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
23962         * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
23963         * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
23964         (arc_init): Likewise.
23965         (arc_override_options): Likewise.
23966         (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
23967         value.
23968         (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
23969         support.
23970         * config/arc/arc.h (TARGET_DBNZ): Define.
23971         * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
23972         properly set the tune attribute.
23973         (dbnz): Use TARGET_DBNZ guard.
23974         * config/arc/arc.opt (mtune): Add core3 option.
23976 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
23978         * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
23979         recognize new pic like addresses.
23980         (arc_delegitimize_address): Clean up.
23982 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
23984         * config/arc/arc-arches.def: Option mrf16 valid for all
23985         architectures.
23986         * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
23987         * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
23988         * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
23989         * config/arc/arc-tables.opt: Regenerate.
23990         * config/arc/arc.c (arc_conditional_register_usage): Handle
23991         reduced register file case.
23992         (arc_file_start): Set must have build attributes.
23993         * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
23994         mrf16 option value.
23995         * config/arc/arc.opt (mrf16): Add new option.
23996         * config/arc/elf.h (ATTRIBUTE_PCS): Define.
23997         * config/arc/genmultilib.awk: Handle new mrf16 option.
23998         * config/arc/linux.h (ATTRIBUTE_PCS): Define.
23999         * config/arc/t-multilib: Regenerate.
24000         * doc/invoke.texi (ARC Options): Document mrf16 option.
24002 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
24004         * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
24005         * config/arc/arc.c (arc_handle_secure_attribute): New function.
24006         (arc_attribute_table): Add 'secure_call' attribute.
24007         (arc_print_operand): Print secure call operand.
24008         (arc_function_ok_for_sibcall): Don't optimize tail calls when
24009         secure.
24010         (arc_is_secure_call_p): New function.  * config/arc/arc.md
24011         (call_i): Add support for sjli instruction.
24012         (call_value_i): Likewise.
24013         * config/arc/constraints.md (Csc): New constraint.
24015 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
24016             John Eric Martin  <John.Martin@emmicro-us.com>
24018         * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
24019         * config/arc/arc.c (_arc_jli_section): New struct.
24020         (arc_jli_section): New type.
24021         (rc_jli_sections): New static variable.
24022         (arc_handle_jli_attribute): New function.
24023         (arc_attribute_table): Add jli_always and jli_fixed attribute.
24024         (arc_file_end): New function.
24025         (TARGET_ASM_FILE_END): Define.
24026         (arc_print_operand): Reuse 'S' letter for JLI output instruction.
24027         (arc_add_jli_section): New function.
24028         (jli_call_scan): Likewise.
24029         (arc_reorg): Call jli_call_scan.
24030         (arc_output_addsi): Remove 'S' from printing asm operand.
24031         (arc_is_jli_call_p): New function.
24032         * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
24033         operand.
24034         (movhi_insn): Likewise.
24035         (movsi_insn): Likewise.
24036         (movsi_set_cc_insn): Likewise.
24037         (loadqi_update): Likewise.
24038         (load_zeroextendqisi_update): Likewise.
24039         (load_signextendqisi_update): Likewise.
24040         (loadhi_update): Likewise.
24041         (load_zeroextendhisi_update): Likewise.
24042         (load_signextendhisi_update): Likewise.
24043         (loadsi_update): Likewise.
24044         (loadsf_update): Likewise.
24045         (movsicc_insn): Likewise.
24046         (bset_insn): Likewise.
24047         (bxor_insn): Likewise.
24048         (bclr_insn): Likewise.
24049         (bmsk_insn): Likewise.
24050         (bicsi3_insn): Likewise.
24051         (cmpsi_cc_c_insn): Likewise.
24052         (movsi_ne): Likewise.
24053         (movsi_cond_exec): Likewise.
24054         (clrsbsi2): Likewise.
24055         (norm_f): Likewise.
24056         (normw): Likewise.
24057         (swap): Likewise.
24058         (divaw): Likewise.
24059         (flag): Likewise.
24060         (sr): Likewise.
24061         (kflag): Likewise.
24062         (ffs): Likewise.
24063         (ffs_f): Likewise.
24064         (fls): Likewise.
24065         (call_i): Remove 'S' asm letter, add jli instruction.
24066         (call_value_i): Likewise.
24067         * config/arc/arc.op (mjli-always): New option.
24068         * config/arc/constraints.md (Cji): New constraint.
24069         * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
24070         operand.
24071         (subsf3_fpx): Likewise.
24072         (mulsf3_fpx): Likewise.
24073         * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
24074         asm operand.
24075         * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
24076         function attrbutes.
24077         * doc/invoke.texi (ARC): Document mjli-always option.
24079 2018-01-26  Sebastian Perta  <sebastian.perta@renesas.com>
24081         * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
24082         avoid addition with 0 and use incw and decw where possible.
24084 2018-01-26  Richard Biener  <rguenther@suse.de>
24086         PR tree-optimization/81082
24087         * fold-const.c (fold_plusminus_mult_expr): Do not perform the
24088         association if it requires casting to unsigned.
24089         * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
24090         from fold_plusminus_mult_expr to catch important cases late when
24091         range info is available.
24093 2018-01-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
24095         * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
24096         * configure.ac (hidden_linkonce): New test.
24097         * configure: Regenerate.
24098         * config.in: Regenerate.
24100 2018-01-26  Julia Koval  <julia.koval@intel.com>
24102         * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
24103         _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
24104         _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
24105         _mm_mask_bitshuffle_epi64_mask): Fix type.
24106         * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
24107         USI_FTYPE_V4DI_V4DI_USI): Remove.
24108         * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
24109         __builtin_ia32_vpshufbitqmb256_mask,
24110         __builtin_ia32_vpshufbitqmb128_mask): Fix types.
24111         * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
24112         * config/i386/sse.md (VI1_AVX512VLBW): Change types.
24114 2018-01-26  Alan Modra  <amodra@gmail.com>
24116         PR target/84033
24117         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
24118         UNSPEC_VBPERMQ.  Sort other unspecs.
24120 2018-01-25  David Edelsohn  <dje.gcc@gmail.com>
24122         * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
24124 2018-01-25  Jan Hubicka  <hubicka@ucw.cz>
24126         PR middle-end/83055
24127         * predict.c (drop_profile): Do not push/pop cfun; update also
24128         node->count.
24129         (handle_missing_profiles): Fix logic looking for zero profiles.
24131 2018-01-25  Jakub Jelinek  <jakub@redhat.com>
24133         PR middle-end/83977
24134         * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
24135         on functions with #pragma omp declare simd or functions with simd
24136         attribute.
24137         * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
24138         * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
24139         Remove trailing \n from warning_at calls.
24141 2018-01-25  Tom de Vries  <tom@codesourcery.com>
24143         PR target/84028
24144         * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
24145         for neutered workers.
24147 2018-01-24  Joseph Myers  <joseph@codesourcery.com>
24149         PR target/68467
24150         * config/m68k/m68k.c (m68k_promote_function_mode): New function.
24151         (TARGET_PROMOTE_FUNCTION_MODE): New macro.
24153 2018-01-24  Jeff Law  <law@redhat.com>
24155         PR target/83994
24156         * i386.c (get_probe_interval): Move to earlier point.
24157         (ix86_compute_frame_layout): If -fstack-clash-protection and
24158         the frame is larger than the probe interval, then use pushes
24159         to save registers rather than reg->mem moves.
24160         (ix86_expand_prologue): Remove conditional for int_registers_saved
24161         assertion.
24163 2018-01-24  Vladimir Makarov  <vmakarov@redhat.com>
24165         PR target/84014
24166         * ira-build.c (setup_min_max_allocno_live_range_point): Set up
24167         min/max for never referenced object.
24169 2018-01-24  Jakub Jelinek  <jakub@redhat.com>
24171         PR middle-end/83977
24172         * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
24173         here.
24174         * omp-low.c (create_omp_child_function): Remove "omp declare simd"
24175         attributes from DECL_ATTRIBUTES (decl) without affecting
24176         DECL_ATTRIBUTES (current_function_decl).
24177         * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
24178         functions with non-NULL DECL_ABSTRACT_ORIGIN.
24180 2018-01-24  Richard Sandiford  <richard.sandiford@linaro.org>
24182         PR tree-optimization/83979
24183         * fold-const.c (fold_comparison): Use constant_boolean_node
24184         instead of boolean_{true,false}_node.
24186 2018-01-24  Jan Hubicka  <hubicka@ucw.cz>
24188         * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
24189         with zero counts.
24191 2018-01-24  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
24193         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
24194         Simplify the clause that sets the length attribute.
24195         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
24196         (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
24197         clause that sets the length attribute.
24198         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
24200 2018-01-24  Tom de Vries  <tom@codesourcery.com>
24202         PR target/83589
24203         * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
24204         (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
24205         Add strict parameter.
24206         (prevent_branch_around_nothing): Insert dummy insn between branch to
24207         label and label with no ptx insn inbetween.
24208         * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
24210 2018-01-24  Tom de Vries  <tom@codesourcery.com>
24212         PR target/81352
24213         * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
24214         for neutered threads in warp.
24215         * config/nvptx/nvptx.md (define_insn "exit"): New insn.
24217 2018-01-24  Richard Biener  <rguenther@suse.de>
24219         PR tree-optimization/83176
24220         * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
24221         operands.
24223 2018-01-24  Richard Biener  <rguenther@suse.de>
24225         PR tree-optimization/82819
24226         * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
24227         code generating pluses that are no-ops in the target precision.
24229 2018-01-24  Richard Biener  <rguenther@suse.de>
24231         PR middle-end/84000
24232         * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
24234 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
24236         * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
24237         to merge probabilities.
24238         * predict.c (probably_never_executed): Also mark as cold functions
24239         with global 0 profile and guessed local profile.
24240         * profile-count.c (profile_probability::combine_with_count): New
24241         member function.
24242         * profile-count.h (profile_probability::operator*,
24243         profile_probability::operator*=, profile_probability::operator/,
24244         profile_probability::operator/=): Reduce precision to adjusted
24245         and set value to guessed on contradictory divisions.
24246         (profile_probability::combine_with_freq): Remove.
24247         (profile_probability::combine_wiht_count): Declare.
24248         (profile_count::force_nonzero):: Set to adjusted.
24249         (profile_count::probability_in):: Set quality to adjusted.
24250         * tree-ssa-tail-merge.c (replace_block_by): Use
24251         combine_with_count.
24253 2018-01-23  Andrew Waterman  <andrew@sifive.com>
24254             Jim Wilson  <jimw@sifive.com>
24256         * config/riscv/riscv.c (riscv_stack_boundary): New.
24257         (riscv_option_override): Set riscv_stack_boundary.  Handle
24258         riscv_preferred_stack_boundary_arg.
24259         * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
24260         (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
24261         (STACK_BOUNDARY): Set to riscv_stack_boundary.
24262         (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
24263         * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
24264         * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
24266 2018-01-23  H.J. Lu  <hongjiu.lu@intel.com>
24268         PR target/83905
24269         * config/i386/i386.c (ix86_expand_prologue): Use cost reference
24270         of struct ix86_frame.
24271         (ix86_expand_epilogue): Likewise.  Add a local variable for
24272         the reg_save_offset field in struct ix86_frame.
24274 2018-01-23  Bin Cheng  <bin.cheng@arm.com>
24276         PR tree-optimization/82604
24277         * tree-loop-distribution.c (enum partition_kind): New enum item
24278         PKIND_PARTIAL_MEMSET.
24279         (partition_builtin_p): Support above new enum item.
24280         (generate_code_for_partition): Ditto.
24281         (compute_access_range): Differentiate cases that equality can be
24282         proven at all loops, the innermost loops or no loops.
24283         (classify_builtin_st, classify_builtin_ldst): Adjust call to above
24284         function.  Set PKIND_PARTIAL_MEMSET for partition appropriately.
24285         (finalize_partitions, distribute_loop): Don't fuse partition of
24286         PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
24287         (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
24288         parloop is enabled.
24290 2018-01-23  Martin Liska  <mliska@suse.cz>
24292         * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
24293         order to ignore the predictor.
24294         (PRED_POLYMORPHIC_CALL): Likewise.
24295         (PRED_RECURSIVE_CALL): Likewise.
24297 2018-01-23  Martin Liska  <mliska@suse.cz>
24299         * tree-profile.c (tree_profiling): Print function header to
24300         aware reader which function we are working on.
24301         * value-prof.c (gimple_find_values_to_profile): Do not print
24302         not interesting value histograms.
24304 2018-01-23  Martin Liska  <mliska@suse.cz>
24306         * profile-count.h (enum profile_quality): Add
24307         profile_uninitialized as the first value. Do not number values
24308         as they are zero based.
24309         (profile_count::verify): Update sanity check.
24310         (profile_probability::verify): Likewise.
24312 2018-01-23  Nathan Sidwell  <nathan@acm.org>
24314         * doc/invoke.texi (ffor-scope): Deprecate.
24316 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
24318         PR tree-optimization/83510
24319         * domwalk.c (set_all_edges_as_executable): New function.
24320         (dom_walker::dom_walker): Convert bool param
24321         "skip_unreachable_blocks" to enum reachability.  Move setup of
24322         edge flags to set_all_edges_as_executable and only do it when
24323         reachability is REACHABLE_BLOCKS.
24324         * domwalk.h (enum dom_walker::reachability): New enum.
24325         (dom_walker::dom_walker): Convert bool param
24326         "skip_unreachable_blocks" to enum reachability.
24327         (set_all_edges_as_executable): New decl.
24328         * graphite-scop-detection.c  (gather_bbs::gather_bbs): Convert
24329         from false for "skip_unreachable_blocks" to ALL_BLOCKS for
24330         "reachability".
24331         * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
24332         but converting true to REACHABLE_BLOCKS.
24333         * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
24334         * tree-vrp.c
24335         (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
24336         Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
24337         (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
24338         REACHABLE_BLOCKS.
24339         (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
24340         if check_all_array_refs will be called.
24342 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
24344         * tree.c (selftest::test_location_wrappers): Add more test
24345         coverage.
24347 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
24349         * sbitmap.c (selftest::test_set_range): Fix memory leaks.
24350         (selftest::test_bit_in_range): Likewise.
24352 2018-01-23  Richard Sandiford  <richard.sandiford@linaro.org>
24354         PR testsuite/83888
24355         * doc/sourcebuild.texi (vect_float): Say that the selector
24356         only describes the situation when -funsafe-math-optimizations is on.
24357         (vect_float_strict): Document.
24359 2018-01-23  Richard Sandiford  <richard.sandiford@linaro.org>
24361         PR tree-optimization/83965
24362         * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
24363         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
24364         instead of checking only for a reduction.
24365         (vect_recog_widen_sum_pattern): Likewise.
24367 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
24369         * predict.c (probably_never_executed): Only use precise profile info.
24370         (compute_function_frequency): Skip after inlining hack since we now
24371         have quality checking.
24373 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
24375         * profile-count.h (profile_probability::very_unlikely,
24376         profile_probability::unlikely, profile_probability::even): Set
24377         precision to guessed.
24379 2018-01-23  Richard Biener  <rguenther@suse.de>
24381         PR tree-optimization/83963
24382         * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
24383         Properly terminate dominator walk when crossing the exit edge not
24384         when visiting its source block.
24386 2018-01-23  Jakub Jelinek  <jakub@redhat.com>
24388         PR c++/83918
24389         * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
24390         VIEW_CONVERT_EXPR to wrap CONST_DECLs.
24392 2018-01-22  Jakub Jelinek  <jakub@redhat.com>
24394         PR tree-optimization/83957
24395         * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs.  Remove
24396         semicolon after for body surrounded by braces.
24398         PR tree-optimization/83081
24399         * profile-count.h (profile_probability::split): New method.
24400         * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
24401         Use profile_probability::split.
24402         (do_compare_rtx_and_jump): Fix adjustment of probabilities
24403         when splitting a single conditional jump into 2.
24405 2018-01-22  David Malcolm  <dmalcolm@redhat.com>
24407         PR tree-optimization/69452
24408         * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
24409         decl.
24411 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
24413         * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
24414         * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
24415         * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
24417 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
24419         * config/rl78/rl78-protos.h (rl78_split_movdi): New function
24420         declaration.
24421         * config/rl78/rl78.md (movdi): New define_expand.
24422         * config/rl78/rl78.c (rl78_split_movdi): New function.
24424 2018-01-22  Michael Meissner  <meissner@linux.vnet.ibm.com>
24426         PR target/83862
24427         * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
24428         no longer used.
24429         * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
24430         * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
24431         128-bit to produce an UNSPEC move to get the double word with the
24432         signbit and then a shift directly to do signbit.
24433         (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
24434         implementation with a new version that just does either a direct
24435         move or a regular move.  Move memory interface to separate insns.
24436         Move insns so they are next to the expander.
24437         (signbit<mode>2_dm_mem_be): New combiner insns to combine load
24438         with signbit move.  Split big and little endian case.
24439         (signbit<mode>2_dm_mem_le): Likewise.
24440         (signbit<mode>2_dm_<su>ext): Delete, no longer used.
24441         (signbit<mode>2_dm2): Likewise.
24443 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
24445         * config/rl78/rl78.md (anddi3): New define_expand.
24447 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
24449         * config/rl78/rl78.md (umindi3): New define_expand.
24451 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
24453         * config/rl78/rl78.md (smindi3): New define_expand.
24455 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
24457         * config/rl78/rl78.md (smaxdi3): New define_expand.
24459 2018-01-22  Carl Love  <cel@us.ibm.com>
24461         * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
24462         LVX_V1TI): Add macro expansion.
24463         * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
24464         definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
24465         VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
24466         * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
24467         Change check to determine if the instruction is a byte reversing
24468         entry.  Fix typo in comment.
24469         * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
24470         for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
24471         Add def_builtin calls for new builtins.
24472         * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
24473         Add define_insn expansion.
24475 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
24477         * config/rl78/rl78.md (umaxdi3): New define_expand.
24479 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
24481         * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
24482         for non-QImode registers.
24484 2018-01-22  Richard Biener  <rguenther@suse.de>
24486         PR tree-optimization/83963
24487         * graphite-scop-detection.c (scop_detection::get_sese): Delay
24488         including the loop exit block.
24489         (scop_detection::merge_sese): Likewise.
24490         (scop_detection::add_scop): Do it here instead.
24492 2018-01-22  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
24494         * doc/sourcebuild.texi (arm_softfloat): Document.
24496 2018-01-21  John David Anglin  <danglin@gcc.gnu.org>
24498         PR gcc/77734
24499         * config/pa/pa.c (pa_function_ok_for_sibcall): Use
24500         targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
24501         Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
24503 2018-01-21  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
24504             David Edelsohn  <dje.gcc@gmail.com>
24506         PR target/83946
24507         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
24508         Change "crset eq" to "crset 2".
24509         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
24510         (*call_indirect_aix<mode>_nospec): Likewise.
24511         (*call_value_indirect_aix<mode>_nospec): Likewise.
24512         (*call_indirect_elfv2<mode>_nospec): Likewise.
24513         (*call_value_indirect_elfv2<mode>_nospec): Likewise.
24514         (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
24515         change assembly output from . to $.
24516         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
24517         (indirect_jump<mode>_nospec): Change assembly output from . to $.
24518         (*tablejump<mode>_internal1_nospec): Likewise.
24520 2018-01-21  Oleg Endo  <olegendo@gcc.gnu.org>
24522         PR target/80870
24523         * config/sh/sh_optimize_sett_clrt.cc:
24524         Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
24526 2018-01-20  Richard Sandiford  <richard.sandiford@linaro.org>
24528         PR tree-optimization/83940
24529         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
24530         offset_dt to vect_constant_def rather than vect_unknown_def_type.
24531         (vect_check_load_store_mask): Add a mask_dt_out parameter and
24532         use it to pass back the definition type.
24533         (vect_check_store_rhs): Likewise rhs_dt_out.
24534         (vect_build_gather_load_calls): Add a mask_dt argument and use
24535         it instead of a call to vect_is_simple_use.
24536         (vectorizable_store): Update calls to vect_check_load_store_mask
24537         and vect_check_store_rhs.  Use the dt returned by the latter instead
24538         of scatter_src_dt.  Use the cached mask_dt and gs_info.offset_dt
24539         instead of calls to vect_is_simple_use.  Pass the scalar rather
24540         than the vector operand to vect_is_simple_use when handling
24541         second and subsequent copies of an rhs value.
24542         (vectorizable_load): Update calls to vect_check_load_store_mask
24543         and vect_build_gather_load_calls.  Use the cached mask_dt and
24544         gs_info.offset_dt instead of calls to vect_is_simple_use.
24546 2018-01-20  Jakub Jelinek  <jakub@redhat.com>
24548         PR middle-end/83945
24549         * tree-emutls.c: Include gimplify.h.
24550         (lower_emutls_2): New function.
24551         (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
24552         with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
24553         it before further processing.
24555         PR target/83930
24556         * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
24557         UINTVAL (trueop1) instead of INTVAL (op1).
24559 2018-01-19  Jakub Jelinek  <jakub@redhat.com>
24561         PR debug/81570
24562         PR debug/83728
24563         * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
24564         INCOMING_FRAME_SP_OFFSET if not defined.
24565         (scan_trace): Add ENTRY argument.  If true and
24566         DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
24567         emit a note to adjust the CFA offset.
24568         (create_cfi_notes): Adjust scan_trace callers.
24569         (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
24570         INCOMING_FRAME_SP_OFFSET in the CIE.
24571         * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
24572         * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
24573         Likewise.
24574         * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
24575         * doc/tm.texi: Regenerated.
24577 2018-01-19  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
24579         PR rtl-optimization/83147
24580         * lra-constraints.c (remove_inheritance_pseudos): Use
24581         lra_substitute_pseudo_within_insn.
24583 2018-01-19  Tom de Vries  <tom@codesourcery.com>
24584             Cesar Philippidis  <cesar@codesourcery.com>
24586         PR target/83920
24587         * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
24589 2018-01-19  Cesar Philippidis  <cesar@codesourcery.com>
24591         PR target/83790
24592         * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
24593         spaces for function labels.
24595 2018-01-19  Martin Liska  <mliska@suse.cz>
24597         * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
24598         (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
24599         (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
24600         (PRED_OPCODE_POSITIVE): Change from 64 to 59.
24601         (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
24602         (PRED_CONST_RETURN): Change from 69 to 65.
24603         (PRED_NULL_RETURN): Change from 91 to 71.
24604         (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
24605         (PRED_LOOP_GUARD): Change from 66 to 73.
24607 2018-01-19  Martin Liska  <mliska@suse.cz>
24609         * predict.c (predict_insn_def): Add new assert.
24610         (struct branch_predictor): Change type to signed integer.
24611         (test_prediction_value_range): Amend test to cover
24612         PROB_UNINITIALIZED.
24613         * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
24614         (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
24615         (PRED_LOOP_ITERATIONS_MAX): Likewise.
24616         (PRED_LOOP_IV_COMPARE): Likewise.
24617         * predict.h (PROB_UNINITIALIZED): Define new constant.
24619 2018-01-19  Martin Liska  <mliska@suse.cz>
24621         * predict.c (dump_prediction): Add new format for
24622         analyze_brprob.py script which is enabled with -details
24623         suboption.
24624         * profile-count.h (precise_p): New function.
24626 2018-01-19  Richard Sandiford  <richard.sandiford@linaro.org>
24628         PR tree-optimization/83922
24629         * tree-vect-loop.c (vect_verify_full_masking): Return false if
24630         there are no statements that need masking.
24631         (vect_active_double_reduction_p): New function.
24632         (vect_analyze_loop_operations): Use it when handling phis that
24633         are not in the loop header.
24635 2018-01-19  Richard Sandiford  <richard.sandiford@linaro.org>
24637         PR tree-optimization/83914
24638         * tree-vect-loop.c (vectorizable_induction): Don't convert
24639         init_expr or apply the peeling adjustment for inductions
24640         that are nested within the vectorized loop.
24642 2018-01-19  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
24644         * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
24645         instead of NEG.
24647 2018-01-18  Jakub Jelinek  <jakub@redhat.com>
24649         PR sanitizer/81715
24650         PR testsuite/83882
24651         * function.h (gimplify_parameters): Add gimple_seq * argument.
24652         * function.c: Include gimple.h and options.h.
24653         (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
24654         for the added local temporaries if needed.
24655         * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
24656         if there are any parameter cleanups, wrap whole body into a
24657         try/finally with the cleanups.
24659 2018-01-18  Wilco Dijkstra  <wdijkstr@arm.com>
24661         PR target/82964
24662         * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
24663         Use GET_MODE_CLASS for scalar floating point.
24665 2018-01-18  Jan Hubicka  <hubicka@ucw.cz>
24667         PR ipa/82256
24668         patch by PaX Team
24669         * cgraphclones.c (cgraph_node::create_version_clone_with_body):
24670         Fix call of call_cgraph_insertion_hooks.
24672 2018-01-18  Martin Sebor  <msebor@redhat.com>
24674         * doc/invoke.texi (-Wclass-memaccess): Tweak text.
24676 2018-01-18  Jan Hubicka  <hubicka@ucw.cz>
24678         PR ipa/83619
24679         * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
24680         frequencies.
24682 2018-01-18  Boris Kolpackov  <boris@codesynthesis.com>
24684         PR other/70268
24685         * common.opt: (-ffile-prefix-map): New option.
24686         * opts.c (common_handle_option): Defer it.
24687         * opts-global.c (handle_common_deferred_options): Handle it.
24688         * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
24689         * file-prefix-map.h: New file.
24690         (remap_debug_filename, add_debug_prefix_map): ...here.
24691         (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
24692         * final.c (debug_prefix_map, add_debug_prefix_map
24693         remap_debug_filename): Move to...
24694         * file-prefix-map.c: New file.
24695         (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
24696         generalize, get rid of alloca(), use strrchr() instead of strchr().
24697         (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
24698         Implement in terms of add_prefix_map().
24699         (remap_macro_filename, remap_debug_filename): Implement in term of
24700         remap_filename().
24701         * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
24702         * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
24703         * dbxout.c: Include file-prefix-map.h.
24704         * varasm.c: Likewise.
24705         * vmsdbgout.c: Likewise.
24706         * xcoffout.c: Likewise.
24707         * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
24708         * doc/cppopts.texi (-fmacro-prefix-map): Document.
24709         * doc/invoke.texi (-ffile-prefix-map): Document.
24710         (-fdebug-prefix-map): Update description.
24712 2018-01-18  Martin Liska  <mliska@suse.cz>
24714         * config/i386/i386.c (indirect_thunk_name): Document that also
24715         lfence is emitted.
24716         (output_indirect_thunk): Document why both instructions
24717         (pause and lfence) are generated.
24719 2018-01-18  Richard Biener  <rguenther@suse.de>
24721         PR tree-optimization/83887
24722         * graphite-scop-detection.c
24723         (scop_detection::get_nearest_dom_with_single_entry): Remove.
24724         (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
24725         (scop_detection::merge_sese): Re-implement with a flood-fill
24726         algorithm that properly finds a SESE region if it exists.
24728 2018-01-18  Jakub Jelinek  <jakub@redhat.com>
24730         PR c/61240
24731         * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
24732         pointer_diff optimizations use view_convert instead of convert.
24734 2018-01-17  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
24736         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
24737         Generate different code for -mno-speculate-indirect-jumps.
24738         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
24739         (*call_indirect_aix<mode>): Disable for
24740         -mno-speculate-indirect-jumps.
24741         (*call_indirect_aix<mode>_nospec): New define_insn.
24742         (*call_value_indirect_aix<mode>): Disable for
24743         -mno-speculate-indirect-jumps.
24744         (*call_value_indirect_aix<mode>_nospec): New define_insn.
24745         (*sibcall_nonlocal_sysv<mode>): Generate different code for
24746         -mno-speculate-indirect-jumps.
24747         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
24749 2018-01-17  Michael Meissner  <meissner@linux.vnet.ibm.com>
24751         * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
24752         long double type, set the flags for noting the default long double
24753         type, even if we don't pass or return a long double type.
24755 2018-01-17  Jan Hubicka  <hubicka@ucw.cz>
24757         PR ipa/83051
24758         * ipa-inline.c (flatten_function): Do not overwrite final inlining
24759         failure.
24761 2018-01-17  Will Schmidt  <will_schmidt@vnet.ibm.com>
24763         * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
24764         support for merge[hl].
24765         (fold_mergehl_helper): New helper function.
24766         (tree-vector-builder.h): New #include for tree_vector_builder usage.
24767         * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
24768         (altivec_vmrglw_direct): Add xxmrglw insn.
24770 2018-01-17  Andrew Waterman  <andrew@sifive.com>
24772         * config/riscv/riscv.c (riscv_conditional_register_usage): If
24773         UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
24775 2018-01-17  David Malcolm  <dmalcolm@redhat.com>
24777         PR lto/83121
24778         * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
24779         call the lto_location_cache before reading the
24780         DECL_SOURCE_LOCATION of the types.
24782 2018-01-17  Wilco Dijkstra  <wdijkstr@arm.com>
24783             Richard Sandiford  <richard.sandiford@linaro.org>
24785         * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
24786         * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
24787         (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
24788         SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
24789         * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
24790         Add declaration.
24791         * config/aarch64/constraints.md (aarch64_movti_operand):
24792         Limit immediates.
24793         * config/aarch64/predicates.md (Uti): Add new constraint.
24795 2018-01-17  Carl Love  <cel@us.ibm.com>
24797         * config/rs6000/vsx.md (define_expand xl_len_r,
24798         define_expand stxvl, define_expand *stxvl): Add match_dup argument.
24799         (define_insn): Add, match_dup 1 argument to define_insn stxvll and
24800         lxvll.
24801         (define_expand, define_insn): Move the shift left from  the
24802         define_insn to the define_expand for lxvl and stxvl instructions.
24803         * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
24804         and XL_LEN_R definitions to PURE.
24806 2018-01-17  Uros Bizjak  <ubizjak@gmail.com>
24808         * config/i386/i386.c (indirect_thunk_name): Declare regno
24809         as unsigned int.  Compare regno with INVALID_REGNUM.
24810         (output_indirect_thunk): Ditto.
24811         (output_indirect_thunk_function): Ditto.
24812         (ix86_code_end): Declare regno as unsigned int.  Use INVALID_REGNUM
24813         in the call to output_indirect_thunk_function.
24815 2018-01-17  Richard Sandiford  <richard.sandiford@linaro.org>
24817         PR middle-end/83884
24818         * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
24819         rather than the size of inner_type to determine the stack slot size
24820         when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
24822 2018-01-16  Sebastian Peryt  <sebastian.peryt@intel.com>
24824         PR target/83546
24825         * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
24826         to PTA_SILVERMONT.
24828 2018-01-16  Michael Meissner  <meissner@linux.vnet.ibm.com>
24830         * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
24831         endian Linux systems to optionally enable multilibs for selecting
24832         the long double type if the user configured an explicit type.
24833         * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
24834         have no long double multilibs if not defined.
24835         * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
24836         warn if the user used -mabi={ieee,ibm}longdouble and we built
24837         multilibs for long double.
24838         * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
24839         appropriate multilib option.
24840         (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
24841         multilib options.
24842         * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
24843         for building long double multilibs.
24844         * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
24846 2018-01-16  John David Anglin  <danglin@gcc.gnu.org>
24848         * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
24849         copies.
24851         * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
24852         64 bits.
24853         * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
24854         128 bits.
24856         * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
24857         variables.
24859         * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
24860         return value.
24862 2018-01-16  Eric Botcazou  <ebotcazou@adacore.com>
24864         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
24865         ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
24867 2018-01-16  Kelvin Nilsen  <kelvin@gcc.gnu.org>
24869         * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
24870         different rtl trees depending on TARGET_64BIT.
24871         (rs6000_gen_lvx): Likewise.
24873 2018-01-16  Eric Botcazou  <ebotcazou@adacore.com>
24875         * config/visium/visium.md (nop): Tweak comment.
24876         (hazard_nop): Likewise.
24878 2018-01-16  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
24880         * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
24881         -mspeculate-indirect-jumps.
24882         * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
24883         for -mno-speculate-indirect-jumps.
24884         (*call_indirect_elfv2<mode>_nospec): New define_insn.
24885         (*call_value_indirect_elfv2<mode>): Disable for
24886         -mno-speculate-indirect-jumps.
24887         (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
24888         (indirect_jump): Emit different RTL for
24889         -mno-speculate-indirect-jumps.
24890         (*indirect_jump<mode>): Disable for
24891         -mno-speculate-indirect-jumps.
24892         (*indirect_jump<mode>_nospec): New define_insn.
24893         (tablejump): Emit different RTL for
24894         -mno-speculate-indirect-jumps.
24895         (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
24896         (tablejumpsi_nospec): New define_expand.
24897         (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
24898         (tablejumpdi_nospec): New define_expand.
24899         (*tablejump<mode>_internal1): Disable for
24900         -mno-speculate-indirect-jumps.
24901         (*tablejump<mode>_internal1_nospec): New define_insn.
24902         * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
24903         option.
24905 2018-01-16  Artyom Skrobov tyomitch@gmail.com
24907         * caller-save.c (insert_save): Drop unnecessary parameter.  All
24908         callers updated.
24910 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
24911             Richard Biener  <rguenth@suse.de>
24913         PR libgomp/83590
24914         * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
24915         return early, inline manually is_gimple_sizepos.  Make sure if we
24916         call gimplify_expr we don't end up with a gimple constant.
24917         * tree.c (variably_modified_type_p): Don't return true for
24918         is_gimple_constant (_t).  Inline manually is_gimple_sizepos.
24919         * gimplify.h (is_gimple_sizepos): Remove.
24921 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
24923         PR tree-optimization/83857
24924         * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
24925         vectorizable_live_operation for pure SLP statements.
24926         (vectorizable_live_operation): Handle PHIs.
24928 2018-01-16  Richard Biener  <rguenther@suse.de>
24930         PR tree-optimization/83867
24931         * tree-vect-stmts.c (vect_transform_stmt): Precompute
24932         nested_in_vect_loop_p since the scalar stmt may get invalidated.
24934 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
24936         PR c/83844
24937         * stor-layout.c (handle_warn_if_not_align): Use byte_position and
24938         multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
24939         If off is not INTEGER_CST, issue a may not be aligned warning
24940         rather than isn't aligned.  Use isn%'t rather than isn't.
24941         * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
24942         into MULT_EXPR.
24943         <case MULT_EXPR>: Improve the case when bottom and one of the
24944         MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
24945         operand, in that case check if the other operand is multiple of
24946         bottom divided by the INTEGER_CST operand.
24948 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
24950         PR target/83858
24951         * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
24952         * config/pa/pa-protos.h (pa_function_arg_size): Declare.
24953         * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
24954         pa_function_arg_size instead of FUNCTION_ARG_SIZE.
24955         * config/pa/pa.c (pa_function_arg_advance): Likewise.
24956         (pa_function_arg, pa_arg_partial_bytes): Likewise.
24957         (pa_function_arg_size): New function.
24959 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
24961         * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
24962         in a separate statement.
24964 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
24966         PR tree-optimization/83847
24967         * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
24968         group gathers and scatters.
24970 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
24972         PR rtl-optimization/86620
24973         * params.def (max-sched-ready-insns): Bump minimum value to 1.
24975         PR rtl-optimization/83213
24976         * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
24977         to last if both are JUMP_INSNs.
24979         PR tree-optimization/83843
24980         * gimple-ssa-store-merging.c
24981         (imm_store_chain_info::output_merged_store): Handle bit_not_p on
24982         store_immediate_info for bswap/nop orig_stores.
24984 2018-01-15  Andrew Waterman  <andrew@sifive.com>
24986         * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
24987         !TARGET_MUL.
24988         <UDIV>: Increase cost if !TARGET_DIV.
24990 2018-01-15  Segher Boessenkool  <segher@kernel.crashing.org>
24992         * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
24993         (define_attr "cr_logical_3op"): New.
24994         (cceq_ior_compare): Adjust.
24995         (cceq_ior_compare_complement): Adjust.
24996         (*cceq_rev_compare): Adjust.
24997         * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
24998         (is_cracked_insn): Adjust.
24999         (insn_must_be_first_in_group): Adjust.
25000         * config/rs6000/40x.md: Adjust.
25001         * config/rs6000/440.md: Adjust.
25002         * config/rs6000/476.md: Adjust.
25003         * config/rs6000/601.md: Adjust.
25004         * config/rs6000/603.md: Adjust.
25005         * config/rs6000/6xx.md: Adjust.
25006         * config/rs6000/7450.md: Adjust.
25007         * config/rs6000/7xx.md: Adjust.
25008         * config/rs6000/8540.md: Adjust.
25009         * config/rs6000/cell.md: Adjust.
25010         * config/rs6000/e300c2c3.md: Adjust.
25011         * config/rs6000/e500mc.md: Adjust.
25012         * config/rs6000/e500mc64.md: Adjust.
25013         * config/rs6000/e5500.md: Adjust.
25014         * config/rs6000/e6500.md: Adjust.
25015         * config/rs6000/mpc.md: Adjust.
25016         * config/rs6000/power4.md: Adjust.
25017         * config/rs6000/power5.md: Adjust.
25018         * config/rs6000/power6.md: Adjust.
25019         * config/rs6000/power7.md: Adjust.
25020         * config/rs6000/power8.md: Adjust.
25021         * config/rs6000/power9.md: Adjust.
25022         * config/rs6000/rs64.md: Adjust.
25023         * config/rs6000/titan.md: Adjust.
25025 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
25027         * config/i386/predicates.md (indirect_branch_operand): Rewrite
25028         ix86_indirect_branch_register logic.
25030 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
25032         * config/i386/constraints.md (Bs): Update
25033         ix86_indirect_branch_register check.  Don't check
25034         ix86_indirect_branch_register with GOT_memory_operand.
25035         (Bw): Likewise.
25036         * config/i386/predicates.md (GOT_memory_operand): Don't check
25037         ix86_indirect_branch_register here.
25038         (GOT32_symbol_operand): Likewise.
25040 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
25042         * config/i386/predicates.md (constant_call_address_operand):
25043         Rewrite ix86_indirect_branch_register logic.
25044         (sibcall_insn_operand): Likewise.
25046 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
25048         * config/i386/constraints.md (Bs): Replace
25049         ix86_indirect_branch_thunk_register with
25050         ix86_indirect_branch_register.
25051         (Bw): Likewise.
25052         * config/i386/i386.md (indirect_jump): Likewise.
25053         (tablejump): Likewise.
25054         (*sibcall_memory): Likewise.
25055         (*sibcall_value_memory): Likewise.
25056         Peepholes of indirect call and jump via memory: Likewise.
25057         * config/i386/i386.opt: Likewise.
25058         * config/i386/predicates.md (indirect_branch_operand): Likewise.
25059         (GOT_memory_operand): Likewise.
25060         (call_insn_operand): Likewise.
25061         (sibcall_insn_operand): Likewise.
25062         (GOT32_symbol_operand): Likewise.
25064 2018-01-15  Jakub Jelinek  <jakub@redhat.com>
25066         PR middle-end/83837
25067         * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
25068         type rather than type addr's type points to.
25069         (expand_omp_atomic_mutex): Likewise.
25070         (expand_omp_atomic): Likewise.
25072 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
25074         PR target/83839
25075         * config/i386/i386.c (output_indirect_thunk_function): Use
25076         ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
25077         for  __x86_return_thunk.
25079 2018-01-15  Richard Biener  <rguenther@suse.de>
25081         PR middle-end/83850
25082         * expmed.c (extract_bit_field_1): Fix typo.
25084 2018-01-15  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
25086         PR target/83687
25087         * config/arm/iterators.md (VF): New mode iterator.
25088         * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
25089         Remove integer-related logic from pattern.
25090         (neon_vabd<mode>_3): Likewise.
25092 2018-01-15  Jakub Jelinek  <jakub@redhat.com>
25094         PR middle-end/82694
25095         * common.opt (fstrict-overflow): No longer an alias.
25096         (fwrapv-pointer): New option.
25097         * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
25098         also for pointer types based on flag_wrapv_pointer.
25099         * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
25100         opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
25101         opts->x_flag_wrapv got set.
25102         * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
25103         changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
25104         POINTER_TYPE_OVERFLOW_UNDEFINED.
25105         * match.pd: Likewise in address comparison pattern.
25106         * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
25108 2018-01-15  Richard Biener  <rguenther@suse.de>
25110         PR lto/83804
25111         * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
25112         from TYPE_FIELDS.  Free TYPE_BINFO if not used by devirtualization.
25113         Reset type names to their identifier if their TYPE_DECL doesn't
25114         have linkage (and thus is used for ODR and devirt).
25115         (save_debug_info_for_decl): Remove.
25116         (save_debug_info_for_type): Likewise.
25117         (add_tree_to_fld_list): Adjust.
25118         * tree-pretty-print.c (dump_generic_node): Make dumping of
25119         type names more robust.
25121 2018-01-15  Richard Biener  <rguenther@suse.de>
25123         * BASE-VER: Bump to 8.0.1.
25125 2018-01-14  Martin Sebor  <msebor@redhat.com>
25127         PR other/83508
25128         * builtins.c (check_access): Avoid warning when the no-warning bit
25129         is set.
25131 2018-01-14  Cory Fields  <cory-nospam-@coryfields.com>
25133         * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
25134         * ira-color (allocno_hard_regs_compare): Likewise.
25136 2018-01-14  Nathan Rossi  <nathan@nathanrossi.com>
25138         PR target/83013
25139         * config/microblaze/microblaze.c (microblaze_asm_output_ident):
25140         Use .pushsection/.popsection.
25142 2018-01-14  Martin Sebor  <msebor@redhat.com>
25144         PR c++/81327
25145         * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
25147 2018-01-14  Jakub Jelinek  <jakub@redhat.com>
25149         * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
25150         entry from extra_headers.
25151         (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
25152         extra_headers, make the list bitwise identical to the i?86-*-* one.
25154 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
25156         * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
25157         -mcmodel=large with -mindirect-branch=thunk,
25158         -mindirect-branch=thunk-extern, -mfunction-return=thunk and
25159         -mfunction-return=thunk-extern.
25160         * doc/invoke.texi: Document -mcmodel=large is incompatible with
25161         -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
25162         -mfunction-return=thunk and -mfunction-return=thunk-extern.
25164 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
25166         * config/i386/i386.c (print_reg): Print the name of the full
25167         integer register without '%'.
25168         (ix86_print_operand): Handle 'V'.
25169         * doc/extend.texi: Document 'V' modifier.
25171 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
25173         * config/i386/constraints.md (Bs): Disallow memory operand for
25174         -mindirect-branch-register.
25175         (Bw): Likewise.
25176         * config/i386/predicates.md (indirect_branch_operand): Likewise.
25177         (GOT_memory_operand): Likewise.
25178         (call_insn_operand): Likewise.
25179         (sibcall_insn_operand): Likewise.
25180         (GOT32_symbol_operand): Likewise.
25181         * config/i386/i386.md (indirect_jump): Call convert_memory_address
25182         for -mindirect-branch-register.
25183         (tablejump): Likewise.
25184         (*sibcall_memory): Likewise.
25185         (*sibcall_value_memory): Likewise.
25186         Disallow peepholes of indirect call and jump via memory for
25187         -mindirect-branch-register.
25188         (*call_pop): Replace m with Bw.
25189         (*call_value_pop): Likewise.
25190         (*sibcall_pop_memory): Replace m with Bs.
25191         * config/i386/i386.opt (mindirect-branch-register): New option.
25192         * doc/invoke.texi: Document -mindirect-branch-register option.
25194 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
25196         * config/i386/i386-protos.h (ix86_output_function_return): New.
25197         * config/i386/i386.c (ix86_set_indirect_branch_type): Also
25198         set function_return_type.
25199         (indirect_thunk_name): Add ret_p to indicate thunk for function
25200         return.
25201         (output_indirect_thunk_function): Pass false to
25202         indirect_thunk_name.
25203         (ix86_output_indirect_branch_via_reg): Likewise.
25204         (ix86_output_indirect_branch_via_push): Likewise.
25205         (output_indirect_thunk_function): Create alias for function
25206         return thunk if regno < 0.
25207         (ix86_output_function_return): New function.
25208         (ix86_handle_fndecl_attribute): Handle function_return.
25209         (ix86_attribute_table): Add function_return.
25210         * config/i386/i386.h (machine_function): Add
25211         function_return_type.
25212         * config/i386/i386.md (simple_return_internal): Use
25213         ix86_output_function_return.
25214         (simple_return_internal_long): Likewise.
25215         * config/i386/i386.opt (mfunction-return=): New option.
25216         (indirect_branch): Mention -mfunction-return=.
25217         * doc/extend.texi: Document function_return function attribute.
25218         * doc/invoke.texi: Document -mfunction-return= option.
25220 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
25222         * config/i386/i386-opts.h (indirect_branch): New.
25223         * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
25224         * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
25225         with local indirect jump when converting indirect call and jump.
25226         (ix86_set_indirect_branch_type): New.
25227         (ix86_set_current_function): Call ix86_set_indirect_branch_type.
25228         (indirectlabelno): New.
25229         (indirect_thunk_needed): Likewise.
25230         (indirect_thunk_bnd_needed): Likewise.
25231         (indirect_thunks_used): Likewise.
25232         (indirect_thunks_bnd_used): Likewise.
25233         (INDIRECT_LABEL): Likewise.
25234         (indirect_thunk_name): Likewise.
25235         (output_indirect_thunk): Likewise.
25236         (output_indirect_thunk_function): Likewise.
25237         (ix86_output_indirect_branch_via_reg): Likewise.
25238         (ix86_output_indirect_branch_via_push): Likewise.
25239         (ix86_output_indirect_branch): Likewise.
25240         (ix86_output_indirect_jmp): Likewise.
25241         (ix86_code_end): Call output_indirect_thunk_function if needed.
25242         (ix86_output_call_insn): Call ix86_output_indirect_branch if
25243         needed.
25244         (ix86_handle_fndecl_attribute): Handle indirect_branch.
25245         (ix86_attribute_table): Add indirect_branch.
25246         * config/i386/i386.h (machine_function): Add indirect_branch_type
25247         and has_local_indirect_jump.
25248         * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
25249         to true.
25250         (tablejump): Likewise.
25251         (*indirect_jump): Use ix86_output_indirect_jmp.
25252         (*tablejump_1): Likewise.
25253         (simple_return_indirect_internal): Likewise.
25254         * config/i386/i386.opt (mindirect-branch=): New option.
25255         (indirect_branch): New.
25256         (keep): Likewise.
25257         (thunk): Likewise.
25258         (thunk-inline): Likewise.
25259         (thunk-extern): Likewise.
25260         * doc/extend.texi: Document indirect_branch function attribute.
25261         * doc/invoke.texi: Document -mindirect-branch= option.
25263 2018-01-14  Jan Hubicka  <hubicka@ucw.cz>
25265         PR ipa/83051
25266         * ipa-inline.c (edge_badness): Tolerate roundoff errors.
25268 2018-01-14  Richard Sandiford  <richard.sandiford@linaro.org>
25270         * ipa-inline.c (want_inline_small_function_p): Return false if
25271         inlining has already failed with CIF_FINAL_ERROR.
25272         (update_caller_keys): Call want_inline_small_function_p before
25273         can_inline_edge_p.
25274         (update_callee_keys): Likewise.
25276 2018-01-10  Kelvin Nilsen  <kelvin@gcc.gnu.org>
25278         * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
25279         New function.
25280         (rs6000_quadword_masked_address_p): Likewise.
25281         (quad_aligned_load_p): Likewise.
25282         (quad_aligned_store_p): Likewise.
25283         (const_load_sequence_p): Add comment to describe the outer-most loop.
25284         (mimic_memory_attributes_and_flags): New function.
25285         (rs6000_gen_stvx): Likewise.
25286         (replace_swapped_aligned_store): Likewise.
25287         (rs6000_gen_lvx): Likewise.
25288         (replace_swapped_aligned_load): Likewise.
25289         (replace_swapped_load_constant): Capitalize argument name in
25290         comment describing this function.
25291         (rs6000_analyze_swaps): Add a third pass to search for vector loads
25292         and stores that access quad-word aligned addresses and replace
25293         with stvx or lvx instructions when appropriate.
25294         * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
25295         New function prototype.
25296         (rs6000_quadword_masked_address_p): Likewise.
25297         (rs6000_gen_lvx): Likewise.
25298         (rs6000_gen_stvx): Likewise.
25299         * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
25300         VSX_D (V2DF, V2DI), modify this split to select lvx instruction
25301         when memory address is aligned.
25302         (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
25303         this split to select lvx instruction when memory address is aligned.
25304         (*vsx_le_perm_load_v8hi): Modify this split to select lvx
25305         instruction when memory address is aligned.
25306         (*vsx_le_perm_load_v16qi): Likewise.
25307         (four unnamed splitters): Modify to select the stvx instruction
25308         when memory is aligned.
25310 2018-01-13  Jan Hubicka  <hubicka@ucw.cz>
25312         * predict.c (determine_unlikely_bbs): Handle correctly BBs
25313         which appears in the queue multiple times.
25315 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
25316             Alan Hayward  <alan.hayward@arm.com>
25317             David Sherwood  <david.sherwood@arm.com>
25319         * tree-vectorizer.h (vec_lower_bound): New structure.
25320         (_loop_vec_info): Add check_nonzero and lower_bounds.
25321         (LOOP_VINFO_CHECK_NONZERO): New macro.
25322         (LOOP_VINFO_LOWER_BOUNDS): Likewise.
25323         (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
25324         * tree-data-ref.h (dr_with_seg_len): Add access_size and align
25325         fields.  Make seg_len the distance travelled, not including the
25326         access size.
25327         (dr_direction_indicator): Declare.
25328         (dr_zero_step_indicator): Likewise.
25329         (dr_known_forward_stride_p): Likewise.
25330         * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
25331         tree-ssanames.h.
25332         (runtime_alias_check_p): Allow runtime alias checks with
25333         variable strides.
25334         (operator ==): Compare access_size and align.
25335         (prune_runtime_alias_test_list): Rework for new distinction between
25336         the access_size and seg_len.
25337         (create_intersect_range_checks_index): Likewise.  Cope with polynomial
25338         segment lengths.
25339         (get_segment_min_max): New function.
25340         (create_intersect_range_checks): Use it.
25341         (dr_step_indicator): New function.
25342         (dr_direction_indicator): Likewise.
25343         (dr_zero_step_indicator): Likewise.
25344         (dr_known_forward_stride_p): Likewise.
25345         * tree-loop-distribution.c (data_ref_segment_size): Return
25346         DR_STEP * (niters - 1).
25347         (compute_alias_check_pairs): Update call to the dr_with_seg_len
25348         constructor.
25349         * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
25350         (vect_preserves_scalar_order_p): New function, split out from...
25351         (vect_analyze_data_ref_dependence): ...here.  Check for zero steps.
25352         (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
25353         (vect_vfa_access_size): New function.
25354         (vect_vfa_align): Likewise.
25355         (vect_compile_time_alias): Take access_size_a and access_b arguments.
25356         (dump_lower_bound): New function.
25357         (vect_check_lower_bound): Likewise.
25358         (vect_small_gap_p): Likewise.
25359         (vectorizable_with_step_bound_p): Likewise.
25360         (vect_prune_runtime_alias_test_list): Ignore cross-iteration
25361         depencies if the vectorization factor is 1.  Convert the checks
25362         for nonzero steps into checks on the bounds of DR_STEP.  Try using
25363         a bunds check for variable steps if the minimum required step is
25364         relatively small. Update calls to the dr_with_seg_len
25365         constructor and to vect_compile_time_alias.
25366         * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
25367         function.
25368         (vect_loop_versioning): Call it.
25369         * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
25370         when retrying.
25371         (vect_estimate_min_profitable_iters): Account for any bounds checks.
25373 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
25374             Alan Hayward  <alan.hayward@arm.com>
25375             David Sherwood  <david.sherwood@arm.com>
25377         * doc/sourcebuild.texi (vect_scatter_store): Document.
25378         * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
25379         optabs.
25380         * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
25381         Document.
25382         * genopinit.c (main): Add supports_vec_scatter_store and
25383         supports_vec_scatter_store_cached to target_optabs.
25384         * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
25385         IFN_MASK_SCATTER_STORE.
25386         * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
25387         functions.
25388         * internal-fn.h (internal_store_fn_p): Declare.
25389         (internal_fn_stored_value_index): Likewise.
25390         * internal-fn.c (scatter_store_direct): New macro.
25391         (expand_scatter_store_optab_fn): New function.
25392         (direct_scatter_store_optab_supported_p): New macro.
25393         (internal_store_fn_p): New function.
25394         (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
25395         IFN_MASK_SCATTER_STORE.
25396         (internal_fn_mask_index): Likewise.
25397         (internal_fn_stored_value_index): New function.
25398         (internal_gather_scatter_fn_supported_p): Adjust operand numbers
25399         for scatter stores.
25400         * optabs-query.h (supports_vec_scatter_store_p): Declare.
25401         * optabs-query.c (supports_vec_scatter_store_p): New function.
25402         * tree-vectorizer.h (vect_get_store_rhs): Declare.
25403         * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
25404         true for scatter stores.
25405         (vect_gather_scatter_fn_p): Handle scatter stores too.
25406         (vect_check_gather_scatter): Consider using scatter stores if
25407         supports_vec_scatter_store_p.
25408         * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
25409         scatter stores too.
25410         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
25411         internal_fn_stored_value_index.
25412         (check_load_store_masking): Handle scatter stores too.
25413         (vect_get_store_rhs): Make public.
25414         (vectorizable_call): Use internal_store_fn_p.
25415         (vectorizable_store): Handle scatter store internal functions.
25416         (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
25417         when deciding whether the end of the group has been reached.
25418         * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
25419         * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
25420         (mask_scatter_store<mode>): New insns.
25422 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
25423             Alan Hayward  <alan.hayward@arm.com>
25424             David Sherwood  <david.sherwood@arm.com>
25426         * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
25427         * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
25428         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
25429         function.
25430         (vect_use_strided_gather_scatters_p): Take a masked_p argument.
25431         Use vect_truncate_gather_scatter_offset if we can't treat the
25432         operation as a normal gather load or scatter store.
25433         (get_group_load_store_type): Take the gather_scatter_info
25434         as argument.  Try using a gather load or scatter store for
25435         single-element groups.
25436         (get_load_store_type): Update calls to get_group_load_store_type
25437         and vect_use_strided_gather_scatters_p.
25439 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
25440             Alan Hayward  <alan.hayward@arm.com>
25441             David Sherwood  <david.sherwood@arm.com>
25443         * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
25444         optional tree argument.
25445         * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
25446         null target hooks.
25447         (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
25448         but continue to use the current value as a fallback.
25449         (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
25450         to compare the updates.
25451         * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
25452         (get_load_store_type): Use it when handling a strided access.
25453         (vect_get_strided_load_store_ops): New function.
25454         (vect_get_data_ptr_increment): Likewise.
25455         (vectorizable_load): Handle strided gather loads.  Always pass
25456         a step to vect_create_data_ref_ptr and bump_vector_ptr.
25458 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
25459             Alan Hayward  <alan.hayward@arm.com>
25460             David Sherwood  <david.sherwood@arm.com>
25462         * doc/md.texi (gather_load@var{m}): Document.
25463         (mask_gather_load@var{m}): Likewise.
25464         * genopinit.c (main): Add supports_vec_gather_load and
25465         supports_vec_gather_load_cached to target_optabs.
25466         * optabs-tree.c (init_tree_optimization_optabs): Use
25467         ggc_cleared_alloc to allocate target_optabs.
25468         * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
25469         * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
25470         functions.
25471         * internal-fn.h (internal_load_fn_p): Declare.
25472         (internal_gather_scatter_fn_p): Likewise.
25473         (internal_fn_mask_index): Likewise.
25474         (internal_gather_scatter_fn_supported_p): Likewise.
25475         * internal-fn.c (gather_load_direct): New macro.
25476         (expand_gather_load_optab_fn): New function.
25477         (direct_gather_load_optab_supported_p): New macro.
25478         (direct_internal_fn_optab): New function.
25479         (internal_load_fn_p): Likewise.
25480         (internal_gather_scatter_fn_p): Likewise.
25481         (internal_fn_mask_index): Likewise.
25482         (internal_gather_scatter_fn_supported_p): Likewise.
25483         * optabs-query.c (supports_at_least_one_mode_p): New function.
25484         (supports_vec_gather_load_p): Likewise.
25485         * optabs-query.h (supports_vec_gather_load_p): Declare.
25486         * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
25487         and memory_type field.
25488         (NUM_PATTERNS): Bump to 15.
25489         * tree-vect-data-refs.c: Include internal-fn.h.
25490         (vect_gather_scatter_fn_p): New function.
25491         (vect_describe_gather_scatter_call): Likewise.
25492         (vect_check_gather_scatter): Try using internal functions for
25493         gather loads.  Recognize existing calls to a gather load function.
25494         (vect_analyze_data_refs): Consider using gather loads if
25495         supports_vec_gather_load_p.
25496         * tree-vect-patterns.c (vect_get_load_store_mask): New function.
25497         (vect_get_gather_scatter_offset_type): Likewise.
25498         (vect_convert_mask_for_vectype): Likewise.
25499         (vect_add_conversion_to_patterm): Likewise.
25500         (vect_try_gather_scatter_pattern): Likewise.
25501         (vect_recog_gather_scatter_pattern): New pattern recognizer.
25502         (vect_vect_recog_func_ptrs): Add it.
25503         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
25504         internal_fn_mask_index and internal_gather_scatter_fn_p.
25505         (check_load_store_masking): Take the gather_scatter_info as an
25506         argument and handle gather loads.
25507         (vect_get_gather_scatter_ops): New function.
25508         (vectorizable_call): Check internal_load_fn_p.
25509         (vectorizable_load): Likewise.  Handle gather load internal
25510         functions.
25511         (vectorizable_store): Update call to check_load_store_masking.
25512         * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
25513         * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
25514         * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
25515         (aarch64_gather_scale_operand_d): New predicates.
25516         * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
25517         (mask_gather_load<mode>): New insns.
25519 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
25520             Alan Hayward  <alan.hayward@arm.com>
25521             David Sherwood  <david.sherwood@arm.com>
25523         * optabs.def (fold_left_plus_optab): New optab.
25524         * doc/md.texi (fold_left_plus_@var{m}): Document.
25525         * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
25526         * internal-fn.c (fold_left_direct): Define.
25527         (expand_fold_left_optab_fn): Likewise.
25528         (direct_fold_left_optab_supported_p): Likewise.
25529         * fold-const-call.c (fold_const_fold_left): New function.
25530         (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
25531         * tree-parloops.c (valid_reduction_p): New function.
25532         (gather_scalar_reductions): Use it.
25533         * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
25534         (vect_finish_replace_stmt): Declare.
25535         * tree-vect-loop.c (fold_left_reduction_fn): New function.
25536         (needs_fold_left_reduction_p): New function, split out from...
25537         (vect_is_simple_reduction): ...here.  Accept reductions that
25538         forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
25539         (vect_force_simple_reduction): Also store the reduction type in
25540         the assignment's STMT_VINFO_REDUC_TYPE.
25541         (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
25542         (merge_with_identity): New function.
25543         (vect_expand_fold_left): Likewise.
25544         (vectorize_fold_left_reduction): Likewise.
25545         (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION.  Leave the
25546         scalar phi in place for it.  Check for target support and reject
25547         cases that would reassociate the operation.  Defer the transform
25548         phase to vectorize_fold_left_reduction.
25549         * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
25550         * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
25551         (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
25553 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
25555         * tree-if-conv.c (predicate_mem_writes): Remove redundant
25556         call to ifc_temp_var.
25558 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
25559             Alan Hayward  <alan.hayward@arm.com>
25560             David Sherwood  <david.sherwood@arm.com>
25562         * target.def (legitimize_address_displacement): Take the original
25563         offset as a poly_int.
25564         * targhooks.h (default_legitimize_address_displacement): Update
25565         accordingly.
25566         * targhooks.c (default_legitimize_address_displacement): Likewise.
25567         * doc/tm.texi: Regenerate.
25568         * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
25569         as an argument, moving assert of ad->disp == ad->disp_term to...
25570         (process_address_1): ...here.  Update calls to base_plus_disp_to_reg.
25571         Try calling targetm.legitimize_address_displacement before expanding
25572         the address rather than afterwards, and adjust for the new interface.
25573         * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
25574         Match the new hook interface.  Handle SVE addresses.
25575         * config/sh/sh.c (sh_legitimize_address_displacement): Make the
25576         new hook interface.
25578 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
25580         * Makefile.in (OBJS): Add early-remat.o.
25581         * target.def (select_early_remat_modes): New hook.
25582         * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
25583         * doc/tm.texi: Regenerate.
25584         * targhooks.h (default_select_early_remat_modes): Declare.
25585         * targhooks.c (default_select_early_remat_modes): New function.
25586         * timevar.def (TV_EARLY_REMAT): New timevar.
25587         * passes.def (pass_early_remat): New pass.
25588         * tree-pass.h (make_pass_early_remat): Declare.
25589         * early-remat.c: New file.
25590         * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
25591         function.
25592         (TARGET_SELECT_EARLY_REMAT_MODES): Define.
25594 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
25595             Alan Hayward  <alan.hayward@arm.com>
25596             David Sherwood  <david.sherwood@arm.com>
25598         * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
25599         vfm1 with a bound_epilog parameter.
25600         (vect_do_peeling): Update calls accordingly, and move the prologue
25601         call earlier in the function.  Treat the base bound_epilog as 0 for
25602         fully-masked loops and retain vf - 1 for other loops.  Add 1 to
25603         this base when peeling for gaps.
25604         * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
25605         with fully-masked loops.
25606         (vect_estimate_min_profitable_iters): Handle the single peeled
25607         iteration in that case.
25609 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
25610             Alan Hayward  <alan.hayward@arm.com>
25611             David Sherwood  <david.sherwood@arm.com>
25613         * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
25614         single-element interleaving even if the size is not a power of 2.
25615         * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
25616         accesses for single-element interleaving if the group size is
25617         not a power of 2.
25619 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
25620             Alan Hayward  <alan.hayward@arm.com>
25621             David Sherwood  <david.sherwood@arm.com>
25623         * doc/md.texi (fold_extract_last_@var{m}): Document.
25624         * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
25625         * optabs.def (fold_extract_last_optab): New optab.
25626         * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
25627         * internal-fn.c (fold_extract_direct): New macro.
25628         (expand_fold_extract_optab_fn): Likewise.
25629         (direct_fold_extract_optab_supported_p): Likewise.
25630         * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
25631         * tree-vect-loop.c (vect_model_reduction_cost): Handle
25632         EXTRACT_LAST_REDUCTION.
25633         (get_initial_def_for_reduction): Do not create an initial vector
25634         for EXTRACT_LAST_REDUCTION reductions.
25635         (vectorizable_reduction): Leave the scalar phi in place for
25636         EXTRACT_LAST_REDUCTIONs.  Try using EXTRACT_LAST_REDUCTION
25637         ahead of INTEGER_INDUC_COND_REDUCTION.  Do not check for an
25638         epilogue code for EXTRACT_LAST_REDUCTION and defer the
25639         transform phase to vectorizable_condition.
25640         * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
25641         split out from...
25642         (vect_finish_stmt_generation): ...here.
25643         (vect_finish_replace_stmt): New function.
25644         (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
25645         * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
25646         pattern.
25647         * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
25649 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
25650             Alan Hayward  <alan.hayward@arm.com>
25651             David Sherwood  <david.sherwood@arm.com>
25653         * doc/md.texi (extract_last_@var{m}): Document.
25654         * optabs.def (extract_last_optab): New optab.
25655         * internal-fn.def (EXTRACT_LAST): New internal function.
25656         * internal-fn.c (cond_unary_direct): New macro.
25657         (expand_cond_unary_optab_fn): Likewise.
25658         (direct_cond_unary_optab_supported_p): Likewise.
25659         * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
25660         loops using EXTRACT_LAST.
25661         * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
25662         (extract_last_<mode>): ...this optab.
25663         (vec_extract<mode><Vel>): Update accordingly.
25665 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
25666             Alan Hayward  <alan.hayward@arm.com>
25667             David Sherwood  <david.sherwood@arm.com>
25669         * target.def (empty_mask_is_expensive): New hook.
25670         * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
25671         * doc/tm.texi: Regenerate.
25672         * targhooks.h (default_empty_mask_is_expensive): Declare.
25673         * targhooks.c (default_empty_mask_is_expensive): New function.
25674         * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
25675         if the target says that empty masks are expensive.
25676         * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
25677         New function.
25678         (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
25680 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
25681             Alan Hayward  <alan.hayward@arm.com>
25682             David Sherwood  <david.sherwood@arm.com>
25684         * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
25685         (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
25686         (vect_use_loop_mask_for_alignment_p): New function.
25687         (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
25688         * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
25689         niters_skip argument.  Make sure that the first niters_skip elements
25690         of the first iteration are inactive.
25691         (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
25692         Update call to vect_set_loop_masks_directly.
25693         (get_misalign_in_elems): New function, split out from...
25694         (vect_gen_prolog_loop_niters): ...here.
25695         (vect_update_init_of_dr): Take a code argument that specifies whether
25696         the adjustment should be added or subtracted.
25697         (vect_update_init_of_drs): Likewise.
25698         (vect_prepare_for_masked_peels): New function.
25699         (vect_do_peeling): Skip prologue peeling if we're using a mask
25700         instead.  Update call to vect_update_inits_of_drs.
25701         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
25702         mask_skip_niters.
25703         (vect_analyze_loop_2): Allow fully-masked loops with peeling for
25704         alignment.  Do not include the number of peeled iterations in
25705         the minimum threshold in that case.
25706         (vectorizable_induction): Adjust the start value down by
25707         LOOP_VINFO_MASK_SKIP_NITERS iterations.
25708         (vect_transform_loop): Call vect_prepare_for_masked_peels.
25709         Take the number of skipped iterations into account when calculating
25710         the loop bounds.
25711         * tree-vect-stmts.c (vect_gen_while_not): New function.
25713 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
25714             Alan Hayward  <alan.hayward@arm.com>
25715             David Sherwood  <david.sherwood@arm.com>
25717         * doc/sourcebuild.texi (vect_fully_masked): Document.
25718         * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
25719         default value to 0.
25720         * tree-vect-loop.c (vect_analyze_loop_costing): New function,
25721         split out from...
25722         (vect_analyze_loop_2): ...here. Don't check the vectorization
25723         factor against the number of loop iterations if the loop is
25724         fully-masked.
25726 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
25727             Alan Hayward  <alan.hayward@arm.com>
25728             David Sherwood  <david.sherwood@arm.com>
25730         * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
25731         (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
25732         (dump_groups): Update accordingly.
25733         (iv_use::mem_type): New member variable.
25734         (address_p): New function.
25735         (record_use): Add a mem_type argument and initialize the new
25736         mem_type field.
25737         (record_group_use): Add a mem_type argument.  Use address_p.
25738         Remove obsolete null checks of base_object.  Update call to record_use.
25739         (find_interesting_uses_op): Update call to record_group_use.
25740         (find_interesting_uses_cond): Likewise.
25741         (find_interesting_uses_address): Likewise.
25742         (get_mem_type_for_internal_fn): New function.
25743         (find_address_like_use): Likewise.
25744         (find_interesting_uses_stmt): Try find_address_like_use before
25745         calling find_interesting_uses_op.
25746         (addr_offset_valid_p): Use the iv mem_type field as the type
25747         of the addressed memory.
25748         (add_autoinc_candidates): Likewise.
25749         (get_address_cost): Likewise.
25750         (split_small_address_groups_p): Use address_p.
25751         (split_address_groups): Likewise.
25752         (add_iv_candidate_for_use): Likewise.
25753         (autoinc_possible_for_pair): Likewise.
25754         (rewrite_groups): Likewise.
25755         (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
25756         (determine_group_iv_cost): Update after split of USE_ADDRESS.
25757         (get_alias_ptr_type_for_ptr_address): New function.
25758         (rewrite_use_address): Rewrite address uses in calls that were
25759         identified by find_address_like_use.
25761 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
25762             Alan Hayward  <alan.hayward@arm.com>
25763             David Sherwood  <david.sherwood@arm.com>
25765         * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
25766         TARGET_MEM_REFs.
25767         * gimple-expr.h (is_gimple_addressable: Likewise.
25768         * gimple-expr.c (is_gimple_address): Likewise.
25769         * internal-fn.c (expand_call_mem_ref): New function.
25770         (expand_mask_load_optab_fn): Use it.
25771         (expand_mask_store_optab_fn): Likewise.
25773 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
25774             Alan Hayward  <alan.hayward@arm.com>
25775             David Sherwood  <david.sherwood@arm.com>
25777         * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
25778         (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
25779         (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
25780         (cond_umax@var{mode}): Document.
25781         * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
25782         (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
25783         (cond_umin_optab, cond_umax_optab): New optabs.
25784         * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
25785         (COND_IOR, COND_XOR): New internal functions.
25786         * internal-fn.h (get_conditional_internal_fn): Declare.
25787         * internal-fn.c (cond_binary_direct): New macro.
25788         (expand_cond_binary_optab_fn): Likewise.
25789         (direct_cond_binary_optab_supported_p): Likewise.
25790         (get_conditional_internal_fn): New function.
25791         * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
25792         Cope with reduction statements that are vectorized as calls rather
25793         than assignments.
25794         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
25795         * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
25796         (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
25797         (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
25798         (UNSPEC_COND_EOR): New unspecs.
25799         (optab): Add mappings for them.
25800         (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
25801         (sve_int_op, sve_fp_op): New int attributes.
25803 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
25804             Alan Hayward  <alan.hayward@arm.com>
25805             David Sherwood  <david.sherwood@arm.com>
25807         * optabs.def (while_ult_optab): New optab.
25808         * doc/md.texi (while_ult@var{m}@var{n}): Document.
25809         * internal-fn.def (WHILE_ULT): New internal function.
25810         * internal-fn.h (direct_internal_fn_supported_p): New override
25811         that takes two types as argument.
25812         * internal-fn.c (while_direct): New macro.
25813         (expand_while_optab_fn): New function.
25814         (convert_optab_supported_p): Likewise.
25815         (direct_while_optab_supported_p): New macro.
25816         * wide-int.h (wi::udiv_ceil): New function.
25817         * tree-vectorizer.h (rgroup_masks): New structure.
25818         (vec_loop_masks): New typedef.
25819         (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
25820         and fully_masked_p.
25821         (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
25822         (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
25823         (vect_max_vf): New function.
25824         (slpeel_make_loop_iterate_ntimes): Delete.
25825         (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
25826         (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
25827         (vect_record_loop_mask, vect_get_loop_mask): Likewise.
25828         * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
25829         internal-fn.h, stor-layout.h and optabs-query.h.
25830         (vect_set_loop_mask): New function.
25831         (add_preheader_seq): Likewise.
25832         (add_header_seq): Likewise.
25833         (interleave_supported_p): Likewise.
25834         (vect_maybe_permute_loop_masks): Likewise.
25835         (vect_set_loop_masks_directly): Likewise.
25836         (vect_set_loop_condition_masked): Likewise.
25837         (vect_set_loop_condition_unmasked): New function, split out from
25838         slpeel_make_loop_iterate_ntimes.
25839         (slpeel_make_loop_iterate_ntimes): Rename to..
25840         (vect_set_loop_condition): ...this.  Use vect_set_loop_condition_masked
25841         for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
25842         (vect_do_peeling): Update call accordingly.
25843         (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
25844         loops.
25845         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
25846         mask_compare_type, can_fully_mask_p and fully_masked_p.
25847         (release_vec_loop_masks): New function.
25848         (_loop_vec_info): Use it to free the loop masks.
25849         (can_produce_all_loop_masks_p): New function.
25850         (vect_get_max_nscalars_per_iter): Likewise.
25851         (vect_verify_full_masking): Likewise.
25852         (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
25853         retries, and free the mask rgroups before retrying.  Check loop-wide
25854         reasons for disallowing fully-masked loops.  Make the final decision
25855         about whether use a fully-masked loop or not.
25856         (vect_estimate_min_profitable_iters): Do not assume that peeling
25857         for the number of iterations will be needed for fully-masked loops.
25858         (vectorizable_reduction): Disable fully-masked loops.
25859         (vectorizable_live_operation): Likewise.
25860         (vect_halve_mask_nunits): New function.
25861         (vect_double_mask_nunits): Likewise.
25862         (vect_record_loop_mask): Likewise.
25863         (vect_get_loop_mask): Likewise.
25864         (vect_transform_loop): Handle the case in which the final loop
25865         iteration might handle a partial vector.  Call vect_set_loop_condition
25866         instead of slpeel_make_loop_iterate_ntimes.
25867         * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
25868         (check_load_store_masking): New function.
25869         (prepare_load_store_mask): Likewise.
25870         (vectorizable_store): Handle fully-masked loops.
25871         (vectorizable_load): Likewise.
25872         (supportable_widening_operation): Use vect_halve_mask_nunits for
25873         booleans.
25874         (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
25875         (vect_gen_while): New function.
25876         * config/aarch64/aarch64.md (umax<mode>3): New expander.
25877         (aarch64_uqdec<mode>): New insn.
25879 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
25880             Alan Hayward  <alan.hayward@arm.com>
25881             David Sherwood  <david.sherwood@arm.com>
25883         * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
25884         (reduc_xor_scal_optab): New optabs.
25885         * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
25886         (reduc_xor_scal_@var{m}): Document.
25887         * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
25888         * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
25889         internal functions.
25890         * fold-const-call.c (fold_const_call): Handle them.
25891         * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
25892         internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
25893         * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
25894         (*reduc_<bit_reduc>_scal_<mode>): New patterns.
25895         * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
25896         (UNSPEC_XORV): New unspecs.
25897         (optab): Add entries for them.
25898         (BITWISEV): New int iterator.
25899         (bit_reduc_op): New int attributes.
25901 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
25902             Alan Hayward  <alan.hayward@arm.com>
25903             David Sherwood  <david.sherwood@arm.com>
25905         * doc/md.texi (vec_shl_insert_@var{m}): New optab.
25906         * internal-fn.def (VEC_SHL_INSERT): New internal function.
25907         * optabs.def (vec_shl_insert_optab): New optab.
25908         * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
25909         (duplicate_and_interleave): Likewise.
25910         * tree-vect-loop.c: Include internal-fn.h.
25911         (neutral_op_for_slp_reduction): New function, split out from
25912         get_initial_defs_for_reduction.
25913         (get_initial_def_for_reduction): Handle option 2 for variable-length
25914         vectors by loading the neutral value into a vector and then shifting
25915         the initial value into element 0.
25916         (get_initial_defs_for_reduction): Replace the code argument with
25917         the neutral value calculated by neutral_op_for_slp_reduction.
25918         Use gimple_build_vector for constant-length vectors.
25919         Use IFN_VEC_SHL_INSERT for variable-length vectors if all
25920         but the first group_size elements have a neutral value.
25921         Use duplicate_and_interleave otherwise.
25922         (vect_create_epilog_for_reduction): Take a neutral_op parameter.
25923         Update call to get_initial_defs_for_reduction.  Handle SLP
25924         reductions for variable-length vectors by creating one vector
25925         result for each scalar result, with the elements associated
25926         with other scalar results stubbed out with the neutral value.
25927         (vectorizable_reduction): Call neutral_op_for_slp_reduction.
25928         Require IFN_VEC_SHL_INSERT for double reductions on
25929         variable-length vectors, or SLP reductions that have
25930         a neutral value.  Require can_duplicate_and_interleave_p
25931         support for variable-length unchained SLP reductions if there
25932         is no neutral value, such as for MIN/MAX reductions.  Also require
25933         the number of vector elements to be a multiple of the number of
25934         SLP statements when doing variable-length unchained SLP reductions.
25935         Update call to vect_create_epilog_for_reduction.
25936         * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
25937         and remove initial values.
25938         (duplicate_and_interleave): Make public.
25939         * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
25940         * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
25942 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
25943             Alan Hayward  <alan.hayward@arm.com>
25944             David Sherwood  <david.sherwood@arm.com>
25946         * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
25947         (can_duplicate_and_interleave_p): New function.
25948         (vect_get_and_check_slp_defs): Take the vector of statements
25949         rather than just the current one.  Remove excess parentheses.
25950         Restriction rejectinon of vect_constant_def and vect_external_def
25951         for variable-length vectors to boolean types, or types for which
25952         can_duplicate_and_interleave_p is false.
25953         (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
25954         (duplicate_and_interleave): New function.
25955         (vect_get_constant_vectors): Use gimple_build_vector for
25956         constant-length vectors and suitable variable-length constant
25957         vectors.  Use duplicate_and_interleave for other variable-length
25958         vectors.  Don't defer the update when inserting new statements.
25960 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
25961             Alan Hayward  <alan.hayward@arm.com>
25962             David Sherwood  <david.sherwood@arm.com>
25964         * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
25965         min_profitable_iters doesn't go negative.
25967 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
25968             Alan Hayward  <alan.hayward@arm.com>
25969             David Sherwood  <david.sherwood@arm.com>
25971         * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
25972         (vec_mask_store_lanes@var{m}@var{n}): Likewise.
25973         * optabs.def (vec_mask_load_lanes_optab): New optab.
25974         (vec_mask_store_lanes_optab): Likewise.
25975         * internal-fn.def (MASK_LOAD_LANES): New internal function.
25976         (MASK_STORE_LANES): Likewise.
25977         * internal-fn.c (mask_load_lanes_direct): New macro.
25978         (mask_store_lanes_direct): Likewise.
25979         (expand_mask_load_optab_fn): Handle masked operations.
25980         (expand_mask_load_lanes_optab_fn): New macro.
25981         (expand_mask_store_optab_fn): Handle masked operations.
25982         (expand_mask_store_lanes_optab_fn): New macro.
25983         (direct_mask_load_lanes_optab_supported_p): Likewise.
25984         (direct_mask_store_lanes_optab_supported_p): Likewise.
25985         * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
25986         parameter.
25987         (vect_load_lanes_supported): Likewise.
25988         * tree-vect-data-refs.c (strip_conversion): New function.
25989         (can_group_stmts_p): Likewise.
25990         (vect_analyze_data_ref_accesses): Use it instead of checking
25991         for a pair of assignments.
25992         (vect_store_lanes_supported): Take a masked_p parameter.
25993         (vect_load_lanes_supported): Likewise.
25994         * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
25995         vect_store_lanes_supported and vect_load_lanes_supported.
25996         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
25997         * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
25998         parameter.  Don't allow gaps for masked accesses.
25999         Use vect_get_store_rhs.  Update calls to vect_store_lanes_supported
26000         and vect_load_lanes_supported.
26001         (get_load_store_type): Take a masked_p parameter and update
26002         call to get_group_load_store_type.
26003         (vectorizable_store): Update call to get_load_store_type.
26004         Handle IFN_MASK_STORE_LANES.
26005         (vectorizable_load): Update call to get_load_store_type.
26006         Handle IFN_MASK_LOAD_LANES.
26008 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
26009             Alan Hayward  <alan.hayward@arm.com>
26010             David Sherwood  <david.sherwood@arm.com>
26012         * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
26013         modes for SVE.
26014         * config/aarch64/aarch64-protos.h
26015         (aarch64_sve_struct_memory_operand_p): Declare.
26016         * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
26017         (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
26018         (VPRED, vpred): Handle SVE structure modes.
26019         * config/aarch64/constraints.md (Utx): New constraint.
26020         * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
26021         (aarch64_sve_struct_nonimmediate_operand): New predicates.
26022         * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
26023         * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
26024         (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
26025         structure modes.  Split into pieces after RA.
26026         (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
26027         (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
26028         New patterns.
26029         * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
26030         SVE structure modes.
26031         (aarch64_classify_address): Likewise.
26032         (sizetochar): Move earlier in file.
26033         (aarch64_print_operand): Handle SVE register lists.
26034         (aarch64_array_mode): New function.
26035         (aarch64_sve_struct_memory_operand_p): Likewise.
26036         (TARGET_ARRAY_MODE): Redefine.
26038 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
26039             Alan Hayward  <alan.hayward@arm.com>
26040             David Sherwood  <david.sherwood@arm.com>
26042         * target.def (array_mode): New target hook.
26043         * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
26044         * doc/tm.texi: Regenerate.
26045         * hooks.h (hook_optmode_mode_uhwi_none): Declare.
26046         * hooks.c (hook_optmode_mode_uhwi_none): New function.
26047         * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
26048         targetm.array_mode.
26049         * stor-layout.c (mode_for_array): Likewise.  Support polynomial
26050         type sizes.
26052 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
26053             Alan Hayward  <alan.hayward@arm.com>
26054             David Sherwood  <david.sherwood@arm.com>
26056         * fold-const.c (fold_binary_loc): Check the argument types
26057         rather than the result type when testing for a vector operation.
26059 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
26061         * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
26062         * doc/tm.texi: Regenerate.
26064 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
26065             Alan Hayward  <alan.hayward@arm.com>
26066             David Sherwood  <david.sherwood@arm.com>
26068         * doc/invoke.texi (-msve-vector-bits=): Document new option.
26069         (sve): Document new AArch64 extension.
26070         * doc/md.texi (w): Extend the description of the AArch64
26071         constraint to include SVE vectors.
26072         (Upl, Upa): Document new AArch64 predicate constraints.
26073         * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
26074         enum.
26075         * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
26076         (msve-vector-bits=): New option.
26077         * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
26078         SVE when these are disabled.
26079         (sve): New extension.
26080         * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
26081         modes.  Adjust their number of units based on aarch64_sve_vg.
26082         (MAX_BITSIZE_MODE_ANY_MODE): Define.
26083         * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
26084         aarch64_addr_query_type.
26085         (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
26086         (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
26087         (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
26088         (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
26089         (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
26090         (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
26091         (aarch64_simd_imm_zero_p): Delete.
26092         (aarch64_check_zero_based_sve_index_immediate): Declare.
26093         (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
26094         (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
26095         (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
26096         (aarch64_sve_float_mul_immediate_p): Likewise.
26097         (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
26098         rather than an rtx.
26099         (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
26100         (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
26101         (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
26102         (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
26103         (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
26104         (aarch64_regmode_natural_size): Likewise.
26105         * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
26106         (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
26107         left one place.
26108         (AARCH64_ISA_SVE, TARGET_SVE): New macros.
26109         (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
26110         for VG and the SVE predicate registers.
26111         (V_ALIASES): Add a "z"-prefixed alias.
26112         (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
26113         (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
26114         (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
26115         (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
26116         (REG_CLASS_NAMES): Add entries for them.
26117         (REG_CLASS_CONTENTS): Likewise.  Update ALL_REGS to include VG
26118         and the predicate registers.
26119         (aarch64_sve_vg): Declare.
26120         (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
26121         (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
26122         (REGMODE_NATURAL_SIZE): Define.
26123         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
26124         SVE macros.
26125         * config/aarch64/aarch64.c: Include cfgrtl.h.
26126         (simd_immediate_info): Add a constructor for series vectors,
26127         and an associated step field.
26128         (aarch64_sve_vg): New variable.
26129         (aarch64_dbx_register_number): Handle VG and the predicate registers.
26130         (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
26131         (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
26132         (VEC_ANY_DATA, VEC_STRUCT): New constants.
26133         (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
26134         (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
26135         (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
26136         (aarch64_get_mask_mode): New functions.
26137         (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
26138         and FP_LO_REGS.  Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
26139         (aarch64_hard_regno_mode_ok): Handle VG.  Also handle the SVE
26140         predicate modes and predicate registers.  Explicitly restrict
26141         GPRs to modes of 16 bytes or smaller.  Only allow FP registers
26142         to store a vector mode if it is recognized by
26143         aarch64_classify_vector_mode.
26144         (aarch64_regmode_natural_size): New function.
26145         (aarch64_hard_regno_caller_save_mode): Return the original mode
26146         for predicates.
26147         (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
26148         (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
26149         (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
26150         (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
26151         functions.
26152         (aarch64_add_offset): Add a temp2 parameter.  Assert that temp1
26153         does not overlap dest if the function is frame-related.  Handle
26154         SVE constants.
26155         (aarch64_split_add_offset): New function.
26156         (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
26157         them aarch64_add_offset.
26158         (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
26159         and update call to aarch64_sub_sp.
26160         (aarch64_add_cfa_expression): New function.
26161         (aarch64_expand_prologue): Pass extra temporary registers to the
26162         functions above.  Handle the case in which we need to emit new
26163         DW_CFA_expressions for registers that were originally saved
26164         relative to the stack pointer, but now have to be expressed
26165         relative to the frame pointer.
26166         (aarch64_output_mi_thunk): Pass extra temporary registers to the
26167         functions above.
26168         (aarch64_expand_epilogue): Likewise.  Prevent inheritance of
26169         IP0 and IP1 values for SVE frames.
26170         (aarch64_expand_vec_series): New function.
26171         (aarch64_expand_sve_widened_duplicate): Likewise.
26172         (aarch64_expand_sve_const_vector): Likewise.
26173         (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
26174         Handle SVE constants.  Use emit_move_insn to move a force_const_mem
26175         into the register, rather than emitting a SET directly.
26176         (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
26177         (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
26178         (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
26179         (offset_9bit_signed_scaled_p): New functions.
26180         (aarch64_replicate_bitmask_imm): New function.
26181         (aarch64_bitmask_imm): Use it.
26182         (aarch64_cannot_force_const_mem): Reject expressions involving
26183         a CONST_POLY_INT.  Update call to aarch64_classify_symbol.
26184         (aarch64_classify_index): Handle SVE indices, by requiring
26185         a plain register index with a scale that matches the element size.
26186         (aarch64_classify_address): Handle SVE addresses.  Assert that
26187         the mode of the address is VOIDmode or an integer mode.
26188         Update call to aarch64_classify_symbol.
26189         (aarch64_classify_symbolic_expression): Update call to
26190         aarch64_classify_symbol.
26191         (aarch64_const_vec_all_in_range_p): New function.
26192         (aarch64_print_vector_float_operand): Likewise.
26193         (aarch64_print_operand): Handle 'N' and 'C'.  Use "zN" rather than
26194         "vN" for FP registers with SVE modes.  Handle (const ...) vectors
26195         and the FP immediates 1.0 and 0.5.
26196         (aarch64_print_address_internal): Handle SVE addresses.
26197         (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
26198         (aarch64_regno_regclass): Handle predicate registers.
26199         (aarch64_secondary_reload): Handle big-endian reloads of SVE
26200         data modes.
26201         (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
26202         (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
26203         (aarch64_convert_sve_vector_bits): New function.
26204         (aarch64_override_options): Use it to handle -msve-vector-bits=.
26205         (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
26206         rather than an rtx.
26207         (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
26208         Handle SVE vector and predicate modes.  Accept VL-based constants
26209         that need only one temporary register, and VL offsets that require
26210         no temporary registers.
26211         (aarch64_conditional_register_usage): Mark the predicate registers
26212         as fixed if SVE isn't available.
26213         (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
26214         Return true for SVE vector and predicate modes.
26215         (aarch64_simd_container_mode): Take the number of bits as a poly_int64
26216         rather than an unsigned int.  Handle SVE modes.
26217         (aarch64_preferred_simd_mode): Update call accordingly.  Handle
26218         SVE modes.
26219         (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
26220         if SVE is enabled.
26221         (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
26222         (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
26223         (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
26224         (aarch64_sve_float_mul_immediate_p): New functions.
26225         (aarch64_sve_valid_immediate): New function.
26226         (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
26227         Explicitly reject structure modes.  Check for INDEX constants.
26228         Handle PTRUE and PFALSE constants.
26229         (aarch64_check_zero_based_sve_index_immediate): New function.
26230         (aarch64_simd_imm_zero_p): Delete.
26231         (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
26232         vector modes.  Accept constants in the range of CNT[BHWD].
26233         (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
26234         ask for an Advanced SIMD mode.
26235         (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
26236         (aarch64_simd_vector_alignment): Handle SVE predicates.
26237         (aarch64_vectorize_preferred_vector_alignment): New function.
26238         (aarch64_simd_vector_alignment_reachable): Use it instead of
26239         the vector size.
26240         (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
26241         (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
26242         functions.
26243         (MAX_VECT_LEN): Delete.
26244         (expand_vec_perm_d): Add a vec_flags field.
26245         (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
26246         (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
26247         (aarch64_evpc_ext): Don't apply a big-endian lane correction
26248         for SVE modes.
26249         (aarch64_evpc_rev): Rename to...
26250         (aarch64_evpc_rev_local): ...this.  Use a predicated operation for SVE.
26251         (aarch64_evpc_rev_global): New function.
26252         (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
26253         (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
26254         MAX_VECT_LEN.
26255         (aarch64_evpc_sve_tbl): New function.
26256         (aarch64_expand_vec_perm_const_1): Update after rename of
26257         aarch64_evpc_rev.  Handle SVE permutes too, trying
26258         aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
26259         than aarch64_evpc_tbl.
26260         (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
26261         (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
26262         (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
26263         (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
26264         (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
26265         (aarch64_expand_sve_vcond): New functions.
26266         (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
26267         of aarch64_vector_mode_p.
26268         (aarch64_dwarf_poly_indeterminate_value): New function.
26269         (aarch64_compute_pressure_classes): Likewise.
26270         (aarch64_can_change_mode_class): Likewise.
26271         (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
26272         (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
26273         (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
26274         (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
26275         (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
26276         (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
26277         * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
26278         (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
26279         constraints.
26280         (Dn, Dl, Dr): Accept const as well as const_vector.
26281         (Dz): Likewise.  Compare against CONST0_RTX.
26282         * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
26283         of "vector" where appropriate.
26284         (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
26285         (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
26286         (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
26287         (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
26288         (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
26289         (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
26290         (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
26291         (v_int_equiv): Extend to SVE modes.
26292         (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
26293         mode attributes.
26294         (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
26295         (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
26296         (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
26297         (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
26298         (SVE_COND_FP_CMP): New int iterators.
26299         (perm_hilo): Handle the new unpack unspecs.
26300         (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
26301         attributes.
26302         * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
26303         (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
26304         (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
26305         (aarch64_equality_operator, aarch64_constant_vector_operand)
26306         (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
26307         (aarch64_sve_nonimmediate_operand): Likewise.
26308         (aarch64_sve_general_operand): Likewise.
26309         (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
26310         (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
26311         (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
26312         (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
26313         (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
26314         (aarch64_sve_float_arith_immediate): Likewise.
26315         (aarch64_sve_float_arith_with_sub_immediate): Likewise.
26316         (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
26317         (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
26318         (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
26319         (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
26320         (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
26321         (aarch64_sve_float_arith_operand): Likewise.
26322         (aarch64_sve_float_arith_with_sub_operand): Likewise.
26323         (aarch64_sve_float_mul_operand): Likewise.
26324         (aarch64_sve_vec_perm_operand): Likewise.
26325         (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
26326         (aarch64_mov_operand): Accept const_poly_int and const_vector.
26327         (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
26328         as well as const_vector.
26329         (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
26330         in file.  Use CONST0_RTX and CONSTM1_RTX.
26331         (aarch64_simd_or_scalar_imm_zero): Likewise.  Add match_codes.
26332         (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
26333         Use aarch64_simd_imm_zero.
26334         * config/aarch64/aarch64-sve.md: New file.
26335         * config/aarch64/aarch64.md: Include it.
26336         (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
26337         (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
26338         (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
26339         (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
26340         (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
26341         (sve): New attribute.
26342         (enabled): Disable instructions with the sve attribute unless
26343         TARGET_SVE.
26344         (movqi, movhi): Pass CONST_POLY_INT operaneds through
26345         aarch64_expand_mov_immediate.
26346         (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
26347         CNT[BHSD] immediates.
26348         (movti): Split CONST_POLY_INT moves into two halves.
26349         (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
26350         Split additions that need a temporary here if the destination
26351         is the stack pointer.
26352         (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
26353         (*add<mode>3_poly_1): New instruction.
26354         (set_clobber_cc): New expander.
26356 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
26358         * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
26359         parameter and use it instead of GET_MODE_SIZE (innermode).  Use
26360         inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
26361         Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
26362         GET_MODE_NUNITS (innermode).  Also add a first_elem parameter.
26363         Change innermode from fixed_mode_size to machine_mode.
26364         (simplify_subreg): Update call accordingly.  Handle a constant-sized
26365         subreg of a variable-length CONST_VECTOR.
26367 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
26368             Alan Hayward  <alan.hayward@arm.com>
26369             David Sherwood  <david.sherwood@arm.com>
26371         * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
26372         (add_offset_to_base): New function, split out from...
26373         (create_mem_ref): ...here.  When handling a scale other than 1,
26374         check first whether the address is valid without the offset.
26375         Add it into the base if so, leaving the index and scale as-is.
26377 2018-01-12  Jakub Jelinek  <jakub@redhat.com>
26379         PR c++/83778
26380         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
26381         fold_for_warn before checking if arg2 is INTEGER_CST.
26383 2018-01-12  Segher Boessenkool  <segher@kernel.crashing.org>
26385         * config/rs6000/predicates.md (load_multiple_operation): Delete.
26386         (store_multiple_operation): Delete.
26387         * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
26388         * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
26389         * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
26390         guarded by TARGET_STRING.
26391         (rs6000_output_load_multiple): Delete.
26392         * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
26393         OPTION_MASK_STRING / TARGET_STRING handling.
26394         (print_operand) <'N', 'O'>: Add comment that these are unused now.
26395         (const rs6000_opt_masks) <"string">: Change mask to 0.
26396         * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
26397         (MASK_STRING): Delete.
26398         * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
26399         parts.  Simplify.
26400         (load_multiple): Delete.
26401         (*ldmsi8): Delete.
26402         (*ldmsi7): Delete.
26403         (*ldmsi6): Delete.
26404         (*ldmsi5): Delete.
26405         (*ldmsi4): Delete.
26406         (*ldmsi3): Delete.
26407         (store_multiple): Delete.
26408         (*stmsi8): Delete.
26409         (*stmsi7): Delete.
26410         (*stmsi6): Delete.
26411         (*stmsi5): Delete.
26412         (*stmsi4): Delete.
26413         (*stmsi3): Delete.
26414         (movmemsi_8reg): Delete.
26415         (corresponding unnamed define_insn): Delete.
26416         (movmemsi_6reg): Delete.
26417         (corresponding unnamed define_insn): Delete.
26418         (movmemsi_4reg): Delete.
26419         (corresponding unnamed define_insn): Delete.
26420         (movmemsi_2reg): Delete.
26421         (corresponding unnamed define_insn): Delete.
26422         (movmemsi_1reg): Delete.
26423         (corresponding unnamed define_insn): Delete.
26424         * config/rs6000/rs6000.opt (mno-string): New.
26425         (mstring): Replace by deprecation warning stub.
26426         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
26428 2018-01-12  Jakub Jelinek  <jakub@redhat.com>
26430         * regrename.c (regrename_do_replace): If replacing the same
26431         reg multiple times, try to reuse last created gen_raw_REG.
26433         PR debug/81155
26434         * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
26435         main to workaround a bug in GDB.
26437 2018-01-12  Tom de Vries  <tom@codesourcery.com>
26439         PR target/83737
26440         * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
26442 2018-01-12  Vladimir Makarov  <vmakarov@redhat.com>
26444         PR rtl-optimization/80481
26445         * ira-color.c (get_cap_member): New function.
26446         (allocnos_conflict_by_live_ranges_p): Use it.
26447         (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
26448         (setup_slot_coalesced_allocno_live_ranges): Ditto.
26450 2018-01-12  Uros Bizjak  <ubizjak@gmail.com>
26452         PR target/83628
26453         * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
26454         (*saddl_se_1): Ditto.
26455         (*ssubsi_1): Ditto.
26456         (*ssubl_se_1): Ditto.
26458 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
26460         * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
26461         rather than wi::to_widest for DR_INITs.
26462         * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
26463         wi::to_poly_offset rather than wi::to_offset for DR_INIT.
26464         (vect_analyze_data_ref_accesses): Require both DR_INITs to be
26465         INTEGER_CSTs.
26466         (vect_analyze_group_access_1): Note that here.
26468 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
26470         * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
26471         polynomial type sizes.
26473 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
26475         * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
26476         poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
26477         (gimple_add_tmp_var): Likewise.
26479 2018-01-12  Martin Liska  <mliska@suse.cz>
26481         * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
26482         (gimple_alloc_sizes): Likewise.
26483         (dump_gimple_statistics): Use PRIu64 in printf format.
26484         * gimple.h: Change uint64_t to int.
26486 2018-01-12  Martin Liska  <mliska@suse.cz>
26488         * tree-core.h: Use uint64_t instead of int.
26489         * tree.c (tree_node_counts): Likewise.
26490         (tree_node_sizes): Likewise.
26491         (dump_tree_statistics): Use PRIu64 in printf format.
26493 2018-01-12  Martin Liska  <mliska@suse.cz>
26495         * Makefile.in: As qsort_chk is implemented in vec.c, add
26496         vec.o to linkage of gencfn-macros.
26497         * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
26498         passing the info to record_node_allocation_statistics.
26499         (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
26500         and pass the info.
26501         * ggc-common.c (struct ggc_usage): Add operator== and use
26502         it in operator< and compare function.
26503         * mem-stats.h (struct mem_usage): Likewise.
26504         * vec.c (struct vec_usage): Remove operator< and compare
26505         function. Can be simply inherited.
26507 2018-01-12  Martin Jambor  <mjambor@suse.cz>
26509         PR target/81616
26510         * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
26511         * tree-ssa-math-opts.c: Include domwalk.h.
26512         (convert_mult_to_fma_1): New function.
26513         (fma_transformation_info): New type.
26514         (fma_deferring_state): Likewise.
26515         (cancel_fma_deferring): New function.
26516         (result_of_phi): Likewise.
26517         (last_fma_candidate_feeds_initial_phi): Likewise.
26518         (convert_mult_to_fma): Added deferring logic, split actual
26519         transformation to convert_mult_to_fma_1.
26520         (math_opts_dom_walker): New type.
26521         (math_opts_dom_walker::after_dom_children): New method, body moved
26522         here from pass_optimize_widening_mul::execute, added deferring logic
26523         bits.
26524         (pass_optimize_widening_mul::execute): Moved most of code to
26525         math_opts_dom_walker::after_dom_children.
26526         * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
26527         * config/i386/i386.c (ix86_option_override_internal): Added
26528         maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
26530 2018-01-12  Richard Biener  <rguenther@suse.de>
26532         PR debug/83157
26533         * dwarf2out.c (gen_variable_die): Do not reset old_die for
26534         inline instance vars.
26536 2018-01-12  Oleg Endo  <olegendo@gcc.gnu.org>
26538         PR target/81819
26539         * config/rx/rx.c (rx_is_restricted_memory_address):
26540         Handle SUBREG case.
26542 2018-01-12  Richard Biener  <rguenther@suse.de>
26544         PR tree-optimization/80846
26545         * target.def (split_reduction): New target hook.
26546         * targhooks.c (default_split_reduction): New function.
26547         * targhooks.h (default_split_reduction): Declare.
26548         * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
26549         target requests first reduce vectors by combining low and high
26550         parts.
26551         * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
26552         (get_vectype_for_scalar_type_and_size): Export.
26553         * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
26554         * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
26555         * doc/tm.texi: Regenerate.
26556         * config/i386/i386.c (ix86_split_reduction): Implement
26557         TARGET_VECTORIZE_SPLIT_REDUCTION.
26559 2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
26561         PR target/83368
26562         * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
26563         in PIC mode except for TARGET_VXWORKS_RTP.
26564         * config/sparc/sparc.c: Include cfgrtl.h.
26565         (TARGET_INIT_PIC_REG): Define.
26566         (TARGET_USE_PSEUDO_PIC_REG): Likewise.
26567         (sparc_pic_register_p): New predicate.
26568         (sparc_legitimate_address_p): Use it.
26569         (sparc_legitimize_pic_address): Likewise.
26570         (sparc_delegitimize_address): Likewise.
26571         (sparc_mode_dependent_address_p): Likewise.
26572         (gen_load_pcrel_sym): Remove 4th parameter.
26573         (load_got_register): Adjust call to above.  Remove obsolete stuff.
26574         (sparc_expand_prologue): Do not call load_got_register here.
26575         (sparc_flat_expand_prologue): Likewise.
26576         (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
26577         (sparc_use_pseudo_pic_reg): New function.
26578         (sparc_init_pic_reg): Likewise.
26579         * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
26580         (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
26582 2018-01-12  Christophe Lyon  <christophe.lyon@linaro.org>
26584         * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
26585         Add item for branch_cost.
26587 2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
26589         PR rtl-optimization/83565
26590         * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
26591         not extend the result to a larger mode for rotate operations.
26592         (num_sign_bit_copies1): Likewise.
26594 2018-01-12  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
26596         PR target/40411
26597         * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
26598         -symbolic.
26599         Use values-Xc.o for -pedantic.
26600         Link with values-xpg4.o for C90, values-xpg6.o otherwise.
26602 2018-01-12  Martin Liska  <mliska@suse.cz>
26604         PR ipa/83054
26605         * ipa-devirt.c (final_warning_record::grow_type_warnings):
26606         New function.
26607         (possible_polymorphic_call_targets): Use it.
26608         (ipa_devirt): Likewise.
26610 2018-01-12  Martin Liska  <mliska@suse.cz>
26612         * profile-count.h (enum profile_quality): Use 0 as invalid
26613         enum value of profile_quality.
26615 2018-01-12  Chung-Ju Wu  <jasonwucj@gmail.com>
26617         * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
26618         -mext-string options.
26620 2018-01-12  Richard Biener  <rguenther@suse.de>
26622         * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
26623         DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
26624         * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
26625         Likewise.
26626         * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
26628 2018-01-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
26630         * configure.ac (--with-long-double-format): Add support for the
26631         configuration option to change the default long double format on
26632         PowerPC systems.
26633         * config.gcc (powerpc*-linux*-*): Likewise.
26634         * configure: Regenerate.
26635         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
26636         double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
26637         used without modification.
26639 2018-01-11  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
26641         * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
26642         (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
26643         * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
26644         MISC_BUILTIN_SPEC_BARRIER.
26645         (rs6000_init_builtins): Likewise.
26646         * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
26647         enum value.
26648         (speculation_barrier): New define_insn.
26649         * doc/extend.texi: Document __builtin_speculation_barrier.
26651 2018-01-11  Jakub Jelinek  <jakub@redhat.com>
26653         PR target/83203
26654         * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
26655         is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
26656         * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
26657         iterators.
26658         (ssescalarmodesuffix): Add 512-bit vectors.  Use "d" or "q" for
26659         integral modes instead of "ss" and "sd".
26660         (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
26661         vectors with 32-bit and 64-bit elements.
26662         (vecdupssescalarmodesuffix): New mode attribute.
26663         (vec_dup<mode>): Use it.
26665 2018-01-11  H.J. Lu  <hongjiu.lu@intel.com>
26667         PR target/83330
26668         * config/i386/i386.c (ix86_compute_frame_layout): Align stack
26669         frame if argument is passed on stack.
26671 2018-01-11  Jakub Jelinek  <jakub@redhat.com>
26673         PR target/82682
26674         * ree.c (combine_reaching_defs): Optimize also
26675         reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
26676         reg2=any_extend(exp); reg1=reg2;, formatting fix.
26678 2018-01-11  Jan Hubicka  <hubicka@ucw.cz>
26680         PR middle-end/83189
26681         * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
26683 2018-01-11  Jan Hubicka  <hubicka@ucw.cz>
26685         PR middle-end/83718
26686         * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
26687         after they are computed.
26689 2018-01-11  Bin Cheng  <bin.cheng@arm.com>
26691         PR tree-optimization/83695
26692         * gimple-loop-linterchange.cc
26693         (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
26694         reset cached scev information after interchange.
26695         (pass_linterchange::execute): Remove call to scev_reset_htab.
26697 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
26699         * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
26700         vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
26701         vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
26702         vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
26703         vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
26704         vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
26705         * config/arm/arm_neon_builtins.def (vfmal_lane_low,
26706         vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
26707         vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
26708         vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
26709         vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
26710         * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
26711         (V_lane_reg): Likewise.
26712         * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
26713         New define_expand.
26714         (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
26715         (vfmal_lane_low<mode>_intrinsic,
26716         vfmal_lane_low<vfmlsel2><mode>_intrinsic,
26717         vfmal_lane_high<vfmlsel2><mode>_intrinsic,
26718         vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
26719         vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
26720         vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
26721         vfmsl_lane_high<mode>_intrinsic): New define_insns.
26723 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
26725         * config/arm/arm-cpus.in (fp16fml): New feature.
26726         (ALL_SIMD): Add fp16fml.
26727         (armv8.2-a): Add fp16fml as an option.
26728         (armv8.3-a): Likewise.
26729         (armv8.4-a): Add fp16fml as part of fp16.
26730         * config/arm/arm.h (TARGET_FP16FML): Define.
26731         * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
26732         when appropriate.
26733         * config/arm/arm-modes.def (V2HF): Define.
26734         * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
26735         vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
26736         vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
26737         * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
26738         vfmsl_low, vfmsl_high): New set of builtins.
26739         * config/arm/iterators.md (PLUSMINUS): New code iterator.
26740         (vfml_op): New code attribute.
26741         (VFMLHALVES): New int iterator.
26742         (VFML, VFMLSEL): New mode attributes.
26743         (V_reg): Define mapping for V2HF.
26744         (V_hi, V_lo): New mode attributes.
26745         (VF_constraint): Likewise.
26746         (vfml_half, vfml_half_selector): New int attributes.
26747         * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
26748         define_expand.
26749         (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
26750         vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
26751         New define_insn.
26752         * config/arm/t-arm-elf (v8_fps): Add fp16fml.
26753         * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
26754         * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
26755         * doc/invoke.texi (ARM Options): Document fp16fml.  Update armv8.4-a
26756         documentation.
26757         * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
26758         Document new effective target and option set.
26760 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
26762         * config/arm/arm-cpus.in (armv8_4): New feature.
26763         (ARMv8_4a): New fgroup.
26764         (armv8.4-a): New arch.
26765         * config/arm/arm-tables.opt: Regenerate.
26766         * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
26767         * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
26768         * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
26769         Add matching rules for -march=armv8.4-a and extensions.
26770         * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
26772 2018-01-11  Oleg Endo  <olegendo@gcc.gnu.org>
26774         PR target/81821
26775         * config/rx/rx.md (BW): New mode attribute.
26776         (sync_lock_test_and_setsi): Add mode suffix to insn output.
26778 2018-01-11  Richard Biener  <rguenther@suse.de>
26780         PR tree-optimization/83435
26781         * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
26782         * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
26783         * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
26785 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
26786             Alan Hayward  <alan.hayward@arm.com>
26787             David Sherwood  <david.sherwood@arm.com>
26789         * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
26790         field.
26791         (aarch64_classify_address): Initialize it.  Track polynomial offsets.
26792         (aarch64_print_address_internal): Use it to check for a zero offset.
26794 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
26795             Alan Hayward  <alan.hayward@arm.com>
26796             David Sherwood  <david.sherwood@arm.com>
26798         * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
26799         * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
26800         Return a poly_int64 rather than a HOST_WIDE_INT.
26801         (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
26802         rather than a HOST_WIDE_INT.
26803         * config/aarch64/aarch64.h (aarch64_frame): Protect with
26804         HAVE_POLY_INT_H rather than HOST_WIDE_INT.  Change locals_offset,
26805         hard_fp_offset, frame_size, initial_adjust, callee_offset and
26806         final_offset from HOST_WIDE_INT to poly_int64.
26807         * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
26808         to_constant when getting the number of units in an Advanced SIMD
26809         mode.
26810         (aarch64_builtin_vectorized_function): Check for a constant number
26811         of units.
26812         * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
26813         GET_MODE_SIZE.
26814         (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
26815         attribute instead of GET_MODE_NUNITS.
26816         * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
26817         (aarch64_class_max_nregs): Use the constant_lowest_bound of the
26818         GET_MODE_SIZE for fixed-size registers.
26819         (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
26820         (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
26821         (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
26822         (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
26823         (aarch64_print_operand, aarch64_print_address_internal)
26824         (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
26825         (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
26826         (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
26827         Handle polynomial GET_MODE_SIZE.
26828         (aarch64_hard_regno_caller_save_mode): Likewise.  Return modes
26829         wider than SImode without modification.
26830         (tls_symbolic_operand_type): Use strip_offset instead of split_const.
26831         (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
26832         (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
26833         passing and returning SVE modes.
26834         (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
26835         rather than GEN_INT.
26836         (aarch64_emit_probe_stack_range): Take the size as a poly_int64
26837         rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
26838         (aarch64_allocate_and_probe_stack_space): Likewise.
26839         (aarch64_layout_frame): Cope with polynomial offsets.
26840         (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
26841         start_offset as a poly_int64 rather than a HOST_WIDE_INT.  Track
26842         polynomial offsets.
26843         (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
26844         (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
26845         poly_int64 rather than a HOST_WIDE_INT.
26846         (aarch64_get_separate_components, aarch64_process_components)
26847         (aarch64_expand_prologue, aarch64_expand_epilogue)
26848         (aarch64_use_return_insn_p): Handle polynomial frame offsets.
26849         (aarch64_anchor_offset): New function, split out from...
26850         (aarch64_legitimize_address): ...here.
26851         (aarch64_builtin_vectorization_cost): Handle polynomial
26852         TYPE_VECTOR_SUBPARTS.
26853         (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
26854         GET_MODE_NUNITS.
26855         (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
26856         number of elements from the PARALLEL rather than the mode.
26857         (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
26858         rather than GET_MODE_BITSIZE.
26859         (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
26860         (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
26861         (aarch64_expand_vec_perm_const_1): Handle polynomial
26862         d->perm.length () and d->perm elements.
26863         (aarch64_evpc_tbl): Likewise.  Use nelt rather than GET_MODE_NUNITS.
26864         Apply to_constant to d->perm elements.
26865         (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
26866         polynomial CONST_VECTOR_NUNITS.
26867         (aarch64_move_pointer): Take amount as a poly_int64 rather
26868         than an int.
26869         (aarch64_progress_pointer): Avoid temporary variable.
26870         * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
26871         the mode attribute instead of GET_MODE.
26873 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
26874             Alan Hayward  <alan.hayward@arm.com>
26875             David Sherwood  <david.sherwood@arm.com>
26877         * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
26878         x exists before using it.
26879         (aarch64_add_constant_internal): Rename to...
26880         (aarch64_add_offset_1): ...this.  Replace regnum with separate
26881         src and dest rtxes.  Handle the case in which they're different,
26882         including when the offset is zero.  Replace scratchreg with an rtx.
26883         Use 2 additions if there is no spare register into which we can
26884         move a 16-bit constant.
26885         (aarch64_add_constant): Delete.
26886         (aarch64_add_offset): Replace reg with separate src and dest
26887         rtxes.  Take a poly_int64 offset instead of a HOST_WIDE_INT.
26888         Use aarch64_add_offset_1.
26889         (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
26890         an rtx rather than an int.  Take the delta as a poly_int64
26891         rather than a HOST_WIDE_INT.  Use aarch64_add_offset.
26892         (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
26893         (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
26894         aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
26895         (aarch64_expand_epilogue): Update calls to aarch64_add_offset
26896         and aarch64_add_sp.
26897         (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
26898         aarch64_add_constant.
26900 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
26902         * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
26903         Use scalar_float_mode.
26905 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
26907         * config/aarch64/aarch64-simd.md
26908         (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
26909         (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
26910         (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
26911         (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
26912         (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
26913         (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
26914         (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
26915         (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
26916         (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
26917         (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
26919 2018-01-11  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
26921         PR target/83514
26922         * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
26923         targ_options->x_arm_arch_string is non NULL.
26925 2018-01-11  Tamar Christina  <tamar.christina@arm.com>
26927         * config/aarch64/aarch64.h
26928         (AARCH64_FL_FOR_ARCH8_4): Add  AARCH64_FL_DOTPROD.
26930 2018-01-11  Sudakshina Das  <sudi.das@arm.com>
26932         PR target/82096
26933         * expmed.c (emit_store_flag_force): Swap if const op0
26934         and change VOIDmode to mode of op0.
26936 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
26938         PR rtl-optimization/83761
26939         * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
26940         than bytes to mode_for_size.
26942 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
26944         PR middle-end/83189
26945         * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
26946         * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
26947         profile.
26949 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
26951         PR middle-end/83575
26952         * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
26953         when in layout mode.
26954         (cfg_layout_finalize): Do not verify cfg before we are out of layout.
26955         * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
26956         partition fixup.
26958 2018-01-10  Michael Collison  <michael.collison@arm.com>
26960         * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
26961         * config/aarch64/aarch64-option-extension.def: Add
26962         AARCH64_OPT_EXTENSION of 'fp16fml'.
26963         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
26964         (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
26965         * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
26966         * config/aarch64/constraints.md (Ui7): New constraint.
26967         * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
26968         (VFMLA_SEL_W): Ditto.
26969         (f16quad): Ditto.
26970         (f16mac1): Ditto.
26971         (VFMLA16_LOW): New int iterator.
26972         (VFMLA16_HIGH): Ditto.
26973         (UNSPEC_FMLAL): New unspec.
26974         (UNSPEC_FMLSL): Ditto.
26975         (UNSPEC_FMLAL2): Ditto.
26976         (UNSPEC_FMLSL2): Ditto.
26977         (f16mac): New code attribute.
26978         * config/aarch64/aarch64-simd-builtins.def
26979         (aarch64_fmlal_lowv2sf): Ditto.
26980         (aarch64_fmlsl_lowv2sf): Ditto.
26981         (aarch64_fmlalq_lowv4sf): Ditto.
26982         (aarch64_fmlslq_lowv4sf): Ditto.
26983         (aarch64_fmlal_highv2sf): Ditto.
26984         (aarch64_fmlsl_highv2sf): Ditto.
26985         (aarch64_fmlalq_highv4sf): Ditto.
26986         (aarch64_fmlslq_highv4sf): Ditto.
26987         (aarch64_fmlal_lane_lowv2sf): Ditto.
26988         (aarch64_fmlsl_lane_lowv2sf): Ditto.
26989         (aarch64_fmlal_laneq_lowv2sf): Ditto.
26990         (aarch64_fmlsl_laneq_lowv2sf): Ditto.
26991         (aarch64_fmlalq_lane_lowv4sf): Ditto.
26992         (aarch64_fmlsl_lane_lowv4sf): Ditto.
26993         (aarch64_fmlalq_laneq_lowv4sf): Ditto.
26994         (aarch64_fmlsl_laneq_lowv4sf): Ditto.
26995         (aarch64_fmlal_lane_highv2sf): Ditto.
26996         (aarch64_fmlsl_lane_highv2sf): Ditto.
26997         (aarch64_fmlal_laneq_highv2sf): Ditto.
26998         (aarch64_fmlsl_laneq_highv2sf): Ditto.
26999         (aarch64_fmlalq_lane_highv4sf): Ditto.
27000         (aarch64_fmlsl_lane_highv4sf): Ditto.
27001         (aarch64_fmlalq_laneq_highv4sf): Ditto.
27002         (aarch64_fmlsl_laneq_highv4sf): Ditto.
27003         * config/aarch64/aarch64-simd.md:
27004         (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
27005         (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
27006         (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
27007         (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
27008         (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
27009         (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
27010         (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
27011         (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
27012         (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
27013         (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
27014         (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
27015         (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
27016         (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
27017         (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
27018         (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
27019         (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
27020         (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
27021         (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
27022         (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
27023         (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
27024         * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
27025         (vfmlsl_low_u32): Ditto.
27026         (vfmlalq_low_u32): Ditto.
27027         (vfmlslq_low_u32): Ditto.
27028         (vfmlal_high_u32): Ditto.
27029         (vfmlsl_high_u32): Ditto.
27030         (vfmlalq_high_u32): Ditto.
27031         (vfmlslq_high_u32): Ditto.
27032         (vfmlal_lane_low_u32): Ditto.
27033         (vfmlsl_lane_low_u32): Ditto.
27034         (vfmlal_laneq_low_u32): Ditto.
27035         (vfmlsl_laneq_low_u32): Ditto.
27036         (vfmlalq_lane_low_u32): Ditto.
27037         (vfmlslq_lane_low_u32): Ditto.
27038         (vfmlalq_laneq_low_u32): Ditto.
27039         (vfmlslq_laneq_low_u32): Ditto.
27040         (vfmlal_lane_high_u32): Ditto.
27041         (vfmlsl_lane_high_u32): Ditto.
27042         (vfmlal_laneq_high_u32): Ditto.
27043         (vfmlsl_laneq_high_u32): Ditto.
27044         (vfmlalq_lane_high_u32): Ditto.
27045         (vfmlslq_lane_high_u32): Ditto.
27046         (vfmlalq_laneq_high_u32): Ditto.
27047         (vfmlslq_laneq_high_u32): Ditto.
27048         * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
27049         (AARCH64_FL_FOR_ARCH8_4): New.
27050         (AARCH64_ISA_F16FML): New ISA flag.
27051         (TARGET_F16FML): New feature flag for fp16fml.
27052         (doc/invoke.texi): Document new fp16fml option.
27054 2018-01-10  Michael Collison  <michael.collison@arm.com>
27056         * config/aarch64/aarch64-builtins.c:
27057         (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
27058         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
27059         (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
27060         * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
27061         (AARCH64_ISA_SHA3): New ISA flag.
27062         (TARGET_SHA3): New feature flag for sha3.
27063         * config/aarch64/iterators.md (sha512_op): New int attribute.
27064         (CRYPTO_SHA512): New int iterator.
27065         (UNSPEC_SHA512H): New unspec.
27066         (UNSPEC_SHA512H2): Ditto.
27067         (UNSPEC_SHA512SU0): Ditto.
27068         (UNSPEC_SHA512SU1): Ditto.
27069         * config/aarch64/aarch64-simd-builtins.def
27070         (aarch64_crypto_sha512hqv2di): New builtin.
27071         (aarch64_crypto_sha512h2qv2di): Ditto.
27072         (aarch64_crypto_sha512su0qv2di): Ditto.
27073         (aarch64_crypto_sha512su1qv2di): Ditto.
27074         (aarch64_eor3qv8hi): Ditto.
27075         (aarch64_rax1qv2di): Ditto.
27076         (aarch64_xarqv2di): Ditto.
27077         (aarch64_bcaxqv8hi): Ditto.
27078         * config/aarch64/aarch64-simd.md:
27079         (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
27080         (aarch64_crypto_sha512su0qv2di): Ditto.
27081         (aarch64_crypto_sha512su1qv2di): Ditto.
27082         (aarch64_eor3qv8hi): Ditto.
27083         (aarch64_rax1qv2di): Ditto.
27084         (aarch64_xarqv2di): Ditto.
27085         (aarch64_bcaxqv8hi): Ditto.
27086         * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
27087         (vsha512h2q_u64): Ditto.
27088         (vsha512su0q_u64): Ditto.
27089         (vsha512su1q_u64): Ditto.
27090         (veor3q_u16): Ditto.
27091         (vrax1q_u64): Ditto.
27092         (vxarq_u64): Ditto.
27093         (vbcaxq_u16): Ditto.
27094         * config/arm/types.md (crypto_sha512): New type attribute.
27095         (crypto_sha3): Ditto.
27096         (doc/invoke.texi): Document new sha3 option.
27098 2018-01-10  Michael Collison  <michael.collison@arm.com>
27100         * config/aarch64/aarch64-builtins.c:
27101         (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
27102         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
27103         (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
27104         (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
27105         * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
27106         (AARCH64_ISA_SM4): New ISA flag.
27107         (TARGET_SM4): New feature flag for sm4.
27108         * config/aarch64/aarch64-simd-builtins.def
27109         (aarch64_sm3ss1qv4si): Ditto.
27110         (aarch64_sm3tt1aq4si): Ditto.
27111         (aarch64_sm3tt1bq4si): Ditto.
27112         (aarch64_sm3tt2aq4si): Ditto.
27113         (aarch64_sm3tt2bq4si): Ditto.
27114         (aarch64_sm3partw1qv4si): Ditto.
27115         (aarch64_sm3partw2qv4si): Ditto.
27116         (aarch64_sm4eqv4si): Ditto.
27117         (aarch64_sm4ekeyqv4si): Ditto.
27118         * config/aarch64/aarch64-simd.md:
27119         (aarch64_sm3ss1qv4si): Ditto.
27120         (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
27121         (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
27122         (aarch64_sm4eqv4si): Ditto.
27123         (aarch64_sm4ekeyqv4si): Ditto.
27124         * config/aarch64/iterators.md (sm3tt_op): New int iterator.
27125         (sm3part_op): Ditto.
27126         (CRYPTO_SM3TT): Ditto.
27127         (CRYPTO_SM3PART): Ditto.
27128         (UNSPEC_SM3SS1): New unspec.
27129         (UNSPEC_SM3TT1A): Ditto.
27130         (UNSPEC_SM3TT1B): Ditto.
27131         (UNSPEC_SM3TT2A): Ditto.
27132         (UNSPEC_SM3TT2B): Ditto.
27133         (UNSPEC_SM3PARTW1): Ditto.
27134         (UNSPEC_SM3PARTW2): Ditto.
27135         (UNSPEC_SM4E): Ditto.
27136         (UNSPEC_SM4EKEY): Ditto.
27137         * config/aarch64/constraints.md (Ui2): New constraint.
27138         * config/aarch64/predicates.md (aarch64_imm2): New predicate.
27139         * config/arm/types.md (crypto_sm3): New type attribute.
27140         (crypto_sm4): Ditto.
27141         * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
27142         (vsm3tt1aq_u32): Ditto.
27143         (vsm3tt1bq_u32): Ditto.
27144         (vsm3tt2aq_u32): Ditto.
27145         (vsm3tt2bq_u32): Ditto.
27146         (vsm3partw1q_u32): Ditto.
27147         (vsm3partw2q_u32): Ditto.
27148         (vsm4eq_u32): Ditto.
27149         (vsm4ekeyq_u32): Ditto.
27150         (doc/invoke.texi): Document new sm4 option.
27152 2018-01-10  Michael Collison  <michael.collison@arm.com>
27154         * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
27155         * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
27156         (AARCH64_FL_FOR_ARCH8_4): New.
27157         (AARCH64_FL_V8_4): New flag.
27158         (doc/invoke.texi): Document new armv8.4-a option.
27160 2018-01-10  Michael Collison  <michael.collison@arm.com>
27162         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
27163         (__ARM_FEATURE_AES): Define if TARGET_AES is true.
27164         (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
27165         * config/aarch64/aarch64-option-extension.def: Add
27166         AARCH64_OPT_EXTENSION of 'sha2'.
27167         (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
27168         (crypto): Disable sha2 and aes if crypto disabled.
27169         (crypto): Enable aes and sha2 if enabled.
27170         (simd): Disable sha2 and aes if simd disabled.
27171         * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
27172         New flags.
27173         (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
27174         (TARGET_SHA2): New feature flag for sha2.
27175         (TARGET_AES): New feature flag for aes.
27176         * config/aarch64/aarch64-simd.md:
27177         (aarch64_crypto_aes<aes_op>v16qi): Make pattern
27178         conditional on TARGET_AES.
27179         (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
27180         (aarch64_crypto_sha1hsi): Make pattern conditional
27181         on TARGET_SHA2.
27182         (aarch64_crypto_sha1hv4si): Ditto.
27183         (aarch64_be_crypto_sha1hv4si): Ditto.
27184         (aarch64_crypto_sha1su1v4si): Ditto.
27185         (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
27186         (aarch64_crypto_sha1su0v4si): Ditto.
27187         (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
27188         (aarch64_crypto_sha256su0v4si): Ditto.
27189         (aarch64_crypto_sha256su1v4si): Ditto.
27190         (doc/invoke.texi): Document new aes and sha2 options.
27192 2018-01-10  Martin Sebor  <msebor@redhat.com>
27194         PR tree-optimization/83781
27195         * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
27196         as string arrays.
27198 2018-01-11  Martin Sebor  <msebor@gmail.com>
27199             Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
27201         PR tree-optimization/83501
27202         PR tree-optimization/81703
27204         * tree-ssa-strlen.c (get_string_cst): Rename...
27205         (get_string_len): ...to this.  Handle global constants.
27206         (handle_char_store): Adjust.
27208 2018-01-10  Kito Cheng  <kito.cheng@gmail.com>
27209             Jim Wilson  <jimw@sifive.com>
27211         * config/riscv/riscv-protos.h (riscv_output_return): New.
27212         * config/riscv/riscv.c (struct machine_function): New naked_p field.
27213         (riscv_attribute_table, riscv_output_return),
27214         (riscv_handle_fndecl_attribute, riscv_naked_function_p),
27215         (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
27216         (riscv_compute_frame_info): Only compute frame->mask if not a naked
27217         function.
27218         (riscv_expand_prologue): Add early return for naked function.
27219         (riscv_expand_epilogue): Likewise.
27220         (riscv_function_ok_for_sibcall): Return false for naked function.
27221         (riscv_set_current_function): New.
27222         (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
27223         (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
27224         * config/riscv/riscv.md (simple_return): Call riscv_output_return.
27225         * doc/extend.texi (RISC-V Function Attributes): New.
27227 2018-01-10  Michael Meissner  <meissner@linux.vnet.ibm.com>
27229         * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
27230         check for 128-bit long double before checking TCmode.
27231         * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
27232         128-bit long doubles before checking TFmode or TCmode.
27233         (FLOAT128_IBM_P): Likewise.
27235 2018-01-10  Martin Sebor  <msebor@redhat.com>
27237         PR tree-optimization/83671
27238         * builtins.c (c_strlen): Unconditionally return zero for the empty
27239         string.
27240         Use -Warray-bounds for warnings.
27241         * gimple-fold.c (get_range_strlen): Handle non-constant lengths
27242         for non-constant array indices with COMPONENT_REF, arrays of
27243         arrays, and pointers to arrays.
27244         (gimple_fold_builtin_strlen): Determine and set length range for
27245         non-constant character arrays.
27247 2018-01-10  Aldy Hernandez  <aldyh@redhat.com>
27249         PR middle-end/81897
27250         * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
27251         empty blocks.
27253 2018-01-10  Eric Botcazou  <ebotcazou@adacore.com>
27255         * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
27257 2018-01-10  Peter Bergner  <bergner@vnet.ibm.com>
27259         PR target/83399
27260         * config/rs6000/rs6000.c (print_operand) <'y'>: Use
27261         VECTOR_MEM_ALTIVEC_OR_VSX_P.
27262         * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
27263         indexed_or_indirect_operand predicate.
27264         (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
27265         (*vsx_le_perm_load_v8hi): Likewise.
27266         (*vsx_le_perm_load_v16qi): Likewise.
27267         (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
27268         (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
27269         (*vsx_le_perm_store_v8hi): Likewise.
27270         (*vsx_le_perm_store_v16qi): Likewise.
27271         (eight unnamed splitters): Likewise.
27273 2018-01-10  Peter Bergner  <bergner@vnet.ibm.com>
27275         * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
27276         * config/rs6000/emmintrin.h: Likewise.
27277         * config/rs6000/mmintrin.h: Likewise.
27278         * config/rs6000/xmmintrin.h: Likewise.
27280 2018-01-10  David Malcolm  <dmalcolm@redhat.com>
27282         PR c++/43486
27283         * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
27284         "public_flag".
27285         * tree.c (tree_nop_conversion): Return true for location wrapper
27286         nodes.
27287         (maybe_wrap_with_location): New function.
27288         (selftest::check_strip_nops): New function.
27289         (selftest::test_location_wrappers): New function.
27290         (selftest::tree_c_tests): Call it.
27291         * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
27292         (maybe_wrap_with_location): New decl.
27293         (EXPR_LOCATION_WRAPPER_P): New macro.
27294         (location_wrapper_p): New inline function.
27295         (tree_strip_any_location_wrapper): New inline function.
27297 2018-01-10  H.J. Lu  <hongjiu.lu@intel.com>
27299         PR target/83735
27300         * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
27301         stack_realign_offset for the largest alignment of stack slot
27302         actually used.
27303         (ix86_find_max_used_stack_alignment): New function.
27304         (ix86_finalize_stack_frame_flags): Use it.  Set
27305         max_used_stack_alignment if we don't realign stack.
27306         * config/i386/i386.h (machine_function): Add
27307         max_used_stack_alignment.
27309 2018-01-10  Christophe Lyon  <christophe.lyon@linaro.org>
27311         * config/arm/arm.opt (-mbranch-cost): New option.
27312         * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
27313         account.
27315 2018-01-10  Segher Boessenkool  <segher@kernel.crashing.org>
27317         PR target/83629
27318         * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
27319         load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
27321 2018-01-10  Richard Biener  <rguenther@suse.de>
27323         PR debug/83765
27324         * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
27325         early out so it also covers the case where we have a non-NULL
27326         origin.
27328 2018-01-10  Richard Sandiford  <richard.sandiford@linaro.org>
27330         PR tree-optimization/83753
27331         * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
27332         for non-strided grouped accesses if the number of elements is 1.
27334 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
27336         PR target/81616
27337         * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
27338         * i386.h (TARGET_USE_GATHER): Define.
27339         * x86-tune.def (X86_TUNE_USE_GATHER): New.
27341 2018-01-10  Martin Liska  <mliska@suse.cz>
27343         PR bootstrap/82831
27344         * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
27345         * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
27346         partitioning.
27347         * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
27348         CLEANUP_NO_PARTITIONING is not set.
27350 2018-01-10  Richard Sandiford  <richard.sandiford@linaro.org>
27352         * doc/rtl.texi: Remove documentation of (const ...) wrappers
27353         for vectors, as a partial revert of r254296.
27354         * rtl.h (const_vec_p): Delete.
27355         (const_vec_duplicate_p): Don't test for vector CONSTs.
27356         (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
27357         * expmed.c (make_tree): Likewise.
27359         Revert:
27360         * common.md (E, F): Use CONSTANT_P instead of checking for
27361         CONST_VECTOR.
27362         * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
27363         checking for CONST_VECTOR.
27365 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
27367         PR middle-end/83575
27368         * predict.c (force_edge_cold): Handle in more sane way edges
27369         with no prediction.
27371 2018-01-09  Carl Love  <cel@us.ibm.com>
27373         * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
27374         V4SI, V4SF types.
27375         (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
27376         * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
27377         VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
27378         VMRGOW_V2DI, VMRGOW_V2DF.  Remove definition for VMRGOW.
27379         * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
27380         P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW):  Add definitions.
27381         * config/rs6000/rs6000-protos.h: Add extern defition for
27382         rs6000_generate_float2_double_code.
27383         * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
27384         function.
27385         * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
27386         (float2_v2df): Add define_expand.
27388 2018-01-09  Uros Bizjak  <ubizjak@gmail.com>
27390         PR target/83628
27391         * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
27392         op_mode in the force_to_mode call.
27394 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
27396         * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
27397         instead of checking each element individually.
27398         (aarch64_evpc_uzp): Likewise.
27399         (aarch64_evpc_zip): Likewise.
27400         (aarch64_evpc_ext): Likewise.
27401         (aarch64_evpc_rev): Likewise.
27402         (aarch64_evpc_dup): Test the encoding for a single duplicated element,
27403         instead of checking each element individually.  Return true without
27404         generating rtl if
27405         (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
27406         whether all selected elements come from the same input, instead of
27407         checking each element individually.  Remove calls to gen_rtx_REG,
27408         start_sequence and end_sequence and instead assert that no rtl is
27409         generated.
27411 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
27413         * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
27414         order of HIGH and CONST checks.
27416 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
27418         * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
27419         if the destination isn't an SSA_NAME.
27421 2018-01-09  Richard Biener  <rguenther@suse.de>
27423         PR tree-optimization/83668
27424         * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
27425         move prologue...
27426         (canonicalize_loop_form): ... here, renamed from ...
27427         (canonicalize_loop_closed_ssa_form): ... this and amended to
27428         swap successor edges for loop exit blocks to make us use
27429         the RPO order we need for initial schedule generation.
27431 2018-01-09  Joseph Myers  <joseph@codesourcery.com>
27433         PR tree-optimization/64811
27434         * match.pd: When optimizing comparisons with Inf, avoid
27435         introducing or losing exceptions from comparisons with NaN.
27437 2018-01-09  Martin Liska  <mliska@suse.cz>
27439         PR sanitizer/82517
27440         * asan.c (shadow_mem_size): Add gcc_assert.
27442 2018-01-09  Georg-Johann Lay  <avr@gjlay.de>
27444         Don't save registers in main().
27446         PR target/83738
27447         * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
27448         * config/avr/avr.opt (-mmain-is-OS_task): New target option.
27449         * config/avr/avr.c (avr_set_current_function): Don't error if
27450         naked, OS_task or OS_main are specified at the same time.
27451         (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
27452         OS_main.
27453         (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
27454         attribute.
27455         * common/config/avr/avr-common.c (avr_option_optimization_table):
27456         Switch on -mmain-is-OS_task for optimizing compilations.
27458 2018-01-09  Richard Biener  <rguenther@suse.de>
27460         PR tree-optimization/83572
27461         * graphite.c: Include cfganal.h.
27462         (graphite_transform_loops): Connect infinite loops to exit
27463         and remove fake edges at the end.
27465 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
27467         * ipa-inline.c (edge_badness): Revert accidental checkin.
27469 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
27471         PR ipa/80763
27472         * ipa-comdats.c (set_comdat_group): Only set comdat group of real
27473         symbols; not inline clones.
27475 2018-01-09  Jakub Jelinek  <jakub@redhat.com>
27477         PR target/83507
27478         * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
27479         hard registers.  Formatting fixes.
27481         PR preprocessor/83722
27482         * gcc.c (try_generate_repro): Pass
27483         &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
27484         &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
27485         do_report_bug.
27487 2018-01-08  Monk Chiang  <sh.chiang04@gmail.com>
27488             Kito Cheng  <kito.cheng@gmail.com>
27490         * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
27491         (riscv_leaf_function_p): Delete.
27492         (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
27494 2018-01-08  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
27496         * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
27497         function.
27498         (do_ifelse): New function.
27499         (do_isel): New function.
27500         (do_sub3): New function.
27501         (do_add3): New function.
27502         (do_load_mask_compare): New function.
27503         (do_overlap_load_compare): New function.
27504         (expand_compare_loop): New function.
27505         (expand_block_compare): Call expand_compare_loop() when appropriate.
27506         * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
27507         option description.
27508         (-mblock-compare-inline-loop-limit): New option.
27510 2018-01-08  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
27512         PR target/83677
27513         * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
27514         Reverse order of second and third operands in first alternative.
27515         * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
27516         of first and second elements in UNSPEC_VPERMR vector.
27517         (altivec_expand_vec_perm_le): Likewise.
27519 2018-01-08  Jeff Law  <law@redhat.com>
27521         PR rtl-optimizatin/81308
27522         * tree-switch-conversion.c (cfg_altered): New file scoped static.
27523         (process_switch): If group_case_labels makes a change, then set
27524         cfg_altered.
27525         (pass_convert_switch::execute): If a switch is converted, then
27526         set cfg_altered.  Return TODO_cfg_cleanup if cfg_altered is true.
27528         PR rtl-optimization/81308
27529         * recog.c (split_all_insns): Conditionally cleanup the CFG after
27530         splitting insns.
27532 2018-01-08  Vidya Praveen  <vidyapraveen@arm.com>
27534         PR target/83663 - Revert r255946
27535         * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
27536         generation for cases where splatting a value is not useful.
27537         * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
27538         across a vec_duplicate and a paradoxical subreg forming a vector
27539         mode to a vec_concat.
27541 2018-01-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
27543         * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
27544         -march=armv8.3-a variants.
27545         * config/arm/t-multilib: Likewise.
27546         * config/arm/t-arm-elf: Likewise.  Handle dotprod extension.
27548 2018-01-08  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
27550         * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
27551         to generate rtl.
27552         (cceq_ior_compare_complement): Give it a name so I can use it, and
27553         change boolean_or_operator predicate to boolean_operator so it can
27554         be used to generate a crand.
27555         (eqne): New code iterator.
27556         (bd/bd_neg): New code_attrs.
27557         (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
27558         a single define_insn.
27559         (<bd>tf_<mode>): A new insn pattern for the conditional form branch
27560         decrement (bdnzt/bdnzf/bdzt/bdzf).
27561         * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
27562         with the new names of the branch decrement patterns, and added the
27563         names of the branch decrement conditional patterns.
27565 2018-01-08  Richard Biener  <rguenther@suse.de>
27567         PR tree-optimization/83563
27568         * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
27569         cache.
27571 2018-01-08  Richard Biener  <rguenther@suse.de>
27573         PR middle-end/83713
27574         * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
27576 2018-01-08  Richard Biener  <rguenther@suse.de>
27578         PR tree-optimization/83685
27579         * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
27580         references to abnormals.
27582 2018-01-08  Richard Biener  <rguenther@suse.de>
27584         PR lto/83719
27585         * dwarf2out.c (output_indirect_strings): Handle empty
27586         skeleton_debug_str_hash.
27587         (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
27589 2018-01-08  Claudiu Zissulescu  <claziss@synopsys.com>
27591         * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
27592         (emit_store_direct): Likewise.
27593         (arc_trampoline_adjust_address): Likewise.
27594         (arc_asm_trampoline_template): New function.
27595         (arc_initialize_trampoline): Use asm_trampoline_template.
27596         (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
27597         * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
27598         * config/arc/arc.md (flush_icache): Delete pattern.
27600 2018-01-08  Claudiu Zissulescu  <claziss@synopsys.com>
27602         * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
27603         * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
27604         munaligned-access.
27606 2018-01-08  Sebastian Huber  <sebastian.huber@embedded-brains.de>
27608         PR target/83681
27609         * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
27610         by not USED_FOR_TARGET.
27611         (make_pass_resolve_sw_modes): Likewise.
27613 2018-01-08  Sebastian Huber  <sebastian.huber@embedded-brains.de>
27615         * config/nios2/nios2.h (nios2_section_threshold): Guard by not
27616         USED_FOR_TARGET.
27618 2018-01-08  Richard Biener  <rguenther@suse.de>
27620         PR middle-end/83580
27621         * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
27623 2018-01-08  Richard Biener  <rguenther@suse.de>
27625         PR middle-end/83517
27626         * match.pd ((t * 2) / 2) -> t): Add missing :c.
27628 2018-01-06  Aldy Hernandez  <aldyh@redhat.com>
27630         PR middle-end/81897
27631         * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
27632         basic blocks with a small number of successors.
27633         (convert_control_dep_chain_into_preds): Improve handling of
27634         forwarder blocks.
27635         (dump_predicates): Split apart into...
27636         (dump_pred_chain): ...here...
27637         (dump_pred_info): ...and here.
27638         (can_one_predicate_be_invalidated_p): Add debugging printfs.
27639         (can_chain_union_be_invalidated_p): Improve check for invalidation
27640         of paths.
27641         (uninit_uses_cannot_happen): Avoid unnecessary if
27642         convert_control_dep_chain_into_preds yielded nothing.
27644 2018-01-06  Martin Sebor  <msebor@redhat.com>
27646         PR tree-optimization/83640
27647         * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
27648         subtracting negative offset from size.
27649         (builtin_access::overlap): Adjust offset bounds of the access to fall
27650         within the size of the object if possible.
27652 2018-01-06  Richard Sandiford  <richard.sandiford@linaro.org>
27654         PR rtl-optimization/83699
27655         * expmed.c (extract_bit_field_1): Restrict the vector usage of
27656         extract_bit_field_as_subreg to cases in which the extracted
27657         value is also a vector.
27659         * lra-constraints.c (process_alt_operands): Test for the equivalence
27660         substitutions when detecting a possible reload cycle.
27662 2018-01-06  Jakub Jelinek  <jakub@redhat.com>
27664         PR debug/83480
27665         * toplev.c (process_options): Don't enable debug_nonbind_markers_p
27666         by default if flag_selective_schedling{,2}.  Formatting fixes.
27668         PR rtl-optimization/83682
27669         * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
27670         if it has non-VECTOR_MODE element mode.
27671         (vec_duplicate_p): Likewise.
27673         PR middle-end/83694
27674         * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
27675         and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
27677 2018-01-05  Jakub Jelinek  <jakub@redhat.com>
27679         PR target/83604
27680         * config/i386/i386-builtin.def
27681         (__builtin_ia32_vgf2p8affineinvqb_v64qi,
27682         __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
27683         Require also OPTION_MASK_ISA_AVX512F in addition to
27684         OPTION_MASK_ISA_GFNI.
27685         (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
27686         __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
27687         OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
27688         to OPTION_MASK_ISA_GFNI.
27689         (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
27690         OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
27691         OPTION_MASK_ISA_AVX512BW.
27692         (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
27693         OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
27694         addition to OPTION_MASK_ISA_GFNI.
27695         (__builtin_ia32_vgf2p8affineinvqb_v16qi,
27696         __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
27697         Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
27698         to OPTION_MASK_ISA_GFNI.
27699         * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
27700         a requirement for all ISAs rather than any of them with a few
27701         exceptions.
27702         (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
27703         processing.
27704         (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
27705         bitmasks to be enabled with 3 exceptions, instead of requiring any
27706         enabled ISA with lots of exceptions.
27707         * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
27708         vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
27709         Change avx512bw in isa attribute to avx512f.
27710         * config/i386/sgxintrin.h: Add license boilerplate.
27711         * config/i386/vaesintrin.h: Likewise.  Fix macro spelling __AVX512F
27712         to __AVX512F__ and __AVX512VL to __AVX512VL__.
27713         (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
27714         _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
27715         defined.
27716         * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
27717         _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
27718         temporarily sse2 rather than sse if not enabled already.
27720         PR target/83604
27721         * config/i386/sse.md (VI248_VLBW): Rename to ...
27722         (VI248_AVX512VL): ... this.  Don't guard V32HI with TARGET_AVX512BW.
27723         (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
27724         vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
27725         vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
27726         vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
27727         mode iterator instead of VI248_VLBW.
27729 2018-01-05  Jan Hubicka  <hubicka@ucw.cz>
27731         * ipa-fnsummary.c (record_modified_bb_info): Add OP.
27732         (record_modified): Skip clobbers; add debug output.
27733         (param_change_prob): Use sreal frequencies.
27735 2018-01-05  Richard Sandiford  <richard.sandiford@linaro.org>
27737         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
27738         punt for user-aligned variables.
27740 2018-01-05  Richard Sandiford  <richard.sandiford@linaro.org>
27742         * tree-chrec.c (chrec_contains_symbols): Return true for
27743         POLY_INT_CST.
27745 2018-01-05  Sudakshina Das  <sudi.das@arm.com>
27747         PR target/82439
27748         * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
27749         of (x|y) == x for BICS pattern.
27751 2018-01-05  Jakub Jelinek  <jakub@redhat.com>
27753         PR tree-optimization/83605
27754         * gimple-ssa-strength-reduction.c: Include tree-eh.h.
27755         (find_candidates_dom_walker::before_dom_children): Ignore stmts that
27756         can throw.
27758 2018-01-05  Sebastian Huber  <sebastian.huber@embedded-brains.de>
27760         * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
27761         * config/epiphany/rtems.h: New file.
27763 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
27764             Uros Bizjak  <ubizjak@gmail.com>
27766         PR target/83554
27767         * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
27768         QIreg_operand instead of register_operand predicate.
27769         * config/i386/i386.c (ix86_rop_should_change_byte_p,
27770         set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
27771         comments instead of -fmitigate[-_]rop.
27773 2018-01-04  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
27775         PR bootstrap/81926
27776         * cgraphunit.c (symbol_table::compile): Switch to text_section
27777         before calling assembly_start debug hook.
27778         * run-rtl-passes.c (run_rtl_passes): Likewise.
27779         Include output.h.
27781 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
27783         * tree-vrp.c (extract_range_from_binary_expr_1): Check
27784         range_int_cst_p rather than !symbolic_range_p before calling
27785         extract_range_from_multiplicative_op_1.
27787 2018-01-04  Jeff Law  <law@redhat.com>
27789         * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
27790         redundant test in assertion.
27792 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
27794         * doc/rtl.texi: Document machine_mode wrapper classes.
27796 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
27798         * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
27799         using tree_to_uhwi.
27801 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
27803         * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
27804         the VEC_PERM_EXPR fold to fail.
27806 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
27808         PR debug/83585
27809         * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
27810         to switched_sections.
27812 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
27814         PR target/83680
27815         * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
27816         test for d.testing.
27818 2018-01-04  Peter Bergner  <bergner@vnet.ibm.com>
27820         PR target/83387
27821         * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
27822         allow arguments in FP registers if TARGET_HARD_FLOAT is false.
27824 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
27826         PR debug/83666
27827         * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
27828         is BLKmode and bitpos not zero or mode change is needed.
27830 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
27832         PR target/83675
27833         * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
27834         TARGET_VIS2.
27836 2018-01-04  Uros Bizjak  <ubizjak@gmail.com>
27838         PR target/83628
27839         * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
27840         instead of MULT rtx.  Update all corresponding splitters.
27841         (*saddl_se): Ditto.
27842         (*ssub<modesuffix>): Ditto.
27843         (*ssubl_se): Ditto.
27844         (*cmp_sadd_di): Update split patterns.
27845         (*cmp_sadd_si): Ditto.
27846         (*cmp_sadd_sidi): Ditto.
27847         (*cmp_ssub_di): Ditto.
27848         (*cmp_ssub_si): Ditto.
27849         (*cmp_ssub_sidi): Ditto.
27850         * config/alpha/predicates.md (const23_operand): New predicate.
27851         * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
27852         Look for ASHIFT, not MULT inner operand.
27853         (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
27855 2018-01-04  Martin Liska  <mliska@suse.cz>
27857         PR gcov-profile/83669
27858         * gcov.c (output_intermediate_file): Add version to intermediate
27859         gcov file.
27860         * doc/gcov.texi: Document new field 'version' in intermediate
27861         file format. Fix location of '-k' option of gcov command.
27863 2018-01-04  Martin Liska  <mliska@suse.cz>
27865         PR ipa/82352
27866         * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
27868 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
27870         * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
27872 2018-01-03  Martin Sebor  <msebor@redhat.com>
27874         PR tree-optimization/83655
27875         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
27876         checking calls with invalid arguments.
27878 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27880         * tree-vect-stmts.c (vect_get_store_rhs): New function.
27881         (vectorizable_mask_load_store): Delete.
27882         (vectorizable_call): Return false for masked loads and stores.
27883         (vectorizable_store): Handle IFN_MASK_STORE.  Use vect_get_store_rhs
27884         instead of gimple_assign_rhs1.
27885         (vectorizable_load): Handle IFN_MASK_LOAD.
27886         (vect_transform_stmt): Don't set is_store for call_vec_info_type.
27888 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27890         * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
27891         split out from..,
27892         (vectorizable_mask_load_store): ...here.
27893         (vectorizable_load): ...and here.
27895 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27897         * tree-vect-stmts.c (vect_build_all_ones_mask)
27898         (vect_build_zero_merge_argument): New functions, split out from...
27899         (vectorizable_load): ...here.
27901 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27903         * tree-vect-stmts.c (vect_check_store_rhs): New function,
27904         split out from...
27905         (vectorizable_mask_load_store): ...here.
27906         (vectorizable_store): ...and here.
27908 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27910         * tree-vect-stmts.c (vect_check_load_store_mask): New function,
27911         split out from...
27912         (vectorizable_mask_load_store): ...here.
27914 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27916         * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
27917         (vect_model_store_cost): Take a vec_load_store_type instead of a
27918         vect_def_type.
27919         * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
27920         (vect_model_store_cost): Take a vec_load_store_type instead of a
27921         vect_def_type.
27922         (vectorizable_mask_load_store): Update accordingly.
27923         (vectorizable_store): Likewise.
27924         * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
27926 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27928         * tree-vect-loop.c (vect_transform_loop): Stub out scalar
27929         IFN_MASK_LOAD calls here rather than...
27930         * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
27932 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27933             Alan Hayward  <alan.hayward@arm.com>
27934             David Sherwood  <david.sherwood@arm.com>
27936         * expmed.c (extract_bit_field_1): For vector extracts,
27937         fall back to extract_bit_field_as_subreg if vec_extract
27938         isn't available.
27940 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27941             Alan Hayward  <alan.hayward@arm.com>
27942             David Sherwood  <david.sherwood@arm.com>
27944         * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
27945         they are variable or constant sized.
27946         (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
27947         slots for constant-sized data.
27949 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27950             Alan Hayward  <alan.hayward@arm.com>
27951             David Sherwood  <david.sherwood@arm.com>
27953         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
27954         handling COND_EXPRs with boolean comparisons, try to find a better
27955         basis for the mask type than the boolean itself.
27957 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27959         * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
27960         is calculated and how it can be overridden.
27961         * genmodes.c (max_bitsize_mode_any_mode): New variable.
27962         (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
27963         if defined.
27964         (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
27965         if nonzero.
27967 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27968             Alan Hayward  <alan.hayward@arm.com>
27969             David Sherwood  <david.sherwood@arm.com>
27971         * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
27972         Remove the mode argument.
27973         (aarch64_simd_valid_immediate): Remove the mode and inverse
27974         arguments.
27975         * config/aarch64/iterators.md (bitsize): New iterator.
27976         * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
27977         (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
27978         * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
27979         aarch64_simd_valid_immediate.
27980         * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
27981         (aarch64_reg_or_bic_imm): Likewise.
27982         * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
27983         with an insn_type enum and msl with a modifier_type enum.
27984         Replace element_width with a scalar_mode.  Change the shift
27985         to unsigned int.  Add constructors for scalar_float_mode and
27986         scalar_int_mode elements.
27987         (aarch64_vect_float_const_representable_p): Delete.
27988         (aarch64_can_const_movi_rtx_p)
27989         (aarch64_simd_scalar_immediate_valid_for_move)
27990         (aarch64_simd_make_constant): Update call to
27991         aarch64_simd_valid_immediate.
27992         (aarch64_advsimd_valid_immediate_hs): New function.
27993         (aarch64_advsimd_valid_immediate): Likewise.
27994         (aarch64_simd_valid_immediate): Remove mode and inverse
27995         arguments.  Rewrite to use the above.  Use const_vec_duplicate_p
27996         to detect duplicated constants and use aarch64_float_const_zero_rtx_p
27997         and aarch64_float_const_representable_p on the result.
27998         (aarch64_output_simd_mov_immediate): Remove mode argument.
27999         Update call to aarch64_simd_valid_immediate and use of
28000         simd_immediate_info.
28001         (aarch64_output_scalar_simd_mov_immediate): Update call
28002         accordingly.
28004 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28005             Alan Hayward  <alan.hayward@arm.com>
28006             David Sherwood  <david.sherwood@arm.com>
28008         * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
28009         (mode_nunits): Likewise CONST_MODE_NUNITS.
28010         * machmode.def (ADJUST_NUNITS): Document.
28011         * genmodes.c (mode_data::need_nunits_adj): New field.
28012         (blank_mode): Update accordingly.
28013         (adj_nunits): New variable.
28014         (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
28015         parameter.
28016         (emit_mode_size_inline): Set need_bytesize_adj for all modes
28017         listed in adj_nunits.
28018         (emit_mode_nunits_inline): Set need_nunits_adj for all modes
28019         listed in adj_nunits.  Don't emit case statements for such modes.
28020         (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
28021         and CONST_MODE_PRECISION.  Make CONST_MODE_SIZE expand to
28022         nothing if adj_nunits is nonnull.
28023         (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
28024         (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
28025         (emit_mode_fbit): Update use of print_maybe_const_decl.
28026         (emit_move_size): Likewise.  Treat the array as non-const
28027         if adj_nunits.
28028         (emit_mode_adjustments): Handle adj_nunits.
28030 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28032         * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
28033         * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
28034         (VECTOR_MODES): Use it.
28035         (make_vector_modes): Take the prefix as an argument.
28037 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28038             Alan Hayward  <alan.hayward@arm.com>
28039             David Sherwood  <david.sherwood@arm.com>
28041         * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
28042         * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
28043         for MODE_VECTOR_BOOL.
28044         * machmode.def (VECTOR_BOOL_MODE): Document.
28045         * genmodes.c (VECTOR_BOOL_MODE): New macro.
28046         (make_vector_bool_mode): New function.
28047         (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
28048         MODE_VECTOR_BOOL.
28049         * lto-streamer-in.c (lto_input_mode_table): Likewise.
28050         * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
28051         Likewise.
28052         * stor-layout.c (int_mode_for_mode): Likewise.
28053         * tree.c (build_vector_type_for_mode): Likewise.
28054         * varasm.c (output_constant_pool_2): Likewise.
28055         * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
28056         CONSTM1_RTX (BImode) are the same thing.  Initialize const_tiny_rtx
28057         for MODE_VECTOR_BOOL.
28058         * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
28059         of mode class checks.
28060         * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
28061         instead of a list of mode class checks.
28062         (expand_vector_scalar_condition): Likewise.
28063         (type_for_widest_vector_mode): Handle BImode as an inner mode.
28065 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28066             Alan Hayward  <alan.hayward@arm.com>
28067             David Sherwood  <david.sherwood@arm.com>
28069         * machmode.h (mode_size): Change from unsigned short to
28070         poly_uint16_pod.
28071         (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
28072         (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
28073         or if measurement_type is not polynomial.
28074         (fixed_size_mode::includes_p): Check for constant-sized modes.
28075         * genmodes.c (emit_mode_size_inline): Make mode_size_inline
28076         return a poly_uint16 rather than an unsigned short.
28077         (emit_mode_size): Change the type of mode_size from unsigned short
28078         to poly_uint16_pod.  Use ZERO_COEFFS for the initializer.
28079         (emit_mode_adjustments): Cope with polynomial vector sizes.
28080         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
28081         for GET_MODE_SIZE.
28082         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
28083         for GET_MODE_SIZE.
28084         * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
28085         * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
28086         * caller-save.c (setup_save_areas): Likewise.
28087         (replace_reg_with_saved_mem): Likewise.
28088         * calls.c (emit_library_call_value_1): Likewise.
28089         * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
28090         * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
28091         (gen_lowpart_for_combine): Likewise.
28092         * convert.c (convert_to_integer_1): Likewise.
28093         * cse.c (equiv_constant, cse_insn): Likewise.
28094         * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
28095         (cselib_subst_to_values): Likewise.
28096         * dce.c (word_dce_process_block): Likewise.
28097         * df-problems.c (df_word_lr_mark_ref): Likewise.
28098         * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
28099         * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
28100         (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
28101         (rtl_for_decl_location): Likewise.
28102         * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
28103         * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
28104         * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
28105         (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
28106         (expand_expr_real_1): Likewise.
28107         * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
28108         (pad_below): Likewise.
28109         * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
28110         * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
28111         * ira.c (get_subreg_tracking_sizes): Likewise.
28112         * ira-build.c (ira_create_allocno_objects): Likewise.
28113         * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
28114         (ira_sort_regnos_for_alter_reg): Likewise.
28115         * ira-costs.c (record_operand_costs): Likewise.
28116         * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
28117         (resolve_simple_move): Likewise.
28118         * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
28119         (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
28120         (lra_constraints): Likewise.
28121         (CONST_POOL_OK_P): Reject variable-sized modes.
28122         * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
28123         (add_pseudo_to_slot, lra_spill): Likewise.
28124         * omp-low.c (omp_clause_aligned_alignment): Likewise.
28125         * optabs-query.c (get_best_extraction_insn): Likewise.
28126         * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
28127         * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
28128         (expand_mult_highpart, valid_multiword_target_p): Likewise.
28129         * recog.c (offsettable_address_addr_space_p): Likewise.
28130         * regcprop.c (maybe_mode_change): Likewise.
28131         * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
28132         * regrename.c (build_def_use): Likewise.
28133         * regstat.c (dump_reg_info): Likewise.
28134         * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
28135         (find_reloads, find_reloads_subreg_address): Likewise.
28136         * reload1.c (eliminate_regs_1): Likewise.
28137         * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
28138         * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
28139         (simplify_binary_operation_1, simplify_subreg): Likewise.
28140         * targhooks.c (default_function_arg_padding): Likewise.
28141         (default_hard_regno_nregs, default_class_max_nregs): Likewise.
28142         * tree-cfg.c (verify_gimple_assign_binary): Likewise.
28143         (verify_gimple_assign_ternary): Likewise.
28144         * tree-inline.c (estimate_move_cost): Likewise.
28145         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
28146         * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
28147         (get_address_cost_ainc): Likewise.
28148         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
28149         (vect_supportable_dr_alignment): Likewise.
28150         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
28151         (vectorizable_reduction): Likewise.
28152         * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
28153         (vectorizable_operation, vectorizable_load): Likewise.
28154         * tree.c (build_same_sized_truth_vector_type): Likewise.
28155         * valtrack.c (cleanup_auto_inc_dec): Likewise.
28156         * var-tracking.c (emit_note_insn_var_location): Likewise.
28157         * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
28158         (ADDR_VEC_ALIGN): Likewise.
28160 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28161             Alan Hayward  <alan.hayward@arm.com>
28162             David Sherwood  <david.sherwood@arm.com>
28164         * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
28165         unsigned short.
28166         (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
28167         or if measurement_type is polynomial.
28168         * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
28169         * combine.c (make_extraction): Likewise.
28170         * dse.c (find_shift_sequence): Likewise.
28171         * dwarf2out.c (mem_loc_descriptor): Likewise.
28172         * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
28173         (extract_bit_field, extract_low_bits): Likewise.
28174         * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
28175         (optimize_bitfield_assignment_op, expand_assignment): Likewise.
28176         (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
28177         * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
28178         * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
28179         * reload.c (find_reloads): Likewise.
28180         * reload1.c (alter_reg): Likewise.
28181         * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
28182         * targhooks.c (default_secondary_memory_needed_mode): Likewise.
28183         * tree-if-conv.c (predicate_mem_writes): Likewise.
28184         * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
28185         * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
28186         * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
28187         * valtrack.c (dead_debug_insert_temp): Likewise.
28188         * varasm.c (mergeable_constant_section): Likewise.
28189         * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
28191 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28192             Alan Hayward  <alan.hayward@arm.com>
28193             David Sherwood  <david.sherwood@arm.com>
28195         * expr.c (expand_assignment): Cope with polynomial mode sizes
28196         when assigning to a CONCAT.
28198 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28199             Alan Hayward  <alan.hayward@arm.com>
28200             David Sherwood  <david.sherwood@arm.com>
28202         * machmode.h (mode_precision): Change from unsigned short to
28203         poly_uint16_pod.
28204         (mode_to_precision): Return a poly_uint16 rather than an unsigned
28205         short.
28206         (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
28207         or if measurement_type is not polynomial.
28208         (HWI_COMPUTABLE_MODE_P): Turn into a function.  Optimize the case
28209         in which the mode is already known to be a scalar_int_mode.
28210         * genmodes.c (emit_mode_precision): Change the type of mode_precision
28211         from unsigned short to poly_uint16_pod.  Use ZERO_COEFFS for the
28212         initializer.
28213         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
28214         for GET_MODE_PRECISION.
28215         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
28216         for GET_MODE_PRECISION.
28217         * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
28218         as polynomial.
28219         (try_combine, find_split_point, combine_simplify_rtx): Likewise.
28220         (expand_field_assignment, make_extraction): Likewise.
28221         (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
28222         (get_last_value): Likewise.
28223         * convert.c (convert_to_integer_1): Likewise.
28224         * cse.c (cse_insn): Likewise.
28225         * expr.c (expand_expr_real_1): Likewise.
28226         * lra-constraints.c (simplify_operand_subreg): Likewise.
28227         * optabs-query.c (can_atomic_load_p): Likewise.
28228         * optabs.c (expand_atomic_load): Likewise.
28229         (expand_atomic_store): Likewise.
28230         * ree.c (combine_reaching_defs): Likewise.
28231         * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
28232         * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
28233         * tree.h (type_has_mode_precision_p): Likewise.
28234         * ubsan.c (instrument_si_overflow): Likewise.
28236 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28237             Alan Hayward  <alan.hayward@arm.com>
28238             David Sherwood  <david.sherwood@arm.com>
28240         * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
28241         polynomial numbers of units.
28242         (SET_TYPE_VECTOR_SUBPARTS): Likewise.
28243         (valid_vector_subparts_p): New function.
28244         (build_vector_type): Remove temporary shim and take the number
28245         of units as a poly_uint64 rather than an int.
28246         (build_opaque_vector_type): Take the number of units as a
28247         poly_uint64 rather than an int.
28248         * tree.c (build_vector_from_ctor): Handle polynomial
28249         TYPE_VECTOR_SUBPARTS.
28250         (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
28251         (uniform_vector_p, vector_type_mode, build_vector): Likewise.
28252         (build_vector_from_val): If the number of units is variable,
28253         use build_vec_duplicate_cst for constant operands and
28254         VEC_DUPLICATE_EXPR otherwise.
28255         (make_vector_type): Remove temporary is_constant ().
28256         (build_vector_type, build_opaque_vector_type): Take the number of
28257         units as a poly_uint64 rather than an int.
28258         (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
28259         VECTOR_CST_NELTS.
28260         * cfgexpand.c (expand_debug_expr): Likewise.
28261         * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
28262         (store_constructor, expand_expr_real_1): Likewise.
28263         (const_scalar_mask_from_tree): Likewise.
28264         * fold-const-call.c (fold_const_reduction): Likewise.
28265         * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
28266         (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
28267         (native_encode_vector, vec_cst_ctor_to_array): Likewise.
28268         (fold_relational_const): Likewise.
28269         (native_interpret_vector): Likewise.  Change the size from an
28270         int to an unsigned int.
28271         * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
28272         TYPE_VECTOR_SUBPARTS.
28273         (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
28274         (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
28275         duplicating a non-constant operand into a variable-length vector.
28276         * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
28277         TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
28278         * ipa-icf.c (sem_variable::equals): Likewise.
28279         * match.pd: Likewise.
28280         * omp-simd-clone.c (simd_clone_subparts): Likewise.
28281         * print-tree.c (print_node): Likewise.
28282         * stor-layout.c (layout_type): Likewise.
28283         * targhooks.c (default_builtin_vectorization_cost): Likewise.
28284         * tree-cfg.c (verify_gimple_comparison): Likewise.
28285         (verify_gimple_assign_binary): Likewise.
28286         (verify_gimple_assign_ternary): Likewise.
28287         (verify_gimple_assign_single): Likewise.
28288         * tree-pretty-print.c (dump_generic_node): Likewise.
28289         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
28290         (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
28291         * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
28292         (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
28293         (vect_shift_permute_load_chain): Likewise.
28294         * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
28295         (expand_vector_condition, optimize_vector_constructor): Likewise.
28296         (lower_vec_perm, get_compute_type): Likewise.
28297         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
28298         (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
28299         * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
28300         (vect_recog_mask_conversion_pattern): Likewise.
28301         * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
28302         (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
28303         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
28304         (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
28305         (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
28306         (vectorizable_shift, vectorizable_operation, vectorizable_store)
28307         (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
28308         (supportable_widening_operation): Likewise.
28309         (supportable_narrowing_operation): Likewise.
28310         * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
28311         Likewise.
28312         * varasm.c (output_constant): Likewise.
28314 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28315             Alan Hayward  <alan.hayward@arm.com>
28316             David Sherwood  <david.sherwood@arm.com>
28318         * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
28319         so that both the length == 3 and length != 3 cases set up their
28320         own permute vectors.  Add comments explaining why we know the
28321         number of elements is constant.
28322         (vect_permute_load_chain): Likewise.
28324 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28325             Alan Hayward  <alan.hayward@arm.com>
28326             David Sherwood  <david.sherwood@arm.com>
28328         * machmode.h (mode_nunits): Change from unsigned char to
28329         poly_uint16_pod.
28330         (ONLY_FIXED_SIZE_MODES): New macro.
28331         (pod_mode::measurement_type, scalar_int_mode::measurement_type)
28332         (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
28333         (complex_mode::measurement_type, fixed_size_mode::measurement_type):
28334         New typedefs.
28335         (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
28336         (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
28337         or if measurement_type is not polynomial.
28338         * genmodes.c (ZERO_COEFFS): New macro.
28339         (emit_mode_nunits_inline): Make mode_nunits_inline return a
28340         poly_uint16.
28341         (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
28342         Use ZERO_COEFFS when emitting initializers.
28343         * data-streamer.h (bp_pack_poly_value): New function.
28344         (bp_unpack_poly_value): Likewise.
28345         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
28346         for GET_MODE_NUNITS.
28347         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
28348         for GET_MODE_NUNITS.
28349         * tree.c (make_vector_type): Remove temporary shim and make
28350         the real function take the number of units as a poly_uint64
28351         rather than an int.
28352         (build_vector_type_for_mode): Handle polynomial nunits.
28353         * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
28354         * emit-rtl.c (const_vec_series_p_1): Likewise.
28355         (gen_rtx_CONST_VECTOR): Likewise.
28356         * fold-const.c (test_vec_duplicate_folding): Likewise.
28357         * genrecog.c (validate_pattern): Likewise.
28358         * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
28359         * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
28360         * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
28361         (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
28362         (expand_vec_cond_expr, expand_mult_highpart): Likewise.
28363         * rtlanal.c (subreg_get_info): Likewise.
28364         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
28365         (vect_grouped_load_supported): Likewise.
28366         * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
28367         * tree-vect-loop.c (have_whole_vector_shift): Likewise.
28368         * simplify-rtx.c (simplify_unary_operation_1): Likewise.
28369         (simplify_const_unary_operation, simplify_binary_operation_1)
28370         (simplify_const_binary_operation, simplify_ternary_operation)
28371         (test_vector_ops_duplicate, test_vector_ops): Likewise.
28372         (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
28373         instead of CONST_VECTOR_NUNITS.
28374         * varasm.c (output_constant_pool_2): Likewise.
28375         * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
28376         explicit-encoded elements in the XVEC for variable-length vectors.
28378 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28380         * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
28382 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28383             Alan Hayward  <alan.hayward@arm.com>
28384             David Sherwood  <david.sherwood@arm.com>
28386         * coretypes.h (fixed_size_mode): Declare.
28387         (fixed_size_mode_pod): New typedef.
28388         * builtins.h (target_builtins::x_apply_args_mode)
28389         (target_builtins::x_apply_result_mode): Change type to
28390         fixed_size_mode_pod.
28391         * builtins.c (apply_args_size, apply_result_size, result_vector)
28392         (expand_builtin_apply_args_1, expand_builtin_apply)
28393         (expand_builtin_return): Update accordingly.
28395 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28397         * cse.c (hash_rtx_cb): Hash only the encoded elements.
28398         * cselib.c (cselib_hash_rtx): Likewise.
28399         * expmed.c (make_tree): Build VECTOR_CSTs directly from the
28400         CONST_VECTOR encoding.
28402 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
28403             Jeff Law  <law@redhat.com>
28405         PR target/83641
28406         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
28407         noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
28408         only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
28409         and add REG_CFA_ADJUST_CFA notes in that case to both insns.
28411         PR target/83641
28412         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
28413         explicitly probe *sp in a noreturn function if there were any callee
28414         register saves or frame pointer is needed.
28416 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
28418         PR debug/83621
28419         * cfgexpand.c (expand_debug_expr): Return NULL if mode is
28420         BLKmode for ternary, binary or unary expressions.
28422         PR debug/83645
28423         * var-tracking.c (delete_vta_debug_insn): New inline function.
28424         (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
28425         insns from get_insns () to NULL instead of each bb separately.
28426         Use delete_vta_debug_insn.  No longer static.
28427         (vt_debug_insns_local, variable_tracking_main_1): Adjust
28428         delete_vta_debug_insns callers.
28429         * rtl.h (delete_vta_debug_insns): Declare.
28430         * final.c (rest_of_handle_final): Call delete_vta_debug_insns
28431         instead of variable_tracking_main.
28433 2018-01-03  Martin Sebor  <msebor@redhat.com>
28435         PR tree-optimization/83603
28436         * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
28437         arguments past the endof the argument list in functions declared
28438         without a prototype.
28439         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
28440         Avoid checking when arguments are null.
28442 2018-01-03  Martin Sebor  <msebor@redhat.com>
28444         PR c/83559
28445         * doc/extend.texi (attribute const): Fix a typo.
28446         * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
28447         issuing -Wsuggest-attribute for void functions.
28449 2018-01-03  Martin Sebor  <msebor@redhat.com>
28451         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
28452         offset_int::from instead of wide_int::to_shwi.
28453         (maybe_diag_overlap): Remove assertion.
28454         Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
28455         * gimple-ssa-sprintf.c (format_directive): Same.
28456         (parse_directive): Same.
28457         (sprintf_dom_walker::compute_format_length): Same.
28458         (try_substitute_return_value): Same.
28460 2018-01-03  Jeff Law  <law@redhat.com>
28462         PR middle-end/83654
28463         * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
28464         non-constant residual for zero at runtime and avoid probing in
28465         that case.  Reorganize code for trailing problem to mirror handling
28466         of the residual.
28468 2018-01-03  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
28470         PR tree-optimization/83501
28471         * tree-ssa-strlen.c (get_string_cst): New.
28472         (handle_char_store): Call get_string_cst.
28474 2018-01-03  Martin Liska  <mliska@suse.cz>
28476         PR tree-optimization/83593
28477         * tree-ssa-strlen.c: Include tree-cfg.h.
28478         (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
28479         (strlen_dom_walker): Add new member variable m_cleanup_cfg.
28480         (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
28481         to false.
28482         (strlen_dom_walker::before_dom_children): Call
28483         gimple_purge_dead_eh_edges. Dump tranformation with details
28484         dump flags.
28485         (strlen_dom_walker::before_dom_children): Update call by adding
28486         new argument cleanup_eh.
28487         (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
28489 2018-01-03  Martin Liska  <mliska@suse.cz>
28491         PR ipa/83549
28492         * cif-code.def (VARIADIC_THUNK): New enum value.
28493         * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
28494         thunks.
28496 2018-01-03  Jan Beulich  <jbeulich@suse.com>
28498         * sse.md (mov<mode>_internal): Tighten condition for when to use
28499         vmovdqu<ssescalarsize> for TI and OI modes.
28501 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
28503         Update copyright years.
28505 2018-01-03  Martin Liska  <mliska@suse.cz>
28507         PR ipa/83594
28508         * ipa-visibility.c (function_and_variable_visibility): Skip
28509         functions with noipa attribure.
28511 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
28513         * gcc.c (process_command): Update copyright notice dates.
28514         * gcov-dump.c (print_version): Ditto.
28515         * gcov.c (print_version): Ditto.
28516         * gcov-tool.c (print_version): Ditto.
28517         * gengtype.c (create_file): Ditto.
28518         * doc/cpp.texi: Bump @copying's copyright year.
28519         * doc/cppinternals.texi: Ditto.
28520         * doc/gcc.texi: Ditto.
28521         * doc/gccint.texi: Ditto.
28522         * doc/gcov.texi: Ditto.
28523         * doc/install.texi: Ditto.
28524         * doc/invoke.texi: Ditto.
28526 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28528         * vector-builder.h (vector_builder::m_full_nelts): Change from
28529         unsigned int to poly_uint64.
28530         (vector_builder::full_nelts): Update prototype accordingly.
28531         (vector_builder::new_vector): Likewise.
28532         (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
28533         (vector_builder::operator ==): Likewise.
28534         (vector_builder::finalize): Likewise.
28535         * int-vector-builder.h (int_vector_builder::int_vector_builder):
28536         Take the number of elements as a poly_uint64 rather than an
28537         unsigned int.
28538         * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
28539         from unsigned int to poly_uint64.
28540         (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
28541         (vec_perm_indices::new_vector): Likewise.
28542         (vec_perm_indices::length): Likewise.
28543         (vec_perm_indices::nelts_per_input): Likewise.
28544         (vec_perm_indices::input_nelts): Likewise.
28545         * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
28546         number of elements per input as a poly_uint64 rather than an
28547         unsigned int.  Use the original encoding for variable-length
28548         vectors, rather than clamping each individual element.
28549         For the second and subsequent elements in each pattern,
28550         clamp the step and base before clamping their sum.
28551         (vec_perm_indices::series_p): Handle polynomial element counts.
28552         (vec_perm_indices::all_in_range_p): Likewise.
28553         (vec_perm_indices_to_tree): Likewise.
28554         (vec_perm_indices_to_rtx): Likewise.
28555         * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
28556         * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
28557         (tree_vector_builder::new_binary_operation): Handle polynomial
28558         element counts.  Return false if we need to know the number
28559         of elements at compile time.
28560         * fold-const.c (fold_vec_perm): Punt if the number of elements
28561         isn't known at compile time.
28563 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28565         * vec-perm-indices.h (vec_perm_builder): Change element type
28566         from HOST_WIDE_INT to poly_int64.
28567         (vec_perm_indices::element_type): Update accordingly.
28568         (vec_perm_indices::clamp): Handle polynomial element_types.
28569         * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
28570         (vec_perm_indices::all_in_range_p): Likewise.
28571         (tree_to_vec_perm_builder): Check for poly_int64 trees rather
28572         than shwi trees.
28573         * vector-builder.h (vector_builder::stepped_sequence_p): Handle
28574         polynomial vec_perm_indices element types.
28575         * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
28576         * fold-const.c (fold_vec_perm): Likewise.
28577         * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
28578         * tree-vect-generic.c (lower_vec_perm): Likewise.
28579         * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
28580         * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
28581         element type to HOST_WIDE_INT.
28583 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28584             Alan Hayward  <alan.hayward@arm.com>
28585             David Sherwood  <david.sherwood@arm.com>
28587         * alias.c (addr_side_effect_eval): Take the size as a poly_int64
28588         rather than an int.  Use plus_constant.
28589         (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
28590         Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
28592 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28593             Alan Hayward  <alan.hayward@arm.com>
28594             David Sherwood  <david.sherwood@arm.com>
28596         * calls.c (emit_call_1, expand_call): Change struct_value_size from
28597         a HOST_WIDE_INT to a poly_int64.
28599 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28600             Alan Hayward  <alan.hayward@arm.com>
28601             David Sherwood  <david.sherwood@arm.com>
28603         * calls.c (load_register_parameters): Cope with polynomial
28604         mode sizes.  Require a constant size for BLKmode parameters
28605         that aren't described by a PARALLEL.  If BLOCK_REG_PADDING
28606         forces a parameter to be padded at the lsb end in order to
28607         fill a complete number of words, require the parameter size
28608         to be ordered wrt UNITS_PER_WORD.
28610 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28611             Alan Hayward  <alan.hayward@arm.com>
28612             David Sherwood  <david.sherwood@arm.com>
28614         * reload1.c (spill_stack_slot_width): Change element type
28615         from unsigned int to poly_uint64_pod.
28616         (alter_reg): Treat mode sizes as polynomial.
28618 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28619             Alan Hayward  <alan.hayward@arm.com>
28620             David Sherwood  <david.sherwood@arm.com>
28622         * reload.c (complex_word_subreg_p): New function.
28623         (reload_inner_reg_of_subreg, push_reload): Use it.
28625 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28626             Alan Hayward  <alan.hayward@arm.com>
28627             David Sherwood  <david.sherwood@arm.com>
28629         * lra-constraints.c (process_alt_operands): Reject matched
28630         operands whose sizes aren't ordered.
28631         (match_reload): Refer to this check here.
28633 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28634             Alan Hayward  <alan.hayward@arm.com>
28635             David Sherwood  <david.sherwood@arm.com>
28637         * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
28638         that the mode size is in the set {1, 2, 4, 8, 16}.
28640 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28641             Alan Hayward  <alan.hayward@arm.com>
28642             David Sherwood  <david.sherwood@arm.com>
28644         * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
28645         Use plus_constant instead of gen_rtx_PLUS.
28647 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28648             Alan Hayward  <alan.hayward@arm.com>
28649             David Sherwood  <david.sherwood@arm.com>
28651         * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
28652         * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
28653         * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
28654         * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
28655         * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
28656         * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
28657         * config/i386/i386-protos.h (ix86_push_rounding): Declare.
28658         * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
28659         * config/i386/i386.c (ix86_push_rounding): ...this new function.
28660         * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
28661         a poly_int64.
28662         * config/m32c/m32c.c (m32c_push_rounding): Likewise.
28663         * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
28664         * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
28665         * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
28666         * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
28667         * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
28668         * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
28669         * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
28670         * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
28671         * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
28672         function.
28673         * expr.c (emit_move_resolve_push): Treat the input and result
28674         of PUSH_ROUNDING as a poly_int64.
28675         (emit_move_complex_push, emit_single_push_insn_1): Likewise.
28676         (emit_push_insn): Likewise.
28677         * lra-eliminations.c (mark_not_eliminable): Likewise.
28678         * recog.c (push_operand): Likewise.
28679         * reload1.c (elimination_effects): Likewise.
28680         * rtlanal.c (nonzero_bits1): Likewise.
28681         * calls.c (store_one_arg): Likewise.  Require the padding to be
28682         known at compile time.
28684 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28685             Alan Hayward  <alan.hayward@arm.com>
28686             David Sherwood  <david.sherwood@arm.com>
28688         * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
28689         Use plus_constant instead of gen_rtx_PLUS.
28691 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28692             Alan Hayward  <alan.hayward@arm.com>
28693             David Sherwood  <david.sherwood@arm.com>
28695         * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
28696         rather than an int.
28698 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28699             Alan Hayward  <alan.hayward@arm.com>
28700             David Sherwood  <david.sherwood@arm.com>
28702         * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
28703         instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
28704         via stack temporaries.  Treat the mode size as polynomial too.
28706 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28707             Alan Hayward  <alan.hayward@arm.com>
28708             David Sherwood  <david.sherwood@arm.com>
28710         * expr.c (expand_expr_real_2): When handling conversions involving
28711         unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
28712         multiplying int_size_in_bytes by BITS_PER_UNIT.  Treat GET_MODE_BISIZE
28713         as a poly_uint64 too.
28715 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28716             Alan Hayward  <alan.hayward@arm.com>
28717             David Sherwood  <david.sherwood@arm.com>
28719         * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
28721 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28722             Alan Hayward  <alan.hayward@arm.com>
28723             David Sherwood  <david.sherwood@arm.com>
28725         * combine.c (can_change_dest_mode): Handle polynomial
28726         REGMODE_NATURAL_SIZE.
28727         * expmed.c (store_bit_field_1): Likewise.
28728         * expr.c (store_constructor): Likewise.
28729         * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
28730         and polynomial REGMODE_NATURAL_SIZE.
28731         (gen_lowpart_common): Likewise.
28732         * reginfo.c (record_subregs_of_mode): Likewise.
28733         * rtlanal.c (read_modify_subreg_p): Likewise.
28735 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28736             Alan Hayward  <alan.hayward@arm.com>
28737             David Sherwood  <david.sherwood@arm.com>
28739         * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
28740         numbers of elements.
28742 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28743             Alan Hayward  <alan.hayward@arm.com>
28744             David Sherwood  <david.sherwood@arm.com>
28746         * match.pd: Cope with polynomial numbers of vector elements.
28748 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28749             Alan Hayward  <alan.hayward@arm.com>
28750             David Sherwood  <david.sherwood@arm.com>
28752         * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
28753         in a POINTER_PLUS_EXPR.
28755 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28756             Alan Hayward  <alan.hayward@arm.com>
28757             David Sherwood  <david.sherwood@arm.com>
28759         * omp-simd-clone.c (simd_clone_subparts): New function.
28760         (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
28761         (ipa_simd_modify_function_body): Likewise.
28763 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28764             Alan Hayward  <alan.hayward@arm.com>
28765             David Sherwood  <david.sherwood@arm.com>
28767         * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
28768         (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
28769         (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
28770         (expand_vector_condition, vector_element): Likewise.
28771         (subparts_gt): New function.
28772         (get_compute_type): Use subparts_gt.
28773         (count_type_subparts): Delete.
28774         (expand_vector_operations_1): Use subparts_gt instead of
28775         count_type_subparts.
28777 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28778             Alan Hayward  <alan.hayward@arm.com>
28779             David Sherwood  <david.sherwood@arm.com>
28781         * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
28782         (vect_compile_time_alias): ...this new function.  Do the calculation
28783         on poly_ints rather than trees.
28784         (vect_prune_runtime_alias_test_list): Update call accordingly.
28786 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28787             Alan Hayward  <alan.hayward@arm.com>
28788             David Sherwood  <david.sherwood@arm.com>
28790         * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
28791         numbers of units.
28792         (vect_schedule_slp_instance): Likewise.
28794 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28795             Alan Hayward  <alan.hayward@arm.com>
28796             David Sherwood  <david.sherwood@arm.com>
28798         * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
28799         constant and extern definitions for variable-length vectors.
28800         (vect_get_constant_vectors): Note that the number of units
28801         is known to be constant.
28803 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28804             Alan Hayward  <alan.hayward@arm.com>
28805             David Sherwood  <david.sherwood@arm.com>
28807         * tree-vect-stmts.c (vectorizable_conversion): Treat the number
28808         of units as polynomial.  Choose between WIDE and NARROW based
28809         on multiple_p.
28811 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28812             Alan Hayward  <alan.hayward@arm.com>
28813             David Sherwood  <david.sherwood@arm.com>
28815         * tree-vect-stmts.c (simd_clone_subparts): New function.
28816         (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
28818 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28819             Alan Hayward  <alan.hayward@arm.com>
28820             David Sherwood  <david.sherwood@arm.com>
28822         * tree-vect-stmts.c (vectorizable_call): Treat the number of
28823         vectors as polynomial.  Use build_index_vector for
28824         IFN_GOMP_SIMD_LANE.
28826 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28827             Alan Hayward  <alan.hayward@arm.com>
28828             David Sherwood  <david.sherwood@arm.com>
28830         * tree-vect-stmts.c (get_load_store_type): Treat the number of
28831         units as polynomial.  Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
28832         for variable-length vectors.
28833         (vectorizable_mask_load_store): Treat the number of units as
28834         polynomial, asserting that it is constant if the condition has
28835         already been enforced.
28836         (vectorizable_store, vectorizable_load): Likewise.
28838 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28839             Alan Hayward  <alan.hayward@arm.com>
28840             David Sherwood  <david.sherwood@arm.com>
28842         * tree-vect-loop.c (vectorizable_live_operation): Treat the number
28843         of units as polynomial.  Punt if we can't tell at compile time
28844         which vector contains the final result.
28846 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28847             Alan Hayward  <alan.hayward@arm.com>
28848             David Sherwood  <david.sherwood@arm.com>
28850         * tree-vect-loop.c (vectorizable_induction): Treat the number
28851         of units as polynomial.  Punt on SLP inductions.  Use an integer
28852         VEC_SERIES_EXPR for variable-length integer reductions.  Use a
28853         cast of such a series for variable-length floating-point
28854         reductions.
28856 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28857             Alan Hayward  <alan.hayward@arm.com>
28858             David Sherwood  <david.sherwood@arm.com>
28860         * tree.h (build_index_vector): Declare.
28861         * tree.c (build_index_vector): New function.
28862         * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
28863         of units as polynomial, forcibly converting it to a constant if
28864         vectorizable_reduction has already enforced the condition.
28865         (vect_create_epilog_for_reduction): Likewise.  Use build_index_vector
28866         to create a {1,2,3,...} vector.
28867         (vectorizable_reduction): Treat the number of units as polynomial.
28868         Choose vectype_in based on the largest scalar element size rather
28869         than the smallest number of units.  Enforce the restrictions
28870         relied on above.
28872 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28873             Alan Hayward  <alan.hayward@arm.com>
28874             David Sherwood  <david.sherwood@arm.com>
28876         * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
28877         number of units as polynomial.
28879 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28880             Alan Hayward  <alan.hayward@arm.com>
28881             David Sherwood  <david.sherwood@arm.com>
28883         * target.h (vector_sizes, auto_vector_sizes): New typedefs.
28884         * target.def (autovectorize_vector_sizes): Return the vector sizes
28885         by pointer, using vector_sizes rather than a bitmask.
28886         * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
28887         * targhooks.c (default_autovectorize_vector_sizes): Likewise.
28888         * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
28889         Likewise.
28890         * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
28891         * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
28892         * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
28893         * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
28894         * omp-general.c (omp_max_vf): Likewise.
28895         * omp-low.c (omp_clause_aligned_alignment): Likewise.
28896         * optabs-query.c (can_vec_mask_load_store_p): Likewise.
28897         * tree-vect-loop.c (vect_analyze_loop): Likewise.
28898         * tree-vect-slp.c (vect_slp_bb): Likewise.
28899         * doc/tm.texi: Regenerate.
28900         * tree-vectorizer.h (current_vector_size): Change from an unsigned int
28901         to a poly_uint64.
28902         * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
28903         the vector size as a poly_uint64 rather than an unsigned int.
28904         (current_vector_size): Change from an unsigned int to a poly_uint64.
28905         (get_vectype_for_scalar_type): Update accordingly.
28906         * tree.h (build_truth_vector_type): Take the size and number of
28907         units as a poly_uint64 rather than an unsigned int.
28908         (build_vector_type): Add a temporary overload that takes
28909         the number of units as a poly_uint64 rather than an unsigned int.
28910         * tree.c (make_vector_type): Likewise.
28911         (build_truth_vector_type): Take the number of units as a poly_uint64
28912         rather than an unsigned int.
28914 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28915             Alan Hayward  <alan.hayward@arm.com>
28916             David Sherwood  <david.sherwood@arm.com>
28918         * target.def (get_mask_mode): Take the number of units and length
28919         as poly_uint64s rather than unsigned ints.
28920         * targhooks.h (default_get_mask_mode): Update accordingly.
28921         * targhooks.c (default_get_mask_mode): Likewise.
28922         * config/i386/i386.c (ix86_get_mask_mode): Likewise.
28923         * doc/tm.texi: Regenerate.
28925 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28926             Alan Hayward  <alan.hayward@arm.com>
28927             David Sherwood  <david.sherwood@arm.com>
28929         * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
28930         * omp-general.c (omp_max_vf): Likewise.
28931         * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
28932         (expand_omp_simd): Handle polynomial safelen.
28933         * omp-low.c (omplow_simd_context): Add a default constructor.
28934         (omplow_simd_context::max_vf): Change from int to poly_uint64.
28935         (lower_rec_simd_input_clauses): Update accordingly.
28936         (lower_rec_input_clauses): Likewise.
28938 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28939             Alan Hayward  <alan.hayward@arm.com>
28940             David Sherwood  <david.sherwood@arm.com>
28942         * tree-vectorizer.h (vect_nunits_for_cost): New function.
28943         * tree-vect-loop.c (vect_model_reduction_cost): Use it.
28944         * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
28945         (vect_analyze_slp_cost): Likewise.
28946         * tree-vect-stmts.c (vect_model_store_cost): Likewise.
28947         (vect_model_load_cost): Likewise.
28949 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28950             Alan Hayward  <alan.hayward@arm.com>
28951             David Sherwood  <david.sherwood@arm.com>
28953         * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
28954         (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
28955         from an unsigned int * to a poly_uint64_pod *.
28956         (calculate_unrolling_factor): New function.
28957         (vect_analyze_slp_instance): Use it.  Track polynomial max_nunits.
28959 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28960             Alan Hayward  <alan.hayward@arm.com>
28961             David Sherwood  <david.sherwood@arm.com>
28963         * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
28964         from an unsigned int to a poly_uint64.
28965         (_loop_vec_info::slp_unrolling_factor): Likewise.
28966         (_loop_vec_info::vectorization_factor): Change from an int
28967         to a poly_uint64.
28968         (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
28969         (vect_get_num_vectors): New function.
28970         (vect_update_max_nunits, vect_vf_for_cost): Likewise.
28971         (vect_get_num_copies): Use vect_get_num_vectors.
28972         (vect_analyze_data_ref_dependences): Change max_vf from an int *
28973         to an unsigned int *.
28974         (vect_analyze_data_refs): Change min_vf from an int * to a
28975         poly_uint64 *.
28976         (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
28977         than an unsigned HOST_WIDE_INT.
28978         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
28979         (vect_analyze_data_ref_dependence): Change max_vf from an int *
28980         to an unsigned int *.
28981         (vect_analyze_data_ref_dependences): Likewise.
28982         (vect_compute_data_ref_alignment): Handle polynomial vf.
28983         (vect_enhance_data_refs_alignment): Likewise.
28984         (vect_prune_runtime_alias_test_list): Likewise.
28985         (vect_shift_permute_load_chain): Likewise.
28986         (vect_supportable_dr_alignment): Likewise.
28987         (dependence_distance_ge_vf): Take the vectorization factor as a
28988         poly_uint64 rather than an unsigned HOST_WIDE_INT.
28989         (vect_analyze_data_refs): Change min_vf from an int * to a
28990         poly_uint64 *.
28991         * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
28992         vfm1 as a poly_uint64 rather than an int.  Make the same change
28993         for the returned bound_scalar.
28994         (vect_gen_vector_loop_niters): Handle polynomial vf.
28995         (vect_do_peeling): Likewise.  Update call to
28996         vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
28997         (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
28998         be constant.
28999         * tree-vect-loop.c (vect_determine_vectorization_factor)
29000         (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
29001         (vect_get_known_peeling_cost): Likewise.
29002         (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
29003         (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
29004         (vect_transform_loop): Likewise.  Use the lowest possible VF when
29005         updating the upper bounds of the loop.
29006         (vect_min_worthwhile_factor): Make static.  Return an unsigned int
29007         rather than an int.
29008         * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
29009         polynomial unroll factors.
29010         (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
29011         (vect_make_slp_decision): Likewise.
29012         (vect_supported_load_permutation_p): Likewise, and polynomial
29013         vf too.
29014         (vect_analyze_slp_cost): Handle polynomial vf.
29015         (vect_slp_analyze_node_operations): Likewise.
29016         (vect_slp_analyze_bb_1): Likewise.
29017         (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
29018         than an unsigned HOST_WIDE_INT.
29019         * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
29020         (vectorizable_load): Handle polynomial vf.
29021         * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
29022         a poly_uint64.
29023         (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
29025 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
29026             Alan Hayward  <alan.hayward@arm.com>
29027             David Sherwood  <david.sherwood@arm.com>
29029         * match.pd: Handle bit operations involving three constants
29030         and try to fold one pair.
29032 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
29034         * tree-vect-loop-manip.c: Include gimple-fold.h.
29035         (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
29036         niters_maybe_zero parameters.  Handle other cases besides a step of 1.
29037         (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
29038         Add a path that uses a step of VF instead of 1, but disable it
29039         for now.
29040         (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
29041         and niters_no_overflow parameters.  Update calls to
29042         slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
29043         Create a new SSA name if the latter choses to use a ste other
29044         than zero, and return it via niters_vector_mult_vf_var.
29045         * tree-vect-loop.c (vect_transform_loop): Update calls to
29046         vect_do_peeling, vect_gen_vector_loop_niters and
29047         slpeel_make_loop_iterate_ntimes.
29048         * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
29049         (vect_gen_vector_loop_niters): Update declarations after above changes.
29051 2018-01-02  Michael Meissner  <meissner@linux.vnet.ibm.com>
29053         * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
29054         128-bit round to integer instructions.
29055         (ceil<mode>2): Likewise.
29056         (btrunc<mode>2): Likewise.
29057         (round<mode>2): Likewise.
29059 2018-01-02  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
29061         * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
29062         unaligned VSX load/store on P8/P9.
29063         (expand_block_clear): Allow the use of unaligned VSX
29064         load/store on P8/P9.
29066 2018-01-02  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
29068         * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
29069         New function.
29070         (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
29071         swap associated with both a load and a store.
29073 2018-01-02  Andrew Waterman  <andrew@sifive.com>
29075         * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
29076         * config/riscv/riscv.md (clear_cache): Use it.
29078 2018-01-02  Artyom Skrobov  <tyomitch@gmail.com>
29080         * web.c: Remove out-of-date comment.
29082 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
29084         * expr.c (fixup_args_size_notes): Check that any existing
29085         REG_ARGS_SIZE notes are correct, and don't try to re-add them.
29086         (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
29087         (emit_single_push_insn): ...here.
29089 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
29091         * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
29092         (const_vector_encoded_nelts): New function.
29093         (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
29094         (const_vector_int_elt, const_vector_elt): Declare.
29095         * emit-rtl.c (const_vector_int_elt_1): New function.
29096         (const_vector_elt): Likewise.
29097         * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
29098         of CONST_VECTOR_ELT.
29100 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
29102         * expr.c: Include rtx-vector-builder.h.
29103         (const_vector_mask_from_tree): Use rtx_vector_builder and operate
29104         directly on the tree encoding.
29105         (const_vector_from_tree): Likewise.
29106         * optabs.c: Include rtx-vector-builder.h.
29107         (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
29108         sequence of "u" values.
29109         * vec-perm-indices.c: Include rtx-vector-builder.h.
29110         (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
29111         directly on the vec_perm_indices encoding.
29113 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
29115         * doc/rtl.texi (const_vector): Describe new encoding scheme.
29116         * Makefile.in (OBJS): Add rtx-vector-builder.o.
29117         * rtx-vector-builder.h: New file.
29118         * rtx-vector-builder.c: Likewise.
29119         * rtl.h (rtx_def::u2): Add a const_vector field.
29120         (CONST_VECTOR_NPATTERNS): New macro.
29121         (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
29122         (CONST_VECTOR_DUPLICATE_P): Likewise.
29123         (CONST_VECTOR_STEPPED_P): Likewise.
29124         (CONST_VECTOR_ENCODED_ELT): Likewise.
29125         (const_vec_duplicate_p): Check for a duplicated vector encoding.
29126         (unwrap_const_vec_duplicate): Likewise.
29127         (const_vec_series_p): Check for a non-duplicated vector encoding.
29128         Say that the function only returns true for integer vectors.
29129         * emit-rtl.c: Include rtx-vector-builder.h.
29130         (gen_const_vec_duplicate_1): Delete.
29131         (gen_const_vector): Call gen_const_vec_duplicate instead of
29132         gen_const_vec_duplicate_1.
29133         (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
29134         (gen_const_vec_duplicate): Use rtx_vector_builder.
29135         (gen_const_vec_series): Likewise.
29136         (gen_rtx_CONST_VECTOR): Likewise.
29137         * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
29138         (swap_const_vector_halves): Take an rtx pointer rather than rtx.
29139         Build a new vector rather than modifying a CONST_VECTOR in-place.
29140         (handle_special_swappables): Update call accordingly.
29141         * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
29142         (swap_const_vector_halves): Take an rtx pointer rather than rtx.
29143         Build a new vector rather than modifying a CONST_VECTOR in-place.
29144         (handle_special_swappables): Update call accordingly.
29146 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
29148         * simplify-rtx.c (simplify_const_binary_operation): Use
29149         CONST_VECTOR_ELT instead of XVECEXP.
29151 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
29153         * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
29154         the selector elements to be different from the data elements
29155         if the selector is a VECTOR_CST.
29156         * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
29157         ssizetype for the selector.
29159 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
29161         * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
29162         before testing each element individually.
29163         * tree-vect-generic.c (lower_vec_perm): Likewise.
29165 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
29167         * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
29168         * selftest-run-tests.c (selftest::run_tests): Call it.
29169         * vector-builder.h (vector_builder::operator ==): New function.
29170         (vector_builder::operator !=): Likewise.
29171         * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
29172         (vec_perm_indices::all_from_input_p): New function.
29173         * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
29174         (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
29175         * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
29176         instead of reading the VECTOR_CST directly.  Detect whether both
29177         vector inputs are the same before constructing the vec_perm_indices,
29178         and update the number of inputs argument accordingly.  Use the
29179         utility functions added above.  Only construct sel2 if we need to.
29181 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
29183         * optabs.c (expand_vec_perm_var): Use an explicit encoding for
29184         the broadcast of the low byte.
29185         (expand_mult_highpart): Use an explicit encoding for the permutes.
29186         * optabs-query.c (can_mult_highpart_p): Likewise.
29187         * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
29188         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
29189         (vectorizable_bswap): Likewise.
29190         * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
29191         explicit encoding for the power-of-2 permutes.
29192         (vect_permute_store_chain): Likewise.
29193         (vect_grouped_load_supported): Likewise.
29194         (vect_permute_load_chain): Likewise.
29196 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
29198         * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
29199         * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
29200         * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
29201         * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
29202         * tree-vect-stmts.c (vectorizable_bswap): Likewise.
29203         (vect_gen_perm_mask_any): Likewise.
29205 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
29207         * int-vector-builder.h: New file.
29208         * vec-perm-indices.h: Include int-vector-builder.h.
29209         (vec_perm_indices): Redefine as an int_vector_builder.
29210         (auto_vec_perm_indices): Delete.
29211         (vec_perm_builder): Redefine as a stand-alone class.
29212         (vec_perm_indices::vec_perm_indices): New function.
29213         (vec_perm_indices::clamp): Likewise.
29214         * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
29215         (vec_perm_indices::new_vector): New function.
29216         (vec_perm_indices::new_expanded_vector): Update for new
29217         vec_perm_indices class.
29218         (vec_perm_indices::rotate_inputs): New function.
29219         (vec_perm_indices::all_in_range_p): Operate directly on the
29220         encoded form, without computing elided elements.
29221         (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
29222         encoding.  Update for new vec_perm_indices class.
29223         * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
29224         the given vec_perm_builder.
29225         (expand_vec_perm_var): Update vec_perm_builder constructor.
29226         (expand_mult_highpart): Use vec_perm_builder instead of
29227         auto_vec_perm_indices.
29228         * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
29229         vec_perm_indices instead of auto_vec_perm_indices.  Use a single
29230         or double series encoding as appropriate.
29231         * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
29232         vec_perm_indices instead of auto_vec_perm_indices.
29233         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
29234         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
29235         (vect_permute_store_chain): Likewise.
29236         (vect_grouped_load_supported): Likewise.
29237         (vect_permute_load_chain): Likewise.
29238         (vect_shift_permute_load_chain): Likewise.
29239         * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
29240         (vect_transform_slp_perm_load): Likewise.
29241         (vect_schedule_slp_instance): Likewise.
29242         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
29243         (vectorizable_mask_load_store): Likewise.
29244         (vectorizable_bswap): Likewise.
29245         (vectorizable_store): Likewise.
29246         (vectorizable_load): Likewise.
29247         * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
29248         vec_perm_indices instead of auto_vec_perm_indices.  Use
29249         tree_to_vec_perm_builder to read the vector from a tree.
29250         * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
29251         vec_perm_builder instead of a vec_perm_indices.
29252         (have_whole_vector_shift): Use vec_perm_builder and
29253         vec_perm_indices instead of auto_vec_perm_indices.  Leave the
29254         truncation to calc_vec_perm_mask_for_shift.
29255         (vect_create_epilog_for_reduction): Likewise.
29256         * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
29257         from auto_vec_perm_indices to vec_perm_indices.
29258         (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
29259         instead of changing individual elements.
29260         (aarch64_vectorize_vec_perm_const): Use new_vector to install
29261         the vector in d.perm.
29262         * config/arm/arm.c (expand_vec_perm_d::perm): Change
29263         from auto_vec_perm_indices to vec_perm_indices.
29264         (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
29265         instead of changing individual elements.
29266         (arm_vectorize_vec_perm_const): Use new_vector to install
29267         the vector in d.perm.
29268         * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
29269         Update vec_perm_builder constructor.
29270         (rs6000_expand_interleave): Likewise.
29271         * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
29272         (rs6000_expand_interleave): Likewise.
29274 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
29276         * optabs-query.c (can_vec_perm_var_p): Check whether lowering
29277         to qimode could truncate the indices.
29278         * optabs.c (expand_vec_perm_var): Likewise.
29280 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
29282         * Makefile.in (OBJS): Add vec-perm-indices.o.
29283         * vec-perm-indices.h: New file.
29284         * vec-perm-indices.c: Likewise.
29285         * target.h (vec_perm_indices): Replace with a forward class
29286         declaration.
29287         (auto_vec_perm_indices): Move to vec-perm-indices.h.
29288         * optabs.h: Include vec-perm-indices.h.
29289         (expand_vec_perm): Delete.
29290         (selector_fits_mode_p, expand_vec_perm_var): Declare.
29291         (expand_vec_perm_const): Declare.
29292         * target.def (vec_perm_const_ok): Replace with...
29293         (vec_perm_const): ...this new hook.
29294         * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
29295         (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
29296         * doc/tm.texi: Regenerate.
29297         * optabs.def (vec_perm_const): Delete.
29298         * doc/md.texi (vec_perm_const): Likewise.
29299         (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
29300         * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
29301         expand_vec_perm for constant permutation vectors.  Assert that
29302         the mode of variable permutation vectors is the integer equivalent
29303         of the mode that is being permuted.
29304         * optabs-query.h (selector_fits_mode_p): Declare.
29305         * optabs-query.c: Include vec-perm-indices.h.
29306         (selector_fits_mode_p): New function.
29307         (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
29308         is defined, instead of checking whether the vec_perm_const_optab
29309         exists.  Use targetm.vectorize.vec_perm_const instead of
29310         targetm.vectorize.vec_perm_const_ok.  Check whether the indices
29311         fit in the vector mode before using a variable permute.
29312         * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
29313         vec_perm_indices instead of an rtx.
29314         (expand_vec_perm): Replace with...
29315         (expand_vec_perm_const): ...this new function.  Take the selector
29316         as a vec_perm_indices rather than an rtx.  Also take the mode of
29317         the selector.  Update call to shift_amt_for_vec_perm_mask.
29318         Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
29319         Use vec_perm_indices::new_expanded_vector to expand the original
29320         selector into bytes.  Check whether the indices fit in the vector
29321         mode before using a variable permute.
29322         (expand_vec_perm_var): Make global.
29323         (expand_mult_highpart): Use expand_vec_perm_const.
29324         * fold-const.c: Includes vec-perm-indices.h.
29325         * tree-ssa-forwprop.c: Likewise.
29326         * tree-vect-data-refs.c: Likewise.
29327         * tree-vect-generic.c: Likewise.
29328         * tree-vect-loop.c: Likewise.
29329         * tree-vect-slp.c: Likewise.
29330         * tree-vect-stmts.c: Likewise.
29331         * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
29332         Delete.
29333         * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
29334         * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
29335         (aarch64_vectorize_vec_perm_const_ok): Fuse into...
29336         (aarch64_vectorize_vec_perm_const): ...this new function.
29337         (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
29338         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
29339         * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
29340         * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
29341         * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
29342         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
29343         (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
29344         into...
29345         (arm_vectorize_vec_perm_const): ...this new function.  Explicitly
29346         check for NEON modes.
29347         * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
29348         * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
29349         * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
29350         (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
29351         into...
29352         (ix86_vectorize_vec_perm_const): ...this new function.  Incorporate
29353         the old VEC_PERM_CONST conditions.
29354         * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
29355         * config/ia64/vect.md (vec_perm_const<mode>): Delete.
29356         * config/ia64/ia64.c (ia64_expand_vec_perm_const)
29357         (ia64_vectorize_vec_perm_const_ok): Merge into...
29358         (ia64_vectorize_vec_perm_const): ...this new function.
29359         * config/mips/loongson.md (vec_perm_const<mode>): Delete.
29360         * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
29361         * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
29362         * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
29363         * config/mips/mips.c (mips_expand_vec_perm_const)
29364         (mips_vectorize_vec_perm_const_ok): Merge into...
29365         (mips_vectorize_vec_perm_const): ...this new function.
29366         * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
29367         * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
29368         * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
29369         * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
29370         * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
29371         (rs6000_expand_vec_perm_const): Delete.
29372         * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
29373         Delete.
29374         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
29375         (altivec_expand_vec_perm_const_le): Take each operand individually.
29376         Operate on constant selectors rather than rtxes.
29377         (altivec_expand_vec_perm_const): Likewise.  Update call to
29378         altivec_expand_vec_perm_const_le.
29379         (rs6000_expand_vec_perm_const): Delete.
29380         (rs6000_vectorize_vec_perm_const_ok): Delete.
29381         (rs6000_vectorize_vec_perm_const): New function.
29382         (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
29383         an element count and rtx array.
29384         (rs6000_expand_extract_even): Update call accordingly.
29385         (rs6000_expand_interleave): Likewise.
29386         * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
29387         * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
29388         * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
29389         * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
29390         (rs6000_expand_vec_perm_const): Delete.
29391         * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
29392         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
29393         (altivec_expand_vec_perm_const_le): Take each operand individually.
29394         Operate on constant selectors rather than rtxes.
29395         (altivec_expand_vec_perm_const): Likewise.  Update call to
29396         altivec_expand_vec_perm_const_le.
29397         (rs6000_expand_vec_perm_const): Delete.
29398         (rs6000_vectorize_vec_perm_const_ok): Delete.
29399         (rs6000_vectorize_vec_perm_const): New function.  Remove stray
29400         reference to the SPE evmerge intructions.
29401         (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
29402         an element count and rtx array.
29403         (rs6000_expand_extract_even): Update call accordingly.
29404         (rs6000_expand_interleave): Likewise.
29405         * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
29406         * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
29407         new function.
29408         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
29410 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
29412         * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
29413         vector mode and that that mode matches the mode of the data
29414         being permuted.
29415         (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
29416         out into expand_vec_perm_var.  Do all CONST_VECTOR handling here,
29417         directly using expand_vec_perm_1 when forcing selectors into
29418         registers.
29419         (expand_vec_perm_var): New function, split out from expand_vec_perm.
29421 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
29423         * optabs-query.h (can_vec_perm_p): Delete.
29424         (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
29425         * optabs-query.c (can_vec_perm_p): Split into...
29426         (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
29427         (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
29428         particular selector is valid.
29429         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
29430         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
29431         (vect_grouped_load_supported): Likewise.
29432         (vect_shift_permute_load_chain): Likewise.
29433         * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
29434         (vect_transform_slp_perm_load): Likewise.
29435         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
29436         (vectorizable_bswap): Likewise.
29437         (vect_gen_perm_mask_checked): Likewise.
29438         * fold-const.c (fold_ternary_loc): Likewise.  Don't take
29439         implementations of variable permutation vectors into account
29440         when deciding which selector to use.
29441         * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
29442         vec_perm_const_optab is supported; instead use can_vec_perm_const_p
29443         with a false third argument.
29444         * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
29445         to test whether the constant selector is valid and can_vec_perm_var_p
29446         to test whether a variable selector is valid.
29448 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
29450         * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
29451         * optabs-query.c (can_vec_perm_p): Likewise.
29452         * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
29453         instead of vec_perm_indices.
29454         * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
29455         (vect_gen_perm_mask_checked): Likewise,
29456         * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
29457         (vect_gen_perm_mask_checked): Likewise,
29459 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
29461         * optabs-query.h (qimode_for_vec_perm): Declare.
29462         * optabs-query.c (can_vec_perm_p): Split out qimode search to...
29463         (qimode_for_vec_perm): ...this new function.
29464         * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
29466 2018-01-02  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
29468         * rtlanal.c (canonicalize_condition): Return 0 if final rtx
29469         does not have a conditional at the top.
29471 2018-01-02  Richard Biener  <rguenther@suse.de>
29473         * ipa-inline.c (big_speedup_p): Fix expression.
29475 2018-01-02  Jan Hubicka  <hubicka@ucw.cz>
29477         PR target/81616
29478         * config/i386/x86-tune-costs.h: Increase cost of integer load costs
29479         for generic 4->6.
29481 2018-01-02  Jan Hubicka  <hubicka@ucw.cz>
29483         PR target/81616
29484         Generic tuning.
29485         * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
29486         cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
29487         and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
29488         cond_taken_branch_cost 3->4.
29490 2018-01-01  Jakub Jelinek  <jakub@redhat.com>
29492         PR tree-optimization/83581
29493         * tree-loop-distribution.c (pass_loop_distribution::execute): Return
29494         TODO_cleanup_cfg if any changes have been made.
29496         PR middle-end/83608
29497         * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
29498         convert_modes if target mode has the right side, but different mode
29499         class.
29501         PR middle-end/83609
29502         * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
29503         last argument when extracting from CONCAT.  If either from_real or
29504         from_imag is NULL, use expansion through memory.  If result is not
29505         a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
29506         the parts directly to inner mode, if even that fails, use expansion
29507         through memory.
29509         PR middle-end/83623
29510         * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
29511         check for bswap in mode rather than HImode and use that in expand_unop
29512         too.
29514 Copyright (C) 2018 Free Software Foundation, Inc.
29516 Copying and distribution of this file, with or without modification,
29517 are permitted in any medium without royalty provided the copyright
29518 notice and this notice are preserved.