gcc/ChangeLog:
[official-gcc.git] / gcc / ChangeLog
blob851502e5ba0c8ef09a161c8bb163208b84d39f0e
1 2018-10-30  Martin Sebor  <msebor@redhat.com>
3         * doc/extend.texi (optimize): Clarify/expand attribute documentation.
4         (target, pragma GCC optimize, pragma GCC target): Ditto.
6 2018-10-30  Jonathan Wakely  <jwakely@redhat.com>
8         * doc/extend.texi: Fix prototype and description of
9         __builtin_expect_with_probability.
11 2018-10-30  Michael Ploujnikov  <michael.ploujnikov@oracle.com>
13         * cgraph.h (clone_function_name_1): Replaced by new
14           clone_function_name_numbered that takes name as string; for
15           privatize_symbol_name_1 use only.
16           (clone_function_name): Renamed to
17           clone_function_name_numbered to be explicit about numbering.
18           (clone_function_name): New two-argument function that does
19           not number its output.
20           (clone_function_name): New three-argument function that
21           takes a number to append to its output.
22         * cgraphclones.c (duplicate_thunk_for_node):
23           (clone_function_name_1): Renamed.
24           (clone_function_name_numbered): Two new functions.
25           (clone_function_name): Improved documentation.
26           (cgraph_node::create_virtual_clone): Use clone_function_name_numbered.
27         * config/rs6000/rs6000.c (make_resolver_func): Ditto.
28         * final.c (final_scan_insn_1): Use the new clone_function_name
29           without numbering.
30         * multiple_target.c (create_dispatcher_calls): Ditto.
31           (create_target_clone): Ditto.
32         * omp-expand.c (grid_expand_target_grid_body): Ditto.
33         * omp-low.c (create_omp_child_function_name): Ditto.
34         * omp-simd-clone.c (simd_clone_create): Ditto.
35         * symtab.c (simd_symtab_node::noninterposable_alias): Use the
36           new clone_function_name without numbering.
38 2018-10-30  Richard Earnshaw  <rearnsha@arm.com>
40         * alloc-pool.h (base_pool_allocator <TBlockAllocator>::initialize):
41         Assert that the allocation size is not zero.
43 2018-10-30  Richard Biener  <rguenther@suse.de>
45         PR tree-optimization/87800
46         * tree-vect-slp.c (vect_build_slp_tree_2): Reject any
47         non-induction or reduction PHIs.
49 2018-10-30 Sameera Deshpande <sameera.deshpande@linaro.org
51         * config/aarch64/falkor-tag-collision-avoidance.c
52         (execute_tag_collision_avoidance): Call df_note_add_problem.
54 2018-10-30  Martin Liska  <mliska@suse.cz>
56         * doc/extend.texi: Fix typo in documentation
57         of __builtin_expect_with_probability.
59 2018-10-29  David Malcolm  <dmalcolm@redhat.com>
61         PR c++/87721
62         * input.c (get_substring_ranges_for_loc): Detect if
63         linemap_resolve_location gives us a NULL map, and reject
64         this case.
66 2018-10-29  Iain Buclaw  <ibuclaw@gdcproject.org>
68         * config.gcc (xstormy16-*-elf): Set tm_d_file.
70 2018-10-29  David Malcolm  <dmalcolm@redhat.com>
71             Martin Sebor  <msebor@redhat.com>
72             Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
74         * doc/ux.texi (Quoting): New subsection, adapted from material at
75         https://gcc.gnu.org/wiki/DiagnosticsGuidelines written by
76         MartinSebor and ManuelLopezIbanez.
77         (Fix-it hints): Note that fix-it hints shouldn't be marked for
78         translation.
80 2018-10-29  Kugan Vivekanandarajah  <kuganv@linaro.org>
82         PR middle-end/87469
83         * tree-ssa-loop-niter.c (number_of_iterations_popcount): Fix niter
84         max value.
86 2018-10-29  Paul A. Clarke  <pc@us.ibm.com>
88         * gcc.target/powerpc/ssse3-check.h: Remove inaccurate comment.
90 2018-10-29  Paul Koning  <ni1d@arrl.net>
92         * doc/rtl.texi (CONST_WIDE_INT_ELT): Give correct macro name.
94 2018-10-29  Paul A. Clarke  <pc@us.ibm.com>
96         * gcc/config/rs6000/mmintrin.h (_mm_packs_pi16, _mm_packs_pi32,
97         _mm_packs_pu16, _mm_unpackhi_pi8, _mm_unpacklo_pi8, _mm_add_pi8,
98         _mm_add_pi16, _mm_add_pi32, _mm_sub_pi8, _mm_sub_pi16, _mm_sub_pi32,
99         _mm_cmpgt_pi8, _mm_cmpeq_pi16, _mm_cmpgt_pi16, _mm_cmpeq_pi32,
100         _mm_cmpgt_pi32, _mm_adds_pi8, _mm_adds_pi16, _mm_adds_pu8,
101         _mm_adds_pu16, _mm_subs_pi8, _mm_subs_pi16, _mm_subs_pu8,
102         _mm_subs_pu16, _mm_madd_pi16, _mm_mulhi_pi16, _mm_mullo_pi16,
103         _mm_sll_pi16, _mm_sra_pi16, _mm_srl_pi16, _mm_set1_pi16, _mm_set1_pi8):
104         Change 'vector' to '__vector'.
105         * gcc/config/rs6000/xmmintrin.h (_mm_cvtps_pi32, _mm_cvttps_pi32,
106         _mm_cvtps_pi16, _mm_cvtps_pi8, _mm_max_pi16, _mm_max_pu8, _mm_min_pi16,
107         _mm_min_pu8, _mm_mulhi_pu16, _mm_shuffle_pi16, _mm_avg_pu8,
108         _mm_avg_pu16): Likewise.  And, whitespace corrections.
110 2018-10-29  Richard Biener  <rguenther@suse.de>
112         PR tree-optimization/87785
113         * tree-vect-slp.c (vect_gather_slp_loads): Only gather
114         internal defs.
116 2018-10-29  Olivier Hainque  <hainque@adacore.com>
118         * VXWORKS_NET_LIBS_RTP: New macro, network part of VXWORKS_LIBS_RTP.
120 2018-10-29  Olivier Hainque  <hainque@adacore.com>
122         * config/vxworks.h (VXWORKS_PERSONALITY): New VxWorks
123         ports configuration macro, defaults to "gnu".
124         (VXWORKS_OS_CPP_BUILTINS): Use it. Feed TOOL and
125         TOOL_FAMILY instead of _VX_TOOL/_VXTOOL_FAMILY.
127 2018-10-29  Olivier Hainque  <hainque@adacore.com>
129         * config/vxworks.h (CLEAR_INSN_CACHE): #undef before #define.
131 2018-10-29  Richard Biener  <rguenther@suse.de>
133         PR tree-optimization/87790
134         * tree-vect-slp.c (vect_mark_slp_stmts): Simplify.
135         (vect_make_slp_decision): Adjust.
136         (vect_slp_analyze_bb_1): Likewise.
137         (vect_detect_hybrid_slp_stmts): Properly union SLP type over
138         edges.
140 2018-10-29  Richard Biener  <rguenther@suse.de>
142         PR tree-optimization/87785
143         * tree-vect-slp.c (vect_build_slp_tree_2): Remove loads argument
144         and processing.
145         (vect_build_slp_tree): Likewise.
146         (vect_gather_slp_loads): New function.
147         (vect_analyze_slp_instance): Gather loads separately from the
148         SLP tree build.
150 2018-10-29  Martin Liska  <mliska@suse.cz>
152         * Makefile.in: Make dependency to json.o.
153         * doc/gcov.texi: Document new JSON format, remove
154         old intermediate format documentation.
155         * gcov.c (struct function_info): Come up with m_name and
156         m_demangled_name.
157         (function_info::function_info): Initialize it.
158         (function_info::~function_info): Release it.
159         (main): Rename flag_intermediate_format to flag_json_format.
160         (print_usage): Describe --json-format.
161         (process_args): Set flag_json_format.
162         (output_intermediate_line): Remove.
163         (output_intermediate_json_line): Likewise.
164         (get_gcov_intermediate_filename): Return new extension
165         ".gcov.json.gz".
166         (output_intermediate_file): Implement JSON emission.
167         (output_json_intermediate_file): Implement JSON emission.
168         (generate_results): Use ::get_name for function name.
169         Handle JSON output file.
170         (read_graph_file): Use ::get_name instead of cplus_demangle.
171         (read_count_file): Likewise.
172         (solve_flow_graph): Likewise.
173         (add_line_counts): Likewise.
174         (accumulate_line_counts): Use new flag_json_format.
175         (output_function_details): Use ::get_name instead of cplus_demangle.
176         (output_lines): Likewise.
177         * json.cc (test_writing_literals): Add new tests.
178         * json.h (class literal): Add new boolean constructor.
180 2018-10-29  Segher Boessenkool  <segher@kernel.crashing.org>
182         PR rtl-optimization/87701
183         PR rtl-optimization/87780
184         * combine.c (make_more_copies): Rewrite.
186 2018-10-28  Kugan Vivekanandarajah  <kuganv@linaro.org>
188         * doc/generic.texi (ABSU_EXPR): Document.
189         * match.pd (absu(x)*absu(x) -> x*x): Handle.
190         (absu(absu(X)) -> absu(X)): Likewise.
191         (absu(-X) -> absu(X)): Likewise.
192         (absu(X)  where X is nonnegative -> X): Likewise.
194 2018-10-28  Iain Buclaw  <ibuclaw@gdcproject.org>
196         * Makefile.in (tm_d_file_list, tm_d_include_list): New variables.
197         (TM_D_H, D_TARGET_DEF, D_TARGET_H, D_TARGET_OBJS): New variables.
198         (tm_d.h, cs-tm_d.h, default-d.o): New rules.
199         (d/d-target-hooks-def.h, s-d-target-hooks-def-h): New rules.
200         (s-tm-texi): Also check timestamp on d-target.def.
201         (generated_files): Add TM_D_H and d-target-hooks-def.h.
202         (build/genhooks.o): Also depend on D_TARGET_DEF.
203         * config.gcc (tm_d_file, d_target_objs, target_has_targetdm): New
204         variables.
205         * config/aarch64/aarch64-d.c: New file.
206         * config/aarch64/aarch64-linux.h (GNU_USER_TARGET_D_CRITSEC_SIZE):
207         Define.
208         * config/aarch64/aarch64-protos.h (aarch64_d_target_versions): New
209         prototype.
210         * config/aarch64/aarch64.h (TARGET_D_CPU_VERSIONS): Define.
211         * config/aarch64/t-aarch64 (aarch64-d.o): New rule.
212         * config/arm/arm-d.c: New file.
213         * config/arm/arm-protos.h (arm_d_target_versions): New prototype.
214         * config/arm/arm.h (TARGET_D_CPU_VERSIONS): Define.
215         * config/arm/linux-eabi.h (EXTRA_TARGET_D_OS_VERSIONS): Define.
216         * config/arm/t-arm (arm-d.o): New rule.
217         * config/default-d.c: New file.
218         * config/glibc-d.c: New file.
219         * config/gnu.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
220         * config/i386/i386-d.c: New file.
221         * config/i386/i386-protos.h (ix86_d_target_versions): New prototype.
222         * config/i386/i386.h (TARGET_D_CPU_VERSIONS): Define.
223         * config/i386/linux-common.h (EXTRA_TARGET_D_OS_VERSIONS): Define.
224         (GNU_USER_TARGET_D_CRITSEC_SIZE): Define.
225         * config/i386/t-i386 (i386-d.o): New rule.
226         * config/kfreebsd-gnu.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
227         * config/kopensolaris-gnu.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
228         * config/linux-android.h (ANDROID_TARGET_D_OS_VERSIONS): Define.
229         * config/linux.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
230         * config/mips/linux-common.h (EXTRA_TARGET_D_OS_VERSIONS): Define.
231         * config/mips/mips-d.c: New file.
232         * config/mips/mips-protos.h (mips_d_target_versions): New prototype.
233         * config/mips/mips.h (TARGET_D_CPU_VERSIONS): Define.
234         * config/mips/t-mips (mips-d.o): New rule.
235         * config/powerpcspe/linux.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
236         * config/powerpcspe/linux64.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
237         * config/powerpcspe/powerpcspe-d.c: New file.
238         * config/powerpcspe/powerpcspe-protos.h (rs6000_d_target_versions):
239         New prototype.
240         * config/powerpcspe/powerpcspe.c (rs6000_output_function_epilogue):
241         Support GNU D by using 0 as the language type.
242         * config/powerpcspe/powerpcspe.h (TARGET_D_CPU_VERSIONS): Define.
243         * config/powerpcspe/t-powerpcspe (powerpcspe-d.o): New rule.
244         * config/riscv/riscv-d.c: New file.
245         * config/riscv/riscv-protos.h (riscv_d_target_versions): New
246         prototype.
247         * config/riscv/riscv.h (TARGET_D_CPU_VERSIONS): Define.
248         * config/riscv/t-riscv (riscv-d.o): New rule.
249         * config/rs6000/linux.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
250         * config/rs6000/linux64.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
251         * config/rs6000/rs6000-d.c: New file.
252         * config/rs6000/rs6000-protos.h (rs6000_d_target_versions): New
253         prototype.
254         * config/rs6000/rs6000.c (rs6000_output_function_epilogue):
255         Support GNU D by using 0 as the language type.
256         * config/rs6000/rs6000.h (TARGET_D_CPU_VERSIONS): Define.
257         * config/rs6000/t-rs6000 (rs6000-d.o): New rule.
258         * config/s390/s390-d.c: New file.
259         * config/s390/s390-protos.h (s390_d_target_versions): New prototype.
260         * config/s390/s390.h (TARGET_D_CPU_VERSIONS): Define.
261         * config/s390/t-s390 (s390-d.o): New rule.
262         * config/sparc/sparc-d.c: New file.
263         * config/sparc/sparc-protos.h (sparc_d_target_versions): New
264         prototype.
265         * config/sparc/sparc.h (TARGET_D_CPU_VERSIONS): Define.
266         * config/sparc/t-sparc (sparc-d.o): New rule.
267         * config/t-glibc (glibc-d.o): New rule.
268         * configure: Regenerated.
269         * configure.ac (tm_d_file): New variable.
270         (tm_d_file_list, tm_d_include_list, d_target_objs): Add substitutes.
271         * doc/contrib.texi (Contributors): Add self for the D frontend.
272         * doc/frontends.texi (G++ and GCC): Mention D as a supported language.
273         * doc/install.texi (Configuration): Mention libphobos as an option for
274         --enable-shared.  Mention d as an option for --enable-languages.
275         (Testing): Mention check-d as a target.
276         * doc/invoke.texi (Overall Options): Mention .d, .dd, and .di as file
277         name suffixes.  Mention d as a -x option.
278         * doc/sourcebuild.texi (Top Level): Mention libphobos.
279         * doc/standards.texi (Standards): Add section on D language.
280         * doc/tm.texi: Regenerated.
281         * doc/tm.texi.in: Add @node for D language and ABI, and @hook for
282         TARGET_CPU_VERSIONS, TARGET_D_OS_VERSIONS, and TARGET_D_CRITSEC_SIZE.
283         * dwarf2out.c (is_dlang): New function.
284         (gen_compile_unit_die): Use DW_LANG_D for D.
285         (declare_in_namespace): Return module die for D, instead of adding
286         extra declarations into the namespace.
287         (gen_namespace_die): Generate DW_TAG_module for D.
288         (gen_decl_die): Handle CONST_DECLSs for D.
289         (dwarf2out_decl): Likewise.
290         (prune_unused_types_walk_local_classes): Handle DW_tag_interface_type.
291         (prune_unused_types_walk): Handle DW_tag_interface_type same as other
292         kinds of aggregates.
293         * gcc.c (default_compilers): Add entries for .d, .dd and .di.
294         * genhooks.c: Include d/d-target.def.
296 2018-10-28  Iain Sandoe  <iain@sandoe.co.uk>
298         PR target/85669
299         * config/rs6000/darwin.h (STACK_BOUNDARY): New.
300         (RS6000_STARTING_FRAME_OFFSET): Adjust to preserve 16byte alignment.
301         (STACK_DYNAMIC_OFFSET): Likewise.
303 2018-10-27  Sandra Loosemore  <sandra@codesourcery.com>
305         PR target/80024
306         * config/nios2/nios2.c (nios2_valid_target_attribute_rec): Fix
307         error message.
309 2018-10-26  Tulio Magno Quites Machado Filho  <tuliom@linux.ibm.com>
311         * doc/extend.texi (PowerPC builtins): Fix __builtin_unpack_ibm128
312         return type and other typos.
314 2018-10-26  Aaron Sawdey  <acsawdey@linux.ibm.com>
316         * config/rs6000/rs6000-string.c (expand_strncmp_gpr_sequence): Change to
317         a shorter sequence with fewer branches.
318         (emit_final_str_compare_gpr): Ditto.
320 2018-10-26  Paul A. Clarke  <pc@us.ibm.com>
322         * config/rs6000/tmmintrin.h: New file.
323         * config.gcc (powerpc*-*-*): Add tmmintrin.h to extra_headers.
325 2018-10-26  Paul A. Clarke  <pc@us.ibm.com>
327         * config/rs6000/mmintrin.h: Enable 32bit compilation.
328         * config/rs6000/xmmintrin.h: Likewise.
330 2018-10-26  Paul A. Clarke  <pc@us.ibm.com>
332         * config/rs6000/xmmintrin.h (_mm_extract_pi16): Fix for big-endian.
334 2018-10-26  Richard Biener  <rguenther@suse.de>
336         * tree-vect-slp.c (vect_mark_slp_stmts): Add visited hash_set
337         and wrapper.
338         (vect_mark_slp_stmts_relevant): Likewise.
339         (vect_detect_hybrid_slp_stmts): Likewise.
340         (vect_bb_slp_scalar_cost): Likewise.
341         (vect_remove_slp_scalar_calls): Likewise.
343 2018-10-26  Jan Hubicka  <jh@suse.cz>
345         * ipa-devirt.c (odr_subtypes_equivalent_p): Fix recursion.
346         (warn_types_mismatch): Fix walk of DECL_NAME.
347         (odr_types_equivalent_p): Fix overactive assert.
349 2018-10-26  Richard Biener  <rguenther@suse.de>
351         PR tree-optimization/87105
352         * tree-vectorizer.h (_slp_tree::refcnt): New member.
353         * tree-vect-slp.c (vect_free_slp_tree): Decrement and honor
354         refcnt.
355         (vect_create_new_slp_node): Initialize refcnt to one.
356         (bst_traits): Move.
357         (scalar_stmts_set_t, bst_fail): Remove.
358         (vect_build_slp_tree_2): Add bst_map argument and adjust calls.
359         (vect_build_slp_tree): Add bst_map argument and lookup
360         already created SLP nodes.
361         (vect_print_slp_tree): Handle a SLP graph, print SLP node
362         addresses.
363         (vect_slp_rearrange_stmts): Handle a SLP graph.
364         (vect_analyze_slp_instance): Adjust and free SLP nodes from
365         the CSE map.  Fix indenting.
366         (vect_schedule_slp_instance): Add short-cut.
368 2018-10-26  Martin Liska  <mliska@suse.cz>
370         PR testsuite/86158
371         * ipa-prop.c (struct ipa_vr_ggc_hash_traits): Hash with
372         addr_expr and not with pointers.
374 2018-10-26  Jan Hubicka  <jh@suse.cz>
376         * tree.c (free_lang_data_in_type): Only check main variants.
377         * ipa-devirt.c (warn_odr): Make static.
378         (types_same_for_odr): Drop strict variant.
379         (types_odr_comparable): Likewise.
380         (odr_or_derived_type_p): Look for main variants.
381         (odr_name_hasher::equal): Cleanup comment.
382         (odr_subtypes_equivalent): Add warn and warned arguments; check main
383         variants.
384         (type_variants_equivalent_p): break out from ...
385         (odr_types_equivalent): ... here; go for main variants where needed.
386         (warn_odr): ... here; turn static.
387         (warn_types_mismatch): Compare mangled names of main variants.
388         * ipa-utils.h (types_odr_comparable): Drop strict parameter.
389         (type_with_linkage_p): Sanity check that we look at main variant.
390         * lto.c (lto_read_decls): Only consider main variant to be ODR type.
391         * tree.h (types_same_for_odr): Drop strict argument.
393 2018-10-26  Richard Biener  <rguenther@suse.de>
395         PR tree-optimization/87746
396         * tree-vect-data-refs.c (vect_update_misalignment_for_peel):
397         Simplify and fix WRT strided store groups with size not
398         equal to step in element count.
399         (vect_analyze_group_access_1): Dump the whole group.
401 2018-10-25  Carl Love  <cel@us.ibm.com>
403         * config/rs6000/rs6000-c.c (P9V_BUILTIN_VEC_VSCEDPGT,
404         P9V_BUILTIN_VEC_VSCEDPLT, P9V_BUILTIN_VEC_VSCEDPEQ,
405         P9V_BUILTIN_VEC_VSCEDPUO): Rename base overloaded name.  Add quad
406         precicion entry for each overloaded builtin.
407         * config/rs6000/rs6000-builtin.def (VSCEDPGT, VSCEDPLT, VSCEDPEQ,
408         VSCEDPUO): Rename overloaded name.
409         (VSCEDPGT, VSCEQPGT, VSCEDPLT, VSCEQPLT, VSCEDPEQ, VSCEQPEQ,
410         VSCEDPUO, VSCEQPUO): Add defitions for overloaded builtins.
411         * config/rs6000/vsx.md (xscmpexpqp_<code>_<mode>): Add
412         define_expand for xscmpexqp instruction.
413         (*xscmpexpqp): Add define_insn for the xscmpexqp instruction.
415 2018-10-25  Bill Schmidt  <wschmidt@linux.ibm.com>
416             Jinsong Ji <jji@us.ibm.com>
418         * config/rs6000/emmintrin.h (_mm_slli_epi16): Replace deprecated
419         function with vec_sl.
420         (_mm_slli_epi32): Likewise.
421         (_mm_slli_epi64): Likewise.
422         (_mm_srai_epi16): Replace deprecated function with vec_sra.
423         (_mm_srai_epi32): Likewise.
424         (_mm_srli_epi16): Replace deprecated function with vec_sr.
425         (_mm_srli_epi32): Likewise.
426         (_mm_srli_epi64): Likewise.
427         (_mm_sll_epi16): Replace deprecated function with vec_sl.
428         (_mm_sll_epi32): Likewise.
429         (_mm_sll_epi64): Likewise.
430         (_mm_sra_epi16): Replace deprecated function with vec_sra.
431         (_mm_sra_epi32): Likewise.
432         (_mm_srl_epi16): Replace deprecated function with vec_sr.
433         (_mm_srl_epi32): Likewise.
434         (_mm_srl_epi64): Likewise.
436 2018-10-25  Bill Schmidt  <wschmidt@linux.ibm.com>
437             Jinsong Ji <jji@us.ibm.com>
439         * gcc/config/rs6000/emmintrin.h (_mm_sll_epi16): Replace
440         comparison operators with vec_cmp* for compatibility due to
441         unfortunate history; clean up formatting and use types more
442         appropriately.
443         (_mm_sll_epi32): Likewise.
444         (_mm_sll_epi64): Likewise.
445         (_mm_srl_epi16): Likewise.
446         (_mm_srl_epi32): Likewise.
447         (_mm_srl_epi64): Likewise.
449 2018-10-25  Bill Schmidt  <wschmidt@linux.ibm.com>
450             Jinsong Ji <jji@us.ibm.com>
452         * config/rs6000/emmintrin.h (_mm_sll_epi64): Remove wrong cast.
453         * config/rs6000/xmmintrin.h (_mm_min_ps): Change m's type to
454         __vector __bool int.  Use vec_cmpgt in preference to deprecated
455         function vec_vcmpgtfp.
456         (_mm_max_ps): Likewise.
458 2018-10-25  Jeff Law  <law@redhat.com>
460         * config/rl78/rl78.c (insn_ok_now): Always re-recognize the insn
461         if returning false.
463 2018-10-25  Martin Sebor  <msebor@redhat.com>
465         * doc/extend.texi (aligned): Expand attribute description.
466         (Alignment): Rename section.  Discuss function arguments.
468 2018-10-25  Jan Hubicka  <jh@suse.cz>
470         * ipa-devirt.c (main_odr_variant): Remove.
471         (hash_odr_name, types_same_for_odr, types_odr_comparable,
472         odr_name_hasher::equal, odr_subtypes_equivalent_p):
473         Drop use of main_odr_variant.
474         (add_type_duplicate): Silence confused warnings on integer types.
475         (get_odr_type): Always look for main variant.
476         (register_odr_type): Simplify.
478 2018-10-25  Richard Biener  <rguenther@suse.de>
480         * tree-vect-data-refs.c (vect_analyze_data_ref_accesses):
481         Initialize ng to silence error with release checking bootstrap.
483 2018-10-25  Richard Biener  <rguenther@suse.de>
485         * tree-if-conv.c: Include tree-ssa-sccvn.h.
486         (tree_if_conversion): Run CSE on the if-converted loop body.
488 2018-10-25  Ilya Leoshkevich  <iii@linux.ibm.com>
490         * config/s390/constraints.md (ZL): New constraint.
491         * config/s390/s390.c (legitimate_pic_operand_p): Accept LARL
492         operands.
493         * config/s390/s390.md (movdi_larl): Remove.
494         (movdi_64): Add the LARL alternative.
496 2018-10-25  Ilya Leoshkevich  <iii@linux.ibm.com>
498         PR bootstrap/87747
499         * rtl.c (RTX_CODE_HWINT_P_1): New helper macro.
500         (RTX_CODE_HWINT_P): New macro.
501         (rtx_code_size): Use RTX_CODE_HWINT_P ().
503 2018-10-25  Jan Hubicka  <jh@suse.cz>
505         * ipa-devirt.c (odr_types_equivalent_p): Do not ICE if one of types
506         is anonymous.
508 2018-10-25  Richard Biener  <rguenther@suse.de>
510         PR tree-optimization/87665
511         PR tree-optimization/87745
512         * tree-vectorizer.h (get_earlier_stmt): Remove.
513         (get_later_stmt): Pick up UID from the original non-pattern stmt.
515 2018-10-25  Sam Tebbs  <sam.tebbs@arm.com>
517         * options.texi (Deprecated): Move list to Var section.
519 2018-10-24  Bill Schmidt  <wschmidt@linux.ibm.com>
520             Jinsong Ji <jji@us.ibm.com>
522         * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Change deprecated
523         __vector long to __vector long long.
524         (_mm_cvtpd_ps): Likewise.
525         (_mm_cvttpd_epi32): Likewise.
526         (_mm_cvtpi32_pd): Likewise.
527         (_mm_unpackhi_epi64): Likewise.
528         (_mm_unpacklo_epi64): Likewise.
530 2018-10-24  Segher Boessenkool  <segher@kernel.crashing.org>
532         PR rtl-optimization/87720
533         * combine.c (make_more_copies): Skip if the dest is pc_rtx.
535 2018-10-24  Alexandre Oliva <aoliva@redhat.com>
537         * gimple-ssa-isolate-paths.c
538         (find_implicit_erroneous_behavior): Do not change code if the
539         pass is running for warnings only.
540         (find_explicit_erroneous_behavior): Likewise.
542 2018-10-24  Michael Meissner  <meissner@linux.ibm.com>
544         * config/rs6000/rs6000.c (TARGET_MANGLE_DECL_ASSEMBLER_NAME):
545         Define as rs6000_mangle_decl_assembler_name.
546         (rs6000_mangle_decl_assembler_name): If the user switched from IBM
547         long double to IEEE long double, switch the names of the long
548         double built-in functions to be <func>f128 instead of <func>l.
550 2018-10-24  Martin Sebor  <msebor@redhat.com>
552         * doc/extend.texi (nonnull): List no-argument form.  Reference
553         -fno-delete-null-pointer-checks and -fisolate-erroneous-paths-attribute.
555 2018-10-24  Richard Biener  <rguenther@suse.de>
557         * tree-ssa-sccvn.c (do_rpo_vn): Free rpo_state.
559 2018-10-24  Martin Liska  <mliska@suse.cz>
561         PR tree-optimization/84436
562         * tree-switch-conversion.c (switch_conversion::contains_same_values_p):
563         Remove.
564         (switch_conversion::contains_linear_function_p): New.
565         (switch_conversion::build_one_array): Support linear
566         transformation on input.
567         * tree-switch-conversion.h (struct switch_conversion): Add
568         contains_linear_function_p declaration.
570 2018-10-24  Richard Biener  <rguenther@suse.de>
572         * varasm.c (const_hash_1): Return hash of ADDR_EXPR
573         if its argument is CONSTANT_CLASS_P.
575 2018-10-11  Jan Hubicka  <hubicka@ucw.cz>
577         * ipa-utils.h (type_with_linkage_p): No longer check for TYPE_STUB_DECL;
578         it is wrong for forward declarations.
580 2018-10-24  Ilya Leoshkevich  <iii@linux.ibm.com>
582         * config/s390/s390.c (s390_check_qrst_address): Add the missing
583         SYMBOL_REF_P () check.
585 2018-10-24  Richard Biener  <rguenther@suse.de>
587         PR tree-optimization/87105
588         * tree-vect-data-refs.c (vect_analyze_group_access_1): Adjust
589         dump classification.
590         (vect_analyze_data_ref_accesses): Handle duplicate loads and
591         stores by splitting the affected group after the fact.
592         * tree-vect-slp.c (vect_build_slp_tree_2): Dump when we
593         fail the SLP build because of size constraints.
595 2018-10-24  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
597         * configure.ac (gcc_cv_ld_aligned_shf_merge): New test.
598         * configure: Regenerate.
599         * config.in: Regenerate.
600         * varasm.c (mergeable_string_section): Use readonly_data_section
601         if linker doesn't support SHF_MERGE with alignment > 8.
602         (mergeable_constant_section): Likewise.
604 2018-10-24  Richard Biener  <rguenther@suse.de>
606         PR tree-optimization/84013
607         * tree-ssa-structalias.c (struct msdi_data): New struct for
608         marshalling data to walk_stmt_load_store_ops.
609         (maybe_set_dependence_info): Refactor as callback for
610         walk_stmt_load_store_ops.
611         (compute_dependence_clique): Set restrict info on all stmt kinds.
613 2018-10-24  Martin Liska  <mliska@suse.cz>
615         * cgraph.c (cgraph_node::dump):
616         Remove reduntant dumps and make tp_first_run dump more compact.
618 2018-10-24  Richard Biener  <rguenther@suse.de>
620         PR tree-optimization/87665
621         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Adjust
622         to reflect reality.
624 2018-10-12  Jeff Law  <law@redhat.com>
626         * config/h8300/h8300.c (h8300_expand_prologue): Fix stm generation
627         for H8/S.
629 2018-10-23  Richard Biener  <rguenther@suse.de>
631         * tree-vrp.c (add_assert_info): Guard dump_printf with
632         dump_enabled_p.
633         * gimple-ssa-evrp-analyze.c
634         (evrp_range_analyzer::record_ranges_from_incoming_edge):
635         Use value_range::ignore_equivs_equal_p.
637 2018-10-23  Richard Biener  <rguenther@suse.de>
639         PR tree-optimization/87105
640         PR tree-optimization/87608
641         * passes.def (pass_all_early_optimizations): Add early phi-opt
642         after dce.
643         * tree-ssa-phiopt.c (value_replacement): Ignore NOPs and predicts in
644         addition to debug stmts.
645         (tree_ssa_phiopt_worker): Add early_p argument, do only min/max
646         and abs replacement early.
647         * tree-cfg.c (gimple_empty_block_p): Likewise.
649 2018-10-23  Richard Earnshaw  <rearnsha@arm.com>
651         PR target/86383
652         * config.gcc (arm*-*-netbsdelf*): Default to StrongARM if no CPU
653         specified to configure.
654         (arm*-*-*): Use ARM7TDMI as the target CPU if no default provided.
656 2018-10-23  Richard Biener  <rguenther@suse.de>
658         PR tree-optimization/87700
659         * tree-ssa-copy.c (set_copy_of_val): Fix change detection logic.
661 2018-10-23  Jakub Jelinek  <jakub@redhat.com>
663         PR target/87674
664         * config/i386/avx512vlintrin.h (_mm_mask_mullo_epi32): Change type of
665         second argument from __mmask16 to __mmask8.
666         * config/i386/avx512vlbwintrin.h (_mm_mask_packus_epi32,
667         _mm_mask_packs_epi32): Likewise.
668         * config/i386/avx512pfintrin.h (_mm512_mask_prefetch_i64scatter_ps):
669         Likewise.
670         (_mm512_mask_prefetch_i64scatter_pd): Likewise.  Formatting fix.
672 2018-10-23  Richard Biener  <rguenther@suse.de>
674         * tree-vect-stmts.c (vect_analyze_stmt): Fix typo in comment.
676 2018-10-23  Richard Biener  <rguenther@suse.de>
678         PR tree-optimization/86144
679         * tree-vect-stmts.c (vect_analyze_stmt): Prefer -mveclibabi
680         over simd attribute.
682 2018-10-23  Richard Biener  <rguenther@suse.de>
684         PR tree-optimization/87693
685         * tree-ssa-threadedge.c (thread_around_empty_blocks): Handle
686         the case we do not find the taken edge.
688 2018-10-22  Bill Schmidt  <wschmidt@linux.ibm.com>
689             Jinsong Ji  <jji@us.ibm.com>
691         * config/rs6000/emmintrin.h (_MM_SHUFFLE2): Comment cleanup.
692         (_mm_store_pd): Use unaligned vector type for pointer cast.
693         (_mm_maskmoveu_si128): Likewise.
694         * config/rs6000/xmmintrin.h (__m128_u): New typedef.
695         (_mm_store_ps): Use unaligned vector type for pointer cast.
697 2018-10-22  Paul Koning  <ni1d@arrl.net>
699         * symtab.c (symtab_node::increase_alignment): Correct max
700         alignment check.
702 2018-10-22  Yury Gribov  <tetra2005@gmail.com>
704         PR tree-optimization/87633
705         * match.pd: Do not generate unordered integer comparisons.
707 2018-10-22  Segher Boessenkool  <segher@kernel.crashing.org>
709         PR rtl-optimization/87600
710         * combine.c: Add include of expr.h.
711         (cant_combine_insn_p): Do not combine moves from any hard non-fixed
712         register to a pseudo.
713         (make_more_copies): New function, add a copy to a new pseudo after
714         the moves from hard registers into pseudos.
715         (rest_of_handle_combine): Declare rebuild_jump_labels_after_combine
716         later.  Call make_more_copies.
718 2018-10-22  Andrew Stubbs  <ams@codesourcery.com>
720         * lra-constraints.c (process_alt_operands): New local array,
721         matching_early_clobber.  Check matching_early_clobber before
722         decrementing reject, and set matching_early_clobber after.
724 2018-10-22  Segher Boessenkool  <segher@kernel.crashing.org>
726         PR target/87598
727         * config/rs6000/rs6000.c (print_operand_address): For unexpected RTL
728         call output_addr_const and hope for the best.
730 2018-10-22  Richard Biener  <rguenther@suse.de>
732         * gimple-ssa-evrp-analyze.c
733         (evrp_range_analyzer::record_ranges_from_incoming_edge): Be
734         smarter about what ranges to use.
735         * tree-vrp.c (add_assert_info): Dump here.
736         (register_edge_assert_for_2): Instead of here at multiple but
737         not all places.
739         * gcc.dg/tree-ssa/evrp12.c: New testcase.
740         * gcc.dg/predict-6.c: Adjust.
741         * gcc.dg/tree-ssa/vrp33.c: Disable EVRP.
742         * gcc.dg/tree-ssa/vrp02.c: Likewise.
743         * gcc.dg/tree-ssa/cunroll-9.c: Likewise.
745 2018-10-22  Steven Bosscher <steven@gcc.gnu.org>
746         Richard Biener  <rguenther@suse.de>
748         * bitmap.h: Update data structure documentation, including a
749         description of bitmap views as either linked-lists or splay trees.
750         (struct bitmap_element_def): Update comments for splay tree bitmaps.
751         (struct bitmap_head_def): Likewise.
752         (bitmap_list_view, bitmap_tree_view): New prototypes.
753         (bitmap_initialize_stat): Initialize a bitmap_head's indx and
754         tree_form fields.
755         (bmp_iter_set_init): Assert the iterated bitmaps are in list form.
756         (bmp_iter_and_init, bmp_iter_and_compl_init): Likewise.
757         * bitmap.c (bitmap_elem_to_freelist): Unregister overhead of a
758         released bitmap element here.
759         (bitmap_element_free): Remove.
760         (bitmap_elt_clear_from): Work on splay tree bitmaps.
761         (bitmap_list_link_element): Renamed from bitmap_element_link.  Move
762         this function similar ones such that linked-list bitmap implementation
763         functions are grouped.
764         (bitmap_list_unlink_element): Renamed from bitmap_element_unlink,
765         and moved for grouping.
766         (bitmap_list_insert_element_after): Renamed from
767         bitmap_elt_insert_after, and moved for grouping.
768         (bitmap_list_find_element): New function spliced from bitmap_find_bit.
769         (bitmap_tree_link_left, bitmap_tree_link_right,
770         bitmap_tree_rotate_left, bitmap_tree_rotate_right, bitmap_tree_splay,
771         bitmap_tree_link_element, bitmap_tree_unlink_element,
772         bitmap_tree_find_element): New functions for splay-tree bitmap
773         implementation.
774         (bitmap_element_link, bitmap_element_unlink, bitmap_elt_insert_after):
775         Renamed and moved, see above entries.
776         (bitmap_tree_listify_from): New function to convert part of a splay
777         tree bitmap to a linked-list bitmap.
778         (bitmap_list_view): Convert a splay tree bitmap to linked-list form.
779         (bitmap_tree_view): Convert a linked-list bitmap to splay tree form.
780         (bitmap_find_bit): Remove.
781         (bitmap_clear, bitmap_clear_bit, bitmap_set_bit,
782         bitmap_single_bit_set_p, bitmap_first_set_bit, bitmap_last_set_bit):
783         Handle splay tree bitmaps.
784         (bitmap_copy, bitmap_count_bits, bitmap_and, bitmap_and_into,
785         bitmap_elt_copy, bitmap_and_compl, bitmap_and_compl_into,
786         bitmap_compl_and_into, bitmap_elt_ior, bitmap_ior, bitmap_ior_into,
787         bitmap_xor, bitmap_xor_into, bitmap_equal_p, bitmap_intersect_p,
788         bitmap_intersect_compl_p, bitmap_ior_and_compl,
789         bitmap_ior_and_compl_into, bitmap_set_range, bitmap_clear_range,
790         bitmap_hash): Reject trying to act on splay tree bitmaps.  Make
791         corresponding changes to use linked-list specific bitmap_element
792         manipulation functions as applicable for efficiency.
793         (bitmap_tree_to_vec): New function.
794         (debug_bitmap_elt_file): New function split out from ...
795         (debug_bitmap_file): ... here.  Handle splay tree bitmaps.
796         (bitmap_print): Likewise.
798         PR tree-optimization/63155
799         * tree-ssa-propagate.c (ssa_prop_init): Use tree-view for the
800         SSA edge worklists.
801         * tree-ssa-coalesce.c (coalesce_ssa_name): Populate used_in_copies
802         in tree-view.
804 2018-10-22  Martin Liska  <mliska@suse.cz>
806         PR tree-optimization/87686
807         Revert
808         2018-08-29  Martin Liska  <mliska@suse.cz>
810         * tree-switch-conversion.c (switch_conversion::expand):
811         Strenghten assumption about gswitch statements.
813 2018-10-22  Martin Liska  <mliska@suse.cz>
815         * ipa-icf.c (sem_item::compare_attributes): Remove.
816         (sem_item::compare_referenced_symbol_properties): Use
817         attribute_list_equal instead.
818         (sem_function::equals_wpa): Likewise.
819         * ipa-icf.h: Remove compare_attributes.
821 2018-10-22  Richard Biener  <rguenther@suse.de>
823         PR middle-end/87682
824         * mem-stats.h (mem_usage::operator==): Fix pasto.
826 2018-10-22  Richard Biener  <rguenther@suse.de>
828         PR tree-optimization/87640
829         * tree-vrp.c (set_value_range_with_overflow): Decompose
830         incomplete result.
831         (extract_range_from_binary_expr_1): Adjust.
833 2018-10-22  Martin Jambor  <mjambor@suse.cz>
835         * tree-eh.h (stmt_could_throw_p): Add function parameter.
836         (stmt_can_throw_external): Likewise.
837         (stmt_can_throw_internal): Likewise.
838         * tree-eh.c (lower_eh_constructs_2): Pass cfun to stmt_could_throw_p.
839         (lower_eh_constructs_2): Likewise.
840         (stmt_could_throw_p): Add fun parameter, use it instead of cfun.
841         (stmt_can_throw_external): Likewise.
842         (stmt_can_throw_internal): Likewise.
843         (maybe_clean_eh_stmt_fn): Pass cfun to stmt_could_throw_p.
844         (maybe_clean_or_replace_eh_stmt): Pass cfun to stmt_could_throw_p.
845         (maybe_duplicate_eh_stmt_fn): Pass new_fun to stmt_could_throw_p.
846         (maybe_duplicate_eh_stmt): Pass cfun to stmt_could_throw_p.
847         (pass_lower_eh_dispatch::execute): Pass cfun to
848         stmt_can_throw_external.
849         (cleanup_empty_eh): Likewise.
850         (verify_eh_edges): Pass cfun to stmt_could_throw_p.
851         * cgraph.c (cgraph_edge::set_call_stmt): Pass a function to
852         stmt_can_throw_external instead of pushing it to cfun.
853         (symbol_table::create_edge): Likewise.
854         * gimple-fold.c (fold_builtin_atomic_compare_exchange): Pass cfun to
855         stmt_can_throw_internal.
856         * gimple-ssa-evrp.c (evrp_dom_walker::before_dom_children): Pass cfun
857         to stmt_could_throw_p.
858         * gimple-ssa-store-merging.c (handled_load): Pass cfun to
859         stmt_can_throw_internal.
860         (pass_store_merging::execute): Likewise.
861         * gimple-ssa-strength-reduction.c
862         (find_candidates_dom_walker::before_dom_children): Pass cfun to
863         stmt_could_throw_p.
864         * gimplify-me.c (gimple_regimplify_operands): Pass cfun to
865         stmt_can_throw_internal.
866         * ipa-pure-const.c (check_call): Pass cfun to stmt_could_throw_p and
867         to stmt_can_throw_external.
868         (check_stmt): Pass cfun to stmt_could_throw_p.
869         (check_stmt): Pass cfun to stmt_can_throw_external.
870         (pass_nothrow::execute): Likewise.
871         * trans-mem.c (expand_call_tm): Pass cfun to stmt_can_throw_internal.
872         * tree-cfg.c (is_ctrl_altering_stmt): Pass cfun to
873         stmt_can_throw_internal.
874         (verify_gimple_in_cfg): Pass cfun to stmt_could_throw_p.
875         (stmt_can_terminate_bb_p): Pass cfun to stmt_can_throw_external.
876         (gimple_purge_dead_eh_edges): Pass cfun to stmt_can_throw_internal.
877         * tree-complex.c (expand_complex_libcall): Pass cfun to
878         stmt_could_throw_p and to stmt_can_throw_internal.
879         (expand_complex_multiplication): Pass cfun to stmt_can_throw_internal.
880         * tree-inline.c (copy_edges_for_bb): Likewise.
881         (maybe_move_debug_stmts_to_successors): Likewise.
882         * tree-outof-ssa.c (ssa_is_replaceable_p): Pass cfun to
883         stmt_could_throw_p.
884         * tree-parloops.c (oacc_entry_exit_ok_1): Likewise.
885         * tree-sra.c (scan_function): Pass cfun to stmt_can_throw_external.
886         * tree-ssa-alias.c (stmt_kills_ref_p): Pass cfun to
887         stmt_can_throw_internal.
888         * tree-ssa-ccp.c (optimize_atomic_bit_test_and): Likewise.
889         * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Pass cfun to
890         stmt_could_throw_p.
891         (mark_aliased_reaching_defs_necessary_1): Pass cfun to
892         stmt_can_throw_internal.
893         * tree-ssa-forwprop.c (pass_forwprop::execute): Likewise.
894         * tree-ssa-loop-im.c (movement_possibility): Pass cfun to
895         stmt_could_throw_p.
896         * tree-ssa-loop-ivopts.c (find_givs_in_stmt_scev): Likewise.
897         (add_autoinc_candidates): Pass cfun to stmt_can_throw_internal.
898         * tree-ssa-math-opts.c (pass_cse_reciprocals::execute): Likewise.
899         (convert_mult_to_fma_1): Likewise.
900         (convert_to_divmod): Likewise.
901         * tree-ssa-phiprop.c (propagate_with_phi): Likewise.
902         * tree-ssa-pre.c (compute_avail): Pass cfun to stmt_could_throw_p.
903         * tree-ssa-propagate.c
904         (substitute_and_fold_dom_walker::before_dom_children): Likewise.
905         * tree-ssa-reassoc.c (suitable_cond_bb): Likewise.
906         (maybe_optimize_range_tests): Likewise.
907         (linearize_expr_tree): Likewise.
908         (reassociate_bb): Likewise.
909         * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
910         * tree-ssa-scopedtables.c (hashable_expr_equal_p): Likewise.
911         * tree-ssa-strlen.c (adjust_last_stmt): Likewise.
912         (handle_char_store): Likewise.
913         * tree-vect-data-refs.c (vect_find_stmt_data_reference): Pass cfun to
914         stmt_can_throw_internal.
915         * tree-vect-patterns.c (check_bool_pattern): Pass cfun to
916         stmt_could_throw_p.
917         * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
918         (vectorizable_call): Pass cfun to stmt_can_throw_internal.
919         (vectorizable_simd_clone_call): Likewise.
920         * value-prof.c (gimple_ic): Pass cfun to stmt_could_throw_p.
921         (gimple_stringop_fixed_value): Likewise.
923 2018-10-22  Ilya Leoshkevich  <iii@linux.ibm.com>
925         * config/s390/s390.c (s390_loadrelative_operand_p): Accept
926         literal pool references.
927         (s390_check_qrst_address): Adapt to the new behavior of
928         s390_loadrelative_operand_p ().
930 2018-10-22  H.J. Lu  <hongjiu.lu@intel.com>
932         PR target/72782
933         * config/i386/sse.md (*andnot<mode>3_bcst): New.
935 2018-10-22  H.J. Lu  <hongjiu.lu@intel.com>
937         PR target/72782
938         * config/i386/sse.md (*<code><mode>3_bcst): New.
940 2018-10-22  H.J. Lu  <hongjiu.lu@intel.com>
942         PR target/72782
943         * config/i386/sse.md (avx512bcst): Updated for V4SI, V2DI, V8SI,
944         V4DI, V16SI and V8DI.
945         (*sub<mode>3<mask_name>_bcst): New.
946         (*add<mode>3<mask_name>_bcst): Likewise.
948 2018-10-21  Bill Schmidt  <wschmidt@linux.ibm.com>
949             Jinsong Ji  <jji@us.ibm.com>
951         * config/rs6000/emmintrin.h (_mm_movemask_pd): Replace __vector
952         __m64 with __vector unsigned long long for compatibility.
953         (_mm_movemask_epi8): Likewise.
954         * config/rs6000/xmmintrin.h (_mm_cvtps_pi32): Likewise.
955         (_mm_cvttps_pi32): Likewise.
956         (_mm_cvtpi32_ps): Likewise.
957         (_mm_cvtps_pi16): Likewise.
958         (_mm_loadh_pi): Likewise.
959         (_mm_storeh_pi): Likewise.
960         (_mm_movehl_ps): Likewise.
961         (_mm_movelh_ps): Likewise.
962         (_mm_loadl_pi): Likewise.
963         (_mm_storel_pi): Likewise.
964         (_mm_movemask_ps): Likewise.
965         (_mm_shuffle_pi16): Likewise.
967 2018-10-21  H.J. Lu  <hongjiu.lu@intel.com>
969         PR target/72782
970         * config/i386/avx512fintrin.h (_mm512_fnmsub_round_pd): Use
971         __builtin_ia32_vfnmsubpd512_mask.
972         (_mm512_mask_fnmsub_round_pd): Likewise.
973         (_mm512_fnmsub_pd): Likewise.
974         (_mm512_mask_fnmsub_pd): Likewise.
975         (_mm512_maskz_fnmsub_round_pd): Use
976         __builtin_ia32_vfnmsubpd512_maskz.
977         (_mm512_maskz_fnmsub_pd): Likewise.
978         (_mm512_fnmsub_round_ps): Use __builtin_ia32_vfnmsubps512_mask.
979         (_mm512_mask_fnmsub_round_ps): Likewise.
980         (_mm512_fnmsub_ps): Likewise.
981         (_mm512_mask_fnmsub_ps): Likewise.
982         (_mm512_maskz_fnmsub_round_ps): Use
983         __builtin_ia32_vfnmsubps512_maskz.
984         (_mm512_maskz_fnmsub_ps): Likewise.
985         * config/i386/avx512vlintrin.h (_mm256_mask_fnmsub_pd): Use
986         __builtin_ia32_vfnmsubpd256_mask.
987         (_mm256_maskz_fnmsub_pd): Use __builtin_ia32_vfnmsubpd256_maskz.
988         (_mm_mask_fnmsub_pd): Use __builtin_ia32_vfmaddpd128_mask
989         (_mm_maskz_fnmsub_pd): Use __builtin_ia32_vfnmsubpd128_maskz.
990         (_mm256_mask_fnmsub_ps): Use __builtin_ia32_vfnmsubps256_mask.
991         (_mm256_mask_fnmsub_ps): Use __builtin_ia32_vfnmsubps256_mask.
992         (_mm256_maskz_fnmsub_ps): Use __builtin_ia32_vfnmsubps256_maskz.
993         (_mm_mask_fnmsub_ps): Use __builtin_ia32_vfnmsubps128_mask.
994         (_mm_maskz_fnmsub_ps): Use __builtin_ia32_vfnmsubps128_maskz.
995         * config/i386/fmaintrin.h (_mm_fnmsub_pd): Use
996         __builtin_ia32_vfnmsubpd.
997         (_mm256_fnmsub_pd): Use __builtin_ia32_vfnmsubpd256.
998         (_mm_fnmsub_ps): Use __builtin_ia32_vfnmsubps.
999         (_mm256_fnmsub_ps): Use __builtin_ia32_vfnmsubps256.
1000         (_mm_fnmsub_sd): Use __builtin_ia32_vfnmsubsd3.
1001         (_mm_fnmsub_ss): Use __builtin_ia32_vfnmsubss3.
1002         * config/i386/i386-builtin.def: Add
1003         __builtin_ia32_vfnmsubpd256_mask,
1004         __builtin_ia32_vfnmsubpd256_maskz,
1005         __builtin_ia32_vfnmsubpd128_mask,
1006         __builtin_ia32_vfnmsubpd128_maskz,
1007         __builtin_ia32_vfnmsubps256_mask,
1008         __builtin_ia32_vfnmsubps256_maskz,
1009         __builtin_ia32_vfnmsubps128_mask,
1010         __builtin_ia32_vfnmsubps128_maskz,
1011         __builtin_ia32_vfnmsubpd512_mask,
1012         __builtin_ia32_vfnmsubpd512_maskz,
1013         __builtin_ia32_vfnmsubps512_mask,
1014         __builtin_ia32_vfnmsubps512_maskz, __builtin_ia32_vfnmsubss3,
1015         __builtin_ia32_vfnmsubsd3, __builtin_ia32_vfnmsubps,
1016         __builtin_ia32_vfnmsubpd, __builtin_ia32_vfnmsubps256 and.
1017         __builtin_ia32_vfnmsubpd256.
1018         * config/i386/sse.md (fma4i_fnmsub_<mode>): New.
1019         (<avx512>_fnmsub_<mode>_maskz<round_expand_name>): Likewise.
1020         (*<sd_mask_codefor>fma_fnmsub_<mode><sd_maskz_name>_bcst_1):
1021         Likewise.
1022         (*<sd_mask_codefor>fma_fnmsub_<mode><sd_maskz_name>_bcst_2):
1023         Likewise.
1024         (*<sd_mask_codefor>fma_fnmsub_<mode><sd_maskz_name>_bcst_3):
1025         Likewise.
1026         (fmai_vmfnmsub_<mode><round_name>): Likewise.
1028 2018-10-21  H.J. Lu  <hongjiu.lu@intel.com>
1030         PR target/72782
1031         * config/i386/avx512fintrin.h (_mm512_fnmadd_round_pd): Use
1032         __builtin_ia32_vfnmaddpd512_mask.
1033         (_mm512_mask_fnmadd_round_pd): Likewise.
1034         (_mm512_fnmadd_pd): Likewise.
1035         (_mm512_mask_fnmadd_pd): Likewise.
1036         (_mm512_maskz_fnmadd_round_pd): Use
1037         __builtin_ia32_vfnmaddpd512_maskz.
1038         (_mm512_maskz_fnmadd_pd): Likewise.
1039         (_mm512_fnmadd_round_ps): Use __builtin_ia32_vfnmaddps512_mask.
1040         (_mm512_mask_fnmadd_round_ps): Likewise.
1041         (_mm512_fnmadd_ps): Likewise.
1042         (_mm512_mask_fnmadd_ps): Likewise.
1043         (_mm512_maskz_fnmadd_round_ps): Use
1044         __builtin_ia32_vfnmaddps512_maskz.
1045         (_mm512_maskz_fnmadd_ps): Likewise.
1046         * config/i386/avx512vlintrin.h (_mm256_mask_fnmadd_pd): Use
1047         __builtin_ia32_vfnmaddpd256_mask.
1048         (_mm256_maskz_fnmadd_pd): Use __builtin_ia32_vfnmaddpd256_maskz.
1049         (_mm_mask_fnmadd_pd): Use __builtin_ia32_vfmaddpd128_mask
1050         (_mm_maskz_fnmadd_pd): Use __builtin_ia32_vfnmaddpd128_maskz.
1051         (_mm256_mask_fnmadd_ps): Use __builtin_ia32_vfnmaddps256_mask.
1052         (_mm256_mask_fnmadd_ps): Use __builtin_ia32_vfnmaddps256_mask.
1053         (_mm256_maskz_fnmadd_ps): Use __builtin_ia32_vfnmaddps256_maskz.
1054         (_mm_mask_fnmadd_ps): Use __builtin_ia32_vfnmaddps128_mask.
1055         (_mm_maskz_fnmadd_ps): Use __builtin_ia32_vfnmaddps128_maskz.
1056         * config/i386/fmaintrin.h (_mm_fnmadd_pd): Use
1057         __builtin_ia32_vfnmaddpd.
1058         (_mm256_fnmadd_pd): Use __builtin_ia32_vfnmaddpd256.
1059         (_mm_fnmadd_ps): Use __builtin_ia32_vfnmaddps.
1060         (_mm256_fnmadd_ps): Use __builtin_ia32_vfnmaddps256.
1061         (_mm_fnmadd_sd): Use __builtin_ia32_vfnmaddsd3.
1062         (_mm_fnmadd_ss): Use __builtin_ia32_vfnmaddss3.
1063         * config/i386/i386-builtin.def: Add
1064         __builtin_ia32_vfnmaddpd256_mask,
1065         __builtin_ia32_vfnmaddpd256_maskz,
1066         __builtin_ia32_vfnmaddpd128_mask,
1067         __builtin_ia32_vfnmaddpd128_maskz,
1068         __builtin_ia32_vfnmaddps256_mask,
1069         __builtin_ia32_vfnmaddps256_maskz,
1070         __builtin_ia32_vfnmaddps128_mask,
1071         __builtin_ia32_vfnmaddps128_maskz,
1072         __builtin_ia32_vfnmaddpd512_mask,
1073         __builtin_ia32_vfnmaddpd512_maskz,
1074         __builtin_ia32_vfnmaddps512_mask,
1075         __builtin_ia32_vfnmaddps512_maskz, __builtin_ia32_vfnmaddss3,
1076         __builtin_ia32_vfnmaddsd3, __builtin_ia32_vfnmaddps,
1077         __builtin_ia32_vfnmaddpd, __builtin_ia32_vfnmaddps256 and.
1078         __builtin_ia32_vfnmaddpd256.
1079         * config/i386/sse.md (fma4i_fnmadd_<mode>): New.
1080         (<avx512>_fnmadd_<mode>_maskz<round_expand_name>): Likewise.
1081         (*<sd_mask_codefor>fma_fnmadd_<mode><sd_maskz_name>_bcst_1):
1082         Likewise.
1083         (*<sd_mask_codefor>fma_fnmadd_<mode><sd_maskz_name>_bcst_2):
1084         Likewise.
1085         (*<sd_mask_codefor>fma_fnmadd_<mode><sd_maskz_name>_bcst_3):
1086         Likewise.
1087         (fmai_vmfnmadd_<mode><round_name>): Likewise.
1089 2018-10-21  H.J. Lu  <hongjiu.lu@intel.com>
1091         PR target/72782
1092         * config/i386/avx512fintrin.h (_mm512_fmsub_round_pd): Use
1093         __builtin_ia32_vfmsubpd512_mask.
1094         (_mm512_mask_fmsub_round_pd): Likewise.
1095         (_mm512_fmsub_pd): Likewise.
1096         (_mm512_mask_fmsub_pd): Likewise.
1097         (_mm512_maskz_fmsub_round_pd): Use
1098         __builtin_ia32_vfmsubpd512_maskz.
1099         (_mm512_maskz_fmsub_pd): Likewise.
1100         (_mm512_fmsub_round_ps): Use __builtin_ia32_vfmsubps512_mask.
1101         (_mm512_mask_fmsub_round_ps): Likewise.
1102         (_mm512_fmsub_ps): Likewise.
1103         (_mm512_mask_fmsub_ps): Likewise.
1104         (_mm512_maskz_fmsub_round_ps): Use
1105         __builtin_ia32_vfmsubps512_maskz.
1106         (_mm512_maskz_fmsub_ps): Likewise.
1107         * config/i386/avx512vlintrin.h (_mm256_mask_fmsub_pd): Use
1108         __builtin_ia32_vfmsubpd256_mask.
1109         (_mm256_maskz_fmsub_pd): Use __builtin_ia32_vfmsubpd256_maskz.
1110         (_mm_mask_fmsub_pd): Use __builtin_ia32_vfmaddpd128_mask
1111         (_mm_maskz_fmsub_pd): Use __builtin_ia32_vfmsubpd128_maskz.
1112         (_mm256_mask_fmsub_ps): Use __builtin_ia32_vfmsubps256_mask.
1113         (_mm256_mask_fmsub_ps): Use __builtin_ia32_vfmsubps256_mask.
1114         (_mm256_maskz_fmsub_ps): Use __builtin_ia32_vfmsubps256_maskz.
1115         (_mm_mask_fmsub_ps): Use __builtin_ia32_vfmsubps128_mask.
1116         (_mm_maskz_fmsub_ps): Use __builtin_ia32_vfmsubps128_maskz.
1117         * config/i386/fmaintrin.h (_mm_fmsub_pd): Use
1118         __builtin_ia32_vfmsubpd.
1119         (_mm256_fmsub_pd): Use __builtin_ia32_vfmsubpd256.
1120         (_mm_fmsub_ps): Use __builtin_ia32_vfmsubps.
1121         (_mm256_fmsub_ps): Use __builtin_ia32_vfmsubps256.
1122         (_mm_fmsub_sd): Use __builtin_ia32_vfmsubsd3.
1123         (_mm_fmsub_ss): Use __builtin_ia32_vfmsubss3.
1124         * config/i386/i386-builtin.def: Add
1125         __builtin_ia32_vfmsubpd256_mask,
1126         __builtin_ia32_vfmsubpd256_maskz,
1127         __builtin_ia32_vfmsubpd128_mask,
1128         __builtin_ia32_vfmsubpd128_maskz,
1129         __builtin_ia32_vfmsubps256_mask,
1130         __builtin_ia32_vfmsubps256_maskz,
1131         __builtin_ia32_vfmsubps128_mask,
1132         __builtin_ia32_vfmsubps128_maskz,
1133         __builtin_ia32_vfmsubpd512_mask,
1134         __builtin_ia32_vfmsubpd512_maskz,
1135         __builtin_ia32_vfmsubps512_mask,
1136         __builtin_ia32_vfmsubps512_maskz, __builtin_ia32_vfmsubss3,
1137         __builtin_ia32_vfmsubsd3, __builtin_ia32_vfmsubps,
1138         __builtin_ia32_vfmsubpd, __builtin_ia32_vfmsubps256 and.
1139         __builtin_ia32_vfmsubpd256.
1140         * config/i386/sse.md (fma4i_fmsub_<mode>): New.
1141         (<avx512>_fmsub_<mode>_maskz<round_expand_name>): Likewise.
1142         (*<sd_mask_codefor>fma_fmsub_<mode><sd_maskz_name>_bcst_1):
1143         Likewise.
1144         (*<sd_mask_codefor>fma_fmsub_<mode><sd_maskz_name>_bcst_2):
1145         Likewise.
1146         (*<sd_mask_codefor>fma_fmsub_<mode><sd_maskz_name>_bcst_3):
1147         Likewise.
1148         (fmai_vmfmsub_<mode><round_name>): Likewise.
1150 2018-10-21  H.J. Lu  <hongjiu.lu@intel.com>
1152         * config/i386/sse.md (*<plusminus_insn><mode>3<mask_name>_bcst_1):
1153         Remove plus.  Renamed to ...
1154         (*sub<mode>3<mask_name>_bcst): This.
1155         (*add<mode>3<mask_name>_bcst_2): Renamede to ...
1156         (*add<mode>3<mask_name>_bcst): This.
1158 2018-10-21  H.J. Lu  <hongjiu.lu@intel.com>
1160         PR target/72782
1161         * config/i386/sse.md (*mul<mode>3<mask_name>_bcst): New.
1163 2018-10-21  H.J. Lu  <hongjiu.lu@intel.com>
1165         PR target/87662
1166         * i386/avx512vlintrin.h (_mm256_or_epi32): New.
1167         (_mm_or_epi32): Likewise.
1168         (_mm256_xor_epi32): Likewise.
1169         (_mm_xor_epi32): Likewise.
1170         (_mm256_or_epi64): Likewise.
1171         (_mm_or_epi64): Likewise.
1172         (_mm256_xor_epi64): Likewise.
1173         (_mm_xor_epi64): Likewise.
1175 2018-10-20  H.J. Lu  <hongjiu.lu@intel.com>
1177         PR target/72782
1178         * config/i386/sse.md (*<avx512>_div<mode>3<mask_name>_bcst): New.
1180 2018-10-20  Jakub Jelinek  <jakub@redhat.com>
1182         PR middle-end/87647
1183         * varasm.c (decode_addr_const): Handle COMPOUND_LITERAL_EXPR.
1185 2018-10-20  Andreas Schwab  <schwab@linux-m68k.org>
1187         * doc/ux.texi: Move @section directly after @node.
1189 2018-10-19  Jakub Jelinek  <jakub@redhat.com>
1191         PR middle-end/85488
1192         PR middle-end/87649
1193         * omp-low.c (check_omp_nesting_restrictions): Diagnose ordered without
1194         depend closely nested inside of loop with ordered clause with
1195         a parameter.
1197 2018-10-19  David Malcolm  <dmalcolm@redhat.com>
1199         * Makefile.in (TEXI_GCCINT_FILES): Add ux.texi.
1200         * doc/gccint.texi: Include ux.texi and use it in top-level menu.
1201         * doc/ux.texi: New file.
1203 2018-10-19  Segher Boessenkool  <segher@kernel.crashing.org>
1205         * config/rs6000/rs6000.h (REG_ALLOC_ORDER): Move 68 (that is, CR0) to
1206         be the first CR field allocated.
1208 2018-10-19  Richard Biener  <rguenther@suse.de>
1210         PR target/87657
1211         * config/i386/i386.c (ix86_builtin_vectorization_cost): Use
1212         TYPE_VECTOR_SUBPARTS and avoid relying on vector mode.
1214 2018-10-19  H.J. Lu  <hongjiu.lu@intel.com>
1216         PR target/72782
1217         * config/i386/sse.md
1218         (*<plusminus_insn><mode>3<mask_name>_bcst_1): New.
1219         (*add<mode>3<mask_name>_bcst_2): Likewise.
1221 2018-10-19  H.J. Lu  <hongjiu.lu@intel.com>
1223         * config/i386/sse.md
1224         (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_1):
1225         Replace nonimmediate_operand with register_operand.
1226         (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_2):
1227         Likewise.
1228         (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_3):
1229         Likewise.
1231 2018-10-19  Ilya Leoshkevich  <iii@linux.ibm.com>
1233         PR rtl-optimization/87596
1234         * lra-constraints.c (spill_hard_reg_in_range): Use INSN_P () +
1235         lra_get_insn_recog_data () instead of lra_insn_recog_data[]
1236         for instructions in FROM..TO range.
1238 2018-10-19  Eric Botcazou  <ebotcazou@adacore.com>
1240         * cfgexpand.c (expand_one_var): Use specific wording in error message
1241         for non-local frame variables.
1242         * stor-layout.c (layout_decl): Do not issue a warning for them.
1244 2018-10-19  Robin Dapp  <rdapp@linux.ibm.com>
1246         * haifa-sched.c (priority): Add force_recompute parameter.
1247         (apply_replacement): Call priority () with force_recompute = true.
1248         (restore_pattern): Likewise.
1250 2018-10-18  H.J. Lu  <hongjiu.lu@intel.com>
1252         * simplify-rtx.c (simplify_subreg): Limit mask of vec_merge to
1253         HOST_BITS_PER_WIDE_INT.
1254         (test_vector_ops_duplicate): Likewise.
1256 2018-10-18  H.J. Lu  <hongjiu.lu@intel.com>
1258         PR target/72782
1259         * config/i386/sse.md (VF_AVX512): New.
1260         (avx512bcst): Likewise.
1261         (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_1):
1262         Likewise.
1263         (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_2):
1264         Likewise.
1265         (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_3):
1266         Likewise.
1268 2018-10-18  Jonathan Wakely  <jwakely@redhat.com>
1270         * doc/invoke.texi (-dumpversion): Improve grammar.
1271         (-dumpfullversion): Make more consistent with -dumpversion.
1273 2018-10-18  Uros Bizjak  <ubizjak@gmail.com>
1275         * config/i386/i386.c (ix86_emit_fp_unordered_jump):
1276         Set JUMP_LABEL to the jump insn.
1277         (ix86_emit_i387_log1p): Use ix86_expand_branch to expand branch.
1278         Predict emitted jump and add label to jump insn.
1280 2018-10-18  David Malcolm  <dmalcolm@redhat.com>
1282         PR tree-optimization/87562
1283         * input.c (get_substring_ranges_for_loc): Use
1284         LRK_SPELLING_LOCATION rather than LRK_MACRO_EXPANSION_POINT when
1285         getting the linemap for the endpoint.  Verify that it's either
1286         in the same linemap as the start point's spelling location, or
1287         at least in the same file.
1289 2018-10-18  Richard Biener  <rguenther@suse.de>
1291         * config/i386/i386.c (ix86_builtin_vectorization_cost): Do not
1292         feed width-specific load/store costs through ix86_vec_cost.
1293         * config/i386/x86-tune-costs.h (athlon_cost): Adjust.
1294         (k8_cost): Likewise.
1295         (bdver_cost): Likewise.
1296         (znver1_cost): Likewise.
1297         (btver1_cost): Likewise.
1298         (btver2_cost): Likewise.
1300 2018-10-18  H.J. Lu  <hongjiu.lu@intel.com>
1302         * simplify-rtx.c (simplify_subreg): Call simplify_gen_subreg
1303         to simplify subreg of vec_merge.
1305 2018-10-18  Richard Biener  <rguenther@suse.de>
1307         * config/i386/i386.c: Fix costing of vector FMA.
1309 2018-10-18  Richard Biener  <rguenther@suse.de>
1311         * config/i386/i386.c (ix86_vec_cost): Remove !parallel path
1312         and argument.
1313         (ix86_builtin_vectorization_cost): For vec_construct properly
1314         cost insertion into SSE regs.
1315         (...): Adjust calls to ix86_vec_cost.
1317 2018-10-18  Richard Biener  <rguenther@suse.de>
1319         PR middle-end/87087
1320         Revert
1321         2018-02-07  Richard Biener  <rguenther@suse.de>
1323         PR tree-optimization/84204
1324         * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
1325         this place.
1327 2018-10-18  H.J. Lu  <hongjiu.lu@intel.com>
1329         PR target/87537
1330         * simplify-rtx.c (simplify_subreg): Simplify subreg of vec_merge
1331         of vec_duplicate.
1332         (test_vector_ops_duplicate): Add test for a scalar subreg of a
1333         VEC_MERGE of a VEC_DUPLICATE.
1335 2018-10-17  Joseph Myers  <joseph@codesourcery.com>
1337         * doc/cpp.texi (__STDC_VERSION__): Document C2X handling.
1338         * doc/invoke.texi (-std=c2x, -std=gnu2x): Document new options.
1339         * doc/standards.texi (C Language): Document C2X.
1340         * dwarf2out.c (highest_c_language), config/rl78/rl78.c
1341         (rl78_option_override): Handle "GNU C2X" language name.
1343 2018-10-17  Joseph Myers  <joseph@codesourcery.com>
1345         * doc/invoke.texi (-std=c17), doc/standards.texi (C Language):
1346         Document C17 as published in 2018.
1348 2018-10-17  Eric Botcazou  <ebotcazou@adacore.com>
1350         PR middle-end/87623
1351         * fold-const.c (fold_truth_andor_1): If the right side is not constant,
1352         bail out if both sides do not have the same storage order.
1354 2018-10-17  Aldy Hernandez  <aldyh@redhat.com>
1356         * bitmap.c (bitmap_head::dump): New.
1357         * bitmap.h (bitmap_head): Add dump().
1358         * gimple-ssa-evrp-analyze.c
1359         (evrp_range_analyzer::try_find_new_range): Adjust for value_range API.
1360         (evrp_range_analyzer::set_ssa_range_info): Same.
1361         (evrp_range_analyzer::record_ranges_from_phis): Same.
1362         (evrp_range_analyzer::record_ranges_from_stmt): Same.
1363         * gimple-ssa-evrp.c (evrp_dom_walker::before_dom_children): Same.
1364         * gimple-ssa-sprintf.c (get_int_range): Same.
1365         (format_integer): Same.
1366         (sprintf_dom_walker::handle_gimple_call): Same.
1367         * ipa-cp.c (ipcp_vr_lattice::meet_with_1): Same.
1368         (ipcp_vr_lattice::top_p): Same.
1369         (ipcp_vr_lattice::bottom_p): Same.
1370         (ipcp_vr_lattice::set_to_bottom): Same.
1371         (ipa_vr_operation_and_type_effects): Same.
1372         (propagate_vr_across_jump_function): Same.
1373         (ipcp_store_vr_results): Same.
1374         * ipa-prop.c (struct ipa_vr_ggc_hash_traits): Same.
1375         (ipa_print_node_jump_functions_for_edge): Same.
1376         (ipa_get_value_range): Same.
1377         (ipa_compute_jump_functions_for_edge): Same.
1378         (ipa_write_jump_function): Same.
1379         * tree-ssa-dom.c (simplify_stmt_for_jump_threading): Same.
1380         * tree-ssa-threadedge.c (record_temporary_equivalences_from_phis):
1381         Same.
1382         * vr-values.c (set_value_range_to_nonnegative): Same.
1383         (set_value_range_to_truthvalue): Same.
1384         (vr_values::get_value_range): Same.
1385         (vr_values::set_defs_to_varying): Same.
1386         (vr_values::update_value_range): Same.
1387         (symbolic_range_based_on_p): Same.
1388         (vr_values::op_with_boolean_value_range_p): Same.
1389         (vr_values::extract_range_for_var_from_comparison_expr): Same.
1390         (vr_values::extract_range_from_ssa_name): Same.
1391         (vr_values::extract_range_from_binary_expr): Same.
1392         (vr_values::extract_range_from_unary_expr): Same.
1393         (vr_values::extract_range_from_cond_expr): Same.
1394         (vr_values::extract_range_from_comparison): Same.
1395         (vr_values::check_for_binary_op_overflow): Same.
1396         (vr_values::extract_range_basic): Same.
1397         (vr_values::extract_range_from_assignment): Same.
1398         (compare_ranges): Same.
1399         (compare_range_with_value): Same.
1400         (vr_values::adjust_range_with_scev): Same.
1401         (vrp_valueize): Same.
1402         (vrp_valueize_1): Same.
1403         (vr_values::get_vr_for_comparison): Same.
1404         (vr_values::compare_name_with_value): Same.
1405         (vr_values::compare_names): Same.
1406         (vr_values::vrp_evaluate_conditional): Same.
1407         (find_case_label_ranges): Same.
1408         (vr_values::vrp_visit_switch_stmt): Same.
1409         (vr_values::extract_range_from_phi_node): Same.
1410         (vr_values::simplify_div_or_mod_using_ranges): Same.
1411         (vr_values::simplify_bit_ops_using_ranges): Same.
1412         (test_for_singularity): Same.
1413         (range_fits_type_p): Same.
1414         (vr_values::simplify_cond_using_ranges_1): Same.
1415         (vr_values::simplify_switch_using_ranges): Same.
1416         (vr_values::simplify_float_conversion_using_ranges): Same.
1417         (vr_values::two_valued_val_range_p): Same.
1418         (vr_values::add_equivalence): Move to value_range::equiv_add.
1419         * vr-values.h (vr_values::add_equivalence): Remove.
1420         (VR_INITIALIZER): Remove.
1421         * tree-vrp.c (value_range::set): New.
1422         (value_range::equiv_add): New.
1423         (value_range::value_range): New.
1424         (value_range::deep_copy): New.
1425         (value_range::check): New.
1426         (value_range::equal_p): New.
1427         (value_range::ignore_equivs_equal_p): New.
1428         (value_range::operator==): New.
1429         (value_range::operator!=): New.
1430         (value_range::symbolic_p): New.
1431         (value_range::numeric_p): New.
1432         (value_range::set_undefined): New.
1433         (value_range::set_varying): New.
1434         (value_range::may_contain_p): New.
1435         (value_range::equiv_clear): New.
1436         (value_range::singleton_p): New.
1437         (value_range::intersect): New.
1438         (value_range::dump): New.
1439         (value_range::set_and_canonicalize): New.
1440         (set_value_range): Adjust for value_range API.
1441         (set_value_range_to_undefined): Same.
1442         (set_value_range_to_varying): Same.
1443         (set_and_canonicalize_value_range): Same.
1444         (set_value_range_to_nonnull): Same.
1445         (set_value_range_to_null): Same.
1446         (range_is_null): Same.
1447         (range_is_nonnull): Same.
1448         (range_int_cst_p): Same.
1449         (range_int_cst_singleton_p): Same.
1450         (symbolic_range_p): Same.
1451         (range_includes_zero_p): Same.
1452         (value_range_constant_singleton): Same.
1453         (vrp_set_zero_nonzero_bits): Same.
1454         (ranges_from_anti_range): Same.
1455         (extract_range_into_wide_ints): Same.
1456         (extract_range_from_multiplicative_op): Same.
1457         (set_value_range_with_overflow): Same.
1458         (extract_range_from_binary_expr_1): Same.
1459         (extract_range_from_unary_expr): Same.
1460         (dump_value_range): Same.
1461         (debug_value_range): Same.
1462         (vrp_prop::check_array_ref): Same.
1463         (vrp_prop::check_mem_ref): Same.
1464         (vrp_prop::vrp_initialize): Same.
1465         (vrp_prop::visit_stmt): Same.
1466         (intersect_ranges): Same.
1467         (vrp_prop::visit_phi): Same.
1468         (vrp_prop::vrp_finalize): Same.
1469         (determine_value_range_1): Same.
1470         (determine_value_range): Same.
1471         (vrp_intersect_ranges_1): Rename to...
1472         (vrp_intersect_1): this.
1473         (vrp_intersect_ranges): Rename to...
1474         (value_range::intersect_helper): ...this.
1475         (vrp_meet_1): Rename to...
1476         (value_range::union_helper): ...this.
1477         (vrp_meet): Rename to...
1478         (value_range::union_): ...this.
1479         (copy_value_range): Remove.
1480         * tree-vrp.h (struct value_range): Rewrite into a proper class.
1481         (value_range::vrtype): New.
1482         (value_range::type): New.
1483         (value_range::equiv): New.
1484         (value_range::min): New.
1485         (value_range::max): New.
1486         (value_range::varying_p): New.
1487         (value_range::undefined_p): New.
1488         (value_range::null_p): New.
1489         (value_range::equiv_add): New.
1490         (copy_value_range): Remove.
1492 2018-10-17  David Malcolm  <dmalcolm@redhat.com>
1494         * Makefile.in (SELFTEST_TARGETS): New.
1495         (selftest) Change from s-selftest-c to $(SELFTEST_TARGETS).
1496         (C_SELFTEST_FLAGS, C_SELFTEST_DEPS, s-selftest-c, selftest-c-gdb)
1497         (selftest-gdb, selftest-c-valgrind, selftest-valgrind): Move to
1498         c/Make-lang.in.
1499         (CPP_SELFTEST_FLAGS, CPP_SELFTEST_DEPS, s-selftest-c++)
1500         (selftest-c++-gdb, selftest-c++-valgrind): Move to
1501         cp/Make-lang.in.
1502         * configure: Regenerate.
1503         * configure.ac (selftest_languages): New.
1505 2018-10-17  Aldy Hernandez  <aldyh@redhat.com>
1507         * tree-vrp.c (extract_range_from_multiplicative_op): Remove
1508         overflow wraps argument.
1509         (extract_range_from_binary_expr_1): Do not pass overflow wraps to
1510         wide_int_range_multiplicative_op.
1511         * wide-int-range.cc (wide_int_range_mult_wrapping): Remove
1512         overflow wraps argument.
1513         (wide_int_range_multiplicative_op): Same.
1514         (wide_int_range_lshift): Same.
1515         (wide_int_range_div): Same.
1516         * wide-int-range.h (wide_int_range_multiplicative_op): Same.
1517         (wide_int_range_lshift): Same.
1518         (wide_int_range_div): Same.
1520 2018-10-17  Aldy Hernandez  <aldyh@redhat.com>
1522         * wide-int-range.h (wide_int_range_shift_undefined_p): Adjust to
1523         use sign as argument.
1524         * tree-vrp.c (extract_range_from_binary_expr_1): Pass sign to
1525         wide_int_range_shift_undefined_p.
1527 2018-10-16  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
1529         * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>):
1530         Rename to...
1531         (@despeculate_copy<ALLI_TI:mode>): ... This.
1532         * config/aarch64/aarch64.c (aarch64_speculation_safe_value): Remove
1533         switch statement.
1535 2018-10-16  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1537         * config.gcc: Obsolete *-*-solaris2.10*.
1538         * doc/install.texi (Specific, *-*-solaris2*): Document it.
1540 2018-10-12  Jeff Law  <law@redhat.com>
1542         * config/ft32/ft32.md (ft32_general_movsrc_operand): Disable
1543         reg + sym +- const_int addressing modes.
1545 2018-10-15  David Malcolm  <dmalcolm@redhat.com>
1547         * common.opt (fdiagnostics-minimum-margin-width=): New option.
1548         * diagnostic-show-locus.c (layout::layout): Apply the minimum
1549         margin width.
1550         (layout::start_annotation_line): Only print up to 3 of the
1551         margin character, to avoid touching the left-hand side.
1552         (selftest::test_diagnostic_show_locus_fixit_lines): Update for
1553         minimum margin width, as set by test_diagnostic_context's ctor.
1554         (selftest::test_fixit_insert_containing_newline): Likewise.
1555         (selftest::test_fixit_insert_containing_newline_2): Likewise.
1556         (selftest::test_line_numbers_multiline_range): Clear
1557         dc.min_margin_width.
1558         * diagnostic.c (diagnostic_initialize): Initialize
1559         min_margin_width.
1560         * diagnostic.h (struct diagnostic_context): Add field
1561         "min_margin_width".
1562         * doc/invoke.texi: Add -fdiagnostics-minimum-margin-width=.
1563         * opts.c (common_handle_option): Handle
1564         OPT_fdiagnostics_minimum_margin_width_.
1565         * selftest-diagnostic.c
1566         (selftest::test_diagnostic_context::test_diagnostic_context):
1567         Initialize min_margin_width to 6.
1568         * toplev.c (general_init): Initialize global_dc->min_margin_width.
1570 2018-10-15  David Malcolm  <dmalcolm@redhat.com>
1572         * gcc-rich-location.h (gcc_rich_location::add_location_if_nearby):
1573         Fix usage of "error_at_rich_loc" in the comment.
1575 2018-10-15  Renlin Li  <renlin.li@arm.com>
1577         PR target/87563
1578         * tree-vectorizer.c (try_vectorize_loop_1): Don't use
1579         if-conversioned loop when it contains ifn with types not
1580         supported by backend.
1581         * internal-fn.c (expand_direct_optab_fn): Add an assert.
1582         (direct_internal_fn_supported_p): New helper function.
1583         * internal-fn.h (direct_internal_fn_supported_p): Declare.
1585 2018-10-15  Jakub Jelinek  <jakub@redhat.com>
1587         PR target/87572
1588         * common/config/i386/i386-common.c (OPTION_MASK_ISA_AVX512F_UNSET):
1589         Remove OPTION_MASK_ISA_AVX5124FMAPS_UNSET and
1590         OPTION_MASK_ISA_AVX5124VNNIW_UNSET.
1592 2018-10-15  Bin Cheng  <bin.cheng@linux.alibaba.com>
1594         PR tree-optimization/87022
1595         * tree-loop-distribution.c (pg_add_dependence_edges): Check all
1596         bits in dist vector rather than the first one.
1598 2018-10-15  Richard Biener  <rguenther@suse.de>
1600         PR middle-end/87610
1601         * tree-ssa-structalias.c (struct vls_data): Add escaped_p member.
1602         (visit_loadstore): When a used restrict tag escaped verify that
1603         the points-to solution of "other" pointers do not include
1604         escaped.
1605         (compute_dependence_clique): If a used restrict tag escaped
1606         communicated that down to visit_loadstore.
1608 2018-10-15  Andreas Krebbel  <krebbel@linux.ibm.com>
1610         * config/s390/s390.c (s390_expand_vec_init): Force vector element
1611         into reg if it isn't a general operand.
1613 2018-10-14  H.J. Lu  <hongjiu.lu@intel.com>
1615         PR target/87599
1616         * config/i386/sse.md (*vec_dupv2di): Add register source to
1617         movddup.
1619 2018-10-14  H.J. Lu  <hongjiu.lu@intel.com>
1621         PR target/87572
1622         * common/config/i386/i386-common.c (OPTION_MASK_ISA_AVX512F_UNSET):
1623         Add OPTION_MASK_ISA_AVX512IFMA_UNSET,
1624         OPTION_MASK_ISA_AVX5124FMAPS_UNSET and
1625         OPTION_MASK_ISA_AVX5124VNNIW_UNSET.
1627 2018-10-13  Eric Botcazou  <ebotcazou@adacore.com>
1629         * dwarf2cfi.c (struct dw_trace_info): Add args_size_defined_for_eh.
1630         (notice_args_size): Set it in the current trace if no insn that can
1631         throw internally has been seen yet.
1632         (connect_traces): When connecting args_size between traces, allow the
1633         incoming values not to match if there is an insn setting it before the
1634         first insn that can throw internally; in that case, force the creation
1635         of a CFI note on this latter insn.
1637 2018-10-13  Jonathan Wakely  <jwakely@redhat.com>
1639         * opt-problem.h (opt_wrapper): Use template-argument-list when naming
1640         the base class, because using the injected-class-name was not clearly
1641         specified until DR 176.
1643 2018-10-12  Paul Koning  <ni1d@arrl.net>
1645         * config/pdp11/pdp11.md (doloop_end): New expander.
1646         (doloop_end_insn): renamed from "doloop_end".
1647         (addqi3): New pattern.
1648         (subqi3): New pattern.
1649         * config/pdp11/predicates.md (incdec_operand): New predicate.
1651 2018-10-12  Yury Gribov  <tetra2005@gmail.com>
1653         PR middle-end/81376
1654         * real.c (format_helper::can_represent_integral_type_p): New function
1655         * real.h (format_helper::can_represent_integral_type_p): Ditto.
1656         * match.pd: New pattern.
1658 2018-10-12  Alexandre Oliva <oliva@adacore.com>
1660         * configure.ac: Introduce --enable-large-address-aware
1661         to define MINGW_DEFAULT_LARGE_ADDR_AWARE.
1662         * doc/install.texi: Document it.
1663         * configure, config.in: Rebuilt.
1664         * config/i386/mingw32.h (LINK_SPEC_LARGE_ADDR_AWARE): Define,
1665         based on MINGW_DEFAULT_LARGE_ADDR_AWARE.
1666         (LINK_SPEC): Insert it.
1667         * config/i386/mingw-264.h: Likewise.
1669         * cygming.h (HAVE_GAS_ALIGNED_COMM): Fallback-define.
1671 2018-10-12  Peter Bergner  <bergner@linux.ibm.com>
1673         PR rtl-optimization/87600
1674         * ira-lives (non_conflicting_reg_copy_p): Disable for non LRA targets.
1676 2018-10-12  Paul Koning  <ni1d@arrl.net>
1678         * doc/md.texi (doloop_end): Document that the pattern code may
1679         need to check operand mode.
1681 2018-10-12  Wilco Dijkstra  <wdijkstr@arm.com>
1683         * config/aarch64/aarch64.md (zero_extendsidi2_aarch64): Add alternatives
1684         to zero-extend between int and floating-point registers.
1685         (load_pair_zero_extendsidi2_aarch64): Add alternative for zero-extended
1686         ldp into floating-point registers.  Add type and arch attributes.
1687         (zero_extend<SHORT:mode><GPI:mode>2_aarch64): Add arch attribute.
1688         Use f_loads for type attribute.
1690 2018-10-11  Martin Sebor  <msebor@redhat.com>
1692         * doc/extend.texi (attribute packed): Correct typos.
1694 2018-10-11  Martin Sebor  <msebor@redhat.com>
1696         * doc/extend.texi (attribute flatten): Mention interaction with
1697         noinline.
1699 2018-10-11  Jan Hubicka  <hubicka@ucw.cz>
1701         PR target/87156
1702         * cgraphclones.c (cgraph_node::create_version_clone_with_body):
1703         Set new_decl virtual flag to zero.
1705 2018-10-11  Martin Sebor  <msebor@redhat.com>
1707         PR middle-end/87593
1708         * doc/extend.texi (attribute format_arg): Discuss using multiple
1709         attributes on a single function.
1711 2018-10-11  Giuliano Belinassi  <giuliano.belinassi@usp.br>
1713         PR tree-optimization/86829
1714         * match.pd (sin (atan (x))): New simplification rules.
1715         (cos (atan (x))): Likewise.
1716         * real.c (build_sinatan_real): New function.
1717         * real.h (build_sinatan_real): Prototype.
1719 2018-10-11  Will Schmidt <will_schmidt@vnet.ibm.com>
1721         * config/rs6000/rs6000.c (map_to_integral_tree_type): New helper
1722         function.
1723         (fold_mergeeo_helper): New helper function.
1724         (rs6000_gimple_fold_builtin): Add hooks for vec_mergee and vec_mergeo
1725         intrinsics.  Correct some whitespace indentation issues.
1727 2018-10-11  Wilco Dijkstra  <wdijkstr@arm.com>
1729         PR target/87511
1730         * config/aarch64/aarch64.c (aarch64_mask_and_shift_for_ubfiz_p):
1731         Use HOST_WIDE_INT_1U for shift.
1733 2018-10-11  Doug Rupp  <rupp@adacore.com>
1734             Olivier Hainque  <hainque@adacore.com>
1736         * config/rs6000/vxworks.h (VXWORKS_RELAX_LINK_SPEC): New macro.
1737         Pass --relax to the linker for RTPs.
1738         (LINK_SPEC): Append VXWORKS_RELAX_LINK_SPEC.
1740 2018-10-11  Andrew Stubbs  <ams@codesourcery.com>
1741             Jan Hubicka  <jh@suse.cz>
1742             Martin Jambor  <mjambor@suse.cz>
1744         * print-rtl.c (print_rtx_operand_codes_E_and_V): Print how many times
1745         the same elements are repeated rather than printing all of them.
1746         * read-rtl.c (rtx_reader::read_rtx_operand): Recognize and expand
1747         "repeated" elements.
1748         * read-rtl-function.c (test_loading_repeat): New function.
1749         (read_rtl_function_c_tests): Call test_loading_repeat.
1750         * rtl-tests.c (test_dumping_repeat): New function.
1751         (rtl_tests_c_tests): Call test_dumping_repeat.
1753 2018-10-11  Richard Biener  <rguenther@suse.de>
1755         * config/i386/x86-tune-costs.h (bdver?_memcpy, bdver?_memset,
1756         bdver?_cost): Unify to ...
1757         (bdver_memcpy, bdver_memset, bdver_cost): ... this.
1758         * config/i386/i386.c (processor_cost_table): Adjust.
1760 2018-10-10  Eric Botcazou  <ebotcazou@adacore.com>
1762         PR middle-end/87574
1763         * cgraphunit.c (cgraph_node::expand_thunk): Force DECL_IGNORED_P on
1764         the thunk when expanding to GIMPLE.
1766 2018-10-10  Bernd Edlinger  <bernd.edlinger@hotmail.de>
1768         * varasm.c (mergeable_string_section): Don't try to move zero-length
1769         strings to the merge section.
1771 2018-10-10  Uros Bizjak  <ubizjak@gmail.com>
1773         PR target/87573
1774         * config/i386/mmx.md (const_vector 0 -> mem splitter): New splitter.
1776 2018-10-10  Jakub Jelinek  <jakub@redhat.com>
1778         PR target/87550
1779         * config/i386/i386-builtin.def (IX86_BUILTIN_RDPMC): Move from args set
1780         to special_args set.
1782 2018-10-10  Richard Biener  <rguenther@suse.de>
1784         * config/i386/sse.md (reduc_plus_scal_v8df, reduc_plus_scal_v4df,
1785         reduc_plus_scal_v2df, reduc_plus_scal_v16sf, reduc_plus_scal_v8sf,
1786         reduc_plus_scal_v4sf): Merge into pattern reducing to half width
1787         and recursing and pattern terminating the recursion on SSE
1788         vector width using ix86_expand_reduc.
1789         (reduc_sminmax_scal_<mode>): Split into part reducing to half
1790         width and recursing and SSE2 vector variant doing the final
1791         reduction with ix86_expand_reduc.
1792         (reduc_uminmax_scal_<mode>): Likewise for the AVX512 variants
1793         with terminating the recursion at AVX level, splitting that
1794         to SSE there.
1796 2018-10-09  David Malcolm  <dmalcolm@redhat.com>
1798         * genmatch.c (error_cb): Rename to...
1799         (diagnostic_cb): ...this, converting int params to enums.
1800         (fatal_at): Update for renaming.
1801         (warning_at): Likewise.
1802         (main): Likewise.
1803         * input.c (selftest::ebcdic_execution_charset::apply):
1804         Update for renaming of...
1805         (selftest::ebcdic_execution_charset::on_error): ...this, renaming
1806         to...
1807         (selftest::ebcdic_execution_charset::on_diagnostic): ...this,
1808         converting level and reason to enums.
1809         (class selftest::lexer_error_sink): Rename to...
1810         (class selftest::lexer_test_options): ...this, renaming field
1811         "m_errors" to "m_diagnostics".
1812         (selftest::lexer_test_options::apply): Update for renaming of...
1813         (selftest::lexer_test_options::on_error): ...this, renaming to...
1814         (selftest::lexer_test_options::on_diagnostic): ...this
1815         converting level and reason to enums.
1816         (selftest::test_lexer_string_locations_raw_string_unterminated):
1817         Update for renamings.
1818         * opth-gen.awk (struct cpp_reason_option_codes_t): Use enum for
1819         "reason".
1821 2018-10-09  Paul A. Clarke  <pc@us.ibm.com>
1823         * config.gcc (powerpc*-*-*): Add pmmintrin.h to extra_headers.
1824         * config/rs6000/pmmintrin.h: New file.
1826 2018-10-09  Eric Botcazou  <ebotcazou@adacore.com>
1828         PR tree-optimization/86659
1829         * gimple-match.h (gimple_match_op constructors): Initialize reverse.
1831 2018-10-09  Richard Biener  <rguenther@suse.de>
1833         PR tree-optimization/63155
1834         * tree-ssa-structalias.c: Include tree-ssa.h.
1835         (get_constraint_for_ssa_var): For undefs return nothing_id.
1836         (find_func_aliases): Cleanup PHI handling.
1838 2018-10-09  Richard Biener  <rguenther@suse.de>
1840         * tree-vectorizer.c (dump_stmt_cost): Fix cut&paste missing
1841         replacements.
1843 2018-10-09  Martin Liska  <mliska@suse.cz>
1845         * asan.c (asan_emit_stack_protection): If a stack variable
1846         is located in a same file as current function, then emit
1847         line info into variable definition string.
1849 2018-10-08  Eric Botcazou  <ebotcazou@adacore.com>
1851         * print-rtl.c (rtx_writer::print_rtx_operand_code_i): Print column
1852         information.
1854 2018-10-08  Eric Botcazou  <ebotcazou@adacore.com>
1856         * cgraphunit.c (cgraph_node::expand_thunk): Do not force DECL_IGNORED_P
1857         on the thunk.
1859 2018-10-08  Eric Botcazou  <ebotcazou@adacore.com>
1861         PR tree-optimization/86659
1862         * gimple-match.h (struct gimple_match_op): Add reverse field.
1863         (gimple_match_op::set_op): New overloaded method.
1864         * gimple-match-head.c (maybe_build_generic_op) <BIT_FIELD_REF>: Set
1865         the REF_REVERSE_STORAGE_ORDER flag on the value.
1866         (gimple_simplify) <GIMPLE_ASSIGN>: For BIT_FIELD_REF, propagate the
1867         REF_REVERSE_STORAGE_ORDER flag and avoid simplifying if it is set.
1868         
1869 2018-10-08  Richard Sandiford  <richard.sandiford@arm.com>
1871         PR middle-end/63155
1872         * gimple-ssa-backprop.c (backprop::intersect_uses): Use
1873         FOR_EACH_IMM_USE_FAST instead of FOR_EACH_IMM_USE_STMT.
1875 2018-10-08  H.J. Lu  <hongjiu.lu@intel.com>
1877         PR target/87517
1878         * config/i386/avx512fintrin.h (_mm512_mask_fmaddsub_round_pd):
1879         Defined with __builtin_ia32_vfmaddsubpd512_mask.
1881 2018-10-08  Richard Biener  <rguenther@suse.de>
1883         * config/i386/x86-tune-costs.h (znver1_cost): Make AVX256 vector loads
1884         cost the same as AVX128 ones.
1886 2018-10-08  Paul Koning  <ni1d@arrl.net>
1888         * config/pdp11/pdp11-protos.h (output_block_move): Remove.
1889         (expand_block_move): New function.
1890         * config/pdp11/pdp11.c (output_block_move): Remove.
1891         (expand_block_move): New function.
1892         * config/pdp11/pdp11.h (MOVE_RATIO): New definition.
1893         * config/pdp11/pdp11.md (movmemhi): Use expand_block_move.
1894         (*movmemhi1): Remove.
1896 2018-10-08  Robin Dapp  <rdapp@linux.ibm.com>
1898         * config/s390/2827.md: Increase latencies for some FP instructions.
1900 2018-10-08  Richard Biener  <rguenther@suse.de>
1902         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
1903         Open a dump scope.
1904         * tree-vectorizer.c (dump_stmt_cost): Add cost param and dump it.
1905         * tree-vectorizer.h (dump_stmt_cost): Adjust.
1906         (add_stmt_cost): Dump return value of the hook.
1908 2018-10-08  Richard Biener  <rguenther@suse.de>
1910         PR tree-optimization/63155
1911         * tree-ssa-propagate.c (add_ssa_edge): Do cheap check first.
1912         (ssa_propagation_engine::ssa_propagate): Remove redundant
1913         bitmap bit clearing.
1915 2018-10-05  Peter Bergner  <bergner@linux.ibm.com>
1917         PR rtl-optimization/86939
1918         PR rtl-optimization/87479
1919         * ira.h (non_conflicting_reg_copy_p): New prototype.
1920         * ira-lives.c (ignore_reg_for_conflicts): New static variable.
1921         (make_hard_regno_dead): Don't add conflicts for register
1922         ignore_reg_for_conflicts.
1923         (make_object_dead): Likewise.
1924         (non_conflicting_reg_copy_p): New function.
1925         (process_bb_node_lives): Set ignore_reg_for_conflicts for copies.
1926         Remove special conflict handling of REAL_PIC_OFFSET_TABLE_REGNUM.
1927         * lra-lives.c (ignore_reg_for_conflicts): New static variable.
1928         (make_hard_regno_dead): Don't add conflicts for register
1929         ignore_reg_for_conflicts.  Remove special conflict handling of
1930         REAL_PIC_OFFSET_TABLE_REGNUM.  Remove now unused argument
1931         check_pic_pseudo_p and update callers.
1932         (mark_pseudo_dead): Don't add conflicts for register
1933         ignore_reg_for_conflicts.
1934         (process_bb_lives): Set ignore_reg_for_conflicts for copies.
1936 2018-10-05  Andrew Waterman  <andrew@sifive.com>
1937             Jim Wilson  <jimw@sifive.com>
1939         * config/riscv/riscv.md (f<quiet_pattern>_quiet<ANYF:mode><X:mode>4):
1940         Add define_expand.  Add ! HONOR_SNANS check to current pattern.  Add
1941         new pattern using HONOR_SNANS that emits one extra instruction.
1943 2018-10-05  Segher Boessenkool  <segher@kernel.crashing.org>
1945         * config/rs6000/rs6000.md (unnamed mfcr scc_comparison_operator
1946         patterns): Merge SI and DI patterns to a GPR pattern.
1947         (unnamed define_insn and define_split for record form of that): Merge
1948         to a single define_insn_and_split pattern.
1950 2018-10-05  David Malcolm  <dmalcolm@redhat.com>
1952         PR c++/56856
1953         * input.c (expand_location_to_spelling_point): Add param "aspect"
1954         and use rather than hardcoding LOCATION_ASPECT_CARET.
1955         (get_substring_ranges_for_loc): Handle the case of a single token
1956         within a macro expansion.
1957         * input.h (expand_location_to_spelling_point): Add "aspect" param,
1958         defaulting to LOCATION_ASPECT_CARET.
1960 2018-10-05  Paul Koning  <ni1d@arrl.net>
1962         * config/pdp11/pdp11.c (TARGET_CXX_GUARD_TYPE): Define.
1963         (TARGET_CXX_CLASS_DATA_ALWAYS_COMDAT): Define.
1964         (TARGET_CXX_LIBRARY_RTTI_COMDAT): Define.
1965         (pdp11_guard_type): New function.
1967 2018-10-05  Paul Koning  <ni1d@arrl.net>
1969         * config/pdp11/pdp11.h (FLOAT_TYPE_SIZE): Always 32.
1970         * config/pdp11/pdp11.opt (mfloat32): Remove.
1971         (mfloat64): Remove.
1972         * doc/invoke.texi (pdp11 -mfloat32): Remove:
1973         (pdp11 -mfloat64): Remove.
1975 2018-10-05  Uros Bizjak  <ubizjak@gmail.com>
1977         * config/i386/i386.md (*cmpxf_cc_i387): Remove pattern.
1978         (*cmp<mode>_cc_i387): Ditto.
1979         (*cmpu<mode>_cc_i387): Ditto.
1980         (*cmp<X87MODEF:mode>_<SWI24:mode>_cc_i387): Ditto.
1981         * config/i386/i386.c (ix86_expand_fp_compare): Remove
1982         "scratch" argument.
1983         <case IX86_FPCMP_SAHF>: Do not generate pattern with HImode clobber.
1984         Emit x86_sahf_1 pattern.
1985         (ix86_expand_compare): Update call to ix86_expand_fp_compare.
1986         (ix86_expand_carry_flag_compare): Ditto.
1988 2018-10-05  Uros Bizjak  <ubizjak@gmail.com>
1990         * config/i386/i386.md (*cmpxf_i387): Change operand 2 predicate
1991         to reg_or_0_operand.  Add "C" constraint.
1992         (*cmpxf_cc_i387): Ditto.
1993         (*cmp<mode>_i387): Change operand 2 predicate
1994         to nonimm_or_0_operand.  Add "C" constraint.
1995         (*cmp<mode>_cc_i387): Ditto.
1996         (*cmp<mode>_0_i387): Remove insn pattern.
1997         (*cmp<mode>_0_cc_i387): Ditto.
1999 2018-10-05  Uros Bizjak  <ubizjak@gmail.com>
2001         * config/i386/constraints.md ("C"): Do not depend on TARGET_SSE.
2002         * config/i386/predicates.md (nonimm_or_0_operand): Rename
2003         from vector_move_operand.  Update all uses.
2005 2018-10-05  Martin Sebor  <msebor@redhat.com>
2007         PR tree-optimization/87490
2008         * builtins.c (expand_builtin_strnlen): Handle a null data.decl
2009         consistently.
2011 2018-10-05  Richard Biener  <rguenther@suse.de>
2013         PR tree-optimization/63155
2014         * tree-ssa-ccp.c (ccp_propagate::visit_phi): Avoid excess
2015         vertical space in dumpfiles.
2016         * tree-ssa-propagate.h
2017         (ssa_propagation_engine::process_ssa_edge_worklist): Remove.
2018         * tree-ssa-propagate.c (cfg_blocks_back): New global.
2019         (ssa_edge_worklist_back): Likewise.
2020         (curr_order): Likewise.
2021         (cfg_blocks_get): Remove abstraction.
2022         (cfg_blocks_add): Likewise.
2023         (cfg_blocks_empty_p): Likewise.
2024         (add_ssa_edge): Add to current or next worklist based on
2025         RPO index.
2026         (add_control_edge): Likewise.
2027         (ssa_propagation_engine::process_ssa_edge_worklist): Fold
2028         into ...
2029         (ssa_propagation_engine::ssa_propagate): ... here.  Unify
2030         iteration from CFG and SSA edge worklist so we process
2031         everything in RPO order, prioritizing forward progress
2032         over iteration.
2033         (ssa_prop_init): Allocate new worklists, do not dump
2034         immediate uses.
2035         (ssa_prop_fini): Free new worklists.
2037 2018-10-05  Richard Biener  <rguenther@suse.de>
2039         * tree-core.h (tree_block::abstract_flag): Remove.
2040         (tree_block::block_num): Make full 32bits.
2041         * tree.def (BLOCK): Remove docs about BLOCK_ABSTRACT.
2042         * tree.h (BLOCK_ABSTRACT): Remove.
2043         * dwarf2out.c (gen_lexical_block_die): Remove dead code
2044         resulting from BLOCK_ABSTRACT being always false.
2045         (gen_inlined_subroutine_die): Likewise.
2046         (gen_block_die): Likewise.
2047         * tree.c (block_ultimate_origin): Likewise.
2048         * tree-pretty-print.c (dump_block_node): Remove code dealing
2049         with BLOCK_ABSTRACT.
2050         * tree-ssa-live.c (dump_scope_block): Likewise.
2051         * tree-streamer-in.c (unpack_ts_block_value_fields): Likewise.
2052         * tree-streamer-out.c (pack_ts_block_value_fields): Likewise.
2054 2018-10-05   Richard Biener  <rguenther@suse.de>
2056         * config/i386/i386.c (ix86_add_stmt_cost): When scalar cost
2057         is asked for initialize mode to the component mode of the
2058         vector type.
2060 2018-10-05  H.J. Lu  <hongjiu.lu@intel.com>
2062         PR target/87522
2063         * config/i386/gnu-user.h (ASM_SPEC): Don't pass -msse2avx to
2064         assembler for -mavx.
2065         * config/i386/gnu-user64.h (ASM_SPEC): Likewise.
2067 2018-10-05  Segher Boessenkool  <segher@kernel.crashing.org>
2069         PR target/87509
2070         * config/rs6000/rs6000-builtin.def (RS6000_BUILTIN_SET_FPSCR_DRN): Use
2071         RS6000_BTM_DFP.
2072         * config/rs6000/rs6000.md (rs6000_set_fpscr_rn): Require the operand
2073         to be DImode.  When using mffscrn, force the operand to a register.
2075 2018-10-04  Uros Bizjak  <ubizjak@gmail.com>
2077         * config/i386/i386.md (*fop_<X87MODEF:mode>_2_i387): Macroize insn
2078         from *fop_<MODEF:mode>_2_i387 and *fop_xf_2_i387 using
2079         X87MODEF mode iterator.
2080         (*fop_<X87MODEF:mode>_3_i387): Macroize insn from
2081         *fop_<MODEF:mode>_3_i387 and *fop_xf_3_i387 using
2082         X87MODEF mode iterator.
2084 2018-10-04  Vinay Kumar  <vinay.kumar@blackfigtech.com>
2086         * doc/invoke.texi (-Wno-prio-ctor-dtor): Document new warning
2087         -Wno-prio-ctor-dtor.
2089 2018-10-04  David Malcolm  <dmalcolm@redhat.com>
2091         * Makefile.in (OBJS): Add opt-problem.o.
2092         * dump-context.h: Include "selftest.h.
2093         (selftest::temp_dump_context): New forward decl.
2094         (class dump_context): Make friend of class
2095         selftest::temp_dump_context.
2096         (dump_context::dump_loc_immediate): New decl.
2097         (class dump_pretty_printer): Move here from dumpfile.c.
2098         (class temp_dump_context): Move to namespace selftest.
2099         (temp_dump_context::temp_dump_context): Add param
2100         "forcibly_enable_dumping".
2101         (selftest::verify_dumped_text):
2102         (ASSERT_DUMPED_TEXT_EQ): Move here from dumpfile.c.
2103         (selftest::verify_item):
2104         (ASSERT_IS_TEXT): Move here from dumpfile.c.
2105         (ASSERT_IS_TREE): Likewise.
2106         (ASSERT_IS_GIMPLE): Likewise.
2107         * dumpfile.c (dump_context::dump_loc): Move immediate dumping
2108         to...
2109         (dump_context::dump_loc_immediate): ...this new function.
2110         (class dump_pretty_printer): Move to dump-context.h.
2111         (dump_switch_p_1): Don't enable MSG_PRIORITY_REEMITTED.
2112         (opt_info_switch_p_1): Enable MSG_PRIORITY_REEMITTED.
2113         (temp_dump_context::temp_dump_context): Move to "selftest"
2114         namespace.  Add param "forcibly_enable_dumping", and use it to
2115         conditionalize the use of m_pp;
2116         (selftest::verify_dumped_text): Make non-static.
2117         (ASSERT_DUMPED_TEXT_EQ): Move to dump-context.h.
2118         (selftest::verify_item): Make non-static.
2119         (ASSERT_IS_TEXT): Move to dump-context.h.
2120         (ASSERT_IS_TREE): Likewise.
2121         (ASSERT_IS_GIMPLE): Likewise.
2122         (selftest::test_capture_of_dump_calls): Pass "true" for new
2123         param of temp_dump_context.
2124         * dumpfile.h (enum dump_flag): Add MSG_PRIORITY_REEMITTED, adding
2125         it to MSG_ALL_PRIORITIES.  Update values of TDF_COMPARE_DEBUG and
2126         TDF_COMPARE_DEBUG.
2127         * opt-problem.cc: New file.
2128         * opt-problem.h: New file.
2129         * optinfo-emit-json.cc
2130         (selftest::test_building_json_from_dump_calls): Pass "true" for
2131         new param of temp_dump_context.
2132         * optinfo.cc (optinfo_kind_to_dump_flag): New function.
2133         (optinfo::emit_for_opt_problem): New function.
2134         (optinfo::emit): Clarity which emit_item is used.
2135         * optinfo.h (optinfo::get_dump_location): New accessor.
2136         (optinfo::emit_for_opt_problem): New decl.
2137         (optinfo::emit): Make const.
2138         * selftest-run-tests.c (selftest::run_tests): Call
2139         selftest::opt_problem_cc_tests.
2140         * selftest.h (selftest::opt_problem_cc_tests): New decl.
2141         * tree-data-ref.c (dr_analyze_innermost): Convert return type from
2142         bool to opt_result, converting fprintf messages to
2143         opt_result::failure_at calls.  Add "stmt" param for use by the
2144         failure_at calls.
2145         (create_data_ref): Pass "stmt" to the dr_analyze_innermost call.
2146         (runtime_alias_check_p): Convert return type from bool to
2147         opt_result, converting dump_printf calls to
2148         opt_result::failure_at, using the statement DDR_A for their
2149         location.
2150         (find_data_references_in_stmt): Convert return type from bool to
2151         opt_result, converting "return false" to opt_result::failure_at
2152         with a new message.
2153         * tree-data-ref.h: Include "opt-problem.h".
2154         (dr_analyze_innermost): Convert return type from bool to opt_result,
2155         and add a const gimple * param.
2156         (find_data_references_in_stmt): Convert return type from bool to
2157         opt_result.
2158         (runtime_alias_check_p): Likewise.
2159         * tree-predcom.c (find_looparound_phi): Pass "init_stmt" to
2160         dr_analyze_innermost.
2161         * tree-vect-data-refs.c (vect_mark_for_runtime_alias_test):
2162         Convert return type from bool to opt_result, adding a message for
2163         the PARAM_VECT_MAX_VERSION_FOR_ALIAS_CHECKS zero case.
2164         (vect_analyze_data_ref_dependence): Convert return type from bool
2165         to opt_result.  Change sense of return type from "false"
2166         effectively meaning "no problems" to "false" meaning a problem,
2167         so that "return false" becomes "return opt_result::success".
2168         Convert "return true" calls to opt_result::failure_at, using
2169         the location of statement A rather than vect_location.
2170         (vect_analyze_data_ref_dependences): Convert return type from bool
2171         to opt_result.
2172         (verify_data_ref_alignment): Likewise, converting dump_printf_loc
2173         calls to opt_result::failure_at, using the stmt location rather
2174         than vect_location.
2175         (vect_verify_datarefs_alignment): Convert return type from bool
2176         to opt_result.
2177         (vect_enhance_data_refs_alignment): Likewise.  Split local "stat"
2178         into multiple more-tightly-scoped copies.
2179         (vect_analyze_data_refs_alignment): Convert return type from bool
2180         to opt_result.
2181         (vect_analyze_data_ref_accesses): Likewise, converting a
2182         "return false" to a "return opt_result::failure_at", adding a
2183         new message.
2184         (vect_prune_runtime_alias_test_list): Convert return type from
2185         bool to opt_result, converting dump_printf_loc to
2186         opt_result::failure_at.  Add a %G to show the pertinent statement,
2187         and use the stmt's location rather than vect_location.
2188         (vect_find_stmt_data_reference): Convert return type from
2189         bool to opt_result, converting dump_printf_loc to
2190         opt_result::failure_at, using stmt's location.
2191         (vect_analyze_data_refs):  Convert return type from bool to
2192         opt_result.  Convert "return false" to "return
2193         opt_result::failure_at", adding messages as needed.
2194         * tree-vect-loop.c (vect_determine_vf_for_stmt_1): Convert return
2195         type from bool to opt_result.
2196         (vect_determine_vf_for_stmt): Likewise.
2197         (vect_determine_vectorization_factor): Likewise, converting
2198         dump_printf_loc to opt_result::failure_at, using location of phi
2199         rather than vect_location.
2200         (vect_analyze_loop_form_1): Convert return type from bool to
2201         opt_result, converting dump_printf_loc calls, retaining the use of
2202         vect_location.
2203         (vect_analyze_loop_form): Convert return type from loop_vec_info
2204         to opt_loop_vec_info.
2205         (vect_analyze_loop_operations): Convert return type from bool to
2206         opt_result, converting dump_printf_loc calls, using the location
2207         of phi/stmt rather than vect_location where available.  Convert
2208         various "return false" to "return opt_result::failure_at" with
2209         "unsupported phi" messages.
2210         (vect_get_datarefs_in_loop): Convert return type from bool to
2211         opt_result.  Add a message for the
2212         PARAM_LOOP_MAX_DATAREFS_FOR_DATADEPS failure.
2213         (vect_analyze_loop_2): Convert return type from bool to
2214         opt_result.  Ensure "ok" is set to a opt_result::failure_at before
2215         each "goto again;", adding new messages where needed.
2216         Add "unsupported grouped {store|load}" messages.
2217         (vect_analyze_loop): Convert return type from loop_vec_info to
2218         opt_loop_vec_info.
2219         * tree-vect-slp.c (vect_analyze_slp): Convert return type from
2220         bool to opt_result.
2221         * tree-vect-stmts.c (process_use): Likewise, converting
2222         dump_printf_loc call and using stmt location, rather than
2223         vect_location.
2224         (vect_mark_stmts_to_be_vectorized): Likeise.
2225         (vect_analyze_stmt): Likewise, adding a %G.
2226         (vect_get_vector_types_for_stmt): Convert return type from bool to
2227         opt_result, converting dump_printf_loc calls and using stmt
2228         location, rather than vect_location.
2229         (vect_get_mask_type_for_stmt): Convert return type from tree to
2230         opt_tree, converting dump_printf_loc calls and using stmt location.
2231         * tree-vectorizer.c: Include "opt-problem.h.
2232         (try_vectorize_loop_1): Flag "Analyzing loop at" dump message as
2233         MSG_PRIORITY_INTERNALS.  Convert local "loop_vinfo" from
2234         loop_vec_info to opt_loop_vec_info.  If if fails, and dumping is
2235         enabled, use it to report at the top level "couldn't vectorize
2236         loop" followed by the problem.
2237         * tree-vectorizer.h (opt_loop_vec_info): New typedef.
2238         (vect_mark_stmts_to_be_vectorized): Convert return type from bool
2239         to opt_result.
2240         (vect_analyze_stmt): Likewise.
2241         (vect_get_vector_types_for_stmt): Likewise.
2242         (tree vect_get_mask_type_for_stmt): Likewise.
2243         (vect_analyze_data_ref_dependences): Likewise.
2244         (vect_enhance_data_refs_alignment): Likewise.
2245         (vect_analyze_data_refs_alignment): Likewise.
2246         (vect_verify_datarefs_alignment): Likewise.
2247         (vect_analyze_data_ref_accesses): Likewise.
2248         (vect_prune_runtime_alias_test_list): Likewise.
2249         (vect_find_stmt_data_reference): Likewise.
2250         (vect_analyze_data_refs): Likewise.
2251         (vect_analyze_loop): Convert return type from loop_vec_info to
2252         opt_loop_vec_info.
2253         (vect_analyze_loop_form): Likewise.
2254         (vect_analyze_slp): Convert return type from bool to opt_result.
2256 2018-10-04  David Malcolm  <dmalcolm@redhat.com>
2258         * doc/invoke.texi (-fopt-info): Document new "internals"
2259         sub-option.
2260         * dump-context.h (dump_context::apply_dump_filter_p): New decl.
2261         * dumpfile.c (dump_options): Update for renaming of MSG_ALL to
2262         MSG_ALL_KINDS.
2263         (optinfo_verbosity_options): Add "internals".
2264         (kind_as_string): Update for renaming of MSG_ALL to MSG_ALL_KINDS.
2265         (dump_context::apply_dump_filter_p): New member function.
2266         (dump_context::dump_loc): Use apply_dump_filter_p rather than
2267         explicitly masking the dump_kind.
2268         (dump_context::begin_scope): Increment the scope depth first.  Use
2269         apply_dump_filter_p rather than explicitly masking the dump_kind.
2270         (dump_context::emit_item): Use apply_dump_filter_p rather than
2271         explicitly masking the dump_kind.
2272         (dump_dec): Likewise.
2273         (dump_hex): Likewise.
2274         (dump_switch_p_1): Default to MSG_ALL_PRIORITIES.
2275         (opt_info_switch_p_1): Default to MSG_PRIORITY_USER_FACING.
2276         (opt_info_switch_p): Update handling of default
2277         MSG_OPTIMIZED_LOCATIONS to cope with default of
2278         MSG_PRIORITY_USER_FACING.
2279         (dump_basic_block): Use apply_dump_filter_p rather than explicitly
2280         masking the dump_kind.
2281         (selftest::test_capture_of_dump_calls): Update test_dump_context
2282         instances to use MSG_ALL_KINDS | MSG_PRIORITY_USER_FACING rather
2283         than MSG_ALL.  Generalize scope test to be run at all four
2284         combinations of with/without MSG_PRIORITY_USER_FACING and
2285         MSG_PRIORITY_INTERNALS, adding examples of explicit priority
2286         for each of the two values.
2287         * dumpfile.h (enum dump_flag): Add comment about the MSG_* flags.
2288         Rename MSG_ALL to MSG_ALL_KINDS.  Add MSG_PRIORITY_USER_FACING,
2289         MSG_PRIORITY_INTERNALS, and MSG_ALL_PRIORITIES, updating the
2290         values for TDF_COMPARE_DEBUG and TDF_ALL_VALUES.
2291         (AUTO_DUMP_SCOPE): Add a note to the comment about the interaction
2292         with MSG_PRIORITY_*.
2293         * tree-vect-loop-manip.c (vect_loop_versioning): Mark versioning
2294         dump messages as MSG_PRIORITY_USER_FACING.
2295         * tree-vectorizer.h (DUMP_VECT_SCOPE): Add a note to the comment
2296         about the interaction with MSG_PRIORITY_*.
2298 2018-10-04  Bernd Edlinger  <bernd.edlinger@hotmail.de>
2300         * varasm.c (output_constant): Add new parameter merge_strings.
2301         Make strings properly zero terminated in merge string sections.
2302         (mergeable_string_section): Don't fail if the last char is non-zero.
2303         (assemble_variable_contents): Handle merge string sections.
2304         (assemble_variable): Likewise.
2305         (assemble_constant_contents): Likewise.
2306         (output_constant_def_contents): Likewise.
2307         (output_constructor_array_range,
2308         output_constructor_regular_field): Adjust call to output_constant.
2309         (output_object_block): Adjust call to assemble_constant_contents
2310         and assemble_variable_contents.
2312 2018-10-04  Martin Liska  <mliska@suse.cz>
2314         PR c/87483
2315         * cgraphunit.c (process_function_and_variable_attributes):
2316         Warn about a function with alias attribute and a body.
2318 2018-10-04  Martin Liska  <mliska@suse.cz>
2320         PR ipa/82625
2321         * multiple_target.c (redirect_to_specific_clone): New function.
2322         (ipa_target_clone): Use it.
2323         * tree-inline.c: Fix comment.
2325 2018-10-04  David Malcolm  <dmalcolm@redhat.com>
2327         * dumpfile.c (gcc::dump_manager::dump_manager): Initialize new
2328         fields.
2329         (gcc::dump_manager::~dump_manager): Free m_optinfo_filename.
2330         (gcc::dump_manager::register_pass): New member function, adapted
2331         from loop body in gcc::pass_manager::register_pass, adding a
2332         call to update_dfi_for_opt_info.
2333         (gcc::dump_manager::opt_info_enable_passes): Store the
2334         -fopt-info options into the new fields.  Move the loop
2335         bodies into...
2336         (gcc::dump_manager::update_dfi_for_opt_info): ...this new member
2337         function.
2338         * dumpfile.h (struct opt_pass): New forward decl.
2339         (gcc::dump_manager::register_pass): New decl.
2340         (gcc::dump_manager::update_dfi_for_opt_info): New decl.
2341         (class gcc::dump_manager): Add fields "m_optgroup_flags",
2342         "m_optinfo_flags", and "m_optinfo_filename".
2343         * passes.c (gcc::pass_manager::register_pass): Move all of the
2344         dump-handling code to gcc::dump_manager::register_pass.
2346 2018-10-04  Peter Bergner  <bergner@linux.ibm.com>
2348         PR rtl-optimization/87466
2349         * target.def (setjmp_preserves_nonvolatile_regs_p): New target hook.
2350         * doc/tm.texi.in (TARGET_SETJMP_PRESERVES_NONVOLATILE_REGS_P): New hook.
2351         * doc/tm.texi: Regenerate.
2352         * ira-lives.c (process_bb_node_lives): Use the new target hook.
2353         * lra-lives.c (process_bb_lives): Likewise.
2354         * config/rs6000/rs6000.c (TARGET_SETJMP_PRESERVES_NONVOLATILE_REGS_P):
2355         Define.
2357 2018-10-04  Tamar Christina  <tamar.christina@arm.com>
2359         * params.c (add_params): Fix initialization.
2361 2018-10-04  Martin Liska  <mliska@suse.cz>
2363         PR gcov-profile/84107
2364         * tree-profile.c (init_ic_make_global_vars):
2365         Remove ic_void_ptr_var and ic_gcov_type_ptr_var.
2366         Come up with new ic_tuple* variables.  Emit
2367         __gcov_indirect_call{,_topn} variables.
2368         (gimple_gen_ic_profiler): Access the variable
2369         and emit gimple.
2370         (gimple_gen_ic_func_profiler): Access
2371         __gcov_indirect_call.callee field.
2372         (gimple_init_gcov_profiler): Use ptr_type_node.
2373         * value-prof.c (gimple_ic): Use ptr_type_node.
2375 2018-10-04  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
2377         PR tree-optimization/85787
2378         * ipa-pure-const.c (malloc_candidate_p_1): Move most of malloc_candidate_p
2379         into this function and add support for detecting multiple phis.
2380         (DUMP_AND_RETURN): Move from malloc_candidate_p into top-level macro.
2382 2018-10-04  Martin Liska  <mliska@suse.cz>
2384         PR ipa/87491
2385         * ipa-inline.c (inline_to_all_callers_1):
2386         Call ultimate_alias_target for node being inlined.
2388 2018-10-03  Jeff Law  <law@redhat.com>
2390         * gimple-ssa-sprintf.c (format_string): Do not hardcode size of
2391         target's wchar_t.
2392         * tree.c (get_typenode_from_name): Moved from fortran/trans-types.c.
2393         * tree.h (get_typenode_from_name): Prototype.
2395 2018-10-03  Uros Bizjak  <ubizjak@gmail.com>
2397         * config/i386/i386.md (*cmp<X87MODEF:mode>_<SWI24:mode>_i387):
2398         Change operand 2 predicate to nonimmediate_operand.
2399         (*cmp<X87MODEF:mode>_<SWI24:mode>_cc_i387): Ditto.
2401 2018-10-03  Martin Sebor  <msebor@redhat.com>
2402             Jeff Law  <law@redhat.com>
2404         * gimple-ssa-sprintf.c (struct fmtresult): Add new member and
2405         initialize it.
2406         (get_string_length): Detect unterminated arrays.
2407         (format_string): Same.
2408         (format_directive): Warn about unterminated arrays.
2409         (handle_gimple_call): Mark statements with no_warning as needed.
2411 2018-10-03  Jim Wilson  <jimw@sifive.com>
2413         * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): For ABI_ILP32E,
2414         also define __riscv_abi_rve.  Delete trailing white space.
2416 2018-10-03  Paul Koning  <ni1d@arrl.net>
2418         Enable LRA register allocator for PDP11.
2419         * config/pdp11/constraints.md (Q): Use define_memory_constraint.
2420         (R): Likewise.
2421         (D): Likewise.
2422         * config/pdp11/pdp11.c (pdp11_lra_p): New function.
2423         * config/pdp11/pdp11.opt (-mlra): New option.
2424         * doc/invoke.texi (PDP-11 Options): Document -mlra.
2426 2018-10-03  Uros Bizjak  <ubizjak@gmail.com>
2428         * config/i386/i386.md (*<absneg:code>extendsfdf2): Remove.
2429         (*<absneg:code>extend<mode>xf2): Ditto.
2431 2018-10-03  Aldy Hernandez  <aldyh@redhat.com>
2433         PR tree-optimization/87415
2434         * tree-vrp.c (set_value_range_with_overflow): Special case one bit
2435         precision fields.
2437 2018-10-02  Jeff Law  <law@redhat.com>
2439         * gimple-fold.c (get_range_strlen): Only set *nonstr when
2440         an unterminated string is discovered.  Bubble up range
2441         even for unterminated strings.
2442         (gimple_fold_builtin_strlen): Do not fold if get_range_strlen
2443         indicates the string was not terminated via NONSTR.
2445 2018-10-03  Aldy Hernandez  <aldyh@redhat.com>
2447         * tree-vrp.c (extract_range_from_unary_expr): Special case all
2448         pointer conversions.
2449         Do not do anything special for anti-ranges.
2451 2018-10-03  Jérôme Lambourg  <lambourg@adacore.com>
2453         * config/arm/vxworks.h (ARM_TARGET2_DWARF_FORMAT): Adjust to
2454         DW_EH_PE_pcrel | DW_EH_PE_indirect for RTPs.
2456 2018-10-03  Martin Liska  <mliska@suse.cz>
2458         PR gcov-profile/86109
2459         * coverage.c (coverage_begin_function): Do not
2460         mark lambdas as artificial.
2461         * tree-core.h (struct GTY): Remove tm_clone_flag
2462         and introduce new lambda_function.
2463         * tree.h (DECL_LAMBDA_FUNCTION): New macro.
2465 2018-10-02  Aaron Sawdey  <acsawdey@linux.ibm.com>
2467         PR target/87474
2468         * config/rs6000/rs6000-string.c (expand_strn_compare): Check that both
2469         P8_VECTOR and VSX are enabled.
2471 2018-10-02  Andreas Krebbel  <krebbel@linux.ibm.com>
2473         * config/s390/driver-native.c (s390_host_detect_local_cpu): Add
2474         0x3907 as CPU model number.
2476 2018-10-02  Andreas Krebbel  <krebbel@linux.ibm.com>
2478         * common/config/s390/s390-common.c: Rename PF_ARCH12 to PF_Z14.
2479         * config/s390/s390.h (enum processor_flags): Rename PF_ARCH12 to
2480         PF_Z14.  Rename TARGET_CPU_ARCH12 to TARGET_CPU_Z14,
2481         TARGET_CPU_ARCH12_P to TARGET_CPU_Z14_P, TARGET_ARCH12 to
2482         TARGET_Z14, and TARGET_ARCH12_P to TARGET_Z14_P.
2483         * config/s390/s390.md: Likewise. Rename also the cpu attribute
2484         value from arch12 to z14.
2486 2018-10-02  Uros Bizjak  <ubizjak@gmail.com>
2488         * config/i386/i386.md (fxam<mode>2_i387_with_temp): Remove.
2489         (isinfxf2): Ditto.
2490         (isinf<mode>2): Ditto.
2492 2018-10-02  Uros Bizjak  <ubizjak@gmail.com>
2494         * config/i386/i386.c (ix86_emit_i387_round): Extend op1 to XFmode
2495         before emitting fxam.  Perform calculations in XFmode.
2497 2018-10-02  Marc Glisse  <marc.glisse@inria.fr>
2499         * match.pd (((X /[ex] A) +- B) * A): New transformation.
2501 2018-10-02  Marc Glisse  <marc.glisse@inria.fr>
2503         PR middle-end/87319
2504         * fold-const.c (fold_plusminus_mult_expr): Handle complex and vectors.
2505         * tree.c (signed_or_unsigned_type_for): Handle complex.
2507 2018-10-02  Jeff Law  <law@redhat.com>
2509         * gimple-fold.c (get_range_strlen): Remove dead code.
2511 2018-10-02  Martin Sebor  <msebor@redhat.com>
2512             Jeff Law  <law@redhat.com>
2514         * builtins.c (unterminated_array): Add new arguments.
2515         If argument is not terminated, bubble up size and exact
2516         state to callers.
2517         (expand_builtin_strnlen): Detect, avoid expanding
2518         and diagnose unterminated arrays.
2519         (c_strlen): Fill in offset of start of unterminated strings.
2520         * builtins.h (unterminated_array): Update prototype.
2522 2018-10-02  Richard Biener  <rguenther@suse.de>
2524         * config/i386/sse.md (reduc_plus_scal_v4df): Avoid the use
2525         of haddv4df, first reduce to SSE width and exploit the fact
2526         that we only need element zero with the reduction result.
2527         (reduc_plus_scal_v2df): Likewise.
2529 2018-10-02  Eric Botcazou  <ebotcazou@adacore.com>
2531         * dojump.h (do_jump): Delete.
2532         (do_jump_1): Likewise.
2533         (split_comparison): Move around.
2534         * dojump.c (do_jump): Make static.
2535         (do_jump_1): Likewise.
2536         (jumpifnot): Move around.
2537         (jumpifnot_1): Likewise.
2538         (jumpif): Likewise.
2539         (jumpif_1): Likewise.
2540         * expr.c (expand_expr_real_1): Call jumpif[not] instead of do_jump.
2542 2018-10-02  Eric Botcazou  <ebotcazou@adacore.com>
2544         * reorg.c (make_return_insns): Use emit_copy_of_insn_after for the
2545         insns in the delay slot and add_insn_after for the jump insn.
2547 2018-10-02  Richard Biener  <rguenther@suse.de>
2549         * tree-inline.c (expand_call_inline): Use the location of
2550         the callee declaration for the inline-entry marker.
2551         * final.c (notice_source_line): Remove special-casing of
2552         NOTE_INSN_INLINE_ENTRY.
2554 2018-10-01  Carl Love  <cel@us.ibm.com>
2556         PR 69431
2557         * config/rs6000/rs6000-builtin.def (__builtin_mffsl): New.
2558         (__builtin_mtfsb0): New.
2559         (__builtin_mtfsb1): New.
2560         ( __builtin_set_fpscr_rn): New.
2561         (__builtin_set_fpscr_drn): New.
2562         * config/rs6000/rs6000.c (rs6000_expand_mtfsb_builtin): Add.
2563         (rs6000_expand_set_fpscr_rn_builtin): Add.
2564         (rs6000_expand_set_fpscr_drn_builtin): Add.
2565         (rs6000_expand_builtin): Add case statement entries for
2566         RS6000_BUILTIN_MTFSB0, RS6000_BUILTIN_MTFSB1,
2567         RS6000_BUILTIN_SET_FPSCR_RN, RS6000_BUILTIN_SET_FPSCR_DRN,
2568         RS6000_BUILTIN_MFFSL.
2569         (rs6000_init_builtins): Add ftype initialization and def_builtin
2570         calls for __builtin_mffsl, __builtin_mtfsb0, __builtin_mtfsb1,
2571         __builtin_set_fpscr_rn, __builtin_set_fpscr_drn.
2572         * config/rs6000.md (rs6000_mtfsb0, rs6000_mtfsb1, rs6000_mffscrn,
2573         rs6000_mffscdrn): Add define_insn.
2574         (rs6000_set_fpscr_rn, rs6000_set_fpscr_drn): Add define_expand.
2575         * doc/extend.texi: Add documentation for the builtins.
2577 2018-10-01  Richard Biener  <rguenther@suse.de>
2579         PR tree-optimization/87465
2580         * tree-ssa-loop-ivcanon.c (tree_estimate_loop_size): Fix typo
2581         causing branch miscounts.
2583 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
2585         * common/config/aarch64/aarch64-common.c (TARGET_OPTION_DEFAULT_PARAM,
2586         aarch64_option_default_param):  New.
2587         (params.h): Include.
2588         (TARGET_OPTION_VALIDATE_PARAM, aarch64_option_validate_param): New.
2589         * config/aarch64/aarch64.c (aarch64_override_options_internal): Simplify
2590         stack-clash protection validation code.
2592 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
2594         * params.c (validate_param): New.
2595         (add_params): Use it.
2596         (set_param_value): Refactor param validation into validate_param.
2597         (diagnostic.h): Include.
2598         * diagnostic.h (diagnostic_ready_p): New.
2600 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
2602         * params.c (set_param_value):
2603         Add index of parameter being validated.
2604         * common/common-target.def (option_validate_param): New.
2605         * common/common-targhooks.h (default_option_validate_param): New.
2606         * common/common-targhooks.c (default_option_validate_param): New.
2607         * doc/tm.texi.in (TARGET_OPTION_VALIDATE_PARAM): New.
2608         * doc/tm.texi: Regenerate.
2610 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
2612         PR target/86486
2613         * config/aarch64/aarch64.c (aarch64_override_options_internal):
2614         Add validation for stack-clash parameters and set defaults.
2616 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
2618         PR target/86486
2619         * configure.ac: Add stack-clash-protection-guard-size.
2620         * doc/install.texi: Document it.
2621         * config.in (DEFAULT_STK_CLASH_GUARD_SIZE): New.
2622         * params.def: Update comment for guard-size.
2623         (PARAM_STACK_CLASH_PROTECTION_GUARD_SIZE,
2624         PARAM_STACK_CLASH_PROTECTION_PROBE_INTERVAL): Update description.
2625         * configure: Regenerate.
2627 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
2629         PR target/86486
2630         * config/aarch64/aarch64.h (STACK_CLASH_MIN_BYTES_OUTGOING_ARGS,
2631         STACK_DYNAMIC_OFFSET): New.
2632         * config/aarch64/aarch64.c (aarch64_layout_frame):
2633         Update outgoing args size.
2634         (aarch64_stack_clash_protection_alloca_probe_range,
2635         TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE): New.
2637 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
2639         PR target/86486
2640         * explow.c (anti_adjust_stack_and_probe_stack_clash): Support custom
2641         probe ranges.
2642         * target.def (stack_clash_protection_alloca_probe_range): New.
2643         (stack_clash_protection_final_dynamic_probe): Remove.
2644         * targhooks.h (default_stack_clash_protection_alloca_probe_range) New.
2645         (default_stack_clash_protection_final_dynamic_probe): Remove.
2646         * targhooks.c: Likewise.
2647         * doc/tm.texi.in (TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE): New.
2648         (TARGET_STACK_CLASH_PROTECTION_FINAL_DYNAMIC_PROBE): Remove.
2649         * doc/tm.texi: Regenerate.
2651 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
2653         PR target/86486
2654         * config/aarch64/aarch64-protos.h (aarch64_output_probe_sve_stack_clash): New.
2655         * config/aarch64/aarch64.c (aarch64_output_probe_sve_stack_clash,
2656         aarch64_clamp_to_uimm12_shift): New.
2657         (aarch64_allocate_and_probe_stack_space): Add SVE specific section.
2658         * config/aarch64/aarch64.md (probe_sve_stack_clash): New.
2660 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
2662         PR target/86486
2663         * config/aarch64/aarch64.c (aarch64_layout_frame): Add assert.
2665 2018-10-01  Jeff Law  <law@redhat.com>
2666             Richard Sandiford <richard.sandiford@linaro.org>
2667             Tamar Christina  <tamar.christina@arm.com>
2669         PR target/86486
2670         * config/aarch64/aarch64.md
2671         (probe_stack_range): Add k (SP) constraint.
2672         * config/aarch64/aarch64.h (STACK_CLASH_CALLER_GUARD,
2673         STACK_CLASH_MAX_UNROLL_PAGES): New.
2674         * config/aarch64/aarch64.c (aarch64_output_probe_stack_range): Emit
2675         stack probes for stack clash.
2676         (aarch64_allocate_and_probe_stack_space): New.
2677         (aarch64_expand_prologue): Use it.
2678         (aarch64_expand_epilogue): Likewise and update IP regs re-use criteria.
2679         (aarch64_sub_sp): Add emit_move_imm optional param.
2681 2018-10-01  MCC CS <deswurstes@users.noreply.github.com>
2683         PR tree-optimization/87261
2684         * match.pd: Remove trailing whitespace.
2685         Add (x & y) | ~(x | y) -> ~(x ^ y),
2686         (~x | y) ^ (x ^ y) -> x | ~y and (x ^ y) | ~(x | y) -> ~(x & y)
2688 2018-10-01  Claudiu Zissulescu  <claziss@synopsys.com>
2690         * config/arc/arc.md (*add_n): Clean up pattern, update instruction
2691         constraints.
2692         (ashlsi3_insn): Update instruction constraints.
2693         (ashrsi3_insn): Likewise.
2694         (rotrsi3): Likewise.
2695         (add_shift): Likewise.
2696         * config/arc/constraints.md (Csz): New 32 bit constraint. It
2697         avoids placing in the limm field small constants which, otherwise,
2698         could end into a small instruction.
2700 2018-10-01  Claudiu Zissulescu  <claziss@synopsys.com>
2702         * config/arc/arc.md (maddsidi4_split): Don't use dmac if the
2703         destination register is not odd-even.
2704         (umaddsidi4_split): Likewise.
2706 2018-10-01  Richard Biener  <rguenther@suse.de>
2708         * tree-inline.c (expand_call_inline): Store origin of fn
2709         in BLOCK_ABSTRACT_ORIGIN for the inline BLOCK.
2710         * tree.c (block_ultimate_origin): Simplify and do some
2711         checking.
2713 2018-09-30  Uros Bizjak  <ubizjak@gmail.com>
2715         * config/i386/mmx.md (EMMS): New int iterator.
2716         (emms): New int attribute.
2717         (mmx_<emms>): Macroize insn from *mmx_emms and *mmx_femms using
2718         EMMS int iterator.  Explicitly declare clobbers.
2719         (mmx_emms): Remove expander.
2720         (mmx_femms): Ditto.
2721         * config/i386/predicates.md (emms_operation): Remove predicate.
2722         (vzeroall_pattern): New predicate.
2723         (vzeroupper_pattern): Rename from vzeroupper_operation.
2724         * config/i386/i386.c (ix86_avx_u128_mode_after): Use
2725         vzeroupper_pattern and vzeroall_pattern predicates.
2727 2018-09-30  Peter Bergner  <bergner@linux.ibm.com>
2729         PR rtl-optimization/86939
2730         * ira-lives.c (make_hard_regno_born): Rename from this...
2731         (make_hard_regno_live): ... to this.  Remove update to conflict
2732         information.  Update function comment.
2733         (make_hard_regno_dead): Add conflict information update.  Update
2734         function comment.
2735         (make_object_born): Rename from this...
2736         (make_object_live): ... to this.  Remove update to conflict information.
2737         Update function comment.
2738         (make_object_dead):  Add conflict information update.  Update function
2739         comment.
2740         (mark_pseudo_regno_live): Call make_object_live.
2741         (mark_pseudo_regno_subword_live): Likewise.
2742         (mark_hard_reg_dead): Update function comment.
2743         (mark_hard_reg_live): Call make_hard_regno_live.
2744         (process_bb_node_lives): Likewise.
2745         * lra-lives.c (make_hard_regno_born): Rename from this...
2746         (make_hard_regno_live): ... to this.  Remove update to conflict
2747         information.  Remove now uneeded check_pic_pseudo_p argument.
2748         Update function comment.
2749         (make_hard_regno_dead): Add check_pic_pseudo_p argument and add update
2750         to conflict information.  Update function comment.
2751         (mark_pseudo_live): Remove update to conflict information.  Update
2752         function comment.
2753         (mark_pseudo_dead): Add conflict information update.
2754         (mark_regno_live): Call make_hard_regno_live.
2755         (mark_regno_dead): Call make_hard_regno_dead with new arguement.
2756         (process_bb_lives): Call make_hard_regno_live and make_hard_regno_dead.
2758 2018-09-29  H.J. Lu  <hongjiu.lu@intel.com>
2760         PR target/87370
2761         * config/i386/i386.c (construct_container): Use TImode for
2762         BLKmode values in 2 integer registers.
2764 2018-09-29  Jeff Law  <law@redhat.com>
2766         * builtins.c (unterminated_array): Pass in c_strlen_data * to
2767         c_strlen rather than just a tree *.
2768         (c_strlen): Change NONSTR argument to a c_strlen_data pointer.
2769         Update recursive calls appropriately.  If caller did not provide a
2770         suitable data pointer, create a local one.  When a non-terminated
2771         string is discovered, bubble up information about the string via the
2772         c_strlen_data object.
2773         * builtins.h (c_strlen): Update prototype.
2774         (c_strlen_data): New structure.
2775         * gimple-fold.c (get_range_strlen): Update calls to c_strlen.
2776         For a type 2 call, if c_strlen indicates a non-terminated string
2777         use the length of the non-terminated string.
2778         (gimple_fold_builtin_stpcpy): Update calls to c_strlen.
2780 2018-09-29  Jakub Jelinek  <jakub@redhat.com>
2782         PR target/87467
2783         * config/i386/avx512fintrin.h (_mm512_abs_pd, _mm512_mask_abs_pd): Use
2784         __m512d type for __A argument rather than __m512.
2786 2018-09-28  John David Anglin  <danglin@gcc.gnu.org>
2788         * match.pd (simple_comparison): Don't optimize if either operand is
2789         a function pointer when target needs function pointer canonicalization.
2791 2018-09-28  Segher Boessenkool  <segher@kernel.crashing.org>
2793         * config/rs6000/driver-rs6000.c (asm_names): Adjust the entries for
2794         power5 .. power9 to remove indirection.
2795         * config/rs6000/rs6000.h (ASM_CPU_POWER5_SPEC, ASM_CPU_POWER6_SPEC,
2796         ASM_CPU_POWER7_SPEC, ASM_CPU_POWER8_SPEC, ASM_CPU_POWER9_SPEC,
2797         ASM_CPU_476_SPEC): Delete.
2798         (ASM_CPU_SPEC): Adjust.
2799         (EXTRA_SPECS): Delete asm_cpu_power5, asm_cpu_power6, asm_cpu_power7,
2800         asm_cpu_power8, asm_cpu_power9, asm_cpu_476.
2802 2018-09-28  Segher Boessenkool  <segher@kernel.crashing.org>
2804         * config.in: Delete HAVE_AS_DCI.
2805         * config/powerpcspe/powerpcspe.h: Treat HAVE_AS_DCI as always true.
2806         * config/rs6000/rs6000.h: Ditto.
2807         * configure.ac: Delete HAVE_AS_DCI.
2808         * configure: Regenerate.
2810 2018-09-28  Segher Boessenkool  <segher@kernel.crashing.org>
2812         * config.in (HAVE_AS_LWSYNC): Delete.
2813         * config/powerpcspe/powerpcspe.h (TARGET_LWSYNC_INSTRUCTION): Delete.
2814         * config/powerpcspe/sync.md (*lwsync): Always generate lwsync, never
2815         do it as a .long .
2816         * config/rs6000/rs6000.h (TARGET_LWSYNC_INSTRUCTION): Delete.
2817         * config/rs6000/sync.md (*lwsync): Always generate lwsync, never do it
2818         as a .long .
2819         * configure.ac: Delete HAVE_AS_LWSYNC.
2820         * configure: Regenerate.
2822 2018-09-28  Eric Botcazou  <ebotcazou@adacore.com>
2823             Pierre-Marie de Rodat  <derodat@adacore.com>
2825         * calls.c (expand_call): Try to do a tail call for thunks at -O0 too.
2826         * cgraph.h (struct cgraph_thunk_info): Add indirect_offset.
2827         (cgraph_node::create_thunk): Add indirect_offset parameter.
2828         (thunk_adjust): Likewise.
2829         * cgraph.c (cgraph_node::create_thunk): Add indirect_offset parameter
2830         and initialize the corresponding field with it.
2831         (cgraph_node::dump): Dump indirect_offset field.
2832         * cgraphclones.c (duplicate_thunk_for_node): Deal with indirect_offset.
2833         * cgraphunit.c (cgraph_node::analyze): Be prepared for external thunks.
2834         (thunk_adjust): Add indirect_offset parameter and deal with it.
2835         (cgraph_node::expand_thunk): Deal with the indirect_offset field and
2836         pass it to thunk_adjust.  Do not call the target hook if it's non-zero
2837         or if the thunk is external or local.  Fix formatting.  Do not chain
2838         the RESULT_DECL to BLOCK_VARS.  Pass the static chain to the target,
2839         if any, in the GIMPLE representation.
2840         * ipa-icf.c (sem_function::equals_wpa): Deal with indirect_offset.
2841         * lto-cgraph.c (lto_output_node): Write indirect_offset field.
2842         (input_node): Read indirect_offset field.
2843         * tree-inline.c (expand_call_inline): Pass indirect_offset field in the
2844         call to thunk_adjust.
2845         * tree-nested.c (struct nesting_info): Add thunk_p field.
2846         (create_nesting_tree): Set it.
2847         (convert_all_function_calls): Copy static chain from targets to thunks.
2848         (finalize_nesting_tree_1): Return early for thunks.
2849         (unnest_nesting_tree_1): Do not finalize thunks.
2850         (gimplify_all_functions): Do not gimplify thunks.
2852 2018-09-28  David Malcolm  <dmalcolm@redhat.com>
2854         * opt-suggestions.c (option_proposer::build_option_suggestions):
2855         Release "option_values".
2857 2018-09-28  David Malcolm  <dmalcolm@redhat.com>
2859         * coverage.c (get_coverage_counts): Convert problem-reporting dump
2860         messages from MSG_OPTIMIZED_LOCATIONS to MSG_MISSED_OPTIMIZATION.
2861         * dumpfile.c (kind_as_string): New function.
2862         (dump_loc): Rather than a hardcoded prefix of "note: ", use
2863         kind_as_string to vary the prefix based on dump_kind.
2864         (selftest::test_capture_of_dump_calls): Update for above.
2866 2018-09-28  Uros Bizjak  <ubizjak@gmail.com>
2868         * config/i386/i386.h (SSE_REGNO): Fix check for FIRST_REX_SSE_REG.
2869         (GET_SSE_REGNO): Rename from SSE_REGNO.  Update all uses for rename.
2871 2018-09-28  Uros Bizjak  <ubizjak@gmail.com>
2873         * config/i386/i386.h (CC_REGNO): Remove FPSR_REG.
2874         * config/i386/i386.c (ix86_fixed_condition_code_regs): Use
2875         INVALID_REGNUM instead of FPSR_REG.
2876         (ix86_md_asm_adjust): Do not clobber FPSR_REG.
2877         * config/i386/i386.md: Update comment of FP compares.
2878         (fldenv): Do not clobber FPSR_REG.
2880 2018-09-28  Richard Biener  <rguenther@suse.de>
2882         * tree.h (BLOCK_ORIGIN): New.
2883         * omp-expand.c (grid_expand_target_grid_body): Assign
2884         BLOCK_ORIGIN to BLOCK_ABSTRACT_ORIGIN.
2885         * tree-inline.c (remap_block): Likewise.
2886         * auto-profile.c (get_function_decl_from_block): Simplify
2887         by eliding the BLOCK_ABSTRACT_ORIGIN chasing.
2888         * langhooks.c (lhd_print_error_function): Likewise.
2889         * optinfo-emit-json.cc (optrecord_json_writer::inlining_chain_to):
2890         Likewise.
2891         * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
2892         * tree.c (block_nonartificial_location): Likewise.
2893         (block_ultimate_origin): Likewise.
2894         * tree-pretty-print.c (percent_K_format): Likewise.  Remove
2895         no longer needed LTO case.
2897 2018-09-28  Andrew Stubbs  <ams@codesourcery.com>
2898             Jan Hubicka  <jh@suse.cz>
2899             Martin Jambor  <mjambor@suse.cz>
2901         * simplify-rtx.c (simplify_merge_mask): New function.
2902         (simplify_ternary_operation): Use it, also see if VEC_MERGEs with the
2903         same masks are used in op1 or op2.
2904         (test_vec_merge): New function.
2905         (test_vector_ops): Call test_vec_merge.
2907 2018-09-28  Eric Botcazou  <ebotcazou@adacore.com>
2909         * config/sparc/sparc-protos.h (sparc_branch_cost): Declare.
2910         * config/sparc/sparc.h (BRANCH_COST): Call sparc_branch_cost.
2911         * config/sparc/sparc.c (struct processor_costs): Add branch_cost field.
2912         (cypress_costs): Set it.
2913         (supersparc_costs): Likewise.
2914         (hypersparc_costs): Likewise.
2915         (leon_cost): Likewise.
2916         (leon3_costs): Likewise.
2917         (sparclet_costs): Likewise.
2918         (ultrasparc_costs): Likewise.
2919         (ultrasparc_costs): Likewise.
2920         (niagara_costs): Likewise.
2921         (niagara2_costs): Likewise.
2922         (niagara3_costs): Likewise.
2923         (niagara4_costs): Likewise.
2924         (niagara7_costs): Likewise.
2925         (m8_costs): Likewise.
2926         (TARGET_CAN_FOLLOW_JUMP): Define.
2927         (pass_work_around_errata::gate): Minor tweak.
2928         (sparc_option_override): Remove MASK_FSMULD mask for V7 processors.
2929         Do not set both MASK_VIS4 and MASK_VIS4B for M8 processor.
2930         Automaitcally clear MASK_FSMULD mask for V7 processors.
2931         (sparc_can_follow_jump): New static function.
2932         (output_ubranch): Deal with CROSSING_JUMP_P.
2933         (sparc_use_sched_lookahead): Rewrite using switch statement.
2934         (sparc_issue_rate): Reorder.
2935         (sparc_branch_cost): New function.
2937 2018-09-27  Martin Sebor  <msebor@redhat.com>
2939         * tree.h (tree_to_shwi): Add attribute nonnull and pure.
2940         (tree_to_poly_int64, tree_to_uhwi, tree_to_poly_uint64): Same.
2941         (int_fits_type_p): Same.
2943 2018-09-27  Uros Bizjak  <ubizjak@gmail.com>
2945         * config/i386/i386.md (FPCR_REG): Remove.
2946         (UNSPEC_FLDCW): Remove.
2947         (x86_fnstcw_1): Use (const_int 0) instead of FPCR_REG.
2948         (x86_fldcw_1): Remove insn pattern.
2949         (fnstenv): Do not clobber FPCR_REG.
2950         (fldenv): Ditto.
2951         * config/i386/i386.h (FIXED_REGISTERS) Remove fpsr register.
2952         (CALL_USED_REGISTERS): Ditto.
2953         (REG_ALLOC_ORDER): Ditto.
2954         (REG_CLASS_CONTENTS): Ditto.
2955         (HI_REGISTER_NAMES): Ditto.
2956         (ADDITIONAL_REGISTER_NAMES): Use defines instead
2957         of numerical constants.
2958         * config/i386/i386.c (regclass_map): Remove fpsr register.
2959         (dbx_register_map): Ditto.
2960         (dbx64_register_map): Ditto.
2961         (svr4_dbx_register_map): Ditto.
2962         (print_reg): Do not handle FPCR_REG.
2964 2018-09-27  Segher Boessenkool  <segher@kernel.crashing.org>
2966         PR target/87149
2967         * config.in (HAVE_AS_CMPB, HAVE_AS_DFP, HAVE_AS_FPRND, HAVE_AS_MFPGPR,
2968         HAVE_AS_POPCNTB, HAVE_AS_POPCNTD, HAVE_AS_POWER8, HAVE_AS_POWER9):
2969         Delete, always treat as true.
2970         * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
2971         Ditto.  Simplify remaining code.
2972         * config/powerpcspe/powerpcspe.h: Ditto.
2973         * config/rs6000/rs6000.c (rs6000_option_override_internal): Ditto.
2974         Simplify remaining code.
2975         (rs6000_expand_builtin): Ditto.
2976         * config/rs6000/rs6000.h: Ditto.
2977         * configure.ac: Ditto.
2978         * configure: Regenerate.
2980 2018-09-27  Martin Liska  <mliska@suse.cz>
2982         * coverage.c (get_coverage_counts): Revert the formatting
2983         of missing profile opt info.
2985 2018-09-27  Richard Biener  <rguenther@suse.de>
2987         PR debug/37801
2988         PR debug/87440
2989         * dwarf2out.c (set_block_origin_self): Do not mark outermost
2990         block as we do not output that.
2991         (gen_inlined_subroutine_die): Elide the originally outermost
2992         block, matching what we do for concrete instances.
2993         (decls_for_scope): Add parameter specifying whether to recurse
2994         to subblocks.
2996 2018-09-27  Andrew Stubbs  <ams@codesourcery.com>
2997             Tom de Vries  <tom@codesourcery.com>
2999         PR 82089
3001         * expmed.c (emit_cstore): Fix handling of result_mode == BImode and
3002         STORE_FLAG_VALUE == 1.
3004 2018-09-27  Andreas Krebbel  <krebbel@linux.ibm.com>
3006         * config/s390/s390.md (PPA_TX_ABORT, PPA_OOO_BARRIER): New
3007         constant definitions.
3008         ("tx_assist"): Replace magic number with PPA_TX_ABORT.
3009         ("*ppa"): Enable pattern also for -march=zEC12 -mno-htm.
3010         ("speculation_barrier"): New expander definition.
3012 2018-09-26  Indu Bhagat  <indu.bhagat@oracle.com>
3014         PR gcov-profile/86957
3015         * common.opt: New warning option -Wmissing-profile.
3016         * coverage.c (get_coverage_counts): Add warning for missing .gcda file.
3017         * doc/invoke.texi: Document -Wmissing-profile.
3019 2018-09-26  Jim Wilson  <jimw@sifive.com>
3021         * config/riscv/riscv.md (subsi3_extended2): Add J constraint.
3022         (negdi2, negsi2, negsi2_extended, negsi2_extended2): New.
3024 2018-09-26  Martin Sebor  <msebor@redhat.com>
3026         * tree.c (zerop): Change return type to bool.
3027         (integer_zerop, integer_onep, integer_each_onep): Same.
3028         (integer_all_onesp, integer_minus_onep, integer_pow2p): Same.
3029         (integer_nonzerop, integer_truep, tree_ctz, real_zerop): Same.
3030         (real_onep, real_minus_onep, chain_index): Same.
3031         (print_type_hash_statistics, type_list_equal): Same.
3032         * tree.h (zerop): Same.
3033         (zerop, integer_zerop, integer_onep, integer_each_onep): Same.
3034         (integer_all_onesp, integer_minus_onep, integer_pow2p): Same.
3035         (integer_nonzerop, integer_truep, tree_ctz, real_zerop): Same.
3036         (real_onep, real_minus_onep, chain_index): Same.
3037         (print_type_hash_statistics, type_list_equal): Same.
3039 2018-09-26  Jim Wilson  <jimw@sifive.com>
3041         * config/riscv/riscv.h (FUNCTION_ARG_REGNO_P): Fix comment.
3043 2018-09-26  Jakub Jelinek  <jakub@redhat.com>
3045         PR target/87414
3046         * config/i386/i386.c: Include debug.h and dwarf2out.h.
3047         (output_indirect_thunk): Emit DW_CFA_def_cfa_offset after the
3048         call.
3050 2018-09-25  Andrew Stubbs  <ams@codesourcery.com>
3052         * builtins.c (get_builtin_sync_mem): Force address mode conversion.
3054 2018-09-26  Uros Bizjak  <ubizjak@gmail.com>
3056         * config/i386/i386.h (enum reg_class): Remove FP_TOP_SSE_REGS
3057         and FP_SECOND_SSE_REGS.
3058         (REG_CLASS_NAMES): Ditto.
3059         (REG_CLASS_CONTENTS): Ditto.
3060         * config/i386/i386.c (ix86_preferred_reload_class) Do not handle
3061         FP_TOP_SSE_REGS and FP_SECOND_SSE_REGS classes.
3062         (ix86_preferred_output_reload_class): Ditto.
3063         * config/i386/i386.md (fix_trunc<mode>_i387_fisttp): Change "=&1f"
3064         clobber constraint to "=&f".
3065         (fix_truncdi_i387): Ditto.
3066         (lrintxfdi2): Ditto.
3067         (fistdi2_<rounding>): Ditto.
3068         (fpremxf4_i387): Change "=u" constraint to "=f".
3069         (fprem1xf4_i387): Ditto.
3070         (sincosxf3): Ditto.
3071         (fptanxf4_i387): Ditto.
3072         (fxtractxf3_i387): Ditto.
3073         (fscalexf4_i387): Ditto.
3074         (atan2xf3): Change "u" constraint to "f".
3075         (fyl2xxf3_i387): Ditto.
3076         (fyl2xp1xf3_i387): Ditto.
3078 2018-09-26  Uros Bizjak  <ubizjak@gmail.com>
3080         PR target/87439
3081         * config/i386/i386.h (NUM_MODES_FOR_MODE_SWITCHING): Update
3082         for removed I387_MASK_PM entity.
3085 2018-09-26  Jeff Law  <law@redhat.com>
3086         Revert
3087         2018-09-26  Alexey Neyman  <stilor@att.net>
3089         * graphite.h: Include <isl/id.h> and <isl/space.h>; these
3090         headers are no longer pulled in by <isl/val.h>.
3092 2018-09-26  Richard Biener  <rguenther@suse.de>
3094         PR debug/87443
3095         * dwarf2out.c (gen_lexical_block_die): Do not equate inline
3096         or concrete instance DIE to the tree.  Create abstract origin
3097         attributes also for concrete instances.
3099 2018-09-26  Alexey Neyman  <stilor@att.net>
3101         * graphite.h: Include <isl/id.h> and <isl/space.h>; these
3102         headers are no longer pulled in by <isl/val.h>.
3104 2018-09-26  Matthew Malcomson  <matthew.malcomson@arm.com>
3106         * config/arm/arm.c (arm_split_compare_and_swap, arm_split_atomic_op):
3107         Use new helper functions.
3108         * config/arm/sync.md (atomic_load<mode>, atomic_store<mode>):
3109         Use new helper functions.
3110         * config/arm/aarch-common-protos.h (aarch_mm_needs_acquire,
3111         aarch_mm_needs_release): New declarations.
3112         * config/arm/aarch-common.c (aarch_mm_needs_acquire,
3113         aarch_mm_needs_release): New.
3115 2018-09-26  Eric Botcazou  <ebotcazou@adacore.com>
3117         * config/arm/arm.c (arm_reorg): Skip Thumb reorg pass for thunks.
3118         (arm32_output_mi_thunk): Deal with long calls.
3120 2018-09-26  Richard Biener  <rguenther@suse.de>
3122         PR debug/87428
3123         PR debug/87362
3124         * tree-inline.c (expand_call_inline): When the location
3125         of the call is UNKNOWN_LOCATION use DECL_SOURCE_LOCATION
3126         or BUILTINS_LOCATION for the BLOCK_SOURCE_LOCATION of
3127         the inserted BLOCK to make inlined_function_outer_scope_p
3128         recognize it.
3129         * dwarf2out.c (add_call_src_coords_attributes): Do not add
3130         coords for reserved locations.
3132 2018-09-25  Segher Boessenkool  <segher@kernel.crashing.org>
3134         * config/rs6000/rs6000.md (*movcc_internal1): Use set_attr_alternative.
3135         (*call_indirect_nonlocal_sysv<mode>): Ditto.
3136         (*call_value_indirect_nonlocal_sysv<mode>): Ditto.
3137         (*sibcall_nonlocal_sysv<mode>): Ditto.
3138         (*sibcall_value_nonlocal_sysv<mode>): Ditto.
3139         (<bd>_<mode>): Ditto.
3140         (<bd>tf_<mode>): Ditto.
3142 2018-09-25  Segher Boessenkool  <segher@kernel.crashing.org>
3144         * config/rs6000/altivec.md (*altivec_mov<mode>): Write the output
3145         control string as a list of templates instead of as C code.
3146         (*altivec_movti): Ditto.
3147         * config/rs6000/darwin.md (movdf_low_di): Ditto.
3149 2018-09-25  Jim Wilson  <jimw@sifive.com>
3151         * config/riscv/riscv.c (riscv_split_symbol): Mark auipc label as weak
3152         when target symbol is weak.
3154 2018-09-25  Bernd Edlinger  <bernd.edlinger@hotmail.de>
3156         PR c/87387
3157         * builtins.c (unterminated_array): Simplify.
3158         * expr.c (string_constant): Handle SSA_NAME.  Add more exceptions
3159         where pointer arithmetic is safe.
3161 2018-09-25  Segher Boessenkool  <segher@kernel.crashing.org>
3163         PR target/86987
3164         * config/rs6000/altivec.md (altivec_vspltb): Use
3165         const_0_to_15_operand instead of u5bit_cint_operand.
3166         (*altivec_vspltb_internal): Ditto.
3167         (altivec_vspltb_direct): Ditto.
3168         (altivec_vsplth): Use const_0_to_7_operand instead of
3169         u5bit_cint_operand.
3170         (*altivec_vsplth_internal): Ditto.
3171         (altivec_vsplth_direct): Ditto.
3172         (altivec_vspltw): Use const_0_to_3_operand instead of
3173         u5bit_cint_operand.
3174         (*altivec_vspltw_internal): Ditto.
3175         (altivec_vspltw_direct): Ditto.
3176         (altivec_vspltsf): Ditto.
3177         (*altivec_vspltsf_internal): Ditto.
3178         * config/rs6000/rs6000.c (rs6000_expand_binop_builtin): Handle the
3179         various splats with the proper size immediate.  Reorder the various
3180         cases by ascending size of immediate, and put all such together.
3182 2018-09-25  Richard Biener  <rguenther@suse.de>
3184         PR debug/83941
3185         * dwarf2out.c (add_AT_external_die_ref): Remove now redundant
3186         GC-ification.
3187         (maybe_create_die_with_external_ref): Do not create
3188         DW_TAG_imported_unit here.
3189         (add_abstract_origin_attribute): Handle external BLOCK refs.
3190         (dwarf2out_abstract_function): Simplify LTO case.
3191         (dwarf2out_early_finish): Create DW_TAG_imported_unit explicitely
3192         rather than using maybe_create_die_with_external_ref.
3194 2018-09-25  Uros Bizjak  <ubizjak@gmail.com>
3196         PR target/71278
3197         * config/i386/i386.md (frndintxf2_mask_pm): Remove.
3198         (frndintxf2_mask_pm_i387): Ditto.
3199         (nearbyintxf2): Rewrite expander pattern to match rintxf2.
3200         Enable for !flag_trapping_math.
3201         (nearbyint<mode>2): Enable x87 modes for !flag_trapping_math.
3202         Enable SSE modes for TARGET_SSE4_1 and expand them with round insn.
3203         Change operand 1 predicate to nonimmediate_operand.
3204         (attr "i387_cw"): Remove mask_pm.
3205         * config/i386/i386.h (enum ix86_stack_slot): Remove SLOT_CW_MASK_PM.
3206         (enum ix86_entity): Remove I387_MASK_PM.
3207         * config/i386/i386.c (ix86_i387_mode_needed): Do not
3208         handle I387_MASK_PM.
3209         (ix86_mode_needed): Ditto.
3210         (ix86_mode_after): Ditto.
3211         (ix86_mode_entry): Ditto.
3212         (ix86_mode_exit): Ditto.
3213         (emit_i387_cw_initialization): Do not handle I387_CW_MASK_PM.
3215 2018-09-25  Jakub Jelinek  <jakub@redhat.com>
3217         * vr-values.c (vr_values::vr_values): Initialize to_remove_edges and
3218         to_update_switch_stmts to vNULL instead of calling create on them
3219         immediately.
3221 2018-09-25  Richard Biener  <rguenther@suse.de>
3223         PR tree-optimization/87402
3224         * tree-ssa-sccvn.c (SSA_VISITED): Remove unused function.
3225         (visit_phi): Re-instantiate handling of supposed to be VARYING
3226         but non-VARYING backedge value.
3228 2018-09-25  Richard Biener  <rguenther@suse.de>
3230         PR debug/83941
3231         * dwarf2out.c (struct sym_off_pair): New.
3232         (external_die_map): New global.
3233         (lookup_decl_die): When in LTO create DIEs lazily from the
3234         external_die_map.
3235         (lookup_block_die): New function, create DIEs lazily in LTO.
3236         (equate_block_to_die): New function.
3237         (dwarf2out_die_ref_for_decl): During WPA get the association
3238         from the external DIE map.
3239         (dwarf2out_register_external_die): Record mapping into the
3240         external DIE map.
3241         (maybe_create_die_with_external_ref): New function split out from
3242         DIE generation part of old dwarf2out_register_external_die.
3243         (add_abstract_origin_attribute): Do not return the DIE.  When
3244         in LTO reference externals directly.
3245         (dwarf2out_abstract_function): When in LTO ignore calls for
3246         decls with external DIEs (already present abstract instances).
3247         (gen_call_site_die): Adjust.
3248         (add_high_low_attributes): Likewise.
3249         (gen_lexical_block_die): Likewise.
3250         (gen_inlined_subroutine_die): Likewie.
3251         (gen_block_die): Likewise.
3252         (dwarf2out_inline_entry): Likewise.
3253         (dwarf2out_early_finish): In LTRANS phase create DW_TAG_imported_unit
3254         DIEs.
3256 2018-09-25  Martin Liska  <mliska@suse.cz>
3258         * ipa-fnsummary.c (estimate_node_size_and_time): Scale by two
3259         integers and not by a float value.
3261 2018-09-25  Martin Liska  <mliska@suse.cz>
3263         PR fortran/87394
3264         * dbgcnt.c (dbg_cnt_process_single_pair): Return false
3265         instead of NULL.
3266         * dumpfile.c (dump_enable_all): Remove extra parenthesis.
3267         * gcov-tool.c: Declare the function with ATTRIBUTE_NORETURN.
3268         * godump.c (go_format_type): Remove extra parenthesis.
3270 2018-09-25  Martin Liska  <mliska@suse.cz>
3272         * alias.c (set_dest_equal_p): Remove unused function.
3273         * config/i386/i386.c (def_builtin_pure2): Likewise.
3274         * diagnostic-show-locus.c (class layout): Remove
3275         unused field.
3276         (layout::layout): Likewise here.
3277         * dump-context.h (class temp_dump_context): Likewise.
3278         * dwarf2out.c (add_AT_fde_ref): Remove unused function.
3279         (add_AT_loclistsptr): Likewise.
3280         (add_AT_offset): Likewise.
3281         (get_AT_hi_pc): Likewise.
3282         (is_comdat_die): Likewise.
3283         (type_is_enum): Likewise.
3284         (ceiling): Likewise.
3285         (add_AT_vms_delta): Likewise.
3286         (is_class_die): Likewise.
3287         * edit-context.c (class line_event): Remove unused field.
3288         * graphite-sese-to-poly.c (tree_int_to_gmp): Remove
3289         unused function.
3290         * ipa-cp.c (ipa_get_vr_lat): Likewise.
3291         * lra-constraints.c (ok_for_index_p_nonstrict): Likewise.
3292         (ok_for_base_p_nonstrict): Likewise.
3293         * tree-chrec.c (is_not_constant_evolution): Likewise.
3294         (chrec_fold_poly_cst): Likewise.
3295         * tree-if-conv.c (has_pred_critical_p): Likewise.
3296         * tree-ssa-coalesce.c (print_exprs): Likewise.
3297         * tree-ssa-pre.c (bitmap_set_contains_expr): Likewise.
3298         * tree-ssa-uninit.c (is_and_or_or_p): Likewise.
3299         * tree-vrp.c (value_ranges_intersect_p): Likewise.
3300         (value_range_nonnegative_p): Likewise.
3302 2018-09-25  Martin Liska  <mliska@suse.cz>
3304         * config/powerpcspe/powerpcspe.c (rs6000_output_function_epilogue):
3305         Do not handle "GNU Pascal".
3306         * config/rs6000/rs6000.c (rs6000_output_function_epilogue):
3307         Likewise.
3308         * config/sparc/sparc.c (sparc_pass_by_reference): Remove Pascal
3309         from documentation. Likewise.
3310         * dbxout.c (dbxout_range_type): Likewise.
3311         * doc/cpp.texi: Likewise.
3312         * doc/extend.texi: Likewise.
3313         * doc/frontends.texi: Likewise.
3314         * doc/invoke.texi: Remove Pascal entry.
3315         * tree.def (CLEANUP_POINT_EXPR): Likewise.
3316         * doc/rtl.texi (MODE_FUNCTION): Remove not used entry.
3318 2018-09-25  Martin Liska  <mliska@suse.cz>
3320         PR middle-end/86078
3321         * doc/invoke.texi: Document all parameters and remove default
3322         of the parameters.
3324 2018-09-25  Ilya Leoshkevich  <iii@linux.ibm.com>
3326         PR bootstrap/87417
3327         * rtl.c (rtx_code_size): Take into account that EQ_ATTR_ALT
3328         contains HOST_WIDE_INTs when computing its size.
3330 2018-09-24  Jim Wilson  <jimw@sifive.com>
3332         PR target/87391
3333         * config/riscv/riscv.h (STACK_BOUNDARY): Test riscv_abi == ABI_ILP32E
3334         not TARGET_RVE.
3335         (ABI_STACK_BOUNDARY, MAX_ARGS_IN_REGISTERS): Likewise.
3337 2018-09-24  Andrew Pinski  <apinski@marvell.com>
3339         *  config/aarch64/aarch64.c (aarch_macro_fusion_pair_p): Don't
3340         access prev before checking it for NULLness in the
3341         AARCH64_FUSE_CMP_BRANCH case.
3343 2018-09-24  H.J. Lu  <hongjiu.lu@intel.com>
3345         PR target/82699
3346         * config/i386/i386.c (rest_of_insert_endbranch): Set
3347         endbr_queued_at_entrance to true and don't insert ENDBR if
3348         x86_function_profiler will be called.
3349         (x86_function_profiler): Insert ENDBR if endbr_queued_at_entrance
3350         is true.
3351         * config/i386/i386.h (machine_function): Add
3352         endbr_queued_at_entrance.
3354 2018-09-24  Ilya Leoshkevich  <iii@linux.ibm.com>
3356         * genattrtab.c (mk_attr_alt): Use alternative_mask.
3357         (attr_rtx_1): Adjust caching to match the new EQ_ATTR_ALT field
3358         types.
3359         (check_attr_test): Use alternative_mask.
3360         (get_attr_value): Likewise.
3361         (compute_alternative_mask): Use alternative_mask and XWINT.
3362         (make_alternative_compare): Use alternative_mask.
3363         (attr_alt_subset_p): Use XWINT.
3364         (attr_alt_subset_of_compl_p): Likewise.
3365         (attr_alt_intersection): Use alternative_mask and XWINT.
3366         (attr_alt_union): Likewise.
3367         (attr_alt_complement): Use HOST_WIDE_INT and XWINT.
3368         (mk_attr_alt): Use alternative_mask and HOST_WIDE_INT.
3369         (simplify_test_exp): Use alternative_mask and XWINT.
3370         (write_test_expr): Use alternative_mask and XWINT, adjust bit
3371         number calculation to support 64 bits.  Generate code that
3372         checks 64-bit masks.
3373         (main): Use alternative_mask.
3374         * rtl.def (EQ_ATTR_ALT): Change field types from ii to ww.
3376 2018-09-24  Ilya Leoshkevich  <iii@linux.ibm.com>
3378         PR target/80080
3379         * config/s390/s390.c (s390_emit_epilogue): Do not use PARALLEL
3380         RETURN+USE when returning via %r14.
3382 2018-09-24  Martin Liska  <mliska@suse.cz>
3384         * gcov.c (output_lines): Print colorization legend
3385         for both flag_use_colors and flag_use_hotness_colors.
3386         Reword the help.
3388 2018-09-24  Martin Liska  <mliska@suse.cz>
3390         * coverage.c (get_coverage_counts): Use warning_at
3391         with current_function_decl location. Use %qD in warning
3392         message.
3394 2018-09-24  Martin Liska  <mliska@suse.cz>
3396         * memory-block.h (memory_block_pool::release): Annotate with
3397         valgrind that the memory is not accessible.
3399 2018-09-24  Martin Liska  <mliska@suse.cz>
3401         PR sanitizer/85774
3402         * asan.c: Make asan_handled_variables extern.
3403         * asan.h: Likewise.
3404         * cfgexpand.c (expand_stack_vars): Make sure
3405         a representative is unpoison if another
3406         variable in the partition is handled by
3407         use-after-scope sanitization.
3409 2018-09-24  Richard Biener  <rguenther@suse.de>
3411         PR tree-optimization/63155
3412         * tree-ssa-propagate.c (add_ssa_edge): Avoid adding PHIs to
3413         the worklist when the edge of the respective argument isn't
3414         executable.
3416 2018-09-23   Uros Bizjak  <ubizjak@gmail.com>
3418         * config/i386/i386.h (enum reg_class): Rename MASK_REGS to
3419         ALL_MASK_REGS and MASK_EVEX_REGS to MASK_REGS.
3420         (MASK_CLASS_P): Update for rename.
3421         (MAYBE_MASK_CLASS_P): Ditto.
3422         (REG_CLASS_NAMES): Update.
3423         (REG_CLASS_CONTENT): Update.
3424         * config/i386/i386.c (regclass_map): Update for MASK_REG
3425         and ALL_MASK_REGS rename.
3426         * config/i386/constraints.md (Yk): Update for rename.
3427         (k): Ditto.
3429 2018-09-23   Uros Bizjak  <ubizjak@gmail.com>
3431         * config/i386/i386.h (enum reg_class): Remove
3432         EVEX_SSE_REGS and MOD4_SSE_REGS.
3433         (REG_CLASS_NAMES): Update.
3434         (REG_CLASS_CONTENT): Update.
3435         * config/i386/i386.c (regclass_map): Declare AVX-512 SSE
3436         registers as ALL_SSE_REGS.
3437         (ix86_additional_allocno_class_p): Remove.
3438         (TARGET_ADDITIONAL_ALLOCNO_CLASS_P): Remove.
3439         (ix86_register_priority): Lower priority of EVEX SSE registers.
3440         Use IN_RANGE macro where appropriate.
3441         (ix86_hard_regno_mode_ok): Merge AVX-5124FMAPS and
3442         AVX-5124VNNIW checks.
3443         (ix86_modes_tieable_p): Tie 512-bit SSE modes.
3444         * config/i386/sse.md (avx5124fmaddps_4fmaddps)
3445         (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddps_maskz)
3446         (avx5124fmaddps_4fmaddss, avx5124fmaddps_4fmaddss_mask)
3447         (avx5124fmaddps_4fmaddss_maskz, avx5124fmaddps_4fnmaddps)
3448         (avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddps_maskz)
3449         (avx5124fmaddps_4fnmaddss, avx5124fmaddps_4fnmaddss_mask)
3450         (avx5124fmaddps_4fnmaddss_maskz, avx5124vnniw_vp4dpwssd)
3451         (avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssd_maskz)
3452         (avx5124vnniw_vp4dpwssds, avx5124vnniw_vp4dpwssds_mask)
3453         (avx5124vnniw_vp4dpwssds_maskz): Use "v" instead of "Yh" constraint.
3454         * config/i386/constraints.md (Yh): Remove.
3456 2018-09-23   Uros Bizjak  <ubizjak@gmail.com>
3458         * config/i386/i386.c (regclass_map): Declare integer REX registers
3459         as GENERAL_REGS.
3461 2018-09-23  Gerald Pfeifer  <gerald@pfeifer.com>
3463         * doc/service.texi (Service): Switch the fsf.org link to https.
3465 2018-09-22  Chung-Ju Wu  <jasonwucj@gmail.com>
3467         PR target/86798
3468         * config/nds32/nds32.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3469         Define to speculation_safe_value_not_needed.
3471 2018-09-21  Florian Weimer  <fweimer@redhat.com>
3473         PR middle-end/81035
3474         * doc/extend.texi (Common Function Attributes): Mention that
3475         noreturn suppresses tail call optimization.
3477 2018-09-21  Jeff Law  <law@redhat.com>
3479         * gimple-ssa-evrp.c (evrp_dom_walker::cleanup): Call
3480         vr_values::cleanup_edges_and_switches.
3481         * tree-vrp.c (to_remove_edges, to_update_switch_stmts): Moved into
3482         vr_values class.
3483         (identify_jump_threads): Remove EDGE_IGNORE handling.
3484         (execute_vrp): Move handling of to_remove_edges and
3485         to_update_switch_stmts into vr_values class member functions.
3486         * tree-vrp.h (switch_update, to_remove_edges): Remove declarations.
3487         (to_update_switch_stmts): Likewise.
3488         * vr-values.c: Include cfghooks.h.
3489         (vr_values::vr_values): Initialize to_remove_edges and
3490         to_update_switch_stmts.
3491         (vr_values::~vr_values): Verify to_remove_edges and
3492         to_update_switch_stmts are empty.
3493         (vr_values::simplify_switch_using_ranges): Set EDGE_IGNORE as needed.
3494         (vr_values::cleanup_edges_and_switches): New member function.
3495         * vr-values.h (vr_values): Add cleanup_edges_and_switches member
3496         function.  Add new data members.
3498 2018-09-21  David Malcolm  <dmalcolm@redhat.com>
3500         PR tree-optimization/87309
3501         * dumpfile.c (dump_context::begin_scope): Filter the dump_loc
3502         calls with pflags and alt_flags.
3503         (selftest::test_capture_of_dump_calls): Add test of interaction of
3504         MSG_OPTIMIZED_LOCATIONS with AUTO_DUMP_SCOPE.
3506 2018-09-21  Olivier Hainque  <hainque@adacore.com>
3508         * config.gcc: Factorize and comment inclusion of vxworks-dummy.h.
3510 2018-09-21  Olivier Hainque  <hainque@adacore.com>
3512         * config/vxworks.h (CLEAR_INSN_CACHE): #define to 1.
3514 2018-09-21  Olivier Hainque  <hainque@adacore.com>
3516         * config/vxworks.h (VXWORKS_LIBGCC_SPEC): Remove -lc_internal.
3517         Merge block comment with the one ahead of VXWORKS_LIBS_RTP. Then:
3518         (VXWORKS_LIBS_RTP): Minor reordering.
3520 2018-09-21  Olivier Hainque  <hainque@adacore.com>
3522         * config/vxworks.h (STARTFILE_PREFIX_SPEC): Define.
3523         (VXWORKS_LIBS_DIR_RTP): Remove definition and use.
3525 2018-09-21  Olivier Hainque  <hainque@adacore.com>
3527         * config/vxworks.h (SIZE_TYPE): Account for TARGET_VXWORKS64.
3528         (PTRDIFF_TYPE): Likewise.
3530 2018-09-21  Olivier Hainque  <hainque@adacore.com>
3532         * config.gcc: Enforce def of TARGET_VXWORKS64 to 1 from
3533         triplet, similar to support for VxWorks7.
3534         * config/vxworks-dummy.h: Provide a default definition
3535         of TARGET_VXWORKS64 to 0.
3537 2018-09-21  Olivier Hainque  <hainque@adacore.com>
3539         * config/vxworks.h (TARGET_VXWORKS7): Move default definition ...
3540         * config/vxworks-dummy.h: here.
3542 2018-09-21  Olivier Hainque  <hainque@adacore.com>
3544         * config.gcc: Prepend vxworks-dummy.h to tm_file for powerpc*
3546 2018-09-21  Shaokun Zhang  <zhangshaokun@hisilicon.com>
3547             Bo Zhou  <zbo.zhou@hisilicon.com>
3549         * config/aarch64/aarch64-cores.def (tsv110): New CPU.
3550         * config/aarch64/aarch64-tune.md: Regenerated.
3551         * doc/invoke.texi (AArch64 Options/-mtune): Add "tsv110".
3552         * config/aarch64/aarch64.c (tsv110_tunings): New tuning table.
3553         * config/aarch64/aarch64-cost-tables.h: Add "tsv110" extra costs.
3555 2018-09-21  Andrew Stubbs  <ams@codesourcery.com>
3556             Julian Brown  <julian@codesourcery.com>
3558         * builtins.c (get_builtin_sync_mem): Handle address spaces.
3560 2018-09-21  Eric Botcazou  <ebotcazou@adacore.com>
3562         * config/rs6000/rs6000.c (rs6000_function_ok_for_sibcall): Return false
3563         if the call takes a static chain.
3565 2018-09-21  Martin Liska  <mliska@suse.cz>
3567         * auto-profile.c (autofdo_source_profile::read): Do not
3568         set sum_all.
3569         (read_profile): Do not add working sets.
3570         (read_autofdo_file): Remove sum_all.
3571         (afdo_callsite_hot_enough_for_early_inline): Remove const
3572         qualifier.
3573         * coverage.c (struct counts_entry): Remove gcov_summary.
3574         (read_counts_file): Read new GCOV_TAG_OBJECT_SUMMARY,
3575         do not support GCOV_TAG_PROGRAM_SUMMARY.
3576         (get_coverage_counts): Remove summary and expected
3577         arguments.
3578         * coverage.h (get_coverage_counts): Likewise.
3579         * doc/gcov-dump.texi: Remove -w option.
3580         * gcov-dump.c (dump_working_sets): Remove.
3581         (main): Do not support '-w' option.
3582         (print_usage): Likewise.
3583         (tag_summary): Likewise.
3584         * gcov-io.c (gcov_write_summary): Do not dump
3585         histogram.
3586         (gcov_read_summary): Likewise.
3587         (gcov_histo_index): Remove.
3588         (gcov_histogram_merge): Likewise.
3589         (compute_working_sets): Likewise.
3590         * gcov-io.h (GCOV_TAG_OBJECT_SUMMARY): Mark
3591         it not obsolete.
3592         (GCOV_TAG_PROGRAM_SUMMARY): Mark it obsolete.
3593         (GCOV_TAG_SUMMARY_LENGTH): Adjust.
3594         (GCOV_HISTOGRAM_SIZE): Remove.
3595         (GCOV_HISTOGRAM_BITVECTOR_SIZE): Likewise.
3596         (struct gcov_summary): Simplify rapidly just
3597         to runs and sum_max fields.
3598         (gcov_histo_index): Remove.
3599         (NUM_GCOV_WORKING_SETS): Likewise.
3600         (compute_working_sets): Likewise.
3601         * gcov-tool.c (print_overlap_usage_message): Remove
3602         trailing empty line.
3603         * gcov.c (read_count_file): Read GCOV_TAG_OBJECT_SUMMARY.
3604         (output_lines): Remove program related line.
3605         * ipa-profile.c (ipa_profile): Do not consider GCOV histogram.
3606         * lto-cgraph.c (output_profile_summary): Do not stream GCOV
3607         histogram.
3608         (input_profile_summary): Do not read it.
3609         (merge_profile_summaries): And do not merge it.
3610         (input_symtab): Do not call removed function.
3611         * modulo-sched.c (sms_schedule): Do not print sum_max.
3612         * params.def (HOT_BB_COUNT_FRACTION): Reincarnate param that was
3613         removed when histogram method was invented.
3614         (HOT_BB_COUNT_WS_PERMILLE): Mention that it's used only in LTO
3615         mode.
3616         * postreload-gcse.c (eliminate_partially_redundant_load): Fix
3617         GCOV coding style.
3618         * predict.c (get_hot_bb_threshold): Use HOT_BB_COUNT_FRACTION
3619         and dump selected value.
3620         * profile.c (add_working_set): Remove.
3621         (get_working_sets): Likewise.
3622         (find_working_set): Likewise.
3623         (get_exec_counts): Do not work with working sets.
3624         (read_profile_edge_counts): Do not inform as sum_max is removed.
3625         (compute_branch_probabilities): Likewise.
3626         (compute_value_histograms): Remove argument for call of
3627         get_coverage_counts.
3628         * profile.h: Do not make gcov_summary const.
3630 2018-09-21  Monk Chiang  <sh.chiang04@gmail.com>
3632         * config.gcc (nds32*-*-*): Set TARGET_DEFAULT_TLSDESC_TRAMPOLINE=0.
3634 2018-09-21  Eric Botcazou  <ebotcazou@adacore.com>
3636         PR tree-optimization/86990
3637         * gimple-ssa-store-merging.c (imm_store_chain_info:coalesce_immediate):
3638         Check that the entire merged store group is made of constants only for
3639         overlapping stores.
3641 2018-09-20  Allan Sandfeld Jensen  <allan.jensen@qt.io>
3643         * gcc.c (LINK_COMMAND_SPEC): Handle -r like -nostdlib.
3644         (VTABLE_VERIFICATION_SPEC): Likewise.
3645         (SANITIZER_EARLY_SPEC): Likewise.
3646         (SANITIZER_SPEC): Likewise.
3647         * config/darwin.h (LINK_COMMAND_SPEC): Likewise.
3648         * doc/invoke.texi (Link Options): Document -r.
3650 2018-09-20  Richard Biener <rguenther@suse.de>
3652         PR middle-end/87054
3653         * gimplify.c (gimplify_expr): Retain alignment of
3654         addressable lvalue in dereference.
3656 2018-09-20  Alexandre Oliva <aoliva@redhat.com>
3658         PR bootstrap/87013
3659         * configure.ac: Check for .loc is_stmt support.
3660         * configure, config.in: Rebuilt.
3661         * dwarf2out.c (dwarf2out_source_line): Skip is_stmt
3662         if not supported.
3664 2018-09-20  Segher Boessenkool  <segher@kernel.crashing.org>
3666         * config/rs6000/rs6000.opt (misel=no, misel=yes): Delete.
3667         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -misel=yes and
3668         -misel=no.
3670 2018-09-20  Segher Boessenkool  <segher@kernel.crashing.org>
3672         * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
3673         VECTOR_OTHER.
3674         * config/rs6000/rs6000.c (rs6000_debug_vector_unit): Delete
3675         case VECTOR_OTHER.
3677 2018-09-20  Marek Polacek  <polacek@redhat.com>
3679         * doc/invoke.texi: Add -Wno-init-list-lifetime to C++ Language Options.
3681 2018-09-20  Richard Sandiford  <richard.sandiford@arm.com>
3683         PR tree-optimization/87288
3684         * tree-vect-loop.c (vect_analyze_loop_2): Take PEELING_FOR_GAPS
3685         into account when determining PEELING_FOR_NITERS.
3687 2018-09-20  Richard Sandiford  <richard.sandiford@arm.com>
3689         PR tree-optimization/86877
3690         * tree-vect-loop.c (vect_analyze_loop_2): Call
3691         vect_verify_datarefs_alignment.
3693 2018-09-19  Marek Polacek  <polacek@redhat.com>
3695         * doc/invoke.texi: Document -Wclass-conversion.
3697 2018-09-19  John David Anglin  <danglin@gcc.gnu.org>
3699         * config/pa/pa.c (pa_adjust_priority): Delete.
3700         (TARGET_SCHED_ADJUST_PRIORITY): Delete define.
3702         * config/pa/pa.md (atomic_storeqi): Restore deleted expander.
3703         (atomic_storehi): Likewise.
3704         (atomic_storesi): Likewise.
3705         (atomic_loaddi): Restore compare and swap exchange loop code.
3707 2018-09-19  Segher Boessenkool  <segher@kernel.crashing.org>
3709         PR rtl-optimization/86902
3710         * combine.c (try_combine): When changing the CC mode used, don't change
3711         an unrelated mode in other_insn to that new CC mode.
3713 2018-09-19  David Malcolm  <dmalcolm@redhat.com>
3715         * tree-data-ref.c (runtime_alias_check_p): Use formatted printing
3716         with %T in place of calls to dump_generic_expr.
3717         (prune_runtime_alias_test_list): Likewise.
3718         (create_runtime_alias_checks): Likewise.
3719         * tree-vect-data-refs.c (vect_check_nonzero_value): Likewise.
3720         (vect_analyze_data_ref_dependence): Likewise.
3721         (vect_slp_analyze_data_ref_dependence): Likewise.
3722         (vect_record_base_alignment): Likewise.  Use %G in place of call
3723         to dump_gimple_stmt.
3724         (vect_compute_data_ref_alignment): Likewise.
3725         (verify_data_ref_alignment): Likewise.
3726         (vect_find_same_alignment_drs): Likewise.
3727         (vect_analyze_group_access_1): Likewise.
3728         (vect_analyze_data_ref_accesses): Likewise.
3729         (dependence_distance_ge_vf): Likewise.
3730         (dump_lower_bound): Likewise.
3731         (vect_prune_runtime_alias_test_list): Likewise.
3732         (vect_find_stmt_data_reference): Likewise.
3733         (vect_analyze_data_refs): Likewise.
3734         (vect_create_addr_base_for_vector_ref): Likewise.
3735         (vect_create_data_ref_ptr): Likewise.
3736         * tree-vect-loop-manip.c (vect_set_loop_condition): Likewise.
3737         (vect_can_advance_ivs_p): Likewise.
3738         (vect_update_ivs_after_vectorizer): Likewise.
3739         (vect_gen_prolog_loop_niters): Likewise.
3740         (vect_prepare_for_masked_peels): Likewise.
3741         * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
3742         (vect_determine_vectorization_factor): Likewise.
3743         (vect_is_simple_iv_evolution): Likewise.
3744         (vect_analyze_scalar_cycles_1): Likewise.
3745         (vect_analyze_loop_operations): Likewise.
3746         (report_vect_op): Likewise.
3747         (vect_is_slp_reduction): Likewise.
3748         (check_reduction_path): Likewise.
3749         (vect_is_simple_reduction): Likewise.
3750         (vect_create_epilog_for_reduction): Likewise.
3751         (vect_finalize_reduction:): Likewise.
3752         (vectorizable_induction): Likewise.
3753         (vect_transform_loop_stmt): Likewise.
3754         (vect_transform_loop): Likewise.
3755         (optimize_mask_stores): Likewise.
3756         * tree-vect-patterns.c (vect_pattern_detected): Likewise.
3757         (vect_split_statement): Likewise.
3758         (vect_recog_over_widening_pattern): Likewise.
3759         (vect_recog_average_pattern): Likewise.
3760         (vect_determine_min_output_precision_1): Likewise.
3761         (vect_determine_precisions_from_range): Likewise.
3762         (vect_determine_precisions_from_users): Likewise.
3763         (vect_mark_pattern_stmts): Likewise.
3764         (vect_pattern_recog_1): Likewise.
3765         * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
3766         (vect_record_max_nunits): Likewise.
3767         (vect_build_slp_tree_1): Likewise.
3768         (vect_build_slp_tree_2): Likewise.
3769         (vect_print_slp_tree): Likewise.
3770         (vect_analyze_slp_instance): Likewise.
3771         (vect_detect_hybrid_slp_stmts): Likewise.
3772         (vect_detect_hybrid_slp_1): Likewise.
3773         (vect_slp_analyze_operations): Likewise.
3774         (vect_slp_analyze_bb_1): Likewise.
3775         (vect_transform_slp_perm_load): Likewise.
3776         (vect_schedule_slp_instance): Likewise.
3777         * tree-vect-stmts.c (vect_mark_relevant): Likewise.
3778         (vect_mark_stmts_to_be_vectorized): Likewise.
3779         (vect_init_vector_1): Likewise.
3780         (vect_get_vec_def_for_operand): Likewise.
3781         (vect_finish_stmt_generation_1): Likewise.
3782         (vect_check_load_store_mask): Likewise.
3783         (vectorizable_call): Likewise.
3784         (vectorizable_conversion): Likewise.
3785         (vectorizable_operation): Likewise.
3786         (vectorizable_load): Likewise.
3787         (vect_analyze_stmt): Likewise.
3788         (vect_is_simple_use): Likewise.
3789         (vect_get_vector_types_for_stmt): Likewise.
3790         (vect_get_mask_type_for_stmt): Likewise.
3791         * tree-vectorizer.c (increase_alignment): Likewise.
3793 2018-09-19  Andrew Stubbs  <ams@codesourcery.com>
3795         * doc/rtl.texi: Adjust vec_select description.
3796         * simplify-rtx.c (simplify_binary_operation_1): Allow VEC_SELECT to use
3797         non-constant selectors.
3799 2018-09-19  Matthew Malcomson  <matthew.malcomson@arm.com>
3801         * config/aarch64/aarch64-protos.h
3802         (aarch64_offset_9bit_signed_unscaled_p): New declaration.
3803         * config/aarch64/aarch64.md (arches): New "rcpc8_4" attribute value.
3804         (arch_enabled): Add check for "rcpc8_4" attribute value of "arch".
3805         * config/aarch64/aarch64.h (AARCH64_FL_RCPC8_4): New bitfield.
3806         (AARCH64_FL_FOR_ARCH8_4): Include AARCH64_FL_RCPC8_4.
3807         (AARCH64_FL_PROFILE): Move index so flags are ordered.
3808         (AARCH64_ISA_RCPC8_4): New flag.
3809         * config/aarch64/aarch64.c (offset_9bit_signed_unscaled_p): Renamed
3810         to aarch64_offset_9bit_signed_unscaled_p.
3811         * config/aarch64/atomics.md (atomic_store<mode>): Allow offset
3812         and use stlur.
3813         * config/aarch64/constraints.md (Ust): New constraint.
3814         * config/aarch64/predicates.md.
3815         (aarch64_9bit_offset_memory_operand): New predicate.
3816         (aarch64_rcpc_memory_operand): New predicate.
3818 2018-09-19  Eric Botcazou  <ebotcazou@adacore.com>
3820         PR rtl-optimization/87361
3821         * rtlanal.c (nonzero_bits1): Revert accidental change.
3823 2018-09-19  Richard Biener  <rguenther@suse.de>
3825         PR tree-optimization/87349
3826         PR tree-optimization/87342
3827         * tree-ssa-sccvn.c (do_rpo_vn): Iterate max_rpo computation.
3829 2018-09-18  Marek Polacek  <polacek@redhat.com>
3831         P1064R0 - Allowing Virtual Function Calls in Constant Expressions
3832         * gimple-fold.c (gimple_get_virt_method_for_vtable): Adjust assert.
3834 2018-09-18  Segher Boessenkool  <segher@kernel.crashing.org>
3836         * config/rs6000/rs6000.md: Remove old "Cygnus sibcall" comment.
3838 2018-09-18  Segher Boessenkool  <segher@kernel.crashing.org>
3840         PR rtl-optimization/86882
3841         * rtlanal.c (reg_overlap_mentioned_p): Handle CLOBBER.
3843 2018-09-18  Uros Bizjak  <ubizjak@gmail.com>
3845         * config/i386/i386.md (*<code>extend<mode>xf2): Macroize insn from
3846         *<code>extendsfxf2 and *<code>extenddfxf2 using MODEF mode iterator.
3848 2018-09-18  Jonathan Wakely  <jwakely@redhat.com>
3850         PR other/87353
3851         * doc/invoke.texi (Link Options): Fix formatting and grammar.
3853 2018-09-18  Richard Biener  <rguenther@suse.de>
3855         PR middle-end/63155
3856         * tree-ssa-coalesce.c (tree_int_map_hasher): Remove.
3857         (compute_samebase_partition_bases): Likewise.
3858         (coalesce_ssa_name): Always use compute_optimized_partition_bases.
3859         (gimple_can_coalesce_p): Simplify.
3861 2018-09-18  Hans-Peter Nilsson  <hp@bitrange.com>
3863         Handle a library implementation of ffs calling __builtin_ffs.
3864         * config/mmix/mmix.c (TARGET_INIT_LIBFUNCS): Override with...
3865         (mmix_init_libfuncs): New function: make __builtin_ffs expand
3866         to __ffsdi2.
3868 2018-09-17  David Malcolm  <dmalcolm@redhat.com>
3870         * diagnostic-show-locus.c (class layout_range): Add field
3871         "m_original_idx".
3872         (layout_range::layout_range): Add "original_idx" param and use it
3873         to initialize new field.
3874         (make_range): Use 0 for original_idx.
3875         (layout::layout): Pass in index to calls to
3876         maybe_add_location_range.
3877         (layout::maybe_add_location_range): Add param "original_idx" and
3878         pass it on to layout_range.
3879         (layout::print_any_labels): Pass on range->m_original_idx to
3880         get_text call.
3881         (gcc_rich_location::add_location_if_nearby): Use 0 for
3882         original_idx.
3883         * gcc-rich-location.h (text_range_label::get_text): Update for new
3884         param.
3885         (range_label_for_type_mismatch::get_text): Likewise.
3887 2018-09-17  Uros Bizjak  <ubizjak@gmail.com>
3889         * config/i386/i386.c (ix86_emit_i387_log1p): Emit fldln2 earlier.
3891 2018-09-17  David Malcolm  <dmalcolm@redhat.com>
3893         * gimple-ssa-sprintf.c (fmtwarn): Update for introduction of
3894         format_string_diagnostic_t.
3895         (fmtwarn_n): Likewise.
3896         * substring-locations.c
3897         (format_string_diagnostic_t::format_string_diagnostic_t) New ctor.
3898         (format_warning_n_va): Convert to...
3899         (format_string_diagnostic_t::emit_warning_n_va): ...this.
3900         (format_warning_va): Convert to...
3901         (format_string_diagnostic_t::emit_warning_va): ...this.
3902         (format_warning_at_substring): Convert to...
3903         (format_string_diagnostic_t::emit_warning): ...this.
3904         (format_warning_at_substring_n): Convert to...
3905         (format_string_diagnostic_t::emit_warning_n): ...this.
3906         * substring-locations.h (class format_string_diagnostic_t): New
3907         class.
3908         (format_warning_va): Convert to
3909         format_string_diagnostic_t::emit_warning_va.
3910         (format_warning_n_va): Convert to
3911         format_string_diagnostic_t::emit_warning_n_va.
3912         (format_warning_at_substring): Convert to
3913         format_string_diagnostic_t::emit_warning.
3914         (format_warning_at_substring_n): Convert to
3915         format_string_diagnostic_t::emit_warning_n.
3917 2018-09-17  Cesar Philippidis  <cesar@codesourcery.com>
3918             Bernd Schmidt <bernds_cb1@t-online.de>
3920         * config/nvptx/nvptx.md (atomic_fetch_<logic><mode>): Enable with
3921         SImode args.
3923 2018-09-17  Uros Bizjak  <ubizjak@gmail.com>
3925         * config/i386/i386.md (truncxf<mode>2_i387_noop_unspec): Change
3926         operand 0 predicate to nonimmediate operand.
3927         (rint<mode>2_frndint): Remove insn pattern.
3928         (rint<mode>2): Change operand 1 predicate to general_operand.
3929         Extend operand 1 to XFmode and generate rintxf2 insn.
3930         (frndintxf2_<rounding>): Rename from frndint<mode>2_<rounding>.
3931         Do not use X87MODEF mode macro.
3932         (frndintxf2_<rounding>_i387): Rename from
3933         frndint<mode>2_<rounding>_i387.  Do not use X87MODEF mode macro.
3934         (<rounding_insn><mode>2): For non-SSE modes, extend operand 1
3935         to XFmode and generate significandxf3 insn.
3937 2018-09-17  Richard Biener  <rguenther@suse.de>
3939         PR tree-optimization/87328
3940         * tree-ssa-sccvn.c (process_bb): Remove assertion about not
3941         visiting unexecutable backedges when not iterating.
3942         (do_rpo_vn): Mark all edges not executable even when not
3943         iterating.
3945 2018-09-17  Martin Jambor  <mjambor@suse.cz>
3947         PR c/63886
3948         * doc/invoke.texi (Warning Options): Likewise.
3950 2018-09-17  Richard Biener  <rguenther@suse.de>
3952         PR tree-optimization/87301
3953         * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_cleanup): Properly
3954         clean EH info from leftover copy assignments.
3956 2018-09-17  Martin Liska  <mliska@suse.cz>
3958         PR gcov-profile/85871
3959         * gcov.c (output_intermediate_file): Fix out of bounds
3960         access.
3962 2018-09-17  Vineet Gupta  <vgupta@synopsys.com>
3964         * config/arc/arc.c: Object attributes for core4 not reflected
3965         correctly.
3966         * config/arc/arc.h: Don't restrict DBNZ to core3 (core4 includes
3967         core3).
3969 2018-09-17  Alexey Brodkin  <abrodkin@synopsys.com>
3971         * config/arc/linux.h (LINK_EH_SPEC): Add missing space.
3973 2018-09-17  Martin Liska  <mliska@suse.cz>
3975         * doc/gcov.texi: Document new option --use-hotness-colors.
3976         * gcov.c (struct source_info): Declare new field.
3977         (source_info::source_info): Set default for maximum_count.
3978         (print_usage): Add new -q option.
3979         (process_args): Process it.
3980         (accumulate_line_info): Save src->maximum_count.
3981         (output_line_beginning): Make color line number if
3982         flag_use_hotness_colors is set.
3983         (output_line_details): Pass default argument value.
3984         (output_lines): Pass src->maximum_count.
3986 2018-09-17  Martin Liska  <mliska@suse.cz>
3988         * common/config/i386/i386-common.c (ix86_get_valid_option_values):
3989         Use processor_names table.
3990         * config/i386/i386.c (ix86_default_align): Use
3991         processor_cost_table for alignment values.
3992         (ix86_option_override_internal): Use processor_names.
3993         (ix86_function_specific_print): Likewise.
3994         * config/i386/i386.h (struct processor_costs):
3995         Add alignment values.
3996         (struct ptt): Remove and replace with const char *.
3997         * config/i386/x86-tune-costs.h (struct processor_costs):
3998         Declare default alignments for all costs.
4000 2018-09-17  Aldy Hernandez  <aldyh@redhat.com>
4002         * tree-vrp.c (extract_range_from_unary_expr): Do not special case
4003         symbolics or VR_VARYING ranges for ABS_EXPR.
4004         * wide-int-range.cc (wide_int_range_abs): Return positive numbers
4005         when range will wrap.
4007 2018-09-15  Eric Botcazou  <ebotcazou@adacore.com>
4009         PR middle-end/86864
4010         * cfgexpand.c (expand_gimple_basic_block): Be prepared for a BARRIER
4011         before and after a JUMP_TABLE_DATA.
4013 2018-09-14  John David Anglin  <danglin@gcc.gnu.org>
4015         PR middle-end/87188
4016         * dojump.c (do_compare_and_jump): Canonicalize function pointers
4017         when one operand is a function pointer.  Use POINTER_TYPE_P and
4018         FUNC_OR_METHOD_TYPE_P.
4019         * expr.c (do_store_flag): Use POINTER_TYPE_P and FUNC_OR_METHOD_TYPE_P.
4020         * fold-const.c (build_range_check): Likewise.
4021         * match.pd (simple_comparison): Likewise.
4023 2018-09-14  David Malcolm  <dmalcolm@redhat.com>
4025         PR c/82967
4026         * spellcheck.c (get_edit_distance_cutoff): New function.
4027         (selftest::test_edit_distance_unit_test_oneway): Rename to...
4028         (selftest::test_get_edit_distance_one_way): ...this.
4029         (selftest::test_get_edit_distance_unit): Rename to...
4030         (selftest::test_get_edit_distance_both_ways): ...this.
4031         (selftest::test_edit_distances): Move tests to this new function,
4032         and test some more pairs of strings.  Update for above renaming.
4033         (selftest::get_old_cutoff): New function.
4034         (selftest::test_get_edit_distance_cutoff): New function.
4035         (selftest::assert_suggested_for): New function.
4036         (ASSERT_SUGGESTED_FOR): New macro.
4037         (selftest::assert_not_suggested_for): New function.
4038         (ASSERT_NOT_SUGGESTED_FOR): New macro.
4039         (selftest::test_suggestions): New function.
4040         (selftest::spellcheck_c_tests): Move test_get_edit_distance_unit
4041         tests to selftest::test_edit_distances and call it.  Add calls to
4042         selftest::test_get_edit_distance_cutoff and
4043         selftest::test_suggestions.
4044         * spellcheck.h (get_edit_distance_cutoff): New function declaration.
4045         (best_match::consider): Replace hard-coded cutoff calculation with
4046         a call to...
4047         (best_match::get_cutoff): New declaration.
4048         (best_match::get_best_meaningful_candidate): Likewise.
4050 2018-09-14  Bernd Edlinger  <bernd.edlinger@hotmail.de>
4052         * builtins.c (fold_builtin_strlen): Remove TODO comment.
4054 2018-09-14  Bernd Edlinger  <bernd.edlinger@hotmail.de>
4056         revert:
4057         2018-07-30  Bernd Edlinger  <bernd.edlinger@hotmail.de>
4059         * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
4060         terminated string literal.
4062 2018-09-14  Martin Sebor  <msebor@redhat.com>
4064         * builtins.c (unterminated_array): Handle ARRAY_REF.
4065         (expand_builtin_stpcpy_1): Detect unterminated char arrays.
4066         * builtins.h (unterminated_array): Declare extern.
4067         * gimple-fold.c (gimple_fold_builtin_stpcpy): Detect unterminated
4068         arrays.
4069         (gimple_fold_builtin_sprintf): Propagate NO_WARNING to transformed
4070         calls.
4072 2018-09-14  Martin Sebor  <msebor@redhat.com>
4073             Jeff Law  <law@redhat.com>
4075         * builtins.c (unterminated_array): New.
4076         (expand_builtin_strcpy): Adjust.
4077         (expand_builtin_strcpy_args): Detect unterminated arrays.
4078         * gimple-fold.c (get_maxval_strlen): Add argument.  Detect
4079         unterminated arrays.
4080         * gimple-fold.h (get_maxval_strlen): Add argument.
4081         (gimple_fold_builtin_strcpy): Detec unterminated arrays.
4083         * gimple-fold.c (get_range_strlen): Add argument.
4084         (get_maxval_strlen): Adjust.
4085         * gimple-fold.h (get_range_strlen): Add argument.
4087 2018-09-14  Wei Xiao  <wei3.xiao@intel.com>
4089         * config/i386/movdirintrin.h: Fix copyright year.
4091 2018-09-14  Uros Bizjak  <ubizjak@gmail.com>
4093         * reg-stack.c: Include regs.h.
4094         (replace_reg): Assert that mode is MODE_FLOAT or MODE_COMPLEX_FLOAT.
4095         (emit_pop_insn): Default pop insn mode to the reg_raw_mode of
4096         FIRST_STACK_REG, not DFmode.
4097         (emit_swap_insn): Default swap insn mode to the reg_raw_mode of
4098         FIRST_STACK_REG, not XFmode.  Explicitly construct swap RTX.
4099         (change stack): Default register mode to the reg_raw_mode of
4100         FIRST_STACK_REG, not DFmode.
4101         * config/i386/i386.md (*swap<mode>): Remove insn pattern.
4102         (*swapxf): Rename from swapxf.
4104 2018-09-14  Carl Love  <cel@us.ibm.com>
4106         * config/rs6000/emmintrin.h: Add _MM_SHUFFLE2.
4107         * config/rs6000/xmmintrin.h: Add _MM_SHUFFLE.
4109 2018-09-14  Segher Boessenkool  <segher@kernel.crashing.org>
4111         PR target/87224
4112         * config/rs6000/rs6000.md (*mov<mode>_hardfloat64): Add Z to the Y
4113         alternatives.
4115 2018-09-14  Sam Tebbs  <sam.tebbs@arm.com>
4117         PR target/85628
4118         * config/aarch64/aarch64.md (*aarch64_bfxilsi_uxtw): Define.
4120 2018-09-14  Jason Merrill  <jason@redhat.com>
4122         Fix --enable-gather-detailed-mem-stats.
4123         * hash-table.c (hash_table_usage): Change from variable to function.
4124         * hash-table.h: Adjust.
4125         * Makefile.in: Add missing dependencies on hash-table.h.
4127 2018-09-14  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
4129         PR tree-optimization/87259
4130         PR lto/87283
4131         (pass_cse_reciprocals::execute): Run optimize_recip_sqrt after
4132         execute_cse_reciprocals_1 has tried transforming.
4134 2018-09-14  Aldy Hernandez  <aldyh@redhat.com>
4136         * tree-vrp.c (extract_range_from_binary_expr_1): Normalize
4137         VR_VARYING for PLUS/MINUS_EXPR.
4139 2018-09-14  Ilya Leoshkevich  <iii@linux.ibm.com>
4141         * config/s390/s390-passes.def (INSERT_PASS_BEFORE): Improve
4142         formatting.
4144 2018-09-14  Richard Biener  <rguenther@suse.de>
4146         PR middle-end/63155
4147         * tree-ssa-coalesce.c (ssa_conflicts_merge): Remove conflict
4148         bits for the merged partition.
4150 2018-09-13  Martin Sebor  <msebor@redhat.com>
4151             Bernd Edlinger  <bernd.edlinger@hotmail.de>
4153         * builtins.h (c_srlen): Add argument.
4154         * builtins.c (warn_string_no_nul): New function.
4155         (c_strlen): Add argument and use it.  Update recursive calls.
4156         Pass DECL argument to string_constant to get info on non
4157         terminated strings.  Update *NONSTR as needed.
4158         (fold_builtin_strlen): Add argument to calls to c_strlen.
4159         Warn for unterminated arrays.
4160         (warn_string_no_null): Add prototype.
4161         * expr.c (string_constant): Update arguments.  Update recursive
4162         calls appropriately.  Detect missing NUL terminator and outermost
4163         declaration its missing in.
4164         Improve checks for arrays with nonzero lower bound or elements
4165         that are not a single byte.  Simplify offset computation.
4166         Simplify checks for non-NUL terminated strings.
4167         * gimple-fold.c (get_range_strlen): Add argument to c_strlen call.
4168         * gimple-ssa-sprintf.c (get_string_length): Remove unnecessary code.
4170 2018-09-13  Bernd Edlinger  <bernd.edlinger@hotmail.de>
4172         * builtins.c (c_strlen): Handle not zero terminated STRING_CSTs
4173         correctly.
4174         * fold-const.c (c_getstr): Fix function comment.  Remove unused third
4175         argument.  Fix range checks.
4176         * fold-const.h (c_getstr): Adjust protoype.
4177         * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid folding when
4178         string is constant but contains no NUL byte.
4180         * expr.c (string_constant): Adjust function comment.
4181         Remove bogus check for zero termination.
4183         * fold-const.c (c_getstr): Clamp STRING_LENGTH to STRING_SIZE.
4185         * varasm.c (compare_constant): Compare type size of STRING_CSTs.
4186         (get_constant_size): Don't make STRING_CSTs larger than they are.
4187         (check_string_literal): New check function for STRING_CSTs.
4188         (output_constant): Use it.
4190 2018-09-13  Eric Botcazou  <ebotcazou@adacore.com>
4192         PR target/86812
4193         * config/visium/visium.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define.
4195 2018-09-13  Richard Biener  <rguenther@suse.de>
4197         PR tree-optimization/87263
4198         * tree-ssa-sccvn.c (visit_phi): Revert some earlier changes.
4199         (struct unwind_state): Add max_rpo field.
4200         (do_rpo_vn): Allow up-to-date loop state to be used when not iterating.
4201         Compute max_rpo, the max RPO number a block can be backwards reached
4202         from.  Re-write non-iterating mode to a RPO ordered worklist approach,
4203         separating it from the iterating mode.
4205 2018-09-13  Vlad Lazar  <vlad.lazar@arm.com>
4207         * haifa-sched.c (rank_for_schedule): Schedule by INSN_COST.
4208         (rfs_decision): New scheduling decision.
4210 2018-09-13  Richard Biener  <rguenther@suse.de>
4212         PR bootstrap/87134
4213         * tree-ssa-sccvn.c (vn_nary_op_insert_into): Fix assert.
4214         (vn_nary_op_insert_pieces_predicated): Do not write useless
4215         valid_dominated_by_p entry outside of the allocated storage.
4217 2018-09-13  Omar Sandoval  <osandov@osandov.com>
4218             Tom de Vries  <tdevries@suse.de>
4220         PR debug/86985
4221         * dwarf2out.c (is_c): New function.
4222         (add_subscript_info): Add DW_AT_count of 0 for C zero-length arrays.
4224 2018-09-13  Sam Tebbs  <sam.tebbs@arm.com>
4226         PR target/85628
4227         * config/aarch64/aarch64.md (*aarch64_bfxil):
4228         Define.
4229         * config/aarch64/constraints.md (Ulc): Define.
4230         * config/aarch64/aarch64-protos.h (aarch64_high_bits_all_ones_p):
4231         Define.
4232         * config/aarch64/aarch64.c (aarch64_high_bits_all_ones_p):
4233         New function.
4235 2018-09-13  Vlad Lazar  <vlad.lazar@arm.com>
4237         * config/aarch64/aarch64.h (TARGET_COMPUTE_FRAME_LAYOUT): Define.
4238         * config/aarch64/aarch64.c (aarch64_expand_prologue): Remove
4239         aarch64_layout_frame call.
4240         (aarch64_expand_epilogue): Likewise.
4241         (aarch64_initial_elimination_offset): Likewise.
4242         (aarch64_get_separate_components): Likewise.
4243         (aarch64_use_return_insn_p): Likewise.
4244         (aarch64_layout_frame): Remove unneeded check.
4246 2018-09-13  Jakub Jelinek  <jakub@redhat.com>
4248         * configure.ac: Only append
4249         " : (reconfigured) $TOPLEVEL_CONFIGURE_ARGUMENTS" to
4250         gcc_config_arguments if it was never reconfigured or last reconfigure
4251         was with different arguments.
4252         * configure: Regenerated.
4254 2018-09-13  Jakub Jelinek  <jakub@redhat.com>
4255             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
4257         PR middle-end/87290
4258         * expr.c (maybe_optimize_pow2p_mod_cmp): New function.
4259         (maybe_optimize_mod_cmp): Use it if integer_pow2p treeop1.
4261 2018-09-13  Jakub Jelinek  <jakub@redhat.com>
4263         PR tree-optimization/87287
4264         * fold-const.c (fold_binary_loc) <case EQ_EXPR>: Move signed modulo
4265         X % C == 0 to X % (unsigned) C == 0 optimization to ...
4266         * match.pd (X % C == 0): ... here.  New optimization.
4268 2018-09-12  Jakub Jelinek  <jakub@redhat.com>
4270         PR middle-end/82853
4271         * expr.h (maybe_optimize_mod_cmp): Declare.
4272         * expr.c (mod_inv): New function.
4273         (maybe_optimize_mod_cmp): New function.
4274         (do_store_flag): Use it.
4275         * cfgexpand.c (expand_gimple_cond): Likewise.
4277 2018-09-09  Cesar Philippidis  <cesar@codesourcery.com>
4278             Julian Brown  <julian@codesourcery.com>
4280         PR middle-end/86336
4281         * gimplify.c (gimplify_scan_omp_clauses): Set
4282         target_firstprivatize_array_bases in OpenACC parallel and kernels
4283         region contexts.  Remove GOMP_MAP_FIRSTPRIVATE_REFERENCE clauses from
4284         OpenACC data regions.
4286 2018-09-12  Uros Bizjak  <ubizjak@gmail.com>
4288         * config/i386/i386.md (sqrt_extend<mode>xf3_i387): Remove.
4289         (sqrt<mode>2): Extend operand 1 to XFmode and generate sqrtxf3 insn.
4291 2018-09-12  Richard Biener  <rguenther@suse.de>
4293         PR tree-optimization/87280
4294         * tree-ssa-sccvn.c (process_bb): Handle the case of executable
4295         edge but unreachable target.
4296         (do_rpo_vn): For conservatively handling a PHI only mark
4297         the backedge executable but not the block reachable.
4299 2018-09-12  Richard Biener  <rguenther@suse.de>
4301         PR tree-optimization/87266
4302         * tree-ssa-sccvn.c (do_rpo_vn): Always iterate to not yet
4303         visited blocks.
4305 2018-09-12  Andreas Krebbel  <krebbel@linux.ibm.com>
4307         * config/s390/s390.md (PFPO_RND_MODE_DFP, PFPO_RND_MODE_BFP): New
4308         constants.
4309         ("trunc<BFP:mode><DFP_ALL:mode>2")
4310         ("trunc<DFP_ALL:mode><BFP:mode>2")
4311         ("extend<BFP:mode><DFP_ALL:mode>2")
4312         ("extend<DFP_ALL:mode><BFP:mode>2"): Set proper rounding mode
4313         according to the target operand type.
4315 2018-09-12  Jakub Jelinek  <jakub@redhat.com>
4316             Andreas Krebbel  <krebbel@linux.ibm.com>
4318         PR tree-optimization/86844
4319         * gimple-ssa-store-merging.c
4320         (imm_store_chain_info::coalesce_immediate): For overlapping stores, if
4321         there are any overlapping stores in between them, make sure they are
4322         also coalesced or we give up completely.
4324 2018-09-12  Jakub Jelinek  <jakub@redhat.com>
4326         PR middle-end/87248
4327         * fold-const.c (fold_ternary_loc) <case COND_EXPR>: Verify also that
4328         BIT_AND_EXPR's second operand is a power of two.  Formatting fix.
4330 2018-09-12  Tom de Vries  <tdevries@suse.de>
4332         * common.opt (gdescribe-dies): Add option.
4333         * dwarf2out.c (add_name_and_src_coords_attributes): Add description
4334         attribute for artifical and nameless decls.
4335         (dwarf2out_register_external_die): Add description attribute to
4336         external reference die.
4337         (add_desc_attribute): New functions.
4338         (gen_subprogram_die): Add description attribute to
4339         DW_TAG_call_site_parameter.
4340         * tree-pretty-print.c (print_generic_expr_to_str): New function.
4341         * tree-pretty-print.h (print_generic_expr_to_str): Declare.
4342         * doc/invoke.texi (@item Debugging Options): Add -gdescribe-dies and
4343         -gno-describe-dies.
4344         (@item -gdescribe-dies): Add.
4346 2018-09-12  Aldy Hernandez  <aldyh@redhat.com>
4348         * tree-vrp.c (vrp_shift_undefined_p): Remove.
4349         (extract_range_from_binary_expr_1: Call
4350         wide_int_range_shift_undefined_p instead of vrp_shift_undefined_p.
4351         * wide-int-range.h (wide_int_range_shift_undefined_p): Do not
4352         depend on sign.
4354 2018-09-12  Aldy Hernandez  <aldyh@redhat.com>
4356         * gimple-ssa-warn-alloca.c
4357         (alloca_type_and_limit::alloca_type_and_limit): Initialize limit
4358         field for ALLOCA_BOUND_*_LARGE.
4360 2018-09-11  Nathan Sidwell  <nathan@acm.org>
4362         * gcc.c (load_specs, execute, run_attempt): Use %qs not '%s'.
4364 2018-09-11  Uros Bizjak  <ubizjak@gmail.com>
4366         * reg-stack.c (subst_asm_stack_regs): Call replace_reg also
4367         for clobbers.  Remove obsolete comment.
4369 2018-09-11  Uros Bizjak  <ubizjak@gmail.com>
4371         * config/i386/i386.md (define_attr "type"): Remove mpxmov, mpxmk,
4372         mpxchk, mpxld and mpxst types.
4373         (define_attr length_immediate): Remove all processing of mpx types.
4374         (define_attr prefix_0f): Ditto.
4375         (define_attr memory): Ditto.
4377 2018-09-11  Uros Bizjak  <ubizjak@gmail.com>
4379         * config/i386/i386.md (fyl2x_extend<mode>xf3_i387): Remove.
4380         (log<mode>2): Change operand 1 predicate to general_operand.
4381         Extend operand 1 to XFmode and generate logxf3 insn.
4382         (log10<mode>2): Change operand 1 predicate to general_operand.
4383         Extend operand 1 to XFmode and generate log10xf3 insn.
4384         (log2<mode>2): Change operand 1 predicate to general_operand.
4385         Extend operand 1 to XFmode and generate log2xf3 insn.
4386         (fyl2xp1_extend<mode>xf3_i387): Remove.
4387         (log1p<mode>2): Change operand 1 predicate to general_operand.
4388         Extend operand 1 to XFmode and generate log1pxf3 insn.
4389         (fxtract_extend<mode>xf3_i387): Remove.
4390         (logb<mode>2): Change operand 1 predicate to general_operand.
4391         Extend operand 1 to XFmode and generate logbxf3 insn.
4392         (ilogb<mode>2): Change operand 1 predicate to general_operand.
4393         Extend operand 1 to XFmode and generate fxtractxf3_i387 insn.
4394         (significand<mode>2): Change operand 1 predicate to general_operand.
4395         Extend operand 1 to XFmode and generate significandxf3 insn.
4397 2018-09-11  Nathan Sidwell  <nathan@acm.org>
4399         * gcc.c (perror_with_name, pfatal_with_name): Delete.
4400         (load_specs): Use fatal_error.
4401         (DELETE_IF_ORDINARY, process_command): Use error.
4402         (execute, run_attempt): Use fatal_error.
4404 2018-09-11  Andrew Stubbs  <ams@codesourcery.com>
4406         * diagnostic-core.h (sorry_at): New prototype.
4407         * diagnostic.c (sorry_at): New function.
4409 2018-09-11  Aldy Hernandez  <aldyh@redhat.com>
4411         * tree-vrp.c (extract_range_from_binary_expr_1): Treat all divisions
4412         by zero as VR_UNDEFINED.
4414 2018-09-10  Uros Bizjak  <ubizjak@gmail.com>
4416         * config/i386/i386.md (<sincos>xf2): Rename from *<sincos>xf2_i387.
4417         (*<sincos>_extend<mode>xf2_i387): Remove insn pattern.
4418         (<sincos>mode2): New expander.
4419         (sincos_extend<mode>xf3_i387): Remove insn pattern.
4420         (sincos -> sin, cos splitters): Remove splitter patterns.
4421         (sincos<mode>3): Change operand 2 predicate to general_operand.
4422         Extend operand 2 to XFmode and generate sincosxf3 insn.
4423         (fptanxf4_i387): Change mode of operands 0 and 3 to SFmode.
4424         Change operand 3 predicate to const1_operand.
4425         (fptan_extend<mode>xf4_i387): Remove insn pattern.
4426         (tanxf2): Update operands in the call to fptanxf4_i387.
4427         (tan<mode>2): Change operand 1 predicate to general_operand.
4428         Extend operand 1 to XFmode and generate tanxf3 insn.
4429         (atan2xf3): Rename from *fpatanxf3_i387.
4430         (fpatan_extend<mode>xf3_i387): Remove insn pattern.
4431         (atan2xf3): Remove expander.
4432         (atan2<mode<3):  Change operand 1 and 2 predicates to general_operand.
4433         Extend operands 1 and 2 to XFmode and generate atan2xf3 insn.
4434         (atan<mode>2): Change operand 1 predicate to general_operand.
4435         Extend operand 1 to XFmode and generate atanxf3 insn.
4437 2018-09-10  Uros Bizjak  <ubizjak@gmail.com>
4439         * config/i386/i386.md (x87/SSE constant load splitter): Use
4440         memory_operand instead of nonimmediate_operand for input operand
4441         predicate.
4443 2018-09-09  Uros Bizjak  <ubizjak@gmail.com>
4445         * config/i386/i386.md (float partial SSE register stall splitter): Move
4446         splitter near its instruction pattern.
4447         (float_extend partial SSE register stall splitter): Ditto.
4448         (float_truncate partial SSE register stall splitter): Ditto.
4450 2018-09-09  Hans-Peter Nilsson  <hp@bitrange.com>
4452         PR target/86794
4453         * config/mmix/mmix.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
4454         to speculation_safe_value_not_needed.
4456         PR target/85666
4457         * config/mmix/mmix.c (mmix_assemble_integer): Handle byte-size
4458         non-CONST_INT rtx:es using assemble_integer_with_op ".byte".
4459         (MMIX_CFUN_NEEDS_SAVED_EH_RETURN_ADDRESS): Don't call
4460         leaf_function_p, instead use has_hard_reg_initial_val.
4462 2018-09-09  Nathan Sidwell  <nathan@acm.org>
4464         * gcc.h (pfatal_with_name): Don't declare here.
4465         * gcc.c (pfatal_with_name): Make static.
4467 2018-09-09  Xianmiao Qu  <xianmiao_qu@c-sky.com>
4469         * config/csky/csky.md (*cskyv2_adddi3, *cskyv2_subdi3): Add
4470         earlyclobber.
4472 2018-09-08  John David Anglin  <danglin@gcc.gnu.org>
4474         PR rtl-optimization/85458
4475         * sel-sched.c (sel_target_adjust_priority): Allow backend adjust
4476         priority hook to reduce the priority of EXPR.
4478 2018-09-07  Uros Bizjak  <ubizjak@gmail.com>
4480         * config/i386/i386.md (float<SWI48x:mode><MODEF:mode>2) Enable
4481         DImode for x87 on 32bit targets.  Conditionally disable x87 modes
4482         with X87_ENABLE_FLOAT.  Remove preparation code.
4483         (*float<SWI48:mode><MODEF:mode>2): Rename from
4484         *float<SWI48:mode><MODEF:mode>2_mixed.  Handle x87, SSE and mixed
4485         math using "enabled" attribute.
4486         (*floatdi<MODEF:mode>2_i387): Rename from
4487         *float<SWI48x:mode><MODEF:mode>2_i387.  Handle only DImode and
4488         enable for 32bit targets only.
4489         (floatdi<X87MODEF:mode>2_i387_with_xmm pre-reload splitter): New
4490         splitter.
4491         (floatdi<X87MODEF:mode>2_i387_with_xmm): Use register_operand
4492         as operand 1 predicate.  Rewrite as define_insn_and_split.
4493         (floatdi<X87MODEF:mode>2_i387_with_xmm memory input splitter): Remove.
4495 2018-09-06  Uros Bizjak  <ubizjak@gmail.com>
4497         * reg-stack.c (get_true_reg) <case FLOAT_TRUNCATE>: Reorder
4498         to fallthru to FLOAT case.
4500 2018-09-06  Will Schmidt  <will_schmidt@vnet.ibm.com>
4502         PR target/86731
4503         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Update logic
4504         around folding of vec_sl to handle out of range shift values.
4506 2018-09-06  Uros Bizjak  <ubizjak@gmail.com>
4508         * config/i386/i386.md (fix_trunc<mode>_fisttp_i387_1): Remove.
4509         Update callers to gen_fix_trunc<mode>_i387_fisttp
4510         (fix_trunc<mode>_i387_fisttp): Change operand 0 predicate to
4511         nonimmediate_operand.
4512         (fix_trunc<mode>_i387_fisttp_with_temp): Remove insn pattern
4513         and corresponding splitters.
4514         (*fix_trunc<mode>_i387_1): Always expand with fix_trunc<mode>_i387.
4515         (fix_truncdi_i387): Change operand 0 predicate to nonimmediate_operand.
4516         (fix_truncdi_i387_with_temp): Remove insn pattern
4517         and corresponding splitters.
4518         (fix_trunc<mode>_i387): Change operand 0 predicate to
4519         nonimmediate_operand.
4520         (fix_trunc<mode>_i387_with_temp): Remove insn pattern
4521         and corresponding splitters.
4522         (*fistdi2_1): Remove.
4523         (fistdi2): Ditto.
4524         (fistdi2_with_temp): Remove insn pattern and corresponding splitters.
4525         (lrintxfdi2): Remove expander.  Reimplement as define_insn.
4526         (*fist<mode>2_1): Remove.
4527         (fist<mode>2): Ditto.
4528         (fist<mode>2_with_temp): Remove insn pattern and corresponding
4529         splitters.
4530         (lrintxf<mode>2): Remove expander.  Reimplement as define_insn.
4531         (*fist<mode>2_<rounding>_1): Always expand with fist<mode>2_<rounding>.
4532         (fistdi2_<rounding>): Change operand 0 predicate to
4533         nonimmediate_operand.
4534         (fistdi2_<rounding>_with_temp): Remove insn pattern
4535         and corresponding splitters.
4536         (fist<mode>2_<rounding>): Change operand 0 predicate to
4537         nonimmediate_operand.
4538         (fist<mode>2_<rounding>_with_temp): Remove insn pattern
4539         and corresponding splitters.
4541         (*fixuns_trunc<mode>si2_avx512f_zext): Depend on TARGET_SSE_MATH.
4543 2018-09-06  Bernd Edlinger  <bernd.edlinger@hotmail.de>
4545         * varasm.c (output_constructor_regular_field): Check TYPE_SIZE_UNIT of
4546         the init value.
4548 2018-09-06  Will Schmidt  <will_schmidt@vnet.ibm.com>
4550         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support for
4551         early gimple folding of vec_splat().
4552         * tree-vect-generic.c: Remove static from tree_vec_extract() definition.
4553         * gimple-fold.h: Add an extern define for tree_vec_extract().
4555 2018-09-06  Will Schmidt  <will_schmidt@vnet.ibm.com>
4557         * config/rs6000/rs6000.c (fold_mergehl_helper): Add types_compatible_p
4558         wrappers around TREE_TYPE comparisons.
4560 2018-09-06  Ilya Leoshkevich  <iii@linux.ibm.com>
4562         PR target/80080
4563         * config/s390/predicates.md: Add nonsym_memory_operand.
4564         * config/s390/s390.c (s390_legitimize_cs_operand): If operand
4565         contains a SYMBOL_REF, load it into an intermediate pseudo.
4566         (s390_emit_compare_and_swap): Legitimize operand.
4567         * config/s390/s390.md: Use the new nonsym_memory_operand
4568         with UNSPECV_CAS patterns.
4570 2018-09-06  Ilya Leoshkevich  <iii@linux.ibm.com>
4572         PR target/80080
4573         * config/s390/s390-passes.def: New file.
4574         * config/s390/s390-protos.h (class rtl_opt_pass): Add forward
4575         declaration.
4576         (make_pass_s390_early_mach): Add declaration.
4577         * config/s390/s390.c (make_pass_s390_early_mach):
4578         (s390_option_override): Remove dynamic registration.
4579         * config/s390/t-s390: Add s390-passes.def.
4581 2018-09-06  Ilya Leoshkevich  <iii@linux.ibm.com>
4583         * config/s390/s390.c (s390_decompose_constant_pool_ref):
4584         Remove UNSPEC_LTREL_BASE check.
4585         (annotate_constant_pool_refs): Likewise.
4586         (find_constant_pool_ref): Likewise.
4587         (find_ltrel_base): Removed.
4588         (replace_ltrel_base): Removed.
4589         (s390_mainpool_finish): Remove replace_ltrel_base call.
4590         (s390_chunkify_start): Remove pending LTREL_BASE logic.
4591         (s390_chunkify_finish): Remove replace_ltrel_base call.
4592         * config/s390/s390.md: Remove UNSPEC_LTREL_BASE.
4594 2018-09-06  Hans-Peter Nilsson  <hp@axis.com>
4596         PR target/86779
4597         * config/cris/cris.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
4598         to speculation_safe_value_not_needed.
4600 2018-09-05  Cesar Philippidis  <cesar@codesourcery.com>
4601             Bernd Schmidt  <bernds_cb1@t-online.de>
4603         * config/nvptx/nvptx-opts.h: New file.
4604         * config/nvptx/nvptx.c (nvptx_file_start): Print the correct .target.
4605         * config/nvptx/nvptx.h: Include "nvptx-opts.h".
4606         (ASM_SPEC): Define.
4607         (TARGET_SM35): New macro.
4608         * config/nvptx/nvptx.md (atomic_fetch_<logic><mode>): Enable with the
4609         correct predicate.
4610         * config/nvptx/nvptx.opt (ptx_isa, sm_30, sm_35): New enum and its
4611         values.
4612         (misa=): New option.
4613         * doc/invoke.texi (Nvidia PTX Options): Document -misa.
4615 2018-09-05  Uros Bizjak  <ubizjak@gmail.com>
4617         * config/i386/i386.md (truncdfsf2): Remove expander.
4618         (truncdfsf2_with_temp): Ditto.
4619         (truncxf<mode>2): Ditto.
4620         (*truncdfsf_fast_mixed): Remove insn pattern.
4621         (*truncdfsf_fast_i387): Ditto.
4622         (*truncdfsf_mixed): Ditto.
4623         (*truncdfsf_i387): Ditto.
4624         (*truncdfsf2_i387_1): Ditto.
4625         (*truncxfsf2_mixed): Ditto.
4626         (*truncxfdf2_mixed): Ditto.
4627         (*truncxf<mode>2_i387_noop): Ditto. Update callers
4628         to call gen_truncxf<mode>2 instead.
4629         (*truncxf<mode>2_i387): Remove.
4630         (reg->reg splitters): Remove splitter pattern.
4631         (reg->mem splitters): Ditto.
4633         (truncdfsf2): New insn pattern.
4634         (truncxf<mode>2): Ditto.
4636 2018-09-05  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
4638         * tree-ssa-math-opts.c (is_mult_by): New function.
4639         (is_square_of): Use the above.
4640         (optimize_recip_sqrt): New function.
4641         (pass_cse_reciprocals::execute): Use the above.
4643 2018-09-05  Richard Biener  <rguenther@suse.de>
4645         PR bootstrap/87134
4646         * tree-ssa-sccvn.c (rpo_elim::eliminate_push_avail): Make sure
4647         to zero-init the emplaced vec.
4649 2018-09-05  Martin Liska  <mliska@suse.cz>
4651         PR tree-optimization/87205
4652         * tree-switch-conversion.c (pass_lower_switch::execute):
4653         Group cases for switch statements.
4655 2018-09-05  Richard Biener  <rguenther@suse.de>
4657         PR tree-optimization/87217
4658         * tree-ssa-sccvn.c (vuse_valueize): New.
4659         (vn_reference_lookup_pieces): Use it.
4660         (vn_reference_lookup): Likewise.
4662 2018-09-05  Nathan Sidwell  <nathan@acm.org>
4664         PR c++/87137
4665         * stor-layout.c (place_field): Scan forwards to check last
4666         bitfield when ms_bitfield_placement is in effect.
4668 2018-09-05  Richard Biener  <rguenther@suse.de>
4670         PR bootstrap/87225
4671         * tree-vect-stmts.c (vectorizable_simd_clone_call): Fix bogus
4672         return.
4674 2018-09-05  Siddhesh Poyarekar  <siddhesh@sourceware.org>
4675             Kugan Vivekanandarajah  <kugan.vivekanandarajah@linaro.org>
4677         * config/aarch64/falkor-tag-collision-avoidance.c: New file.
4678         * config.gcc (extra_objs): Build it.
4679         * config/aarch64/t-aarch64 (falkor-tag-collision-avoidance.o):
4680         Likewise.
4681         * config/aarch64/aarch64-passes.def
4682         (pass_tag_collision_avoidance): New pass.
4683         * config/aarch64/aarch64.c (qdf24xx_tunings): Add
4684         AARCH64_EXTRA_TUNE_RENAME_LOAD_REGS to tuning_flags.
4685         (aarch64_classify_address): Remove static qualifier.
4686         (aarch64_address_info, aarch64_address_type): Move to...
4687         * config/aarch64/aarch64-protos.h: ... here.
4688         (make_pass_tag_collision_avoidance): New function.
4689         * config/aarch64/aarch64-tuning-flags.def (rename_load_regs):
4690         New tuning flag.
4692 2018-09-05  Martin Liska  <mliska@suse.cz>
4694         * doc/gcov.texi: Update documentation of humar
4695         readable mode.
4696         * gcov.c (format_count): Print one decimal place, it provides
4697         more fine number of situations like '1G' vs. '1.4G'.
4699 2018-09-05  Martin Liska  <mliska@suse.cz>
4701         PR target/87164
4702         * config/rs6000/rs6000.opt: Mark the option as Deprecated.
4703         * optc-gen.awk: Allow 'Var' for Deprecated options in order
4704         to generate a MASK value.
4706 2018-09-04  H.J. Lu  <hongjiu.lu@intel.com>
4708         PR debug/86593
4709         * dwarf2out.c (based_loc_descr): Allow hard frame pointer even
4710         if frame pointer isn't used.
4711         (compute_frame_pointer_to_fb_displacement): Likewise.
4713 2018-09-04  Jakub Jelinek  <jakub@redhat.com>
4715         PR target/87198
4716         * common/config/i386/i386-common.c (OPTION_MASK_ISA_XSAVEOPT_SET,
4717         OPTION_MASK_ISA_XSAVES_SET, OPTION_MASK_ISA_XSAVEC_SET): Use
4718         OPTION_MASK_ISA_XSAVE_SET instead of OPTION_MASK_ISA_XSAVE.
4719         (OPTION_MASK_ISA_XSAVE_UNSET): Add OPTION_MASK_ISA_XSAVES_UNSET
4720         and OPTION_MASK_ISA_XSAVEC_UNSET.
4722 2018-09-04  Max Filippov  <jcmvbkbc@gmail.com>
4724         * config/xtensa/xtensa.c (xtensa_expand_atomic): Reorder AND and
4725         XOR operations in NAND case.
4727 2018-09-04  Aldy Hernandez  <aldyh@redhat.com>
4729         * wide-int-range.cc (wide_int_range_convert): New.
4730         * wide-int-range.h (wide_int_range_convert): New.
4731         * tree-vrp.c (extract_range_from_unary_expr): Abstract wide int
4732         code into wide_int_range_convert.
4733         (extract_range_into_wide_ints): Do not munge anti range constants
4734         into the entire domain.  Just return the range back.
4736 2018-09-04  Martin Liska  <mliska@suse.cz>
4738         * genmatch.c (output_line_directive): Add new argument
4739         fnargs.
4740         (dt_simplify::gen_1): Encapsulate dump within __builtin_expect.
4742 2018-09-04  Jonathan Wakely  <jwakely@redhat.com>
4744         * doc/invoke.texi (Option Summary): Add whitespace.
4746         * doc/invoke.texi (Option Summary): Add -Waligned-new.
4748 2018-09-04  Richard Biener  <rguenther@suse.de>
4750         PR tree-optimization/87211
4751         * tree-ssa-sccvn.c (visit_phi): When value-numbering to a
4752         backedge value we're supposed to treat as VARYING also number
4753         the PHI to VARYING in case it got a different value-number already.
4755 2018-09-04  Aldy Hernandez  <aldyh@redhat.com>
4757         * tree-vrp.c (vrp_can_optimize_bit_op): Remove.
4758         (extract_range_from_binary_expr_1): Do not call
4759         vrp_can_optimize_bit_op.
4760         * wide-int-range.cc (wide_int_range_can_optimize_bit_op): Make
4761         static.
4762         (wide_int_range_get_mask_and_bounds): New.
4763         (wide_int_range_optimize_bit_op): New.
4764         (wide_int_range_bit_ior): Call wide_int_range_optimize_bit_op.
4765         (wide_int_range_bit_and): Same.
4766         * wide-int-range.h (wide_int_range_can_optimize_bit_op): Remove.
4767         (wide_int_range_optimize_bit_op): New.
4768         (wide_int_range_get_mask_and_bounds): New.
4770 2018-09-04  Richard Biener  <rguenther@suse.de>
4772         PR tree-optimization/87176
4773         * tree-ssa-sccvn.c (visit_phi): Remove redundant allsame
4774         variable.  When value-numbering a virtual PHI node make sure
4775         to not value-number to the backedge value.
4777 2018-09-04  Jonathan Wakely  <jwakely@redhat.com>
4779         * doc/extend.texi (Long Long, Hex Floats): Document support for
4780         long long and hex floats in more recent versions of ISO C++.
4782 2018-09-03  Richard Biener  <rguenther@suse.de>
4784         PR tree-optimization/87177
4785         * tree-ssa-sccvn.c (vuse_ssa_val): Revert previous change, keep
4786         cleanup.
4788 2018-09-03  Alexander Monakov  <amonakov@ispras.ru>
4790         * bb-reorder.c (edge_order): Convert to C-qsort-style
4791         tri-state comparator.
4792         (reorder_basic_blocks_simple): Change std::stable_sort to
4793         gcc_stablesort.
4795 2018-09-03  Alexander Monakov  <amonakov@ispras.ru>
4797         * tree-loop-distribution.c (offset_cmp): Convert to C-qsort-style
4798         tri-state comparator.
4799         (fuse_memset_builtins): Change std::stable_sort to gcc_stablesort.
4801 2018-09-03  Alexander Monakov  <amonakov@ispras.ru>
4803         * sort.cc (struct sort_ctx): New field 'nlim'.  Use it...
4804         (mergesort): ... here as maximum count for using netsort.
4805         (gcc_qsort): Set nlim to 3 if stable sort is requested.
4806         (gcc_stablesort): New.
4807         * system.h (gcc_stablesort): Declare.
4809 2018-09-03  Alexander Monakov  <amonakov@ispras.ru>
4811         * sort.cc (gcc_qsort) [CHECKING_P]: Call qsort_chk.
4812         * system.h (qsort): Always redirect to gcc_qsort.  Update comment.
4813         * vec.c (qsort_chk): Do not call gcc_qsort.  Update comment.
4815 2018-09-03  Segher Boessenkool  <segher@kernel.crashing.org>
4817         * config/rs6000/rs6000.md (*mov<mode>_hardfloat32): Remove %U from the
4818         lxsdx and stxsdx alternatives.
4819         (*mov<mode>_hardfloat64): Ditto.
4820         * config/rs6000/vsx.md (*vsx_extract_<mode>_store): Ditto.
4822 2018-09-03  Richard Biener  <rguenther@suse.de>
4824         PR tree-optimization/87200
4825         * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Valueize a
4826         simplify result.
4828 2018-09-03  Martin Liska  <mliska@suse.cz>
4830         PR tree-optimization/87201
4831         * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
4832         Fix parenthesis in an expression.
4834 2018-09-03  Richard Biener  <rguenther@suse.de>
4836         PR tree-optimization/87197
4837         * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Mark the new def
4838         visited.  CSE the VN_INFO hashtable lookup.
4840         PR tree-optimization/87169
4841         * tree-ssa-sccvn.c (do_rpo_vn): When marking loops for not
4842         iterating make sure there's no extra backedges from irreducible
4843         regions feeding the header.  Mark the destination block
4844         executable.
4846 2018-09-03  Martin Liska  <mliska@suse.cz>
4848         PR driver/83193
4849         * common/common-target.def: Add TARGET_GET_VALID_OPTION_VALUES.
4850         * common/common-targhooks.c (default_get_valid_option_values):
4851         New function.
4852         * common/common-targhooks.h (default_get_valid_option_values):
4853         Likewise.
4854         * common/config/i386/i386-common.c: Move processor_target_table
4855         from i386.c.
4856         (ix86_get_valid_option_values): New function.
4857         (TARGET_GET_VALID_OPTION_VALUES): New macro.
4858         * config/i386/i386.c (struct ptt): Move to i386-common.c.
4859         (PTA_*): Move all defined masks into i386-common.c.
4860         (ix86_function_specific_restore): Use new processor_cost_table.
4861         * config/i386/i386.h (struct ptt): Moved from i386.c.
4862         (struct pta): Likewise.
4863         * doc/tm.texi: Document new TARGET_GET_VALID_OPTION_VALUES.
4864         * doc/tm.texi.in: Likewise.
4865         * opt-suggestions.c (option_proposer::suggest_option):
4866         Pass prefix to build_option_suggestions.
4867         (option_proposer::get_completions): Likewise.
4868         (option_proposer::build_option_suggestions): Use the new target
4869         hook.
4870         * opts.c (struct option_help_tuple): New struct.
4871         (print_filtered_help): Use the new target hook.
4873 2018-09-03  Martin Liska  <mliska@suse.cz>
4875         PR middle-end/59521
4876         * predict.c (set_even_probabilities): Add likely_edges
4877         argument and handle cases where we have precisely one
4878         likely edge.
4879         (combine_predictions_for_bb): Catch also likely_edges.
4880         (tree_predict_by_opcode): Handle gswitch statements.
4881         * tree-cfg.h (find_case_label_for_value): New declaration.
4882         (find_taken_edge_switch_expr): Likewise.
4883         * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
4884         Find pivot in decision tree based on probabily, not by number of
4885         nodes.
4887 2018-09-02  Gerald Pfeifer  <gerald@pfeifer.com>
4889         * doc/standards.texi (Standards): Update Objective-C reference.
4891 2018-09-01  Gerald Pfeifer  <gerald@pfeifer.com>
4893         * doc/install.texi (Prerequisites): Update link for MPC.
4895 2018-09-01  Michael Matz  <matz@suse.de>
4897         PR tree-optimization/87074
4898         * gimple-loop-jam.c (unroll_jam_possible_p): Check loop exit
4899         PHIs for outer-loop uses.
4901 2018-09-01  Gerald Pfeifer  <gerald@pfeifer.com>
4903         * doc/generic.texi (OpenMP): Adjust link to openmp.org.
4904         * doc/invoke.texi (C Dialect Options): Ditto.
4906 2018-09-01  Gerald Pfeifer  <gerald@pfeifer.com>
4908         * doc/install.texi (Prerequisites): Adjust link mpfr.org.
4910 2018-08-31  Richard Biener  <rguenther@suse.de>
4912         PR tree-optimization/87168
4913         * tree-ssa-sccvn.c (SSA_VAL): Add visited output parameter.
4914         (rpo_elim::eliminate_avail): When OP was not visited it must
4915         be available.
4917 2018-08-31  David Malcolm  <dmalcolm@redhat.com>
4919         * tree-vrp.c (copy_value_range): Convert param "from" from
4920         "value_range *" to "const value_range *".
4921         (range_is_null): Likewise for param "vr".
4922         (range_int_cst_p): Likewise.
4923         (range_int_cst_singleton_p): Likewise.
4924         (symbolic_range_p): Likewise.
4925         (value_ranges_intersect_p): Likewise for both params.
4926         (value_range_nonnegative_p): Likewise for param "vr".
4927         (value_range_constant_singleton): Likewise.
4928         (vrp_set_zero_nonzero_bits): Likewise for param "ar".
4929         (extract_range_into_wide_ints): Likewise for param "vr".
4930         (extract_range_from_multiplicative_op): Likewise for params "vr0"
4931         and "vr1".
4932         (vrp_can_optimize_bit_op): Likewise.
4933         (extract_range_from_binary_expr_1): Likewise for params "vr0_" and
4934         "vr1_".
4935         (extract_range_from_unary_expr): Likewise.
4936         (debug_value_range): Likewise for param "vr".
4937         (value_range::dump): Add "const" qualifier.
4938         (vrp_prop::check_array_ref): Convert local "vr" from
4939         "value_range *" to "const value_range *".
4940         (vrp_prop::check_mem_ref): Likewise.
4941         (vrp_prop::visit_stmt): Likewise for local "old_vr".
4942         (vrp_intersect_ranges_1): Likewise for param "vr_1".
4943         (vrp_intersect_ranges): Likewise.
4944         (simplify_stmt_for_jump_threading): Likewise for local "vr".
4945         (vrp_prop::vrp_finalize): Likewise.
4946         * tree-vrp.h (value_range::dump): Add "const" qualifier.
4947         (vrp_intersect_ranges): Add "const" qualifier to params as above.
4948         (extract_range_from_unary_expr): Likewise.
4949         (value_range_constant_singleton): Likewise.
4950         (symbolic_range_p): Likewise.
4951         (copy_value_range): Likewise.
4952         (extract_range_from_binary_expr_1): Likewise.
4953         (range_int_cst_p): Likewise.
4954         (vrp_set_zero_nonzero_bits): Likewise.
4955         (range_int_cst_singleton_p): Likewise.
4957 2018-08-31  Vlad Lazar  <vlad.lazar@arm.com>
4959         * config/aarch64/arm_neon.h (vabsd_s64): New.
4960         (vnegd_s64): Likewise.
4962 2018-08-31  Martin Jambor  <mjambor@suse.cz>
4964         * ipa-cp.c (estimate_local_effects): Replace wrong MAX with MIN.
4966 2018-08-31  Martin Liska  <mliska@suse.cz>
4968         * ipa-icf.c (sem_item::add_type): Use
4969         sem_item::m_type_hash_cache.
4970         * ipa-icf.h: Move the cache from sem_item_optimizer
4971         to sem_item.
4973 2018-08-31  Nathan Sidwell  <nathan@acm.org>
4975         * doc/extend.texi (Backwards Compatibility): Remove implicit
4976         extern C leeway of () being (...).
4978 2018-08-31  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
4980         * ipa-inline.c (can_inline_edge_by_limits_p): Fix typos in comment.
4982 2018-08-31  Segher Boessenkool  <segher@kernel.crashing.org>
4984         PR target/86684
4985         PR target/87149
4986         * config/rs6000/rs6000.md (lround<mode>di2): Gate on TARGET_FPRND.
4988 2018-08-31  Jakub Jelinek  <jakub@redhat.com>
4990         PR middle-end/87138
4991         * expmed.c (expand_mult_const): Use immed_wide_int_const instead of
4992         gen_int_mode.  Formatting fixes.
4994 2018-08-30  Sandra Loosemore  <sandra@codesourcery.com>
4996         * target.def (custom_function_descriptors): Improve documentation.
4997         * doc/tm.texi.in (Trampolines): Expand discussion of function
4998         descriptors and move TARGET_CUSTOM_FUNCTION_DESCRIPTORS to the
4999         beginning of the section.
5000         * doc/tm.texi: Regenerated.
5002 2018-08-30  Jose E. Marchesi  <jose.marchesi@oracle.com>
5004         * cfg.h (class auto_edge_flag): Spell out the template-id of the
5005         base class in the initializer list.  This is a workaround for
5006         building with older GCC.
5007         (class auto_bb_flag): Likewise.
5009 2018-08-30  Aaron Sawdey  <acsawdey@linux.ibm.com>
5011         * config/rs6000/altivec.md (altivec_eq<mode>): Remove star.
5012         (altivec_vcmpequ<VI_char>_p): Remove star.
5013         * config/rs6000/rs6000-string.c (do_load_for_compare): Support
5014         vector load modes.
5015         (expand_strncmp_vec_sequence): New function.
5016         (emit_final_str_compare_vec): New function.
5017         (expand_strn_compare): Add support for vector strncmp.
5018         * config/rs6000/rs6000.opt (-mstring-compare-inline-limit): Change
5019         length specification to bytes.
5020         * config/rs6000/vsx.md (vsx_ld_elemrev_v16qi_internal): Remove star.
5021         (vcmpnezb_p): New pattern.
5022         * doc/invoke.texi (RS/6000 and PowerPC Options): Update documentation
5023         for option -mstring-compare-inline-limit.
5025 2018-08-30  Thiago Macieira  <thiago.macieira@intel.com>
5027         * config/i386/i386.c (PTA_WESTMERE): Remove PTA_AES.
5028         (PTA_SKYLAKE): Add PTA_AES.
5029         (PTA_GOLDMONT): Likewise.
5031 2018-08-29  Jan Hubicka  <jh@suse.cz>
5033         PR lto/86517
5034         * lto-opts.c (lto_write_options): Always stream PIC/PIE mode.
5035         * lto-wrapper.c (merge_and_complain): Fix merging of PIC/PIE.
5037 2018-08-29  Jan Hubicka  <jh@suse.cz>
5039         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not follow
5040         TYPE_STUB_DECL.
5041         (hash_tree): Do not visit TYPE_STUB_DECL.
5042         * tree-streamer-out.c (write_ts_type_common_tree_pointers): Do not
5043         stream TYPE_STUB_DECL.
5044         * tree-streamer-in.c (lto_input_ts_type_common_tree_pointers): Likewise.
5045         * ipa-utils.h (type_with_linkage_p): Do not rely on TYPE_STUB_DECL
5046         after free_lang_data.
5047         (type_in_anonymous_namespace_p): Likewise.
5049 2018-08-29  Jan Hubicka  <jh@suse.cz>
5051         * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
5052         comment that it has to be even number.
5053         (class sreal): Change m_sig type to int32_t.
5054         * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
5055         int64_t for temporary calculations.
5056         (sreal_verify_basics): Drop one bit from minimum and maximum.
5058 2018-08-30  Richard Biener  <rguenther@suse.de>
5060         PR tree-optimization/87147
5061         * tree-ssa-sccvn.c (SSA_VISITED): New function.
5062         (visit_phi): When the degenerate result is from the backedge and
5063         we didn't visit its definition yet drop to VARYING.
5064         (do_rpo_vn): Properly mark blocks with incoming backedges as executable.
5066 2018-08-29  Jan Hubicka  <jh@suse.cz>
5068         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not walk
5069         DECL_VINDEX.
5070         (hash_tree): Likewise.
5072 2018-08-29  Jan Hubicka  <jh@suse.cz>
5074         * tree.c (find_decls_types_r): Walk also TYPE_NEXT_PTR_TO
5075         and TYPE_NEXT_REF_TO.
5077 2018-08-29  Jan Hubicka  <jh@suse.cz>
5079         * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
5080         comment that it has to be even number.
5081         (class sreal): Change m_sig type to int32_t.
5082         * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
5083         int64_t for temporary calculations.
5084         (sreal_verify_basics): Drop one bit from minimum and maximum.
5086 2018-08-30  Tamar Christina  <tamar.christina@arm.com>
5088         * config/aarch64/aarch64.c (aarch64_expand_movmem): Set TImode max.
5090 2018-08-30  Vlad Lazar  <vlad.lazar@arm.com>
5092         PR middle-end/86995
5093         * expmed.c (canonicalize_comparison): Use wi::sub instead of wi::add
5094         if to_add is negative.
5096 2018-08-29  Bernd Edlinger  <bernd.edlinger@hotmail.de>
5098         PR middle-end/87053
5099         * builtins.c (c_strlen): Improve range checks.
5101 2018-08-29  Martin Sebor  <msebor@redhat.com>
5102             Jeff Law  <law@redhat.com>
5104         PR tree-optimization/86714
5105         PR tree-optimization/86711
5106         * builtins.c (c_strlen): Add arguments to call to string_constant.
5107         * expr.c (string_constant): Add argument.  Detect missing nul
5108         terminator and outermost declaration it's missing in.
5109         * expr.h (string_constant): Add argument.
5110         * fold-const.c (read_from_constant_string): Add arguments to call to
5111         string_constant.
5112         (c_getstr): Likewise.
5113         * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
5114         to string_constant.
5115         * tree-ssa-strlen.c (get_stridx): Likewise.
5117 2018-08-29  Jan Hubicka  <jh@suse.cz>
5119         * tree-streamer-in.c (lto_input_ts_function_decl_tree_pointers):
5120         Do not stream DECL_VINDEX.
5121         * tree-streamer-out.c (write_ts_function_decl_tree_pointers): Likewise.
5122         * tree.c (free_lang_data_in_decl): Clear DECL_VINDEX.
5123         (decl_function_context): Use DECL_VIRTUAL_P rather than DECL_VINDEX.
5125 2018-08-29  Richard Biener  <rguenther@suse.de>
5127         * tree-ssa-sccvn.c (vuse_ssa_val): Return NULL for unvisited
5128         virtual operands that are not default defs to honor region
5129         boundaries.
5130         (rpo_vn_valueize): Remove ineffective code here.
5132 2018-08-29  Richard Biener  <rguenther@suse.de>
5134         PR tree-optimization/87132
5135         * tree-ssa-alias.c (get_continuation_for_phi): Do not translate
5136         when skipping defs reachable over backedges.
5138 2018-08-29  Richard Biener  <rguenther@suse.de>
5140         * tree-core.h: Document use of deprecated_flag in SSA_NAME.
5141         * tree.h (SSA_NAME_POINTS_TO_READONLY_MEMORY): Define.
5142         * tree-into-ssa.c (pass_build_ssa::execute): Initialize
5143         function parameters SSA_NAME_POINTS_TO_READONLY_MEMORY from fnspec.
5144         * tree-ssa-sccvn.c (const_parms, init_const_parms): Remove.
5145         (vn_reference_lookup_3): Remove use of const_parms.
5146         (free_rpo_vn): Do not free const_parms.
5147         (do_rpo_vn): Do not call init_const_parms.
5148         * tree-ssa-alias.c (refs_may_alias_p_1): Honor
5149         SSA_NAME_POINTS_TO_READONLY_MEMORY.
5150         (call_may_clobber_ref_p_1): Likewise.
5152 2018-08-29  Alexander Monakov  <amonakov@ispras.ru>
5154         PR other/86726
5155         * invoke.texi (Optimization Options): List -ftree-scev-cprop.
5156         (-O): Ditto.
5157         (-ftree-scev-cprop): Document.
5159 2018-08-29  Jan Hubicka  <jh@suse.cz>
5161         * sreal.h (normalize, normalize_up, normalize_down): Add new_sig/new_exp
5162         parameters.
5163         (sreal constructor): Update.
5164         * sreal.c (sreal:operator+, sreal:operator-, sreal:operator*,
5165         sreal:operator/): Update.
5167 2018-08-29  Martin Liska  <mliska@suse.cz>
5169         * tree-switch-conversion.c (switch_conversion::expand):
5170         Strenghten assumption about gswitch statements.
5172 2018-08-29  Richard Biener  <rguenther@suse.de>
5174         PR tree-optimization/87117
5175         * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_stmt): Only
5176         re-value-number released SSA VDEFs.
5178 2018-08-29  Richard Biener  <rguenther@suse.de>
5180         PR tree-optimization/87126
5181         * tree-ssa-sccvn.c (vn_reference_insert): Remove assert.
5183 2018-08-28  Jim Wilson  <jimw@sifive.com>
5185         * config/riscv/pic.md: Rewrite.
5186         * config/riscv/riscv.c (riscv_address_insns): Return cost of 3 for
5187         invalid address.
5188         * config/riscv/riscv.md (ZERO_EXTEND_LOAD): Delete.
5189         (SOFTF, default_load, softload, softstore): New.
5191 2018-08-28  Jeff Law  <law@redhat.com>
5193         * fold-const.c (fold_binary_loc): Remove recently added assert.
5195 2018-08-28  Joern Rennecke  <joern.rennecke@riscy-ip.com>
5197         * genpreds.c (write_predicate_subfunction): Also add ATTRIBUTE_UNUSED
5198         to OP parmeter of generated function.
5200 2018-08-28  MCC CS  <deswurstes@users.noreply.github.com>
5202         PR tree-optimization/87009
5203         * match.pd: Add boolean optimizations.
5205 2018-08-28  Martin Sebor  <msebor@redhat.com>
5207         PR middle-end/86631
5208         * calls.c (alloc_max_size): Treat HOST_WIDE_INT special.
5209         * gimple-ssa-warn-alloca.c (adjusted_warn_limit): New function.
5210         (pass_walloca::gate): Use it.
5211         (alloca_call_type): Same.
5212         (pass_walloca::execute): Same.
5213         * stor-layout.c (layout_decl): Treat HOST_WIDE_INT special.
5215 2018-08-28  David Malcolm  <dmalcolm@redhat.com>
5217         * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): Change version check on
5218         GCC_VERSION for usage of "__gcc_dump_printf__" format from
5219         >= 3005 to >= 9000.
5221 2018-08-28  Richard Biener  <rguenther@suse.de>
5223         PR tree-optimization/87124
5224         * tree-ssa-sccvn.c (vn_lookup_simplify_result): Guard against
5225         constants before looking up avail.
5227 2018-08-28  Jakub Jelinek  <jakub@redhat.com>
5229         PR middle-end/87099
5230         * calls.c (maybe_warn_nonstring_arg): Punt early if
5231         warn_stringop_overflow is zero.  Don't call get_range_strlen
5232         on 3rd argument, keep iterating until lenrng[1] is INTEGER_CST.
5233         Swap comparison operands to have constants on rhs.  Only use
5234         lenrng[1] if non-NULL and INTEGER_CST.  Don't uselessly
5235         increment lenrng[0].
5237 2018-08-28  Richard Sandiford  <richard.sandiford@arm.com>
5239         * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Fix unguarded
5240         use of tree_to_shwi.  Remove duplicated test for the size being
5241         a whole number of bytes.
5243 2018-08-28  Richard Biener  <rguenther@suse.de>
5245         PR tree-optimization/87117
5246         * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_cleanup):
5247         Handle removed stmt without LHS (GIMPLE_NOP).
5249 2018-08-28  Richard Biener  <rguenther@suse.de>
5251         PR tree-optimization/87117
5252         * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Exclude
5253         void which is is_gimple_reg_type by checking for COMPLETE_TYPE_P.
5255 2018-08-28  Richard Biener  <rguenther@suse.de>
5257         PR tree-optimization/87117
5258         * tree-ssa-pre.c (compute_avail): Do not make expressions
5259         with predicated values available.
5260         (get_expr_value_id): Assert we do not run into predicated value
5261         expressions.
5263 2018-08-28  Richard Biener  <rguenther@suse.de>
5265         PR tree-optimization/87117
5266         * tree-ssa-operands.c (add_stmt_operand): STRING_CST may
5267         get virtual operands.
5268         (get_expr_operands): Handle STRING_CST like other decls.
5270 2018-08-28  Martin Liska  <mliska@suse.cz>
5272         * tree.h: Update documentation of fndecl_built_in_p
5273         functions.
5276 2018-08-27  Jeff Law  <law@redhat.com>
5277         PR tree-optimization/87110
5278         * tree-ssa-dse.c (compute_trims): Handle non-constant
5279         TYPE_SIZE_UNIT.
5281 2018-08-27  Martin Sebor  <msebor@redhat.com>
5283         PR tree-optimization/86914
5284         * tree-ssa-strlen.c (maybe_set_strlen_range): Avoid MEM_REF.
5286 2018-08-27  Martin Sebor  <msebor@redhat.com>
5288         PR tree-optimization/87112
5289         * builtins.c (expand_builtin_strnlen): Convert c_strlen result to
5290         the type of the bound argument.
5292 2018-08-27  Jeff Law  <law@redhat.com>
5294         * tree-ssa-dse.c (compute_trims): Handle case where the reference's
5295         type does not have a TYPE_SIZE_UNIT.
5297 2018-08-27  Steve Ellcey  <sellcey@cavium.com>
5299         * config/aarch64/aarch64-speculation.cc: Replace include of cfg.h
5300         with include of backend.h.
5302 2018-08-27  Richard Biener  <rguenther@suse.de>
5304         PR tree-optimization/86927
5305         * tree-vect-loop.c (vect_create_epilog_for_reduction): Properly
5306         use const cond reduction code.
5308 2018-08-27  Alexander Monakov  <amonakov@ispras.ru>
5310         PR tree-optimization/85758
5311         * match.pd ((X & Y) ^ Y): Add :s qualifier to inner expression.
5313 2018-08-27  David Malcolm  <dmalcolm@redhat.com>
5315         PR c++/87091
5316         * diagnostic-show-locus.c (class layout_range): Update for
5317         conversion of show_caret_p to a tri-state.
5318         (layout_range::layout_range): Likewise.
5319         (make_range): Likewise.
5320         (layout::maybe_add_location_range): Likewise.
5321         (layout::should_print_annotation_line_p): Don't show annotation
5322         lines for ranges that are SHOW_LINES_WITHOUT_RANGE.
5323         (layout::get_state_at_point): Update for conversion of
5324         show_caret_p to a tri-state.  Bail out early for
5325         SHOW_LINES_WITHOUT_RANGE, so that such ranges don't affect
5326         underlining or source colorization.
5327         (gcc_rich_location::add_location_if_nearby): Update for conversion
5328         of show_caret_p to a tri-state.
5329         (selftest::test_one_liner_multiple_carets_and_ranges): Likewise.
5330         (selftest::test_one_liner_fixit_replace_equal_secondary_range):
5331         Likewise.
5332         (selftest::test_one_liner_labels): Likewise.
5333         * gcc-rich-location.c (gcc_rich_location::add_expr): Update for
5334         conversion of show_caret_p to a tri-state.
5335         * pretty-print.c (text_info::set_location): Likewise.
5336         * pretty-print.h (text_info::set_location): Likewise.
5337         * substring-locations.c (format_warning_n_va): Likewise.
5338         * tree-diagnostic.c (default_tree_printer): Likewise.
5339         * tree-pretty-print.c (newline_and_indent): Likewise.
5341 2018-08-27  David Malcolm  <dmalcolm@redhat.com>
5343         PR c++/87091
5344         * diagnostic-show-locus.c (get_line_span_for_fixit_hint): Show the
5345         line above for line-insertion fix-it hints.
5346         (selftest::test_fixit_insert_containing_newline): Update the
5347         expected results, and add a test with line-numbering enabled.
5349 2018-08-27  Martin Liska  <mliska@suse.cz>
5351         PR sanitizer/86962
5352         * sanopt.c (sanitize_rewrite_addressable_params): Ignore
5353         params with DECL_HAS_VALUE_EXPR_P.
5355 2018-08-27  Martin Liska  <mliska@suse.cz>
5357         * config/i386/i386.c (ix86_expand_set_or_movmem): Dump
5358         selected expansion strategy.
5360 2018-08-27  Martin Liska  <mliska@suse.cz>
5362         * builtins.h (is_builtin_fn): Remove and fndecl_built_in_p.
5363         * builtins.c (is_builtin_fn): Likewise.
5364         * attribs.c (diag_attr_exclusions): Use new function
5365         fndecl_built_in_p and remove check for FUNCTION_DECL if
5366         possible.
5367         (builtin_mathfn_code): Likewise.
5368         (fold_builtin_expect): Likewise.
5369         (fold_call_expr): Likewise.
5370         (fold_builtin_call_array): Likewise.
5371         (fold_call_stmt): Likewise.
5372         (set_builtin_user_assembler_name): Likewise.
5373         (is_simple_builtin): Likewise.
5374         * calls.c (gimple_alloca_call_p): Likewise.
5375         (maybe_warn_nonstring_arg): Likewise.
5376         * cfgexpand.c (expand_call_stmt): Likewise.
5377         * cgraph.c (cgraph_update_edges_for_call_stmt_node): Likewise.
5378         (cgraph_edge::verify_corresponds_to_fndecl): Likewise.
5379         (cgraph_node::verify_node): Likewise.
5380         * cgraphclones.c (build_function_decl_skip_args): Likewise.
5381         (cgraph_node::create_clone): Likewise.
5382         * config/arm/arm.c (arm_insert_attributes): Likewise.
5383         * config/i386/i386.c (ix86_gimple_fold_builtin): Likewise.
5384         * dse.c (scan_insn): Likewise.
5385         * expr.c (expand_expr_real_1): Likewise.
5386         * fold-const.c (operand_equal_p): Likewise.
5387         (fold_binary_loc): Likewise.
5388         * gimple-fold.c (gimple_fold_stmt_to_constant_1): Likewise.
5389         * gimple-low.c (lower_stmt): Likewise.
5390         * gimple-pretty-print.c (dump_gimple_call): Likewise.
5391         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
5392         Likewise.
5393         * gimple.c (gimple_build_call_from_tree): Likewise.
5394         (gimple_call_builtin_p): Likewise.
5395         (gimple_call_combined_fn): Likewise.
5396         * gimplify.c (gimplify_call_expr): Likewise.
5397         (gimple_boolify): Likewise.
5398         (gimplify_modify_expr): Likewise.
5399         (gimplify_addr_expr): Likewise.
5400         * hsa-gen.c (gen_hsa_insns_for_call): Likewise.
5401         * ipa-cp.c (determine_versionability): Likewise.
5402         * ipa-fnsummary.c (compute_fn_summary): Likewise.
5403         * ipa-param-manipulation.c (ipa_modify_formal_parameters): Likewise.
5404         * ipa-split.c (visit_bb): Likewise.
5405         (split_function): Likewise.
5406         * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
5407         * lto-cgraph.c (input_node): Likewise.
5408         * lto-streamer-out.c (write_symbol): Likewise.
5409         * omp-low.c (setjmp_or_longjmp_p): Likewise.
5410         (lower_omp_1): Likewise.
5411         * predict.c (strip_predict_hints): Likewise.
5412         * print-tree.c (print_node): Likewise.
5413         * symtab.c (symtab_node::output_to_lto_symbol_table_p): Likewise.
5414         * trans-mem.c (is_tm_irrevocable): Likewise.
5415         (is_tm_load): Likewise.
5416         (is_tm_simple_load): Likewise.
5417         (is_tm_store): Likewise.
5418         (is_tm_simple_store): Likewise.
5419         (is_tm_abort): Likewise.
5420         (tm_region_init_1): Likewise.
5421         * tree-call-cdce.c (gen_shrink_wrap_conditions): Likewise.
5422         * tree-cfg.c (verify_gimple_call): Likewise.
5423         (move_stmt_r): Likewise.
5424         (stmt_can_terminate_bb_p): Likewise.
5425         * tree-eh.c (lower_eh_constructs_2): Likewise.
5426         * tree-if-conv.c (if_convertible_stmt_p): Likewise.
5427         * tree-inline.c (remap_gimple_stmt): Likewise.
5428         (copy_bb): Likewise.
5429         (estimate_num_insns): Likewise.
5430         (fold_marked_statements): Likewise.
5431         * tree-sra.c (scan_function): Likewise.
5432         * tree-ssa-ccp.c (surely_varying_stmt_p): Likewise.
5433         (optimize_stack_restore): Likewise.
5434         (pass_fold_builtins::execute): Likewise.
5435         * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Likewise.
5436         (mark_all_reaching_defs_necessary_1): Likewise.
5437         * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Likewise.
5438         * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
5439         (pass_forwprop::execute): Likewise.
5440         * tree-ssa-loop-im.c (stmt_cost): Likewise.
5441         * tree-ssa-math-opts.c (pass_cse_reciprocals::execute): Likewise.
5442         * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Likewise.
5443         * tree-ssa-strlen.c (get_string_length): Likewise.
5444         * tree-ssa-structalias.c (handle_lhs_call): Likewise.
5445         (find_func_aliases_for_call): Likewise.
5446         * tree-ssa-ter.c (find_replaceable_in_bb): Likewise.
5447         * tree-stdarg.c (optimize_va_list_gpr_fpr_size): Likewise.
5448         * tree-tailcall.c (find_tail_calls): Likewise.
5449         * tree.c (need_assembler_name_p): Likewise.
5450         (free_lang_data_in_decl): Likewise.
5451         (get_call_combined_fn): Likewise.
5452         * ubsan.c (is_ubsan_builtin_p): Likewise.
5453         * varasm.c (incorporeal_function_p): Likewise.
5454         * tree.h (DECL_BUILT_IN): Remove and replace with
5455         fndecl_built_in_p.
5456         (DECL_BUILT_IN_P): Transfort to fndecl_built_in_p.
5457         (fndecl_built_in_p): New.
5459 2018-08-27  Martin Liska  <mliska@suse.cz>
5461         PR tree-optimization/86847
5462         * tree-switch-conversion.c (switch_decision_tree::dump_case_nodes):
5463         Dump also subtree probability.
5464         (switch_decision_tree::do_jump_if_equal): New function.
5465         (switch_decision_tree::emit_case_nodes): Handle special
5466         situations in balanced tree that can be emitted much simpler.
5467         Fix calculation of probabilities that happen in tree expansion.
5468         * tree-switch-conversion.h (struct cluster): Add
5469         is_single_value_p.
5470         (struct simple_cluster): Likewise.
5471         (struct case_tree_node): Add new function has_child.
5472         (do_jump_if_equal): New.
5474 2018-08-27  Martin Liska  <mliska@suse.cz>
5476         * tree-switch-conversion.c (bit_test_cluster::find_bit_tests):
5477         Add new argument to bit_test_cluster constructor.
5478         (bit_test_cluster::emit): Set bits really number of values
5479         handlel by a test.
5480         (bit_test_cluster::hoist_edge_and_branch_if_true): Add
5481         probability argument.
5482         * tree-switch-conversion.h (struct bit_test_cluster):
5483         Add m_handles_entire_switch.
5485 2018-08-27  Martin Liska  <mliska@suse.cz>
5487         PR tree-optimization/86702
5488         * tree-switch-conversion.c (jump_table_cluster::emit):
5489         Make probabilities even for values in jump table
5490         according to number of cases handled.
5491         (switch_decision_tree::compute_cases_per_edge): Pass
5492         argument to reset_out_edges_aux function.
5493         (switch_decision_tree::analyze_switch_statement): Likewise.
5494         * tree-switch-conversion.h (switch_decision_tree::reset_out_edges_aux):
5495         Make it static.
5497 2018-08-27  Martin Liska  <mliska@suse.cz>
5499         * cfgexpand.c (expand_asm_stmt): Use label_to_block and pass
5500         cfun argument explicitly.
5501         * gimple-pretty-print.c (dump_gimple_switch): Likewise.
5502         * hsa-gen.c (gen_hsa_insns_for_switch_stmt): Use new
5503         function gimple_switch_default_bb.
5504         (convert_switch_statements):
5505         (expand_builtins):
5506         * ipa-fnsummary.c (set_switch_stmt_execution_predicate):
5507         * stmt.c (label_to_block_fn): Use label_to_block and pass
5508         cfun argument explicitly and use gimple_switch_label_bb.
5509         (expand_case): Likewise.
5510         * tree-cfg.c (lower_phi_internal_fn): Use label_to_block and pass
5511         cfun argument explicitly. Likewise.
5512         (make_edges_bb): Likewise.
5513         (make_cond_expr_edges): Likewise.
5514         (get_cases_for_edge): Likewise.
5515         (make_gimple_switch_edges): Likewise.
5516         (label_to_block_fn): Likewise.
5517         (label_to_block): Likewise.
5518         (make_goto_expr_edges): Likewise.
5519         (make_gimple_asm_edges): Likewise.
5520         (main_block_label): Likewise.
5521         (group_case_labels_stmt): Likewise.
5522         (find_taken_edge_computed_goto): Likewise.
5523         (find_taken_edge_switch_expr): Likewise.
5524         (gimple_verify_flow_info): Likewise.
5525         (gimple_redirect_edge_and_branch): Likewise.
5526         (gimple_switch_label_bb): New function.
5527         (gimple_switch_default_bb): Likewise.
5528         (gimple_switch_edge): Likewise.
5529         (gimple_switch_default_edge): Likewise.
5530         * tree-cfg.h (label_to_block_fn): Remove and replace ...
5531         (label_to_block): ... with this.
5532         (gimple_switch_label_bb): New.
5533         (gimple_switch_default_bb): Likewise.
5534         (gimple_switch_edge): Likewise.
5535         (gimple_switch_default_edge): Likewise.
5536         * tree-cfgcleanup.c (convert_single_case_switch): Use
5537         new gimple functions and pass new argument to label_to_block.
5538         (cleanup_control_flow_bb):
5539         * tree-eh.c (make_eh_dispatch_edges): Use label_to_block and pass
5540         cfun argument explicitly.
5541         (make_eh_edges): Likewise.
5542         (redirect_eh_dispatch_edge): Likewise.
5543         (lower_resx): Likewise.
5544         (lower_eh_dispatch): Likewise.
5545         (maybe_remove_unreachable_handlers): Likewise.
5546         (unsplit_eh): Likewise.
5547         (cleanup_empty_eh): Likewise.
5548         (verify_eh_edges): Likewise.
5549         (verify_eh_dispatch_edge): Likewise.
5550         * tree-ssa-dom.c (record_edge_info): Likewise.
5551         * tree-ssa-forwprop.c (simplify_gimple_switch_label_vec): Likewise.
5552         * tree-ssa-threadedge.c (thread_around_empty_blocks): Likewise.
5553         (thread_through_normal_block): Likewise.
5554         * tree-ssa-uncprop.c (associate_equivalences_with_edges): Likewise.
5555         * tree-ssa-uninit.c (convert_control_dep_chain_into_preds):
5556         * tree-switch-conversion.c (switch_conversion::collect): Use new
5557         gimple functions.
5558         (switch_conversion::check_final_bb): Likewise.
5559         (switch_conversion::gather_default_values): Pass new argument
5560         to label_to_block.
5561         (switch_conversion::build_constructors): Likewise.
5562         (switch_decision_tree::compute_cases_per_edge): Use new
5563         gimple_switch_edge function.
5564         (switch_decision_tree::analyze_switch_statement): Pass new argument
5565         to label_to_block.
5566         (switch_decision_tree::try_switch_expansion): Use
5567         gimple_switch_default_edge.
5568         * tree-vrp.c (find_switch_asserts): Pass new argument
5569         to label_to_block.
5570         * vr-values.c (vr_values::vrp_visit_switch_stmt): Likewise.
5571         (vr_values::simplify_switch_using_ranges): Likewise.
5573 2018-08-27  Richard Biener  <rguenther@suse.de>
5575         * cfganal.h (rev_post_order_and_mark_dfs_back_seme): Declare.
5576         * cfganal.c (rev_post_order_and_mark_dfs_back_seme): New function.
5578         * tree-ssa-sccvn.h (struct vn_pval): New structure.
5579         (struct vn_nary_op_s): Add unwind_to member.  Add
5580         predicated_values flag and put result into a union together
5581         with a linked list of vn_pval.
5582         (struct vn_ssa_aux): Add name member to make maintaining
5583         a map of SSA name to vn_ssa_aux possible.  Remove no longer
5584         needed info, dfsnum, low, visited, on_sccstack, use_processed
5585         and range_info_anti_range_p members.
5586         (run_scc_vn, vn_eliminate, free_scc_vn, vn_valueize): Remove.
5587         (do_rpo_vn, run_rpo_vn, eliminate_with_rpo_vn, free_rpo_vn):
5588         New functions.
5589         (vn_valueize): New global.
5590         (vn_context_bb): Likewise.
5591         (VN_INFO_RANGE_INFO, VN_INFO_ANTI_RANGE_P, VN_INFO_RANGE_TYPE,
5592         VN_INFO_PTR_INFO): Remove.
5593         * tree-ssa-sccvn.c: ... (rewrite)
5594         (pass_fre::execute): For -O2+ initialize loops and run
5595         RPO VN in optimistic mode (iterating).  For -O1 and -Og
5596         run RPO VN in non-optimistic mode.
5597         * params.def (PARAM_SCCVN_MAX_SCC_SIZE): Remove.
5598         (PARAM_RPO_VN_MAX_LOOP_DEPTH): Add.
5599         * doc/invoke.texi (sccvn-max-scc-size): Remove.
5600         (rpo-vn-max-loop-depth): Document.
5601         * tree-ssa-alias.c (walk_non_aliased_vuses): Stop walking
5602         when valuezing the VUSE signals we walked out of the region.
5603         * tree-ssa-pre.c (phi_translate_1): Ignore predicated values.
5604         (phi_translate): Set VN context block to use for availability
5605         lookup.
5606         (compute_avail): Likewise.
5607         (pre_valueize): New function.
5608         (pass_pre::execute): Adjust to the RPO VN API.
5610         * tree-ssa-loop-ivcanon.c: Include tree-ssa-sccvn.h.
5611         (propagate_constants_for_unrolling): Remove.
5612         (tree_unroll_loops_completely): Perform value-numbering
5613         on the unrolled bodies loop parent.
5615 2018-08-27  Richard Biener  <rguenther@suse.de>
5617         * tree-ssa-pre.c (compute_antic): Re-use inverted postorder
5618         for partial antic compute.
5620 2018-08-27  Jakub Jelinek  <jakub@redhat.com>
5622         PR rtl-optimization/87065
5623         * combine.c (simplify_if_then_else): Formatting fix.
5624         (if_then_else_cond): Guard MULT optimization with SCALAR_INT_MODE_P
5625         check.
5626         (known_cond): Don't return const_true_rtx for vector modes.  Use
5627         CONST0_RTX instead of const0_rtx.  Formatting fixes.
5629 2018-08-27  Martin Liska  <mliska@suse.cz>
5631         PR gcov-profile/87069
5632         * gcov.c (process_file): Record files already processed
5633         and warn about a file being processed multiple times.
5635 2018-08-27  Martin Liska  <mliska@suse.cz>
5637         PR driver/83193
5638         * config/aarch64/aarch64.c (aarch64_override_options_internal):
5639         Set default values for x_aarch64_*_string strings.
5640         * config/aarch64/aarch64.opt: Remove --{march,mcpu,mtune}==
5641         prefix.  For -mabi do not print '=ABI' in help and use
5642         <option_value> format for -msve-vector-bits and -moverride
5643         options.
5645 2018-08-26  Jeff Law  <law@redhat.com>
5647         * config/mips/frame-header-opt.c: Include "backend.h" rather than
5648         "cfg.h"
5650 2018-08-26  Marek Polacek  <polacek@redhat.com>
5652         PR c++/87029, Implement -Wredundant-move.
5653         * doc/invoke.texi: Document -Wredundant-move.
5655 2018-08-25  Martin Sebor  <msebor@redhat.com>
5657         PR tree-optimization/87059
5658         * builtins.c (expand_builtin_strncmp): Convert MIN_EXPR operand
5659         to the same type as the other.
5660         * fold-const.c (fold_binary_loc): Assert expectation.
5662 2018-08-25  Iain Sandoe  <iain@sandoe.co.uk>
5664         * config/darwin.c (machopic_legitimize_pic_address): Clean up
5665         extraneous parentheses, dead code section and formatting.
5667 2018-08-24  David Malcolm  <dmalcolm@redhat.com>
5669         PR c++/87091
5670         * diagnostic-show-locus.c (layout::layout): Ensure the margin is
5671         wide enough for jumps in the line-numbering to be visible.
5672         (layout::print_gap_in_line_numbering): New member function.
5673         (layout::calculate_line_spans): When using line numbering, merge
5674         line spans that are only 1 line apart.
5675         (diagnostic_show_locus): When printing line numbers, show gaps in
5676         line numbering directly, rather than printing headers.
5677         (selftest::test_diagnostic_show_locus_fixit_lines): Add test of
5678         line-numbering with multiple line spans.
5679         (selftest::test_fixit_insert_containing_newline_2): Add test of
5680         line-numbering, in which the spans are close enough to be merged.
5682 2018-08-24  Aldy Hernandez  <aldyh@redhat.com>
5684         * gimple-ssa-evrp-analyze.c (set_ssa_range_info): Pass value_range
5685         to range_includes_zero_p.  Do not special case VR_ANTI_RANGE.
5686         * tree-vrp.c (range_is_nonnull): Remove.
5687         (range_includes_zero_p): Accept value_range instead of min/max.
5688         (extract_range_from_binary_expr_1): Do not early bail on
5689         POINTER_PLUS_EXPR.
5690         Use range_includes_zero_p instead of range_is_nonnull.
5691         (extract_range_from_unary_expr): Use range_includes_zero_p instead
5692         of range_is_nonnull.
5693         (vrp_meet_1): Pass value_range to range_includes_zero_p.  Do not
5694         special case VR_ANTI_RANGE.
5695         (vrp_finalize): Same.
5696         * tree-vrp.h (range_includes_zero_p): Pass value_range as argument
5697         instead of min/max.
5698         (range_is_nonnull): Remove.
5699         * vr-values.c (vrp_stmt_computes_nonzero): Use
5700         range_includes_zero_p instead of range_is_nonnull.
5701         (extract_range_basic): Pass value_range to range_includes_zero_p
5702         instead of range_is_nonnull.
5704 2018-08-24  Uros Bizjak  <ubizjak@gmail.com>
5706         * emit-rtl.c (init_emit_once): Do not emit MODE_POINTER_BOUNDS RTXes.
5707         * emit-rtl.h (rtl_data): Remove return_bnd.
5708         * explow.c (trunc_int_for_mode): Do not handle POINTER_BOUNDS_MODE_P.
5709         * function.c (diddle_return_value): Do not handle crtl->return_bnd.
5710         * genmodes.c (complete_mode): Do not handle MODE_POINTER_BOUNDS.
5711         (POINTER_BOUNDS_MODE): Remove definition.
5712         (make_pointer_bounds_mode): Remove.
5713         (get_mode_class): Do not handle MODE_POINTER_BOUNDS.
5714         * machmode.h (POINTER_BOUNDS_MODE_P): Remove definition.
5715         (scalare_mode::includes_p): Do not handle MODE_POINTER_BOUNDS.
5716         * mode-classes.def: Do not define MODE_POINTER_BOUNDS.
5717         * stor-layout.c (int_mode_for_mode): Do not handle MODE_POINTER_BOUNDS.
5718         * tree-core.h (enum tree_index): Remove TI_POINTER_BOUNDS_TYPE.
5719         * varasm.c (output_constant_pool_2): Do not handle MODE_POINTER_BOUNDS.
5721         * config/i386/i386-modes.def (BND32, BND64): Remove.
5722         * config/i386/i386.c (dbx_register_map): Remove bound registers.
5723         (dbx64_register_map): Ditto.
5724         (svr4_dbx_register_map): Ditto.
5725         (indirect_thunk_bnd_needed): Remove.
5726         (indirect_thunks_bnd_used): Ditto.
5727         (indirect_return_bnd_needed): Ditto.
5728         (indirect_return_via_cx_bnd): Ditto.
5729         (enum indirect_thunk_prefix): Remove indirect_thunk_prefix_bnd.
5730         (indirect_thunk_name): Remove handling of indirect_thunk_prefix_bnd.
5731         (output_indirect_thunk): Ditto.  Remove need_prefix argument.
5732         (output_indirect_thunk_function): Remove handling of
5733         indirect_return_bnd_needed, indirect_return_via_cx_bnd,
5734         indirect_thunk_bnd_needed and indirect_thunks_bnd_used variables.
5735         (ix86_save_reg): Remove handling of crtl->return_bnd.
5736         (ix86_legitimate_constant_p): Remove handling of POINTER_BOUNDS_MODE_P.
5737         (ix86_print_operand_address_as): Remove handling of UNSPEC_BNDMK_ADDR
5738         and UNSPEC_BNDLX_ADDR.
5739         (ix86_output_indirect_branch_via_reg): Remove handling of
5740         indirect_thunk_prefix_bnd.
5741         (ix86_output_indirect_branch_via_push): Ditto.
5742         (ix86_output_function_return): Ditto.
5743         (ix86_output_indirect_function_return): Ditto.
5744         (avoid_func_arg_motion): Do not handle UNSPEC_BNDSTX.
5745         * config/i386/i386.h (FIXED_REGISTERS): Remove bound registers.
5746         (CALL_USED_REGISTERS): Ditto.
5747         (REG_ALLOC_ORDER): Update for removal of bound registers.
5748         (HI_REGISTER_NAMES): Ditto.
5749         * config/i386/i386.md (UNSPEC_BNDMK, UNSPEC_BNDMK_ADDR, UNSPEC_BNDSTX)
5750         (UNSPEC_BNDLDX, UNSPEC_BNDLDX_ADDR, UNSPEC_BNDCL, UNSPEC_BNDCU)
5751         (UNSPEC_BNDCN, UNSPEC_MPX_FENCE): Remove.
5752         (BND0_REG, BND1_REG, BND2_REG, BND3_REG): Remove
5753         (FIRST_PSEUDO_REG): Update.
5754         (BND): Remove mode iterator.
5755         * config/i386/predicates.md (bnd_mem_operator): Remove.
5757 2018-08-24  Richard Sandiford  <richard.sandiford@arm.com>
5759         * tree-vect-stmts.c (vectorizable_bswap): Handle variable-length
5760         vectors.
5762 2018-08-24  Richard Sandiford  <richard.sandiford@arm.com>
5764         * tree-vect-slp.c (vect_transform_slp_perm_load): Separate out
5765         the case in which the permute needs only a single element and
5766         repeats for every vector of the result.  Extend that case to
5767         handle variable-length vectors.
5768         * tree-vect-stmts.c (vectorizable_load): Update accordingly.
5770 2018-08-24  H.J. Lu  <hongjiu.lu@intel.com>
5772         PR debug/79342
5773         * dwarf2out.c (save_macinfo_strings): Call set_indirect_string
5774         on DW_MACINFO_start_file for -gsplit-dwarf -g3.
5776 2018-08-24  Richard Biener  <rguenther@suse.de>
5778         * cfg.h (struct control_flow_graph): Add edge_flags_allocated and
5779         bb_flags_allocated members.
5780         (auto_flag): New RAII class for allocating flags.
5781         (auto_edge_flag): New RAII class for allocating edge flags.
5782         (auto_bb_flag): New RAII class for allocating bb flags.
5783         * cfgloop.c (verify_loop_structure): Allocate temporary edge
5784         flag dynamically.
5785         * cfganal.c (dfs_enumerate_from): Remove use of visited sbitmap
5786         in favor of temporarily allocated BB flag.
5787         * hsa-brig.c: Re-order includes.
5788         * hsa-dump.c: Likewise.
5789         * hsa-regalloc.c: Likewise.
5790         * print-rtl.c: Likewise.
5791         * profile-count.c: Likewise.
5793 2018-08-24  Segher Boessenkool  <segher@kernel.crashing.org>
5795         PR target/86989
5796         * config/rs6000/rs6000.c (toc_relative_expr_p): Check that the base is
5797         the TOC register.
5799 2018-08-24  Aldy Hernandez  <aldyh@redhat.com>
5801         PR 87073/bootstrap
5802         * wide-int-range.cc (wide_int_range_div): Do not ignore result
5803         from wide_int_range_multiplicative_op.
5805 2018-08-23  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
5807         * tree-vect-data-refs.c (vect_grouped_store_supported): Fix typo
5808         "permutaion".
5810 2018-08-23  Giuliano Belinassi  <giuliano.belinassi@usp.br>
5812         * genmatch.c (parser::parse_operation): Fix typo 'exapnded'
5813         to 'expanded'.
5815 2018-08-23  Alexander Monakov  <amonakov@ispras.ru>
5817         * tree-scalar-evolution.c (final_value_replacement_loop): Dump
5818         full GENERIC expression used for replacement.
5820 2018-08-23  Aldy Hernandez  <aldyh@redhat.com>
5822         * tree-vrp.c (abs_extent_range): Remove.
5823         (extract_range_into_wide_ints): Pass wide ints by reference.
5824         (extract_range_from_binary_expr_1): Rewrite the *DIV_EXPR code.
5825         Pass wide ints by reference in all calls to
5826         extract_range_into_wide_ints.
5827         * wide-int-range.cc (wide_int_range_div): New.
5828         * wide-int-range.h (wide_int_range_div): New.
5829         (wide_int_range_includes_zero_p): New.
5830         (wide_int_range_zero_p): New.
5832 2018-08-23  Matthew Malcomson  <matthew.malcomson@arm.com>
5834         * config/aarch64/aarch64.md (arches): New enum.
5835         (arch): New enum attr.
5836         (arch_enabled): New attr.
5837         (enabled): Now uses arch_enabled only.
5838         (simd, sve, fp16): Removed attribute.
5839         (fp): Attr now defined in terms of 'arch'.
5840         (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64, *movti_aarch64,
5841         *movhf_aarch64, <optab><fcvt_target><GPF:mode>2,
5842         <FCVT_F2FIXED:fcvt_fixed_insn><GPF:mode>3,
5843         <FCVT_FIXED2F:fcvt_fixed_insn><GPI:mode>3): Merge 'fp' and 'simd'
5844         attributes into 'arch'.
5845         (*movsf_aarch64, *movdf_aarch64, *movtf_aarch64, *add<mode>3_aarch64,
5846         subdi3, neg<mode>2, <optab><mode>3, one_cmpl<mode>2,
5847         *<NLOGICAL:optab>_one_cmpl<mode>3, *xor_one_cmpl<mode>3,
5848         *aarch64_ashl_sisd_or_int_<mode>3, *aarch64_lshr_sisd_or_int_<mode>3,
5849         *aarch64_ashr_sisd_or_int_<mode>3, *aarch64_sisd_ushl): Convert use of
5850         'simd' attribute into 'arch'.
5851         (load_pair_sw_<SX:mode><SX2:mode>, load_pair_dw_<DX:mode><DX2:mode>,
5852         store_pair_sw_<SX:mode><SX2:mode>, store_pair_dw_<DX:mode><DX2:mode>):
5853         Convert use of 'fp' attribute to 'arch'.
5854         * config/aarch64/aarch64-simd.md (move_lo_quad_internal_<mode>,
5855         move_lo_quad_internal_<mode>): (different modes) Merge 'fp' and 'simd'
5856         into 'arch'.
5857         (move_lo_quad_internal_be_<mode>, move_lo_quad_internal_be_<mode>):
5858         (different modes) Merge 'fp' and 'simd' into 'arch'.
5859         (*aarch64_combinez<mode>, *aarch64_combinez_be<mode>): Merge 'fp' and
5860         'simd' into 'arch'.
5862 2018-08-23  Segher Boessenkool  <segher@kernel.crashing.org>
5864         PR rtl-optimization/87026
5865         * expmed.c (canonicalize_comparison): If we can no longer create
5866         pseudoregisters, don't.
5868 2018-08-23  Richard Earnshaw  <rearnsha@arm.com>
5870         PR target/86951
5871         * config/arm/arm-protos.h (arm_emit_speculation_barrier): New
5872         prototype.
5873         * config/arm/arm.c (speculation_barrier_libfunc): New static
5874         variable.
5875         (arm_init_libfuncs): Initialize it.
5876         (arm_emit_speculation_barrier): New function.
5877         * config/arm/arm.md (speculation_barrier): Call
5878         arm_emit_speculation_barrier for architectures that do not have
5879         DSB or ISB.
5880         (speculation_barrier_insn): Only match on Armv7 or later.
5882 2018-08-23  Richard Biener  <rguenther@suse.de>
5884         PR middle-end/87024
5885         * tree-inline.c (copy_bb): Drop unused __builtin_va_arg_pack_len
5886         calls.
5888 2018-08-23  Richard Sandiford  <richard.sandiford@arm.com>
5890         * config/aarch64/aarch64.c (aarch64_evpc_sve_tbl): Fix handling
5891         of single-vector TBLs.
5892         (aarch64_vectorize_vec_perm_const): Set one_vector_p when only
5893         one input is given.
5895 2018-08-23  Richard Sandiford  <richard.sandiford@arm.com>
5897         PR target/85910
5898         * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const_1): Fix
5899         aarch64_evpc_tbl guard.
5901 2018-08-22  Bernd Edlinger  <bernd.edlinger@hotmail.de>
5903         * tree-ssa-dse.c (compute_trims): Avoid folding away undefined
5904         behaviour.
5906 2018-08-22  Martin Sebor  <msebor@redhat.com>
5908         PR middle-end/87052
5909         * tree-pretty-print.c (pretty_print_string): Add argument.
5910         (dump_generic_node): Call to pretty_print_string with string size.
5912 2018-08-22  Segher Boessenkool  <segher@kernel.crashing.org>
5914         PR rtl-optimization/86771
5915         * combine.c (try_combine): Do not allow splitting a resulting PARALLEL
5916         of two SETs into those two SETs, one to be placed at i2, if that SETs
5917         destination is modified between i2 and i3.
5919 2018-08-22  Richard Sandiford  <richard.sandiford@arm.com>
5921         PR tree-optimization/86725
5922         * tree-vect-loop.c (vect_inner_phi_in_double_reduction_p): New
5923         function.
5924         (vect_analyze_scalar_cycles_1): Check it.
5926 2018-08-22  Richard Sandiford  <richard.sandiford@arm.com>
5928         PR tree-optimization/86725
5929         * tree-vect-loop.c (vect_is_simple_reduction): When treating
5930         an outer loop phi as a double reduction, make sure that the
5931         single user of the phi result is an inner loop phi.
5933 2018-08-22  Richard Sandiford  <richard.sandiford@arm.com>
5935         * tree-vect-data-refs.c (vect_analyze_group_access_1): Convert
5936         grouped stores with gaps to a strided group.
5938 2018-08-22  Richard Sandiford  <richard.sandiford@arm.com>
5940         * tree-vect-stmts.c (get_group_load_store_type)
5941         (get_load_store_type): Only test STMT_VINFO_STRIDED_P for the
5942         first statement in a group.
5944 2018-08-22  Iain Sandoe  <iain@sandoe.co.uk>
5946         * config/darwin.h (LINK_COMMAND_SPEC_A): Sync LTO options with
5947         the sequence used in gcc/gcc.c.
5949 2018-08-22  Iain Sandoe  <iain@sandoe.co.uk>
5951         PR other/704
5952         * gcc-ar.c (main): Don’t try to invoke the plug-in if we’re not
5953         building it.
5955 2018-08-22  Iain Sandoe  <iain@sandoe.co.uk>
5957         * config/darwin10.h (LINK_GCC_C_SEQUENCE_SPEC): Adjust to use the
5958         Darwin10-specific unwinder-shim.
5959         * config/darwin12.h (LINK_GCC_C_SEQUENCE_SPEC): Remove.
5960         * config/rs6000/darwin.h (DARWIN_CRT1_SPEC, DARWIN_DYLIB1_SPEC):
5961         New to cater for Darwin10 Rosetta.
5963 2018-08-22  Iain Sandoe  <iain@sandoe.co.uk>
5965         * config/i386/i386.c (ix86_output_addr_diff_elt): Move the MACH-O
5966         specific test before the one for HAVE_AS_GOTOFF_IN_DATA.
5968 2018-08-22  Iain Sandoe  <iain@sandoe.co.uk>
5970         PR bootstrap/81033
5971         PR target/81733
5972         PR target/52795
5973         * gcc/dwarf2out.c (FUNC_SECOND_SECT_LABEL): New.
5974         (dwarf2out_switch_text_section): Generate a local label for the
5975         second function sub-section and apply it as the second FDE start
5976         label.
5977         * gcc/final.c (final_scan_insn_1): Emit second FDE label after the
5978         second sub-section start.
5980 2018-08-22  Richard Biener  <rguenther@suse.de>
5982         PR tree-optimization/86988
5983         * tree-vrp.c (vrp_prop::check_mem_ref): Bail out on VLAs.
5985 2018-08-22  Richard Biener  <rguenther@suse.de>
5987         PR tree-optimization/86945
5988         * tree-cfg.c (generate_range_test): Use unsigned arithmetic.
5990 2018-08-22  Alexandre Oliva <oliva@adacore.com>
5992         * config/rs6000/rs6000.c (SMALL_DATA_RELOC, SMALL_DATA_REG): Add
5993         a comment about how uses of r2 for .sdata2 come about.
5995 2018-08-22  Alexandre Oliva <aoliva@redhat.com>
5997         * tree-ssa-reassoc.c (is_reassociable_op): Fix cut&pasto.
5999 2018-08-21  Marek Polacek  <polacek@redhat.com>
6001         PR c++/86981, Implement -Wpessimizing-move.
6002         * doc/invoke.texi: Document -Wpessimizing-move.
6004 2018-08-21  Jan Hubicka  <jh@suse.cz>
6006         * tree.c (find_decls_types_r): Do not check for redundant typedefs.
6007         * tree.h (is_redundant_typedef): Remove.
6008         * dwarf2out.c (is_redundant_typedef): Turn into static function.
6010 2018-08-21  Jan Hubicka  <jh@suse.cz>
6012         * tree.c (free_lang_data_in_decl): Remove types from DECL_CONTEXT
6013         when possible.
6015 2018-08-21  Tamar Christina  <tamar.christina@arm.com>
6017         * expmed.c (extract_low_bits): Reject invalid subregs early.
6019 2018-08-21  Bernd Edlinger  <bernd.edlinger@hotmail.de>
6021         PR middle-end/86121
6022         * tree-ssa-strlen.c (adjust_last_stmt): Avoid folding away undefined
6023         behaviour.
6025 2018-08-21  Rasmus Villemoes  <rv@rasmusvillemoes.dk>
6027         * config/vxworks.h: Guard vxworks_asm_out_constructor and
6028         vxworks_asm_out_destructor by !HAVE_INITFINI_ARRAY_SUPPORT
6029         * config/vxworks.c: Likewise.
6031 2018-08-21  Rasmus Villemoes  <rv@rasmusvillemoes.dk>
6033         * config/vxworks.c: Set targetm.have_ctors_dtors
6034         if HAVE_INITFINI_ARRAY_SUPPORT.
6035         * config/vxworks.h: Set SUPPORTS_INIT_PRIORITY
6036         if HAVE_INITFINI_ARRAY_SUPPORT.
6038 2018-08-21  Rasmus Villemoes  <rv@rasmusvillemoes.dk>
6040         * config/vxworks.h: Add $(WIND_BASE)/target/h/wrn/coreip to
6041         default search path for VxWorks < 7.
6043 2018-08-21  Bernd Edlinger  <bernd.edlinger@hotmail.de>
6045         * gimple-ssa-sprintf.c (decl_constant_value): Remove.
6046         (get_format_string): Refer to c_getstr.
6048 2018-08-21  Tom de Vries  <tdevries@suse.de>
6050         * cgraph.h (debuginfo_early_init, debuginfo_init, debuginfo_fini)
6051         (debuginfo_start, debuginfo_stop, debuginfo_early_start)
6052         (debuginfo_early_stop): Declare.
6053         * cgraphunit.c (debuginfo_early_init, debuginfo_init, debuginfo_fini)
6054         (debuginfo_start, debuginfo_stop, debuginfo_early_start)
6055         (debuginfo_early_stop): New function.
6056         (symbol_table::finalize_compilation_unit): Call debuginfo_early_start
6057         and debuginfo_early_stop.
6058         * dwarf2out.c (dwarf2out_finish, dwarf2out_early_finish): Dump dwarf.
6059         * toplev.c (compile_file): Call debuginfo_start and debuginfo_stop.
6060         (general_init): Call debuginfo_early_init.
6061         (finalize): Call debuginfo_fini.
6062         (do_compile): Call debuginfo_init.
6063         * doc/invoke.texi (@gccoptlist): Add -fdump-debug and
6064         -fdump-early-debug.
6065         (@item -fdump-debug, @item -fdump-earlydebug): Add.
6067 2018-08-21  Tom de Vries  <tdevries@suse.de>
6069         * dwarf2out.c (print_dw_val, print_loc_descr, print_die): Handle
6070         flag_dump_noaddr and flag_dump_unnumbered.
6072 2018-08-21  Aldy Hernandez  <aldyh@redhat.com>
6074         * wide-int-range.cc (wide_int_range_abs): New.
6075         (wide_int_range_order_set): Rename from wide_int_range_min_max.
6076         * wide-int-range.h (wide_int_range_abs): New.
6077         (wide_int_range_min_max): New.
6078         * tree-vrp.c (extract_range_from_unary_expr): Rewrite ABS_EXPR
6079         case to call wide_int_range_abs.
6080         Rewrite MIN/MAX_EXPR to call wide_int_range_min_max.
6081         (extract_range_from_abs_expr): Delete.
6083 2018-08-20  Michael Meissner  <meissner@linux.ibm.com>
6085         PR target/87033
6086         * config/rs6000/rs6000.md (extendsi<mode>2): Change constraints
6087         from 'Y' to 'YZ' to enable the LWAX instruction to be generated
6088         for indexed loads.
6090 2018-08-20  Nathan Sidwell  <nathan@acm.org>
6091             Jeff Law <law@redhat.com>
6093         * config/s390/s390-c (s390_macro_to_expand): Use cpp_macro_p.
6094         * config/spu/spu-c.c (spu_macro_to_expand): Likewise.
6096 2018-08-20  David Malcolm  <dmalcolm@redhat.com>
6098         PR other/84889
6099         * attribs.c (diag_attr_exclusions): Add auto_diagnostic_group instance.
6100         (decl_attributes): Likewise.
6101         * calls.c (maybe_warn_nonstring_arg): Add auto_diagnostic_group
6102         instance.
6103         * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
6104         * diagnostic-core.h (class auto_diagnostic_group): New class.
6105         * diagnostic.c (diagnostic_initialize): Initialize the new fields.
6106         (diagnostic_report_diagnostic): Handle the first diagnostics within
6107         a group.
6108         (emit_diagnostic): Add auto_diagnostic_group instance.
6109         (inform): Likewise.
6110         (inform_n): Likewise.
6111         (warning): Likewise.
6112         (warning_at): Likewise.
6113         (warning_n): Likewise.
6114         (pedwarn): Likewise.
6115         (permerror): Likewise.
6116         (error): Likewise.
6117         (error_n): Likewise.
6118         (error_at): Likewise.
6119         (sorry): Likewise.
6120         (fatal_error): Likewise.
6121         (internal_error): Likewise.
6122         (internal_error_no_backtrace): Likewise.
6123         (auto_diagnostic_group::auto_diagnostic_group): New ctor.
6124         (auto_diagnostic_group::~auto_diagnostic_group): New dtor.
6125         * diagnostic.h (struct diagnostic_context): Add fields
6126         "diagnostic_group_nesting_depth",
6127         "diagnostic_group_emission_count", "begin_group_cb",
6128         "end_group_cb".
6129         * gimple-ssa-isolate-paths.c (find_implicit_erroneous_behavior):
6130         Add auto_diagnostic_group instance(s).
6131         (find_explicit_erroneous_behavior): Likewise.
6132         * gimple-ssa-warn-alloca.c (pass_walloca::execute): Likewise.
6133         * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Likewise.
6134         * gimplify.c (warn_implicit_fallthrough_r): Likewise.
6135         (gimplify_va_arg_expr): Likewise.
6136         * hsa-gen.c (HSA_SORRY_ATV): Likewise.
6137         (HSA_SORRY_AT): Likewise.
6138         * ipa-devirt.c (compare_virtual_tables): Likewise.
6139         (warn_odr): Likewise.
6140         * multiple_target.c (expand_target_clones): Likewise.
6141         * opts-common.c (cmdline_handle_error): Likewise.
6142         * reginfo.c (globalize_reg): Likewise.
6143         * substring-locations.c (format_warning_n_va): Likewise.
6144         * tree-inline.c (expand_call_inline): Likewise.
6145         * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Likewise.
6146         * tree-ssa-loop-niter.c
6147         (do_warn_aggressive_loop_optimizations): Likewise.
6148         * tree-ssa-uninit.c (warn_uninit): Likewise.
6149         * tree.c (warn_deprecated_use): Likewise.
6151 2018-08-20  H.J. Lu  <hongjiu.lu@intel.com>
6153         PR target/87014
6154         * config/i386/i386.md (eh_return): Always update EH return
6155         address in word_mode.
6157 2018-08-20  Chung-Lin Tang  <cltang@codesourcery.com>
6159         * targhooks.c (std_gimplify_va_arg_expr): Properly handle case of when
6160         TARGET_SPLIT_COMPLEX_ARG is defined.
6162 2018-08-20  Bernd Edlinger  <bernd.edlinger@hotmail.de>
6164         * expr.c (store_field): Change gcc_assert to gcc_checking_assert.
6166 2018-08-20  Bernd Edlinger  <bernd.edlinger@hotmail.de>
6168         PR target/86984
6169         * expr.c (expand_assignment): Assert that bitpos is positive.
6170         (store_field): Likewise
6171         (expand_expr_real_1): Make sure that bitpos is positive.
6172         * config/alpha/alpha.h (CONSTANT_ADDRESS_P): Avoid signed
6173         integer overflow.
6175 2018-08-20  Nathan Sidwell  <nathan@acm.org>
6177         * Makefile.in (CPP_ID_DATA_H): Delete.
6178         (CPP_INTERNAL_H): Don't add it.
6179         (GTFILES): Replace CPP_ID_DATA_H with CPPLIB_H.
6180         * gengtype.c (open_base_files): Replace cpp-id-data.h with cpplib.h
6182 2018-08-20  Richard Biener  <rguenther@suse.de>
6184         PR tree-optimization/78655
6185         * tree-vrp.c (extract_range_from_binary_expr_1): Make
6186         pointer + offset nonnull if either operand is nonnull work.
6188 2018-08-20  Tom de Vries  <tdevries@suse.de>
6190         * dwarf2out.c (add_scalar_info): Don't add reference to existing die
6191         unless the referenced die describes the added property using
6192         DW_AT_location or DW_AT_const_value.  Fall back to exprloc case.
6193         Otherwise, add a DW_AT_location to the referenced die.
6195 2018-08-19  Uros Bizjak  <ubizjak@gmail.com>
6197         PR target/86994
6198         * config/i386/i386.c (ix86_rtx_costs) [case SET]: Check source for
6199         register_operand when calling ix86_set_reg_reg_cost.
6200         [case CONST_INT, case CONST, case LABEL_REF, case SYMBOL_REF]:
6201         Set *total to 0 for operands that satisfy x86_64_immediate_operand
6202         predicate and to 1 otherwise.
6204 2018-08-18  Iain Sandoe  <iain@sandoe.co.uk>
6206         * config/darwin.c (darwin_override_options): If -gsplit-dwarf is set,
6207         emit a diagnostic that it is not supported and reset the option.
6208         * config/darwin.h (DRIVER_SELF_SPECS): Note that gsplit-dwarf is not
6209         supported and consume the option.  (ASM_FINAL_SPEC): New.
6211 2018-08-17  Segher Boessenkool  <segher@kernel.crashing.org>
6213         * doc/md.texi (Patterns): Use @ref instead of @xref in the middle of
6214         a sentence.
6216 2018-08-17  Sandra Loosemore  <sandra@codesourcery.com>
6218         C-SKY port: Documentation
6220         * doc/extend.texi (C-SKY Function Attributes): New section.
6221         * doc/invoke.texi (Option Summary): Add C-SKY options.
6222         (C-SKY Options): New section.
6223         * doc/md.texi (Machine Constraints): Document C-SKY constraints.
6225 2018-08-17  Jojo  <jijie_rong@c-sky.com>
6226             Huibin Wang  <huibin_wang@c-sky.com>
6227             Sandra Loosemore  <sandra@codesourcery.com>
6228             Chung-Lin Tang  <cltang@codesourcery.com>
6230         C-SKY port: Backend implementation
6232         * config/csky/*: New.
6233         * common/config/csky/*: New.
6235 2018-08-17  Jojo  <jijie_rong@c-sky.com>
6236             Huibin Wang  <huibin_wang@c-sky.com>
6237             Sandra Loosemore  <sandra@codesourcery.com>
6238             Chung-Lin Tang  <cltang@codesourcery.com>
6239             Andrew Jenner  <andrew@codesourcery.com>
6241         C-SKY port: Configury
6243         * config.gcc (csky-*-*): New.
6244         * configure.ac: Add csky to targets for dwarf2 debug_line support.
6245         * configure: Regenerated.
6247 2018-08-17  David Malcolm  <dmalcolm@redhat.com>
6249         * dump-context.h: Include "dumpfile.h".
6250         (dump_context::dump_printf_va): Convert final param from va_list
6251         to va_list *.  Convert from ATTRIBUTE_PRINTF to
6252         ATTRIBUTE_GCC_DUMP_PRINTF.
6253         (dump_context::dump_printf_loc_va): Likewise.
6254         * dumpfile.c: Include "stringpool.h".
6255         (make_item_for_dump_printf_va): Delete.
6256         (make_item_for_dump_printf): Delete.
6257         (class dump_pretty_printer): New class.
6258         (dump_pretty_printer::dump_pretty_printer): New ctor.
6259         (dump_pretty_printer::emit_items): New member function.
6260         (dump_pretty_printer::emit_any_pending_textual_chunks): New member
6261         function.
6262         (dump_pretty_printer::emit_item): New member function.
6263         (dump_pretty_printer::stash_item): New member function.
6264         (dump_pretty_printer::format_decoder_cb): New member function.
6265         (dump_pretty_printer::decode_format): New member function.
6266         (dump_context::dump_printf_va): Reimplement in terms of
6267         dump_pretty_printer.
6268         (dump_context::dump_printf_loc_va): Convert final param from va_list
6269         to va_list *.
6270         (dump_context::begin_scope): Reimplement call to
6271         make_item_for_dump_printf.
6272         (dump_printf): Update for change to dump_printf_va.
6273         (dump_printf_loc): Likewise.
6274         (selftest::test_capture_of_dump_calls): Convert "stmt" from
6275         greturn * to gimple *.  Add a test_decl.  Add tests of dump_printf
6276         with %T, %E, and %G.
6277         * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): New macro.
6278         (dump_printf): Replace ATTRIBUTE_PRINTF_2 with
6279         ATTRIBUTE_GCC_DUMP_PRINTF (2, 3).
6280         (dump_printf_loc): Replace ATTRIBUTE_PRINTF_3 with
6281         ATTRIBUTE_GCC_DUMP_PRINTF (3, 0).
6282         * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Convert
6283         use of HOST_WIDE_INT_PRINT_DEC on unsigned HOST_WIDE_INT "count"
6284         within a dump_printf_loc call to "%wu".
6285         (vector_alignment_reachable_p): Merge two dump_printf[_loc] calls,
6286         converting a use of HOST_WIDE_INT_PRINT_DEC to "%wd".  Add a
6287         missing space after "=".
6288         * tree-vect-loop.c (vect_analyze_loop_2) Within a dump_printf
6289         call, convert use of HOST_WIDE_INT_PRINT_DEC to "%wd".
6290         * tree-vect-slp.c (vect_slp_bb): Within a dump_printf_loc call,
6291         convert use of HOST_WIDE_INT_PRINT_UNSIGNED to "%wu".
6292         * tree-vectorizer.c (try_vectorize_loop_1): Likewise.  Remove
6293         duplicate "vectorized" from message.
6295 2018-08-17  Szabolcs Nagy  <szabolcs.nagy@arm.com>
6297         * config/arm/arm-builtins.c (arm_init_simd_builtin_types): Clear
6298         polyNxK_t element's TYPE_STRING_FLAG.
6300 2018-08-17  Segher Boessenkool  <segher@kernel.crashing.org>
6302         * config/rs6000/rs6000.md (*cbranch, *creturn): Name these patterns
6303         (they were unnamed before).  Fix comments.
6305 2018-08-17  Nathan Sidwell  <nathan@acm.org>
6307         * cppbuiltin.c: Include "cpplib.h", not "cpp-id-data.h".
6309 2018-08-17  Richard Biener  <rguenther@suse.de>
6311         PR tree-optimization/86841
6312         * wide-int-range.cc (wide_int_range_lshift): Use to_uhwi.
6314 2018-08-17  Martin Liska  <mliska@suse.cz>
6316         * common.opt: Remove Warn, Init and Report for options with
6317         Ignore/Deprecated flag. Warning is done automatically for
6318         Deprecated flags.
6319         * config/i386/i386.opt: Likewise.
6320         * config/ia64/ia64.opt: Likewise.
6321         * config/rs6000/rs6000.opt: Likewise.
6322         * cppbuiltin.c (define_builtin_macros_for_compilation_flags):
6323         Remove usage of flag_check_pointer_bounds.
6324         * lto-wrapper.c (merge_and_complain): Do not handle
6325         OPT_fcheck_pointer_bounds.
6326         (append_compiler_options): Likewise.
6327         * opt-functions.awk: Do not handle Deprecated.
6328         * optc-gen.awk: Check that Var, Report and Init are not
6329         used for an option with Ignore/Deprecated flag.
6330         * opts-common.c (decode_cmdline_option): Do not report
6331         CL_ERR_DEPRECATED.
6332         (read_cmdline_option): Report warning for OPT_SPECIAL_deprecated
6333         options.
6334         * opts.h (struct cl_option): Remove cl_deprecated flag.
6335         (CL_ERR_DEPRECATED): Remove error enum value.
6337 2018-08-17  Richard Biener  <rguenther@suse.de>
6339         PR middle-end/86505
6340         * tree-inline.c (copy_bb): When inlining __builtin_va_arg_pack_len ()
6341         across a va-arg-pack using call adjust its return value accordingly.
6343 2018-08-16  Martin Sebor  <msebor@redhat.com>
6345         PR tree-optimization/86853
6346         * gimple-ssa-sprintf.c (struct format_result): Rename member.
6347         (struct fmtresult): Add member and initialize it in ctors.
6348         (format_character): Handle %C.  Extend range to NUL.  Set MAYFAIL.
6349         (format_string): Handle %S the same as %ls.  Set MAYFAIL.
6350         (format_directive): Set POSUNDER4K when MAYFAIL is set.
6351         (parse_directive): Handle %C same as %c.
6352         (sprintf_dom_walker::compute_format_length): Adjust.
6353         (is_call_safe): Adjust.
6355 2018-08-16  Bernd Edlinger  <bernd.edlinger@hotmail.de>
6357         * builtins.c (c_strlen): Add new parameter eltsize.  Use it
6358         for determining how to count the elements.
6359         * builtins.h (c_strlen): Adjust prototype.
6360         * expr.c (string_constant): Add new parameter mem_size.
6361         Set *mem_size appropriately.
6362         * expr.h (string_constant): Adjust protoype.
6363         * gimple-fold.c (get_range_strlen): Add new parameter eltsize.
6364         * gimple-fold.h (get_range_strlen): Adjust prototype.
6365         * gimple-ssa-sprintf.c (get_string_length): Add new parameter eltsize.
6366         (format_string): Call get_string_length with eltsize.
6368 2018-08-16  David Malcolm  <dmalcolm@redhat.com>
6370         * diagnostic.c (default_diagnostic_start_span_fn): Call pp_string
6371         to emit the span, rather than setting it as the prefix.
6373 2018-08-16  David Malcolm  <dmalcolm@redhat.com>
6375         * diagnostic-show-locus.c (layout::start_annotation_line): Add
6376         "margin_char" parameter, defaulting to space.  Use it in place
6377         of pp_space for the initial part of the margin.
6378         (layout::print_leading_fixits): Use '+' when filling the margin
6379         of line-insertion fix-it hints.
6381 2018-08-16  Segher Boessenkool  <segher@kernel.crashing.org>
6383         * config/rs6000/rs6000.md (two unnamed define_insn and define_split):
6384         Delete.
6386 2018-08-16  Segher Boessenkool  <segher@kernel.crashing.org>
6388         * config/rs6000/altivec.md: Don't set length attribute to the default
6389         value.
6390         * config/rs6000/darwin.md: Ditto.
6391         * config/rs6000/dfp.md: Ditto.
6392         * config/rs6000/htm.md: Ditto.
6393         * config/rs6000/rs6000.md: Ditto.
6394         * config/rs6000/sync.md: Ditto.
6395         * config/rs6000/vsx.md: Ditto.
6397 2018-08-16  Segher Boessenkool  <segher@kernel.crashing.org>
6399         * config/rs6000/altivec.md: Don't set length attribute to the default
6400         value, for branch instructions.
6401         * config/rs6000/darwin.md: Ditto.
6402         * config/rs6000/rs6000.md: Ditto.
6404 2018-08-16  Segher Boessenkool  <segher@kernel.crashing.org>
6406         * config/rs6000/rs6000.md (length): Always define as const_int 4.
6407         (unnamed conditional branch define_insn): Set length to 4 or 8
6408         depending on offset.
6409         (<bd>_<mode>): Similar, for alternative 0.
6410         (<bd>tf_<mode>): Ditto.
6412 2018-08-16  Tamar Christina  <tamar.christina@arm.com>
6414         * expr.c (copy_blkmode_to_reg): Perform larger copies when safe.
6416 2018-08-16  Matthew Malcomson  <matthew.malcomson@arm.com>
6418         * doc/rtl.texi: Replace old RTX class names with new names.
6421 2018-08-16  Vlad Lazar  <vlad.lazar@arm.com>
6423         * expmed.h (canonicalize_comparison): New declaration.
6424         * expmed.c (canonicalize_comparison, equivalent_cmp_code): New function.
6425         * expmed.c (emit_store_flag_1): Add call to canonicalize_comparison.
6426         * optabs.c (prepare_cmp_insn): Likewise.
6427         * rtl.h (unsigned_condition_p): New function which checks if a
6428         comparison operator is unsigned.
6430 2018-08-16  Nathan Sidwell  <nathan@acm.org>
6432         * config/rs6000/rs6000-c.c (rs6000_macro_to_expend): Use cpp_macro_p.
6433         * config/powerpcspc/powerpcspe-c.c (rs6000_macro_to_expend): Likewise.
6435 2018-08-16  Tamar Christina  <tamar.christina@arm.com>
6437         PR target/84711
6438         * config/arm/arm.c (arm_can_change_mode_class): Disallow subreg.
6439         * config/arm/neon.md (movv4hf, movv8hf): Refactored to..
6440         (mov<mov>): ..this and enable unconditionally.
6442 2018-08-16  Tamar Christina  <tamar.christina@arm.com>
6444         * config/arm/neon.md (*neon_mov<mode>): Remove reg-to-reg alternative.
6446 2018-08-16  Sam Tebbs  <sam.tebbs@arm.com>
6448         * config/aarch64/aarch64.opt (mlow-precision-recip-sqrt)
6449         (mlow-precision-sqrt, mlow-precision-div, mverbose-cost-dump): Replace
6450         "Common" with "Target".
6452 2018-08-15  Uros Bizjak  <ubizjak@gmail.com>
6454         * config/i386/i386.opt (mmitigate-rop): Mark as deprecated.
6455         * doc/invoke.texi (mmitigate-rop): Remove.
6456         * config/i386/i386.c: Do not include "regrename.h".
6457         (ix86_rop_should_change_byte_p, reg_encoded_number)
6458         (ix86_get_modrm_for_rop, set_rop_modrm_reg_bits, ix86_mitigate_rop):
6459         Remove.
6460         (ix86_reorg): Remove call to ix86_mitigate_rop.
6461         * config/i386/i386.md (attr "modrm_class"): Remove.
6462         (cmp<mode>_ccno_1, mov<mode>_xor, movstrict<mode>_xor)
6463         (x86_mov<mode>cc_0_m1. x86_mov<mode>cc_0_m1_se)
6464         (x86_mov<mode>cc_0_m1_neg): Remove modrm_class attribute override.
6466 2018-08-15  Will Schmidt  <will_schmidt@vnet.ibm.com>
6468         * config/rs6000/rs600.c (rs6000_gimple_fold_builtin): Add entries to
6469         allow folding of mergeh() and mergel() for the float and double types.
6470         (fold_mergehl_helper): Rework to handle building a permute tree
6471         for float vectors.
6473 2018-08-15  Uros Bizjak  <ubizjak@gmail.com>
6475         * config/i386/i386.c (expand_vec_perm_movs): Enable V4SFmode
6476         for TARGET_SSE.
6478 2018-08-15  David Malcolm  <dmalcolm@redhat.com>
6480         * common.opt (fdiagnostics-show-labels): New option.
6481         * diagnostic-show-locus.c (class layout_range): Add field
6482         "m_label".
6483         (class layout): Add field "m_show_labels_p".
6484         (layout_range::layout_range): Add param "label" and use it to
6485         initialize m_label.
6486         (make_range): Pass in NULL for new "label" param of layout_range's
6487         ctor.
6488         (layout::layout): Initialize m_show_labels_p.
6489         (layout::maybe_add_location_range): Pass in loc_range->m_label
6490         when constructing layout_range instances.
6491         (struct line_label): New struct.
6492         (layout::print_any_labels): New member function.
6493         (layout::print_line): Call it if label-printing is enabled.
6494         (selftest::test_one_liner_labels): New test.
6495         (selftest::test_diagnostic_show_locus_one_liner): Call it.
6496         * diagnostic.c (diagnostic_initialize): Initialize
6497         context->show_labels_p.
6498         * diagnostic.h (struct diagnostic_context): Add field
6499         "show_labels_p".
6500         * doc/invoke.texi (Diagnostic Message Formatting Options): Add
6501         -fno-diagnostics-show-labels.
6502         * dwarf2out.c (gen_producer_string): Add
6503         OPT_fdiagnostics_show_labels to the ignored options.
6504         * gcc-rich-location.c (gcc_rich_location::add_expr): Add "label"
6505         param.
6506         (gcc_rich_location::maybe_add_expr): Likewise.
6507         * gcc-rich-location.h (gcc_rich_location::gcc_rich_location): Add
6508         label" param, defaulting to NULL.
6509         (gcc_rich_location::add_expr): Add "label" param.
6510         (gcc_rich_location::maybe_add_expr): Likewise.
6511         (class text_range_label): New class.
6512         (class range_label_for_type_mismatch): New class.
6513         * gimple-ssa-sprintf.c (fmtwarn): Pass NULL for new label params
6514         of format_warning_va.
6515         (fmtwarn_n): Likewise for new params of format_warning_n_va.
6516         * lto-wrapper.c (merge_and_complain): Add
6517         OPT_fdiagnostics_show_labels to the "pick one setting" options.
6518         (append_compiler_options): Likewise to the dropped options.
6519         (append_diag_options): Likewise to the passed-on options.
6520         * opts.c (common_handle_option): Handle the new option.
6521         * selftest-diagnostic.c
6522         (test_diagnostic_context::test_diagnostic_context): Enable
6523         show_labels_p.
6524         * substring-locations.c: Include "gcc-rich-location.h".
6525         (format_warning_n_va): Add "fmt_label" and "param_label" params
6526         and use them as appropriate.
6527         (format_warning_va): Add "fmt_label" and "param_label" params,
6528         passing them on to format_warning_n_va.
6529         (format_warning_at_substring): Likewise.
6530         (format_warning_at_substring_n): Likewise.
6531         * substring-locations.h (format_warning_va): Add "fmt_label" and
6532         "param_label" params.
6533         (format_warning_n_va): Likewise.
6534         (format_warning_at_substring): Likewise.
6535         (format_warning_at_substring_n): Likewise.
6536         * toplev.c (general_init): Initialize global_dc->show_labels_p.
6538 2018-08-15  Qing Zhao  <qing.zhao@oracle.com>
6540         PR testsuite/86519
6541         * builtins.c (expand_builtin_memcmp): Do not expand the call
6542         when overflow is detected.
6544 2018-08-15  Martin Sebor  <msebor@redhat.com>
6546         PR tree-optimization/71625
6547         * config/aarch64/aarch64-builtins.c
6548         (aarch64_init_simd_builtin_types): Clear Poly8_t's TYPE_STRING_FLAG.
6550 2018-08-15  Ilya Leoshkevich  <iii@linux.ibm.com>
6552         * config/s390/s390.c (s390_reorg): Remove loop.
6554 2018-08-15  Iain Sandoe  <iain@sandoe.co.uk>
6556         * config/darwin.c
6557          (darwin_function_switched_text_sections): Delete.
6558         * gcc/config/darwin.h
6559          (TARGET_ASM_FUNCTION_SWITCHED_TEXT_SECTIONS): Likewise.
6561 2018-08-15  Iain Sandoe  <iain@sandoe.co.uk>
6563         PR target/81685
6564         * config/darwin.h: (DEBUG_STR_OFFSETS_SECTION, DEBUG_LOCLISTS_SECTION,
6565         DEBUG_RNGLISTS_SECTION) new macros.  (DEBUG_PUBNAMES_SECTION,
6566         DEBUG_PUBTYPES_SECTION) update to include GNU variant.
6568 2018-08-15  Martin Liska  <mliska@suse.cz>
6570         PR tree-optimization/86925
6571         * predict.c (expr_expected_value_1): When taking
6572         later predictor, assign also probability.
6573         Use fold_build2_initializer_loc in order to fold
6574         the expression in -frounding-math.
6576 2018-08-14  Allan Sandfeld Jensen <allan.jensen@qt.io>
6578         * config/i386/i386.c (expand_vec_perm_movs): New method matching movs
6579         patterns.
6580         (expand_vec_perm_1): Try the new method.
6582 2018-08-14  Ilya Leoshkevich  <iii@linux.ibm.com>
6584         PR target/86547
6585         * lra-lives.c (remove_some_program_points_and_update_live_ranges):
6586         Check whether lra_live_max_point is 0 before dividing.
6588 2018-08-14  Martin Sebor  <msebor@redhat.com>
6590         PR tree-optimization/86650
6591         * tree-vrp.c (vrp_prop::check_array_ref): Print an inform message.
6592         (vrp_prop::check_mem_ref): Same.
6594 2018-08-13  Liu Hao <lh_mouse@126.com>
6596         * pretty-print.c (eat_esc_sequence): Swap the foreground and
6597         background colors if the COMMON_LVB_REVERSE_VIDEO flag is set,
6598         and clear it thereafter, as it only works for DBCS.
6600 2018-08-13  Liu Hao <lh_mouse@126.com>
6602         * pretty-print.c (mingw_ansi_fputs): Do not call _close() on the
6603         handle returned by _get_osf_handle().
6605 2018-08-13  Will Schmidt  <will_schmidt@vnet.ibm.com>
6607         * gcc/config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support
6608         for folding vec_perm.
6610 2018-08-13  Will Schmidt  <will_schmidt@vnet.ibm.com>
6612         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin):
6613         Add support for gimple-folding of vec_pack() and vec_unpack()
6614         intrinsics.
6616 2018-08-13  Will Schmidt <will_schmidt@vnet.ibm.com>
6618         * config/rs6000/rs6000.c (rs6000_builtin_valid_without_lhs): Add
6619         vec_xst variants to the list.
6620         (rs6000_gimple_fold_builtin): Add support for folding unaligned
6621         vector loads and stores.
6623 2018-08-13  David Edelsohn  <dje.gcc@gmail.com>
6625         * config.gcc (rs6000-ibm-aix4.x): Delete.
6626         (rs6000-ibm-aix5.1): Delete.
6627         (rs6000-ibm-aix5.2): Delete.
6628         (rs6000-ibm-aix5.3): Delete.
6629         * config/rs6000/aix43.h: Delete.
6630         * config/rs6000/aix51.h: Delete.
6631         * config/rs6000/aix52.h: Delete.
6632         * config/rs6000/t-aix43: Delete.
6634 2018-08-13  Ilya Leoshkevich  <iii@linux.ibm.com>
6636         * config/s390/s390.c (s390_decompose_constant_pool_ref):
6637         New function.
6638         (s390_decompose_address): Factor out constant pool ref
6639         decomposition.
6641 2018-08-12  Chung-Ju Wu  <jasonwucj@gmail.com>
6643         * config/nds32/nds32-predicates.c
6644         (nds32_can_use_bclr_p): Change return type as bool.
6645         (nds32_can_use_bset_p): Ditto.
6646         (nds32_can_use_btgl_p): Ditto.
6647         (nds32_can_use_bitci_p): Ditto.
6648         * config/nds32/nds32-protos.h
6649         (nds32_can_use_bclr_p): Change declaration.
6650         (nds32_can_use_bset_p): Ditto.
6651         (nds32_can_use_btgl_p): Ditto.
6652         (nds32_can_use_bitci_p): Ditto.
6654 2018-08-12  Chung-Ju Wu  <jasonwucj@gmail.com>
6656         * config/nds32/nds32.c (nds32_expand_prologue, nds32_expand_epilogue):
6657         Support -msched-prolog-epilog option.
6658         * config/nds32/nds32.opt (msched-prolog-epilog): New option.
6660 2018-08-12  Chung-Ju Wu  <jasonwucj@gmail.com>
6662         * common/config/nds32/nds32-common.c
6663         (nds32_option_optimization_table): Enalbe -malways-align.
6665 2018-08-12  Chung-Ju Wu  <jasonwucj@gmail.com>
6667         * config.gcc (nds32*): Add nds32_isr.h and nds32_init.inc in
6668         extra_headers.
6669         * common/config/nds32/nds32-common.c (nds32_handle_option): Handle
6670         OPT_misr_secure_ case.
6671         * config/nds32/nds32-isr.c: Implementation of backward compatibility.
6672         * config/nds32/nds32-protos.h (nds32_isr_function_critical_p): New.
6673         * config/nds32/nds32.c (nds32_attribute_table): Add critical and
6674         secure attribute.
6675         * config/nds32/nds32.h (nds32_isr_nested_type): Add NDS32_CRITICAL.
6676         (nds32_isr_info): New field security_level.
6677         (TARGET_ISR_VECTOR_SIZE_4_BYTE): New macro.
6678         * config/nds32/nds32.md (return_internal): Consider critical attribute.
6679         * config/nds32/nds32.opt (misr-secure): New option.
6680         * config/nds32/nds32_init.inc: New file.
6681         * config/nds32/nds32_isr.h: New file.
6683 2018-08-11  John David Anglin  <danglin@gcc.gnu.org>
6685         * config/pa/pa.md (UNSPEC_MEMORY_BARRIER): New unspec enum.
6686         Update comment for atomic instructions.
6687         (atomic_storeqi, atomic_storehi, atomic_storesi, atomic_storesf,
6688         atomic_loaddf, atomic_loaddf_1, atomic_storedf, atomic_storedf_1):
6689         Remove.
6690         (atomic_loaddi): Revise fence expansion to only emit fence prior to
6691         load for __ATOMIC_SEQ_CST model.
6692         (atomic_loaddi_1): Remove float register target.
6693         (atomic_storedi): Handle CONST_INT values.
6694         (atomic_storedi_1): Remove float register source.  Add special case
6695         for zero value.
6696         (memory_barrier): New expander and insn.
6698 2018-08-11  Jakub Jelinek  <jakub@redhat.com>
6700         PR tree-optimization/86835
6701         * tree-ssa-math-opts.c (insert_reciprocals): Even when inserting
6702         new_stmt after def_gsi, make sure to insert new_square_stmt after
6703         that stmt, not 2 stmts before it.
6705 2018-08-10  Alexander Monakov  <amonakov@ispras.ru>
6707         PR target/82418
6708         * config/i386/i386.md (<s>mul<mode>3_highpart): Use DWIH mode iterator
6709         instead of SWI48.
6711 2018-08-10  Martin Liska  <mliska@suse.cz>
6713         PR target/83610
6714         * builtin-types.def (BT_FN_LONG_LONG_LONG_DOUBLE): Add new
6715         function type.
6716         * builtins.c (expand_builtin_expect_with_probability):
6717         New function.
6718         (expand_builtin_expect_with_probability): New function.
6719         (build_builtin_expect_predicate): Add new argumnet probability
6720         for BUILT_IN_EXPECT_WITH_PROBABILITY.
6721         (fold_builtin_expect):
6722         (fold_builtin_2):
6723         (fold_builtin_3):
6724         * builtins.def (BUILT_IN_EXPECT_WITH_PROBABILITY):
6725         * builtins.h (fold_builtin_expect): Set new argument.
6726         * doc/extend.texi: Document __builtin_expect_with_probability.
6727         * doc/invoke.texi: Likewise.
6728         * gimple-fold.c (gimple_fold_call): Pass new argument.
6729         * ipa-fnsummary.c (find_foldable_builtin_expect): Handle
6730         also BUILT_IN_EXPECT_WITH_PROBABILITY.
6731         * predict.c (get_predictor_value): New function.
6732         (expr_expected_value): Add new argument probability. Assume
6733         that predictor and probability are always non-null.
6734         (expr_expected_value_1): Likewise.  For __builtin_expect and
6735         __builtin_expect_with_probability set probability.  Handle
6736         combination in binary expressions.
6737         (tree_predict_by_opcode): Simplify code by simply calling
6738         get_predictor_value.
6739         (pass_strip_predict_hints::execute): Add handling of
6740         BUILT_IN_EXPECT_WITH_PROBABILITY.
6741         * predict.def (PRED_BUILTIN_EXPECT_WITH_PROBABILITY): Add
6742         new predictor.
6743         * tree.h (DECL_BUILT_IN_P): New function.
6745 2018-08-10  Martin Liska  <mliska@suse.cz>
6747         PR tree-optimization/85799
6748         * passes.def: Add argument for pass_strip_predict_hints.
6749         * predict.c (class pass_strip_predict_hints): Add new argument
6750         early_p.
6751         (strip_predictor_early): New function.
6752         (pass_strip_predict_hints::execute): Call the function to
6753         strip predictors.
6754         (strip_predict_hints): New function.
6755         * predict.def: Fix comment.
6757 2018-08-10  Thomas Preud'homme  <thomas.preudhomme@linaro.org>
6759         * Makefile.in: Clarify which tm.texi to copy over to assert the
6760         right to grant a GFDL license for all.
6762 2018-08-09  Jeff Law  <law@redhat.com>
6764         * config/m68k/m68k.c (m68k_adjust_decorated_operand): Remove
6765         unused variable.
6767 2018-08-09  Andreas Schwab  <schwab@linux-m68k.org>
6769         * config/m68k/m68k-protos.h (m68k_final_prescan_insn): Remove
6770         prototype.
6772 2018-08-09  Richard Sandiford  <richard.sandiford@arm.com>
6774         * tree-vect-loop.c (vectorizable_reduction): Allow inner-loop
6775         reductions for variable-length vectors.
6777 2018-08-09  David Malcolm  <dmalcolm@redhat.com>
6779         PR other/84889
6780         * common.opt (fdiagnostics-show-line-numbers): New option.
6781         * diagnostic-show-locus.c (class layout): Add fields
6782         "m_show_line_numbers_p" and "m_linenum_width";
6783         (num_digits): New function.
6784         (test_num_digits): New function.
6785         (layout::layout): Initialize new fields.  Update m_x_offset
6786         logic to handle any left margin.
6787         (layout::print_source_line): Print line number when requested.
6788         (layout::start_annotation_line): New member function.
6789         (layout::print_annotation_line): Call it.
6790         (layout::print_leading_fixits): Likewise.
6791         (layout::print_trailing_fixits): Likewise.  Update calls to
6792         move_to_column for new parameter.
6793         (layout::get_x_bound_for_row): Add "add_left_margin" param and use
6794         it to potentially call start_annotation_line.
6795         (layout::show_ruler): Call start_annotation_line.
6796         (selftest::test_line_numbers_multiline_range): New selftest.
6797         (selftest::diagnostic_show_locus_c_tests): Call test_num_digits
6798         and selftest::test_line_numbers_multiline_range.
6799         * diagnostic.c (diagnostic_initialize): Initialize
6800         show_line_numbers_p.
6801         * diagnostic.h (struct diagnostic_context): Add field
6802         "show_line_numbers_p".
6803         * doc/invoke.texi (Diagnostic Message Formatting Options): Add
6804         -fno-diagnostics-show-line-numbers.
6805         * dwarf2out.c (gen_producer_string): Add
6806         OPT_fdiagnostics_show_line_numbers to the ignored options.
6807         * lto-wrapper.c (merge_and_complain): Likewise to the "pick
6808         one setting" options.
6809         (append_compiler_options): Likewise to the dropped options.
6810         (append_diag_options): Likewise to the passed-on options.
6811         * opts.c (common_handle_option): Handle the new option.
6812         * toplev.c (general_init): Set up global_dc->show_line_numbers_p.
6814 2018-08-09  Kelvin Nilsen  <kelvin@gcc.gnu.org>
6816         * doc/extend.texi (PowerPC AltiVec Built-in Functions Available on
6817         ISA 2.07): Correct spelling of bcdsub to be __builtin_bcdsub.  Add
6818         third argument of type "const signed char" to descriptions of
6819         __builtin_bcdadd, __builtin_bcdadd_lt, __builtin_bcdadd_eq,
6820         __builtin_bcdadd_gt, __builtin_bcdadd_ov, __builtin_bcdsub,
6821         __builtin_bcdsub_lt, __builtin_bcdsub_eq, __builtin_bcdsub_gt,
6822         __builtin_bcdsub_ov functions.
6824 2018-08-09  Richard Sandiford  <richard.sandiford@arm.com>
6826         PR tree-optimization/86858
6827         * tree-vect-loop.c (vect_is_simple_reduction): Restore
6828         flow_bb_inside_loop_p calls.
6830 2018-08-09  Richard Sandiford  <richard.sandiford@arm.com>
6832         PR tree-optimization/86871
6833         * tree-vect-stmts.c (vect_transform_stmt): Use gimple_get_lhs
6834         instead of gimple_assign_lhs.
6836 2018-08-09  Richard Earnshaw  <rearnsha@arm.com>
6838         PR target/86887
6839         * config/aarch64/aarch64.md (add<mode>3_carryinC_zero): Add missing
6840         register constraint to operand 0.
6841         (add<mode>3_carryinC): Likewise.
6842         (add<mode>3_carryinV_zero, add<mode>3_carryinV): Likewise.
6844 2018-08-09  Martin Liska  <mliska@suse.cz>
6846         PR c/86895
6847         * common.opt: Remove extra line.
6849 2018-08-09  Martin Liska  <mliska@suse.cz>
6851         * params.def (PARAM_ALIGN_LOOP_ITERATIONS): Remove double dots
6852         at the end of a line, make first letter capital and end up
6853         a sentence with a dot.
6854         (PARAM_LOOP_INTERCHANGE_STRIDE_RATIO): Likewise.
6855         (PARAM_LOOP_BLOCK_TILE_SIZE): Likewise.
6856         (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Likewise.
6857         (PARAM_GRAPHITE_MAX_ARRAYS_PER_SCOP): Likewise.
6858         (PARAM_MAX_ISL_OPERATIONS): Likewise.
6859         (PARAM_GRAPHITE_ALLOW_CODEGEN_ERRORS): Likewise.
6860         (PARAM_PROFILE_FUNC_INTERNAL_ID): Likewise.
6861         (PARAM_INDIR_CALL_TOPN_PROFILE): Likewise.
6862         (PARAM_SLP_MAX_INSNS_IN_BB): Likewise.
6863         (PARAM_IPA_CP_EVAL_THRESHOLD): Likewise.
6864         (PARAM_IPA_CP_RECURSION_PENALTY): Likewise.
6865         (PARAM_IPA_CP_SINGLE_CALL_PENALTY): Likewise.
6866         (PARAM_IPA_CP_LOOP_HINT_BONUS): Likewise.
6867         (PARAM_IPA_CP_ARRAY_INDEX_HINT_BONUS): Likewise.
6868         (PARAM_TREE_REASSOC_WIDTH): Likewise.
6869         (PARAM_HSA_GEN_DEBUG_STORES): Likewise.
6870         (PARAM_MAX_SPECULATIVE_DEVIRT_MAYDEFS): Likewise.
6871         (PARAM_MAX_VRP_SWITCH_ASSERTIONS): Likewise.
6873 2018-08-09  Andreas Krebbel  <krebbel@linux.ibm.com>
6875         PR target/84332
6876         * config/s390/s390.c (s390_option_override_internal): Reduce the
6877         stack-clash-protection-probe-interval param if it would be too big
6878         for z900.
6880 2018-08-08  Andreas Schwab  <schwab@linux-m68k.org>
6882         PR target/46179
6883         * config/m68k/m68k.h (FINAL_PRESCAN_INSN): Don't define.
6884         * config/m68k/m68k.c (handle_move_double): Don't call
6885         m68k_final_prescan_insn.
6886         (m68k_adjust_decorated_operand): Renamed from
6887         m68k_final_prescan_insn, remove first and third operand and
6888         simplify.
6889         (print_operand): Call it.
6890         (print_operand_address): Call it.
6892 2018-08-08  Nathan Sidwell  <nathan@acm.org>
6894         * diagnostic.c (diagnostic_report_current_module): Use
6895         linemap_included_from & linemap_included_from_linemap.
6897 2018-08-08  Hongbo Zhang  <hongbo.zhang@linaro.org>
6899         * config/aarch64/aarch64-cores.def: Add phecda core.
6900         * config/aarch64/aarch64-tune.md: Regenerate.
6901         * doc/invoke.texi: Add phecda core.
6903 2018-08-08  Andreas Krebbel  <krebbel@linux.ibm.com>
6905         PR target/85295
6906         * config/s390/constraints.md ("NxHD0", "NxSD0"): New constraint
6907         definitions.
6908         * config/s390/s390.md ("movti"): Add more alternatives for
6909         constant to GPR copies.
6911 2018-08-08  Andreas Krebbel  <krebbel@linux.ibm.com>
6913         * config/s390/s390.c: Fix whitespace damage throughout the file.
6914         * config/s390/s390.h: Likewise.
6915         * config/s390/tpf.h: Likewise.
6917 2018-08-08  Ilya Leoshkevich  <iii@linux.ibm.com>
6919         * config/s390/s390.c (s390_loadrelative_operand_p):
6920         Remove TARGET_CPU_ZARCH usages.
6921         (s390_rtx_costs): Likewise.
6922         (s390_legitimate_constant_p): Likewise.
6923         (s390_cannot_force_const_mem): Likewise.
6924         (legitimate_reload_constant_p): Likewise.
6925         (s390_preferred_reload_class): Likewise.
6926         (legitimize_pic_address): Likewise.
6927         (legitimize_tls_address): Likewise.
6928         (s390_split_branches): Removed.
6929         (s390_add_execute): Removed.
6930         (s390_dump_pool): Remove TARGET_CPU_ZARCH usages.
6931         (s390_mainpool_start): Likewise.
6932         (s390_mainpool_finish): Likewise.
6933         (s390_mainpool_cancel): Removed.
6934         (s390_chunkify_start): Remove TARGET_CPU_ZARCH usages.
6935         (s390_chunkify_cancel): Likewise.
6936         (s390_return_addr_rtx): Likewise.
6937         (s390_register_info): Remove split_branches_pending_p uages.
6938         (s390_optimize_register_info): Likewise.
6939         (s390_init_frame_layout): Remove TARGET_CPU_ZARCH and
6940         split_branches_pending_p usages.
6941         (s390_can_eliminate): Remove TARGET_CPU_ZARCH usages.
6942         (s390_load_got): Likewise.
6943         (s390_expand_split_stack_prologue): Likewise.
6944         (output_asm_nops): Likewise.
6945         (s390_function_profiler): Likewise.
6946         (s390_emit_call): Likewise.
6947         (s390_conditional_register_usage): Likewise.
6948         (s390_optimize_prologue): Likewise.
6949         (s390_reorg): Remove TARGET_CPU_ZARCH and
6950         split_branches_pending_p usages.
6951         (s390_option_override_internal): Remove TARGET_CPU_ZARCH
6952         usages.
6953         (s390_output_indirect_thunk_function): Likewise.
6954         * config/s390/s390.h (TARGET_CPU_ZARCH): Removed.
6955         (TARGET_CPU_ZARCH_P): Removed.
6956         (struct machine_function): Remove split_branches_pending_p.
6957         * config/s390/s390.md: Remove TARGET_CPU_ZARCH usages.
6959 2018-08-08  Ilya Leoshkevich  <iii@linux.ibm.com>
6961         * common/config/s390/s390-common.c (processor_flags_table):
6962         Remove flags.
6963         * config.gcc: Remove with_arch/with_tune support.
6964         * config/s390/2064.md: Remove cpu attribute comparisons.
6965         * config/s390/driver-native.c (s390_host_detect_local_cpu):
6966         Remove MTN.
6967         * config/s390/linux.h (ASM_SPEC):
6968         Remove -march support.
6969         * config/s390/s390-c.c (s390_cpu_cpp_builtins_internal):
6970         Use a table to get an arch level.
6971         * config/s390/s390-opts.h (enum processor_type):
6972         Remove enum values.
6973         * config/s390/s390.c
6974         (processor_table): Remove entries, add arch_level values.
6975         (s390_issue_rate): Remove cases.
6976         (s390_option_override): Adjust
6977         s390_option_override_internal() call.
6978         (s390_option_override_internal): Remove deprecation warning.
6979         (s390_valid_target_attribute_tree): Adjust
6980         s390_option_override_internal() call.
6981         * config/s390/s390.h (struct s390_processor):
6982         Share with s390-c.c, add arch_level field.
6983         * config/s390/s390.md:
6984         Remove occurrences in cpu attribute.
6985         * config/s390/s390.opt: Remove -march/-mtune support.
6986         * config/s390/tpf.h (ASM_SPEC): Remove -march support.
6987         * doc/invoke.texi: Remove deprecation warning.
6989 2018-08-08  Luis Machado  <luis.machado@linaro.org>
6991         * config/aarch64/aarch64.c (qdf24xx_vector_cost): New static
6992         global.
6993         (qdf24xx_tunings): Set vector cost structure to
6994         qdf24xx_vector_cost.
6996         * config/aarch64/aarch64.c (qdf24xx_addrcost_table)
6997         <register_sextend>: Set to 3.
6999 2018-08-07  Richard Sandiford  <richard.sandiford@arm.com>
7001         PR target/86838
7002         * config/aarch64/iterators.md (FRECP, frecp_suffix): Delete.
7003         * config/aarch64/aarch64-simd.md
7004         (aarch64_frecp<FRECP:frecp_suffix><mode>): Fold FRECPE into...
7005         (@aarch64_frecpe<mode>): ...here and the move FRECPX to...
7006         (aarch64_frecpx<mode>): ...this new pattern.
7007         * config/aarch64/aarch64-simd-builtins.def: Remove comment
7008         about aarch64_frecp<FRECP:frecp_suffix><mode>.
7010 2018-08-07  Martin Liska  <mliska@suse.cz>
7012         PR middle-end/83023
7013         * predict.c (expr_expected_value_1): Handle DECL_IS_MALLOC,
7014         BUILT_IN_REALLOC and DECL_IS_OPERATOR_NEW.
7015         * predict.def (PRED_MALLOC_NONNULL): New predictor.
7016         * doc/extend.texi: Document that malloc attribute adds
7017         hit to compiler.
7019 2018-08-06  John David Anglin  <danglin@gcc.gnu.org>
7021         PR target/86785
7022         * config/pa/pa.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7023         Define to speculation_safe_value_not_needed.
7025 2018-08-06  Jeff Law  <law@redhat.com>
7027         * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Pass down
7028         the vr_values instance to cprop_into_stmt.
7029         (cprop_into_stmt): Pass vr_values instance down to cprop_operand.
7030         (cprop_operand): Also query EVRP to determine if OP is a constant.
7032 2018-08-06  Nathan Sidwell  <nathan@acm.org>
7034         * diagnostic.c (diagnostic_report_current_module): Reroll
7035         included-at loop.  Translate text.
7037 2018-08-06  David Malcolm  <dmalcolm@redhat.com>
7039         * function-tests.c (selftest::test_expansion_to_rtl): Call
7040         free_after_compilation.
7042 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
7044         * config/aarch64/aarch64.md: Add clobber highs to tls_desc.
7046 2018-08-06  Andreas Krebbel  <krebbel@linux.ibm.com>
7048         * config/s390/s390.c (s390_loop_unroll_adjust): Prevent small
7049         loops with memory block operations from getting unrolled.
7051 2018-08-06  Ulrich Weigand  <uweigand@de.ibm.com>
7053         PR target/86807
7054         * config/spu/spu.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7055         Define to speculation_safe_value_not_needed.
7057 2018-08-06  Jeff Law  <law@redhat.com>
7059         * reload1.c (forget_old_reloads_1): Adjust CLOBBER_HIGH
7060         assert.
7062 2018-08-06  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
7064         PR target/86662
7065         * gcc/tree.c (build_common_tree_nodes): Initialize integer_types array
7066         with all enabled __intN types.
7068         * gcc/testsuite/gcc.target/msp430/pr86662.c: New test.
7070 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
7072         * alias.c (record_set): Check for clobber high.
7073         * cfgexpand.c (expand_gimple_stmt): Likewise.
7074         * combine-stack-adj.c (single_set_for_csa): Likewise.
7075         * combine.c (find_single_use_1): Likewise.
7076         (set_nonzero_bits_and_sign_copies): Likewise.
7077         (get_combine_src_dest): Likewise.
7078         (is_parallel_of_n_reg_sets): Likewise.
7079         (try_combine): Likewise.
7080         (record_dead_and_set_regs_1): Likewise.
7081         (reg_dead_at_p_1): Likewise.
7082         (reg_dead_at_p): Likewise.
7083         * dce.c (deletable_insn_p): Likewise.
7084         (mark_nonreg_stores_1): Likewise.
7085         (mark_nonreg_stores_2): Likewise.
7086         * df-scan.c (df_find_hard_reg_defs): Likewise.
7087         (df_uses_record): Likewise.
7088         (df_get_call_refs): Likewise.
7089         * dwarf2out.c (mem_loc_descriptor): Likewise.
7090         * haifa-sched.c (haifa_classify_rtx): Likewise.
7091         * ira-build.c (create_insn_allocnos): Likewise.
7092         * ira-costs.c (scan_one_insn): Likewise.
7093         * ira.c (equiv_init_movable_p): Likewise.
7094         (rtx_moveable_p): Likewise.
7095         (interesting_dest_for_shprep): Likewise.
7096         * jump.c (mark_jump_label_1): Likewise.
7097         * postreload-gcse.c (record_opr_changes): Likewise.
7098         * postreload.c (reload_cse_simplify): Likewise.
7099         (struct reg_use): Add source expr.
7100         (reload_combine): Check for clobber high.
7101         (reload_combine_note_use): Likewise.
7102         (reload_cse_move2add): Likewise.
7103         (move2add_note_store): Likewise.
7104         * print-rtl.c (print_pattern): Likewise.
7105         * recog.c (decode_asm_operands): Likewise.
7106         (store_data_bypass_p): Likewise.
7107         (if_test_bypass_p): Likewise.
7108         * regcprop.c (kill_clobbered_value): Likewise.
7109         (kill_set_value): Likewise.
7110         * reginfo.c (reg_scan_mark_refs): Likewise.
7111         * reload1.c (maybe_fix_stack_asms): Likewise.
7112         (eliminate_regs_1): Likewise.
7113         (elimination_effects): Likewise.
7114         (mark_not_eliminable): Likewise.
7115         (scan_paradoxical_subregs): Likewise.
7116         (forget_old_reloads_1): Likewise.
7117         * reorg.c (find_end_label): Likewise.
7118         (try_merge_delay_insns): Likewise.
7119         (redundant_insn): Likewise.
7120         (own_thread_p): Likewise.
7121         (fill_simple_delay_slots): Likewise.
7122         (fill_slots_from_thread): Likewise.
7123         (dbr_schedule): Likewise.
7124         * resource.c (update_live_status): Likewise.
7125         (mark_referenced_resources): Likewise.
7126         (mark_set_resources): Likewise.
7127         * rtl.c (copy_rtx): Likewise.
7128         * rtlanal.c (reg_referenced_p): Likewise.
7129         (single_set_2): Likewise.
7130         (noop_move_p): Likewise.
7131         (note_stores): Likewise.
7132         * sched-deps.c (sched_analyze_reg): Likewise.
7133         (sched_analyze_insn): Likewise.
7135 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
7137         * cse.c (invalidate_reg): New function extracted from...
7138         (invalidate): ...here.
7139         (canonicalize_insn): Check for clobber high.
7140         (invalidate_from_clobbers): invalidate clobber highs.
7141         (invalidate_from_sets_and_clobbers): Likewise.
7142         (count_reg_usage): Check for clobber high.
7143         (insn_live_p): Likewise.
7144         * cselib.c (cselib_expand_value_rtx_1):Likewise.
7145         (cselib_invalidate_regno): Check for clobber in setter.
7146         (cselib_invalidate_rtx): Pass through setter.
7147         (cselib_invalidate_rtx_note_stores):
7148         (cselib_process_insn): Check for clobber high.
7149         * cselib.h (cselib_invalidate_rtx): Add operand.
7151 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
7153         * lra-eliminations.c (lra_eliminate_regs_1): Check for clobber high.
7154         (mark_not_eliminable): Likewise.
7155         * lra-int.h (struct lra_insn_reg): Add clobber high marker.
7156         * lra-lives.c (process_bb_lives): Check for clobber high.
7157         * lra.c (new_insn_reg): Remember clobber highs.
7158         (collect_non_operand_hard_regs): Check for clobber high.
7159         (lra_set_insn_recog_data): Likewise.
7160         (add_regs_to_insn_regno_info): Likewise.
7161         (lra_update_insn_regno_info): Likewise.
7163 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
7165         * rtl.h (reg_is_clobbered_by_clobber_high): Add declarations.
7166         * rtlanal.c (reg_is_clobbered_by_clobber_high): Add function.
7168 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
7170         * emit-rtl.c (verify_rtx_sharing): Check for CLOBBER_HIGH.
7171         (copy_insn_1): Likewise.
7172         (gen_hard_reg_clobber_high): New gen function.
7173         * genconfig.c (walk_insn_part): Check for CLOBBER_HIGH.
7174         * genemit.c (gen_exp): Likewise.
7175         (gen_emit_seq): Pass through info.
7176         (gen_insn): Check for CLOBBER_HIGH.
7177         (gen_expand): Pass through info.
7178         (gen_split): Likewise.
7179         (output_add_clobbers): Likewise.
7180         * genrecog.c (validate_pattern): Check for CLOBBER_HIGH.
7181         (remove_clobbers): Likewise.
7182         * rtl.h (gen_hard_reg_clobber_high): New declaration.
7184 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
7186         * doc/rtl.texi (clobber_high): Add.
7187         (parallel): Add in clobber high
7188         * rtl.c (rtl_check_failed_code3): Add function.
7189         * rtl.def (CLOBBER_HIGH): Add expression.
7190         * rtl.h (RTL_CHECKC3): Add macro.
7191         (rtl_check_failed_code3): Add declaration.
7192         (XC3EXP): Add macro.
7194 2018-08-05  H.J. Lu  <hongjiu.lu@intel.com>
7196         PR target/86386
7197         * config/i386/i386.c (ix86_finalize_stack_frame_flags): Set
7198         cfun->machine->max_used_stack_alignment if needed.
7200 2018-08-04  Martin Sebor  <msebor@redhat.com>
7202         PR tree-optimization/86571
7203         * gimple-ssa-sprintf.c (format_floating): Extend upper bound of
7204         NaN output to 4.
7206 2018-08-03  Sandra Loosemore  <sandra@codesourcery.com>
7208         PR target/86799
7209         * config/nios2/nios2.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7210         Define.
7212 2018-08-03  Jeff Law  <law@redhat.com>
7214         PR target/86795
7215         * config/mn10300/mn10300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7216         Define to speculation_safe_value_not_needed.
7218 2018-08-03  David Malcolm  <dmalcolm@redhat.com>
7220         * doc/gcov.texi (-x): Remove duplicate "to".
7221         * doc/invoke.texi (-Wnoexcept-type): Remove duplicate "calls".
7222         (-Wif-not-aligned): Remove duplicate "is".
7223         (-flto): Remove duplicate "the".
7224         (MicroBlaze Options): In examples of "-mcpu=cpu-type", remove
7225         duplicate "v5.00.b".
7226         (MSP430 Options): Remove duplicate "and" from the description
7227         of "-mgprel-sec=regexp".
7228         (x86 Options): Remove duplicate copies of "vmldLog102" and
7229         vmlsLog104 from description of "-mveclibabi=type".
7231 2018-08-03  Richard Sandiford  <richard.sandiford@arm.com>
7233         * internal-fn.h (first_commutative_argument): Declare.
7234         * internal-fn.c (first_commutative_argument): New function.
7235         * tree-vect-slp.c (vect_get_and_check_slp_defs): Remove extra
7236         restrictions for pattern statements.  Use first_commutative_argument
7237         to look for commutative operands in calls to internal functions.
7239 2018-08-03  Aldy Hernandez  <aldyh@redhat.com>
7241         * Makefile.in (wide-int-range.o): New.
7242         * tree-vrp.c: Move all the wide_int_* functions to...
7243         * wide-int-range.cc: ...here.
7244         * tree-vrp.h: Move all the wide_int_* prototypes to...
7245         * wide-int-range.h: ...here.
7247 2018-08-03  Tom de Vries  <tdevries@suse.de>
7249         * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): Return
7250         UI_NONE.
7251         * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Remove define.
7252         * except.c (output_function_exception_table): Do early exit if
7253         targetm_common.except_unwind_info (&global_options) == UI_NONE.
7255 2018-08-03  Martin Liska  <mliska@suse.cz>
7257         * predict.c (dump_prediction): Change to 2 digits
7258         in fraction part.
7260 2018-08-03  Siddhesh Poyarekar  <siddhesh@sourceware.org>
7262         * config/aarch64/falkor.md (falkor_am_1_vxvy_vxvy): Move
7263         neon_dup_q to...
7264         (falkor_am_1_gtov_gtov): ... a new insn reservation.
7266 2018-07-19  Ilya Leoshkevich  <iii@linux.ibm.com>
7268         * config/nds32/nds32.c (nds32_hard_regno_mode_ok): Replace > with >=.
7269         * df-problems.c (df_remove_dead_eq_notes): Replace > with >=.
7270         * dwarf2out.c (mem_loc_descriptor): Replace > with >=.
7271         * lra-constraints.c (spill_hard_reg_in_range): Replace <= with <.
7272         * lra-remat.c (call_used_input_regno_present_p): Replace <= with <.
7274 2018-08-02  David Malcolm  <dmalcolm@redhat.com>
7276         * diagnostic-show-locus.c (diagnostic_show_locus): Use
7277         pp_take_prefix when saving the existing prefix.
7278         * diagnostic.c (diagnostic_append_note): Likewise.
7279         * langhooks.c (lhd_print_error_function): Likewise.
7280         * pretty-print.c (pp_set_prefix): Drop the "const" from "prefix"
7281         param's type.  Free the existing prefix.
7282         (pp_take_prefix): New function.
7283         (pretty_printer::pretty_printer): Drop the prefix parameter.
7284         Rename the length parameter to match the comment.
7285         (pretty_printer::~pretty_printer): Free the prefix.
7286         * pretty-print.h (pretty_printer::pretty_printer): Drop the prefix
7287         parameter.
7288         (struct pretty_printer): Drop the "const" from "prefix" field's
7289         type and clarify memory management.
7290         (pp_set_prefix): Drop the "const" from the 2nd param.
7291         (pp_take_prefix): New decl.
7293 2018-08-02  Aaron Sawdey  <acsawdey@linux.ibm.com>
7295         * config/rs6000/rs6000-string.c (select_block_compare_mode): Move test
7296         for word_mode_ok here instead of passing as argument.
7297         (expand_block_compare): Change select_block_compare_mode() call.
7298         (expand_strncmp_gpr_sequence): New function.
7299         (expand_strn_compare): Make use of expand_strncmp_gpr_sequence.
7301 2018-08-02  Jeff Law  <law@redhat.com>
7303         PR target/86790
7304         * config/m68k/m68k.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7305         Define to speculation_safe_value_not_needed.
7307         PR target/86784
7308         * config/h8300/h8300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7309         Define to speculation_safe_value_not_needed.
7311 2018-08-02  Tom de Vries  <tdevries@suse.de>
7313         PR target/86660
7314         * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): New
7315         function.  Return UI_TARGET unconditionally.
7316         (TARGET_EXCEPT_UNWIND_INFO): Redefine to nvptx_except_unwind_info.
7317         * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Emit commented out '.byte'.
7319 2018-08-02  Richard Sandiford  <richard.sandiford@arm.com>
7321         * genemit.c (print_overload_test): Fix typo.
7323 2018-08-02  Richard Biener  <rguenther@suse.de>
7325         PR tree-optimization/86816
7326         * tree-ssa-tail-merge.c (tail_merge_valueize): New function
7327         which checks for value availability before querying it.
7328         (gvn_uses_equal): Use it.
7329         (same_succ_hash): Likewise.
7330         (gimple_equal_p): Likewise.
7332 2018-08-02  Nick Clifton  <nickc@redhat.com>
7334         PR target/86813
7335         * config/stormy16/stormy16.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7336         Define to speculation_safe_value_not_needed.
7338         PR target/86810
7339         * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7340         Define to speculation_safe_value_not_needed.
7342         PR target/86810
7343         * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7344         Define to speculation_safe_value_not_needed.
7346         PR target/86803
7347         * config/rx/rx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7348         Define to speculation_safe_value_not_needed.
7350         PR target/86797
7351         * config/msp430/msp430.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7352         Define to speculation_safe_value_not_needed.
7354         PR target/86791
7355         * config/mcore/mcore.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7356         Define to speculation_safe_value_not_needed.
7358         PR target/86789
7359         * config/m32r/m32r.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7360         Define to speculation_safe_value_not_needed.
7362         PR target/86787
7363         * config/iq2000/iq2000.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7364         Define to speculation_safe_value_not_needed.
7366         PR target/86782
7367         * config/frv/frv.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
7368         speculation_safe_value_not_needed.
7370         PR target/86781
7371         * config/fr30/fr30.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define
7372         to speculation_safe_value_not_needed.
7374 2018-08-02  Richard Sandiford  <richard.sandiford@arm.com>
7376         * doc/md.texi: Expand the documentation of instruction names
7377         to mention port-local uses.  Document '@' in pattern names.
7378         * read-md.h (overloaded_instance, overloaded_name): New structs.
7379         (mapping): Declare.
7380         (md_reader::handle_overloaded_name): New member function.
7381         (md_reader::get_overloads): Likewise.
7382         (md_reader::m_first_overload): New member variable.
7383         (md_reader::m_next_overload_ptr): Likewise.
7384         (md_reader::m_overloads_htab): Likewise.
7385         * read-md.c (md_reader::md_reader): Initialize m_first_overload,
7386         m_next_overload_ptr and m_overloads_htab.
7387         * read-rtl.c (iterator_group): Add "type" and "get_c_token" fields.
7388         (get_mode_token, get_code_token, get_int_token): New functions.
7389         (map_attr_string): Add an optional argument that passes back
7390         the associated iterator.
7391         (overloaded_name_hash, overloaded_name_eq_p, named_rtx_p):
7392         (md_reader::handle_overloaded_name, add_overload_instance): New
7393         functions.
7394         (apply_iterators): Handle '@' names.  Report an error if '@'
7395         is used without iterators.
7396         (initialize_iterators): Initialize the new iterator_group fields.
7397         * genopinit.c (handle_overloaded_code_for)
7398         (handle_overloaded_gen): New functions.
7399         (main): Use them to print declarations of maybe_code_for_* and
7400         maybe_gen_* functions, and inline definitions of code_for_* and gen_*.
7401         * genemit.c (print_overload_arguments, print_overload_test)
7402         (handle_overloaded_code_for, handle_overloaded_gen): New functions.
7403         (main): Use it to print definitions of maybe_code_for_* and
7404         maybe_gen_* functions.
7405         * config/aarch64/aarch64.c (aarch64_split_128bit_move): Use
7406         gen_aarch64_mov{low,high}_di and gen_aarch64_movdi_{low,high}
7407         instead of explicit mode checks.
7408         (aarch64_split_simd_combine): Likewise gen_aarch64_simd_combine.
7409         (aarch64_split_simd_move): Likewise gen_aarch64_split_simd_mov.
7410         (aarch64_emit_load_exclusive): Likewise gen_aarch64_load_exclusive.
7411         (aarch64_emit_store_exclusive): Likewise gen_aarch64_store_exclusive.
7412         (aarch64_expand_compare_and_swap): Likewise
7413         gen_aarch64_compare_and_swap and gen_aarch64_compare_and_swap_lse
7414         (aarch64_gen_atomic_cas): Likewise gen_aarch64_atomic_cas.
7415         (aarch64_emit_atomic_swap): Likewise gen_aarch64_atomic_swp.
7416         (aarch64_constant_pool_reload_icode): Delete.
7417         (aarch64_secondary_reload): Use code_for_aarch64_reload_movcp
7418         instead of aarch64_constant_pool_reload_icode.  Use
7419         code_for_aarch64_reload_mov instead of explicit mode checks.
7420         (rsqrte_type, get_rsqrte_type, rsqrts_type, get_rsqrts_type): Delete.
7421         (aarch64_emit_approx_sqrt): Use gen_aarch64_rsqrte instead of
7422         get_rsqrte_type and gen_aarch64_rsqrts instead of gen_rqrts_type.
7423         (recpe_type, get_recpe_type, recps_type, get_recps_type): Delete.
7424         (aarch64_emit_approx_div): Use gen_aarch64_frecpe instead of
7425         get_recpe_type and gen_aarch64_frecps instead of get_recps_type.
7426         (aarch64_atomic_load_op_code): Delete.
7427         (aarch64_emit_atomic_load_op): Likewise.
7428         (aarch64_gen_atomic_ldop): Use UNSPECV_ATOMIC_* instead of
7429         aarch64_atomic_load_op_code.  Use gen_aarch64_atomic_load
7430         instead of aarch64_emit_atomic_load_op.
7431         * config/aarch64/aarch64.md (aarch64_reload_movcp<GPF_TF:mode><P:mode>)
7432         (aarch64_reload_movcp<VALL:mode><P:mode>, aarch64_reload_mov<mode>)
7433         (aarch64_movdi_<mode>low, aarch64_movdi_<mode>high)
7434         (aarch64_mov<mode>high_di, aarch64_mov<mode>low_di): Add a '@'
7435         character before the pattern name.
7436         * config/aarch64/aarch64-simd.md (aarch64_split_simd_mov<mode>)
7437         (aarch64_rsqrte<mode>, aarch64_rsqrts<mode>)
7438         (aarch64_simd_combine<mode>, aarch64_frecpe<mode>)
7439         (aarch64_frecps<mode>): Likewise.
7440         * config/aarch64/atomics.md (atomic_compare_and_swap<mode>)
7441         (aarch64_compare_and_swap<mode>, aarch64_compare_and_swap<mode>_lse)
7442         (aarch64_load_exclusive<mode>, aarch64_store_exclusive<mode>)
7443         (aarch64_atomic_swp<mode>, aarch64_atomic_cas<mode>)
7444         (aarch64_atomic_load<atomic_ldop><mode>): Likewise.
7446 2018-08-02  Richard Sandiford  <richard.sandiford@arm.com>
7448         * config/aarch64/aarch64.c (aarch64_float_const_representable_p):
7449         Allow HFmode constants if TARGET_FP_F16INST.
7451 2018-08-02  Jackson Woodruff  <jackson.woodruff@arm.com>
7453         PR target/86014
7454         * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp):
7455         No longer check last store for clobber of address register.
7457 2018-08-02  Martin Liska  <mliska@suse.cz>
7459         PR gcov-profile/86817
7460         * gcov.c (process_all_functions): New function.
7461         (main): Call it.
7462         (process_file): Move functions processing to
7463         process_all_functions.
7465 2018-08-02  David Malcolm  <dmalcolm@redhat.com>
7467         * dumpfile.c (dump_user_location_t::dump_user_location_t): Add
7468         "const" to the "gimple *" and "rtx_insn *" parameters.
7469         * dumpfile.h (dump_user_location_t::dump_user_location_t):
7470         Likewise.
7471         (dump_location_t::dump_location_t): Likewise.
7473 2018-08-01  Martin Sebor  <msebor@redhat.com>
7475         PR tree-optimization/86650
7476         * gimple-pretty-print.c (percent_G_format): Accept a "gimple *"
7477         rather than a "gcall *".  Directly pass the data of interest
7478         to percent_K_format, rather than building a temporary CALL_EXPR
7479         to hold it.
7480         * gimple-fold.c (gimple_fold_builtin_strncpy): Adjust.
7481         (gimple_fold_builtin_strncat): Adjust.
7482         * gimple-ssa-warn-restrict.h (check_bounds_or_overlap): Replace
7483         gcall* argument with gimple*.
7484         * gimple-ssa-warn-restrict.c (check_call): Same.
7485         (wrestrict_dom_walker::before_dom_children): Same.
7486         (builtin_access::builtin_access): Same.
7487         (check_bounds_or_overlap): Same
7488         (maybe_diag_overlap): Same.
7489         (maybe_diag_offset_bounds): Same.
7490         * tree-diagnostic.c (default_tree_printer): Move usage of
7491         EXPR_LOCATION (t) and TREE_BLOCK (t) from within percent_K_format
7492         to this callsite.
7493         * tree-pretty-print.c (percent_K_format): Add argument.
7494         * tree-pretty-print.h: Add argument.
7495         * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Adjust.
7496         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Adjust.
7497         (maybe_diag_stxncpy_trunc): Same.
7498         (handle_builtin_stxncpy): Same.
7499         (handle_builtin_strcat): Same.
7501 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
7503         * match.pd: Optimise pointer range checks.
7505 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
7507         PR tree-optimization/86758
7508         * tree-vect-stmts.c (vectorizable_simd_clone_call): Don't try
7509         to remove pattern statements.
7511 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
7513         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Use the
7514         result of dfs_enumerate_from when constructing stmt_vec_infos,
7515         instead of additionally calling get_loop_body.
7517 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
7519         * tree-vectorizer.h (vect_create_data_ref_ptr): Remove inv_p
7520         parameter.
7521         * tree-vect-data-refs.c (vect_create_data_ref_ptr): Likewise.
7522         When creating an iv, assert that the step is not known to be zero.
7523         (vect_setup_realignment): Update call accordingly.
7524         * tree-vect-stmts.c (vectorizable_store): Likewise.
7525         (vectorizable_load): Likewise.  Handle VMAT_INVARIANT separately.
7527 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
7529         * tree-vectorizer.h (vect_stmt_to_vectorize): New function.
7530         * tree-vect-loop.c (vect_update_vf_for_slp): Use it.
7531         (vectorizable_reduction): Likewise.
7532         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
7533         (vect_detect_hybrid_slp_stmts): Likewise.
7534         * tree-vect-stmts.c (vect_is_simple_use): Likewise.
7536 2018-08-01  Aldy Hernandez  <aldyh@redhat.com>
7538         * tree-vrp (zero_nonzero_bits_from_bounds): Rename to...
7539         (wide_int_set_zero_nonzero_bits): ...this.
7540         (zero_nonzero_bits_from_vr): Rename to...
7541         (vrp_set_zero_nonzero_bits): ...this.
7542         (extract_range_from_multiplicative_op_1): Abstract wide int
7543         code...
7544         (wide_int_range_multiplicative_op): ...here.
7545         (extract_range_from_binary_expr_1): Extract wide int binary
7546         operations into their own functions.
7547         (wide_int_range_lshift): New.
7548         (wide_int_range_can_optimize_bit_op): New.
7549         (wide_int_range_shift_undefined_p): New.
7550         (wide_int_range_bit_xor): New.
7551         (wide_int_range_bit_ior): New.
7552         (wide_int_range_bit_and): New.
7553         (wide_int_range_trunc_mod): New.
7554         (extract_range_into_wide_ints): New.
7555         (vrp_shift_undefined_p): New.
7556         (extract_range_from_multiplicative_op): New.
7557         (vrp_can_optimize_bit_op): New.
7558         * tree-vrp.h (value_range::dump): New.
7559         (wide_int_range_multiplicative_op): New.
7560         (wide_int_range_lshift):New.
7561         (wide_int_range_shift_undefined_p): New.
7562         (wide_int_range_bit_xor): New.
7563         (wide_int_range_bit_ior): New.
7564         (wide_int_range_bit_and): New.
7565         (wide_int_range_trunc_mod): New.
7566         (zero_nonzero_bits_from_bounds): Rename to...
7567         (wide_int_set_zero_nonzero_bits): ...this.
7568         (zero_nonzero_bits_from_vr): Rename to...
7569         (vrp_set_zero_nonzero_bits): ...this.
7570         (range_easy_mask_min_max): Rename to...
7571         (wide_int_range_can_optimize_bit_op): this.
7572         * vr-values.c (simplify_bit_ops_using_ranges): Rename
7573         zero_nonzero_bits_from_vr into vrp_set_zero_nonzero_bits.
7575 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
7577         * tree-vectorizer.h (vect_orig_stmt): New function.
7578         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Use it.
7579         * tree-vect-loop.c (vect_model_reduction_cost): Likewise.
7580         (vect_create_epilog_for_reduction): Likewise.
7581         (vectorizable_live_operation): Likewise.
7582         * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
7583         (vect_detect_hybrid_slp_stmts, vect_schedule_slp): Likewise.
7584         * tree-vect-stmts.c (vectorizable_call): Likewise.
7585         (vectorizable_simd_clone_call, vect_remove_stores): Likewise.
7587 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
7589         * tree-vectorizer.h (vect_transform_stmt): Remove grouped_store
7590         argument.
7591         * tree-vect-stmts.c (vect_transform_stmt): Likewise.
7592         * tree-vect-loop.c (vect_transform_loop_stmt): Update call accordingly.
7593         (vect_transform_loop): Likewise.
7594         * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
7596 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
7598         * tree-vectorizer.h (vect_schedule_slp): Return void.
7599         * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
7600         (vect_schedule_slp): Likewise.
7602 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
7604         * tree-vect-loop.c (vect_transform_loop_stmt): Remove slp_scheduled
7605         argument.
7606         (vect_transform_loop): Update calls accordingly.  Schedule SLP
7607         instances before the main loop, if any exist.
7609 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
7611         PR tree-optimization/86749
7612         * tree-vect-patterns.c (vect_determine_min_output_precision_1):
7613         If the lhs is used in a COND_EXPR, check that it is being used
7614         as the "then" or "else" value.
7616 2018-08-01  Tom de Vries  <tdevries@suse.de>
7618         PR target/86800
7619         * config/nvptx/nvptx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
7620         speculation_safe_value_not_needed.
7622 2018-08-01  Richard Biener  <rguenther@suse.de>
7624         * tree-ssa-sccvn.c (visit_phi): Compare invariant addresses
7625         as base and offset.
7627 2018-08-01  Martin Liska  <mliska@suse.cz>
7629         * value-prof.c (gimple_divmod_fixed_value_transform): Unify
7630         format how successful transformation is dumped.
7631         (gimple_mod_pow2_value_transform): Likewise.
7632         (gimple_mod_subtract_transform): Likewise.
7633         (gimple_stringops_transform): Likewise.
7635 2018-08-01  Martin Liska  <mliska@suse.cz>
7637         PR value-prof/35543
7638         * value-prof.c (interesting_stringop_to_profile_p):
7639         Simplify the code and add BUILT_IN_MEMMOVE.
7640         (gimple_stringops_transform): Likewise.
7642 2018-08-01  Sam Tebbs  <sam.tebbs@arm.com>
7644         * config/aarch64/aarch64-simd.md
7645         (*aarch64_get_lane_zero_extendsi<mode>): Rename to...
7646         (*aarch64_get_lane_zero_extend<GPI:mode><VDQQH:mode>): ... This and
7647         use GPI iterator instead of SI mode.
7649 2018-08-01  Richard Earnshaw  <rearnsha@arm.com>
7651         * config/rs6000/rs6000.md (speculation_barrier): Renamed from
7652         rs6000_speculation_barrier.
7653         * config/rs6000/rs6000.c (rs6000_expand_builtin): Adjust for
7654         new barrier pattern name.
7656 2018-08-01  Richard Earnshaw  <rearnsha@arm.com>
7658         * config/i386/i386.md (unspecv): Add UNSPECV_SPECULATION_BARRIER.
7659         (speculation_barrier): New insn.
7661 2018-08-01  Richard Biener  <rguenther@suse.de>
7663         PR bootstrap/86724
7664         * graphite.h: Include isl/id.h and isl/space.h to allow build
7665         with ISL 0.20.
7667 2018-08-01  Jan Willem Jagersma  <jwjagersma@gmail.com>
7669         PR target/86651
7670         * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
7671         mode for COFF targets.
7672         * defaults.h (TARGET_COFF): Define.
7673         * config/i386/djgpp.h (TARGET_ASM_LTO_START, TARGET_ASM_LTO_END,
7674         TARGET_COFF): Define.
7675         (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): Declare.
7676         * config/i386/djgpp.c (saved_debug_info_level): New static variable.
7677         (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): New functions.
7679 2018-07-31  Alexandre Oliva <oliva@adacore.com>
7681         * gimple-streamer-in.c (input_bb): Restore BB discriminator.
7682         * gimple-streamer-out.c (output_bb): Save it.
7683         * lto-streamer-in.c (input_struct_function_base): Restore
7684         instance discriminator if available.  Create map on demand.
7685         * lto-streamer-out.c (output_struct_function_base): Save it if
7686         available.
7687         * final.c (decl_to_instance_map): Document LTO strategy.
7689 2018-07-31  Alexandre Oliva  <oliva@adacore.com>
7690             Olivier Hainque  <hainque@adacore.com>
7692         * debug.h (decl_to_instance_map_t): New type.
7693         (decl_to_instance_map): Declare.
7694         (maybe_create_decl_to_instance_map): New inline function.
7695         * final.c (bb_discriminator, last_bb_discriminator): New statics,
7696         to track basic block discriminators.
7697         (final_start_function_1): Initialize them.
7698         (final_scan_insn_1): On NOTE_INSN_BASIC_BLOCK, track
7699         bb_discriminator.
7700         (decl_to_instance_map): New variable.
7701         (map_decl_to_instance, maybe_set_discriminator): New functions.
7702         (notice_source_line): Set discriminator.
7704 2018-07-31  Ian Lance Taylor  <iant@golang.org>
7706         * targhooks.c (default_have_speculation_safe_value): Add
7707         ATTRIBUTE_UNUSED.
7709 2018-07-31  David Malcolm  <dmalcolm@redhat.com>
7711         * dump-context.h: Include "pretty-print.h".
7712         (dump_context::refresh_dumps_are_enabled): New decl.
7713         (dump_context::emit_item): New decl.
7714         (class dump_context): Add fields "m_test_pp" and
7715         "m_test_pp_flags".
7716         (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
7717         (temp_dump_context::get_dumped_text): New decl.
7718         (class temp_dump_context): Add field "m_pp".
7719         * dumpfile.c (refresh_dumps_are_enabled): Convert to...
7720         (dump_context::refresh_dumps_are_enabled): ...and add a test for
7721         m_test_pp.
7722         (set_dump_file): Update for above change.
7723         (set_alt_dump_file): Likewise.
7724         (dump_loc): New overload, taking a pretty_printer *.
7725         (dump_context::dump_loc): Call end_any_optinfo.  Dump the location
7726         to any test pretty-printer.
7727         (make_item_for_dump_gimple_stmt): New function, adapted from
7728         optinfo::add_gimple_stmt.
7729         (dump_context::dump_gimple_stmt): Call it, and use the result,
7730         eliminating the direct usage of dump_file and alt_dump_file in
7731         favor of indirectly using them via emit_item.
7732         (make_item_for_dump_gimple_expr): New function, adapted from
7733         optinfo::add_gimple_expr.
7734         (dump_context::dump_gimple_expr): Call it, and use the result,
7735         eliminating the direct usage of dump_file and alt_dump_file in
7736         favor of indirectly using them via emit_item.
7737         (make_item_for_dump_generic_expr): New function, adapted from
7738         optinfo::add_tree.
7739         (dump_context::dump_generic_expr): Call it, and use the result,
7740         eliminating the direct usage of dump_file and alt_dump_file in
7741         favor of indirectly using them via emit_item.
7742         (make_item_for_dump_printf_va): New function, adapted from
7743         optinfo::add_printf_va.
7744         (make_item_for_dump_printf): New function.
7745         (dump_context::dump_printf_va): Call make_item_for_dump_printf_va,
7746         and use the result, eliminating the direct usage of dump_file and
7747         alt_dump_file in favor of indirectly using them via emit_item.
7748         (make_item_for_dump_dec): New function.
7749         (dump_context::dump_dec): Call it, and use the result,
7750         eliminating the direct usage of dump_file and alt_dump_file in
7751         favor of indirectly using them via emit_item.
7752         (make_item_for_dump_symtab_node): New function, adapted from
7753         optinfo::add_symtab_node.
7754         (dump_context::dump_symtab_node): Call it, and use the result,
7755         eliminating the direct usage of dump_file and alt_dump_file in
7756         favor of indirectly using them via emit_item.
7757         (dump_context::begin_scope): Reimplement, avoiding direct usage
7758         of dump_file and alt_dump_file in favor of indirectly using them
7759         via emit_item.
7760         (dump_context::emit_item): New member function.
7761         (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
7762         Set up test pretty-printer on the underlying context.  Call
7763         refresh_dumps_are_enabled.
7764         (temp_dump_context::~temp_dump_context): Call
7765         refresh_dumps_are_enabled.
7766         (temp_dump_context::get_dumped_text): New member function.
7767         (selftest::verify_dumped_text): New function.
7768         (ASSERT_DUMPED_TEXT_EQ): New macro.
7769         (selftest::test_capture_of_dump_calls): Run all tests twice, with
7770         and then without optinfo enabled.  Add uses of
7771         ASSERT_DUMPED_TEXT_EQ to all tests.  Add test of nested scopes.
7772         * dumpfile.h: Update comment for the dump_* API.
7773         * optinfo-emit-json.cc
7774         (selftest::test_building_json_from_dump_calls): Update for new
7775         param for temp_dump_context ctor.
7776         * optinfo.cc (optinfo_item::optinfo_item): Remove "owned" param
7777         and "m_owned" field.
7778         (optinfo_item::~optinfo_item): Likewise.
7779         (optinfo::add_item): New member function.
7780         (optinfo::emit): Update comment.
7781         (optinfo::add_string): Delete.
7782         (optinfo::add_printf): Delete.
7783         (optinfo::add_printf_va): Delete.
7784         (optinfo::add_gimple_stmt): Delete.
7785         (optinfo::add_gimple_expr): Delete.
7786         (optinfo::add_tree): Delete.
7787         (optinfo::add_symtab_node): Delete.
7788         (optinfo::add_dec): Delete.
7789         * optinfo.h (class dump_context): New forward decl.
7790         (optinfo::add_item): New decl.
7791         (optinfo::add_string): Delete.
7792         (optinfo::add_printf): Delete.
7793         (optinfo::add_printf_va): Delete.
7794         (optinfo::add_gimple_stmt): Delete.
7795         (optinfo::add_gimple_expr): Delete.
7796         (optinfo::add_tree): Delete.
7797         (optinfo::add_symtab_node): Delete.
7798         (optinfo::add_dec): Delete.
7799         (optinfo::add_poly_int): Delete.
7800         (optinfo_item::optinfo_item): Remove "owned" param.
7801         (class optinfo_item): Remove field "m_owned".
7803 2018-07-31  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
7805         PR middle-end/86705
7806         * gcc/cfgexpand.c (set_parm_rtl): Use the alignment of Pmode when
7807         MAX_SUPPORTED_STACK_ALIGNMENT would otherwise be exceeded by the
7808         requested variable alignment.
7809         (expand_one_ssa_partition): Likewise.
7810         (expand_one_var): Likewise.
7812 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
7814         * config/pdp11/pdp11.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
7815         to speculation_safe_value_not_needed.
7817 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
7819         * targhooks.h (speculation_safe_value_not_needed): New prototype.
7820         * targhooks.c (speculation_safe_value_not_needed): New function.
7821         * target.def (have_speculation_safe_value): Update documentation.
7822         * doc/tm.texi: Regenerated.
7824 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
7826         * config/aarch64/iterators.md (ALLI_TI): New iterator.
7827         * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>): New
7828         expand.
7829         (despeculate_copy<ALLI:mode>_insn): New insn.
7830         (despeculate_copyti_insn): New insn.
7831         (despeculate_simple<ALLI:mode>): New insn
7832         (despeculate_simpleti): New insn.
7833         * config/aarch64/aarch64.c (aarch64_speculation_safe_value): New
7834         function.
7835         (TARGET_SPECULATION_SAFE_VALUE): Redefine to
7836         aarch64_speculation_safe_value.
7837         (aarch64_print_operand): Handle const0_rtx in modifier 'H'.
7839 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
7841         * config/aarch64/aarch64-speculation.cc: New file.
7842         * config/aarch64/aarch64-passes.def (pass_track_speculation): Add
7843         before pass_reorder_blocks.
7844         * config/aarch64/aarch64-protos.h (make_pass_track_speculation): Add
7845         prototype.
7846         * config/aarch64/aarch64.c (aarch64_conditional_register_usage): Fix
7847         X14 and X15 when tracking speculation.
7848         * config/aarch64/aarch64.md (register name constants): Add
7849         SPECULATION_TRACKER_REGNUM and SPECULATION_SCRATCH_REGNUM.
7850         (unspec): Add UNSPEC_SPECULATION_TRACKER.
7851         (speculation_barrier): New insn attribute.
7852         (cmp<mode>): Allow SP in comparisons.
7853         (speculation_tracker): New insn.
7854         (speculation_barrier): Add speculation_barrier attribute.
7855         * config/aarch64/t-aarch64: Add make rule for aarch64-speculation.o.
7856         * config.gcc (aarch64*-*-*): Add aarch64-speculation.o to extra_objs.
7857         * doc/invoke.texi (AArch64 Options): Document -mtrack-speculation.
7859 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
7861         * config/aarch64/aarch64.md (cb<optab><mode>1): Disable when
7862         aarch64_track_speculation is true.
7863         (tb<optab><mode>1): Likewise.
7864         * config/aarch64/aarch64.c (aarch64_split_compare_regs): Do not
7865         generate CB[N]Z when tracking speculation.
7866         (aarch64_split_compare_and_swap): Likewise.
7867         (aarch64_split_atomic_op): Likewise.
7869 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
7871         * config/aarch64/aarch64.opt (mtrack-speculation): New target option.
7873 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
7875         * config/aarch64.md (unspecv): Add UNSPECV_SPECULAION_BARRIER.
7876         (speculation_barrier): New insn.
7878 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
7880         * config/arm/unspecs.md (unspecv): Add VUNSPEC_SPECULATION_BARRIER.
7881         * config/arm/arm.md (speculation_barrier): New expand.
7882         (speculation_barrier_insn): New pattern.
7884 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
7886         * builtin-types.def (BT_FN_PTR_PTR_VAR): New function type.
7887         (BT_FN_I1_I1_VAR, BT_FN_I2_I2_VAR, BT_FN_I4_I4_VAR): Likewise.
7888         (BT_FN_I8_I8_VAR, BT_FN_I16_I16_VAR): Likewise.
7889         * builtin-attrs.def (ATTR_NOVOPS_NOTHROW_LEAF_LIST): New attribute
7890         list.
7891         * builtins.def (BUILT_IN_SPECULATION_SAFE_VALUE_N): New builtin.
7892         (BUILT_IN_SPECULATION_SAFE_VALUE_PTR): New internal builtin.
7893         (BUILT_IN_SPECULATION_SAFE_VALUE_1): Likewise.
7894         (BUILT_IN_SPECULATION_SAFE_VALUE_2): Likewise.
7895         (BUILT_IN_SPECULATION_SAFE_VALUE_4): Likewise.
7896         (BUILT_IN_SPECULATION_SAFE_VALUE_8): Likewise.
7897         (BUILT_IN_SPECULATION_SAFE_VALUE_16): Likewise.
7898         * builtins.c (expand_speculation_safe_value): New function.
7899         (expand_builtin): Call it.
7900         * doc/cpp.texi: Document predefine __HAVE_SPECULATION_SAFE_VALUE.
7901         * doc/extend.texi: Document __builtin_speculation_safe_value.
7902         * doc/md.texi: Document "speculation_barrier" pattern.
7903         * doc/tm.texi.in: Pull in TARGET_SPECULATION_SAFE_VALUE and
7904         TARGET_HAVE_SPECULATION_SAFE_VALUE.
7905         * doc/tm.texi: Regenerated.
7906         * target.def (have_speculation_safe_value, speculation_safe_value): New
7907         hooks.
7908         * targhooks.c (default_have_speculation_safe_value): New function.
7909         (default_speculation_safe_value): New function.
7910         * targhooks.h (default_have_speculation_safe_value): Add prototype.
7911         (default_speculation_safe_value): Add prototype.
7913 2018-07-31  David Malcolm  <dmalcolm@redhat.com>
7915         * dump-context.h (dump_context::dump_loc): New decl.
7916         * dumpfile.c (dump_context::dump_loc): New member function.
7917         (dump_context::dump_gimple_stmt_loc): Reimplement using dump_loc
7918         and dump_gimple_stmt.
7919         (dump_context::dump_gimple_expr_loc): Likewise, using
7920         dump_gimple_expr.
7921         (dump_context::dump_generic_expr_loc): Likewise, using
7922         dump_generic_expr.
7923         (dump_context::dump_printf_loc_va): Likewise, using
7924         dump_printf_va.
7925         (dump_context::begin_scope): Explicitly using the global function
7926         "dump_loc", rather than the member function.
7928 2018-07-31  Martin Sebor  <msebor@redhat.com>
7930         PR tree-optimization/86741
7931         * tree-vrp.c (vrp_prop::check_mem_ref): Avoid incomplete types.
7933 2018-07-31  Andreas Krebbel  <krebbel@linux.ibm.com>
7935         * config/s390/s390.c (s390_expand_setmem): Make the unrolling to
7936         depend on whether prefetch instructions will be emitted or not.
7937         Use TARGET_SETMEM_PFD for checking whether prefetch instructions
7938         will be emitted or not.
7939         * config/s390/s390.h (TARGET_SETMEM_PREFETCH_DISTANCE)
7940         (TARGET_SETMEM_PFD): New macros.
7942 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
7944         * tree-vectorizer.h (stmt_vec_info): Turn back into a typedef.
7945         (NULL_STMT_VEC_INFO): Delete.
7946         (stmt_vec_info::operator*): Likewise.
7947         (stmt_vec_info::operator gimple *): Likewise.
7948         * tree-vect-loop.c (vectorizable_reduction): Use NULL instead
7949         of NULL_STMT_VEC_INFO.
7950         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
7951         (vect_reassociating_reduction_p): Likewise.
7952         * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
7953         (vectorizable_store): Likewise.
7954         * tree-vectorizer.c (vec_info::set_vinfo_for_stmt): Likewise.
7955         (vec_info::free_stmt_vec_infos): Likewise.
7957 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
7959         * tree-vectorizer.h (vect_stmt_in_region_p): Delete.
7960         * tree-vectorizer.c (vect_stmt_in_region_p): Likewise.
7962 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
7964         * tree-vectorizer.h (vec_info::new_vinfo_for_stmt)
7965         (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
7966         (vec_info::free_stmt_vec_info): New private member functions.
7967         (set_stmt_vec_info_vec, free_stmt_vec_infos, vinfo_for_stmt)
7968         (set_vinfo_for_stmt, new_stmt_vec_info, free_stmt_vec_info): Delete.
7969         * tree-parloops.c (gather_scalar_reductions): Remove calls to
7970         set_stmt_vec_info_vec and free_stmt_vec_infos.
7971         * tree-vect-loop.c (_loop_vec_info): Remove call to
7972         set_stmt_vec_info_vec.
7973         * tree-vect-stmts.c (new_stmt_vec_info, set_stmt_vec_info_vec)
7974         (free_stmt_vec_infos, free_stmt_vec_info): Delete in favor of...
7975         * tree-vectorizer.c (vec_info::new_stmt_vec_info)
7976         (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
7977         (vec_info::free_stmt_vec_info): ...these new functions.  Remove
7978         assignments in {vec_info::,}new_stmt_vec_info that are redundant
7979         with the clearing in the xcalloc.
7980         (stmt_vec_info_vec): Delete.
7981         (vec_info::vec_info): Don't call set_stmt_vec_info_vec.
7982         (vectorize_loops): Likewise.
7983         (vec_info::~vec_info): Remove argument from call to
7984         free_stmt_vec_infos.
7985         (vec_info::add_stmt): Remove vinfo argument from call to
7986         new_stmt_vec_info.
7988 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
7990         * tree-vectorizer.h (free_stmt_vec_info): Take a stmt_vec_info
7991         rather than a gimple stmt.
7992         * tree-vect-stmts.c (free_stmt_vec_info): Likewise.  Don't free
7993         information for pattern statements when passed the original
7994         statement; instead wait to be passed the pattern statement itself.
7995         Don't call set_vinfo_for_stmt here.
7996         (free_stmt_vec_infos): Update call to free_stmt_vec_info.
7997         * tree-vect-loop.c (_loop_vec_info::~loop_vec_info): Don't free
7998         stmt_vec_infos here.
7999         * tree-vect-slp.c (_bb_vec_info::~bb_vec_info): Likewise.
8000         * tree-vectorizer.c (vec_info::remove_stmt): Nullify the statement's
8001         stmt_vec_infos entry.
8003 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
8005         * tree-vectorizer.h (vec_info::replace_stmt): Declare.
8006         * tree-vectorizer.c (vec_info::replace_stmt): New function.
8007         * tree-vect-slp.c (vect_remove_slp_scalar_calls): Use it.
8008         * tree-vect-stmts.c (vectorizable_call): Likewise.
8009         (vectorizable_simd_clone_call): Likewise.
8011 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
8013         * tree-vectorizer.h (vec_info::remove_stmt): Declare.
8014         * tree-vectorizer.c (vec_info::remove_stmt): New function.
8015         * tree-vect-loop-manip.c (vect_set_loop_condition): Use it.
8016         * tree-vect-loop.c (vect_transform_loop): Likewise.
8017         * tree-vect-slp.c (vect_schedule_slp): Likewise.
8018         * tree-vect-stmts.c (vect_remove_stores): Likewise.
8020 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
8022         * tree-vectorizer.h (vec_info::lookup_dr): New member function.
8023         (vect_dr_stmt): Delete.
8024         * tree-vectorizer.c (vec_info::lookup_dr): New function.
8025         * tree-vect-loop-manip.c (vect_update_inits_of_drs): Use it instead
8026         of DR_VECT_AUX.
8027         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
8028         (vect_analyze_data_ref_dependence, vect_record_base_alignments)
8029         (vect_verify_datarefs_alignment, vect_peeling_supportable)
8030         (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
8031         (vect_analyze_data_refs): Likewise.
8032         (vect_slp_analyze_data_ref_dependence): Likewise.  Take a vec_info
8033         argument.
8034         (vect_find_same_alignment_drs): Likewise.
8035         (vect_slp_analyze_node_dependences): Update calls accordingly.
8036         (vect_analyze_data_refs_alignment): Likewise.  Use vec_info::lookup_dr
8037         instead of DR_VECT_AUX.
8038         (vect_get_peeling_costs_all_drs): Take a loop_vec_info instead
8039         of a vector data references.  Use vec_info::lookup_dr instead of
8040         DR_VECT_AUX.
8041         (vect_peeling_hash_get_lowest_cost): Update calls accordingly.
8042         (vect_enhance_data_refs_alignment): Likewise.  Use vec_info::lookup_dr
8043         instead of DR_VECT_AUX.
8045 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
8047         * tree-vectorizer.h (_loop_vec_info::unaligned_dr): Change to
8048         dr_vec_info.
8049         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
8050         accordingly.
8051         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
8052         * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
8053         (vect_gen_prolog_loop_niters): Likewise.
8055 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
8057         * tree-vectorizer.h (set_dr_misalignment, dr_misalignment)
8058         (DR_TARGET_ALIGNMENT, aligned_access_p, known_alignment_for_access_p)
8059         (vect_known_alignment_in_bytes, vect_dr_behavior)
8060         (vect_get_scalar_dr_size): Take references as dr_vec_infos
8061         instead of data_references.  Update calls to other routines for
8062         which the same change has been made.
8063         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Take
8064         dr_vec_infos instead of stmt_vec_infos.
8065         (vect_analyze_data_ref_dependence): Update call accordingly.
8066         (vect_slp_analyze_data_ref_dependence)
8067         (vect_record_base_alignments): Use DR_VECT_AUX.
8068         (vect_calculate_target_alignment, vect_compute_data_ref_alignment)
8069         (vect_update_misalignment_for_peel, verify_data_ref_alignment)
8070         (vector_alignment_reachable_p, vect_get_data_access_cost)
8071         (vect_peeling_supportable, vect_analyze_group_access_1)
8072         (vect_analyze_group_access, vect_analyze_data_ref_access)
8073         (vect_vfa_segment_size, vect_vfa_access_size, vect_vfa_align)
8074         (vect_compile_time_alias, vect_small_gap_p)
8075         (vectorizable_with_step_bound_p, vect_duplicate_ssa_name_ptr_info):
8076         (vect_supportable_dr_alignment): Take references as dr_vec_infos
8077         instead of data_references.  Update calls to other routines for
8078         which the same change has been made.
8079         (vect_verify_datarefs_alignment, vect_get_peeling_costs_all_drs)
8080         (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
8081         (vect_slp_analyze_and_verify_node_alignment)
8082         (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
8083         (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
8084         (vect_setup_realignment): Use dr_vec_infos.  Update calls after
8085         above changes.
8086         (_vect_peel_info::dr): Replace with...
8087         (_vect_peel_info::dr_info): ...this new field.
8088         (vect_peeling_hash_get_most_frequent)
8089         (vect_peeling_hash_choose_best_peeling): Update accordingly.
8090         (vect_peeling_hash_get_lowest_cost):
8091         (vect_enhance_data_refs_alignment): Likewise.  Update calls to other
8092         routines for which the same change has been made.
8093         (vect_peeling_hash_insert): Likewise.  Take a dr_vec_info instead of a
8094         data_reference.
8095         * tree-vect-loop-manip.c (get_misalign_in_elems)
8096         (vect_gen_prolog_loop_niters): Use dr_vec_infos.  Update calls after
8097         above changes.
8098         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
8099         * tree-vect-stmts.c (vect_get_store_cost, vect_get_load_cost)
8100         (vect_truncate_gather_scatter_offset, compare_step_with_zero)
8101         (get_group_load_store_type, get_negative_load_store_type)
8102         (vect_get_data_ptr_increment, vectorizable_store)
8103         (vectorizable_load): Likewise.
8104         (ensure_base_align): Take a dr_vec_info instead of a data_reference.
8105         Update calls to other routines for which the same change has been made.
8107 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
8109         * tree-vectorizer.h (vec_info::move_dr): New member function.
8110         (dataref_aux): Rename to...
8111         (dr_vec_info): ...this and add "dr" and "stmt" fields.
8112         (_stmt_vec_info::dr_aux): Update accordingly.
8113         (_stmt_vec_info::data_ref_info): Delete.
8114         (STMT_VINFO_GROUPED_ACCESS, DR_GROUP_FIRST_ELEMENT)
8115         (DR_GROUP_NEXT_ELEMENT, DR_GROUP_SIZE, DR_GROUP_STORE_COUNT)
8116         (DR_GROUP_GAP, DR_GROUP_SAME_DR_STMT, REDUC_GROUP_FIRST_ELEMENT):
8117         (REDUC_GROUP_NEXT_ELEMENT, REDUC_GROUP_SIZE): Use dr_aux.dr instead
8118         of data_ref.
8119         (STMT_VINFO_DATA_REF): Likewise.  Turn into an lvalue.
8120         (STMT_VINFO_DR_INFO): New macro.
8121         (DR_VECT_AUX): Use STMT_VINFO_DR_INKFO and vect_dr_stmt.
8122         (set_dr_misalignment): Update after rename of dataref_aux.
8123         (vect_dr_stmt): Move earlier in file.  Return dr_aux.stmt.
8124         * tree-vect-stmts.c (new_stmt_vec_info): Remove redundant
8125         initialization of STMT_VINFO_DATA_REF.
8126         * tree-vectorizer.c (vec_info::move_dr): New function.
8127         * tree-vect-patterns.c (vect_recog_bool_pattern)
8128         (vect_recog_mask_conversion_pattern)
8129         (vect_recog_gather_scatter_pattern): Use it.
8130         * tree-vect-data-refs.c (vect_analyze_data_refs): Initialize
8131         the "dr" and "stmt" fields of dr_vec_info instead of
8132         STMT_VINFO_DATA_REF.
8134 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
8136         * tree-vectorizer.h (_stmt_vec_info::pattern_stmt_p): New field.
8137         (is_pattern_stmt_p): Use it.
8138         * tree-vect-patterns.c (vect_init_pattern_stmt): Set pattern_stmt_p
8139         on pattern statements.
8141 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
8143         * tree-vect-patterns.c (vect_mark_pattern_stmts): Take the
8144         original stmt as a stmt_vec_info rather than a gimple stmt.
8145         (vect_pattern_recog_1): Take the statement directly as a
8146         stmt_vec_info, rather than via a gimple_stmt_iterator.
8147         Update call to vect_mark_pattern_stmts.
8148         (vect_pattern_recog): Update calls accordingly.
8150 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
8152         * tree-vectorizer.h (vect_get_vec_defs_for_stmt_copy)
8153         (vect_get_vec_def_for_stmt_copy): Take a vec_info rather than
8154         a vect_def_type for the first argument.
8155         * tree-vect-stmts.c (vect_get_vec_defs_for_stmt_copy): Likewise.
8156         (vect_get_vec_def_for_stmt_copy): Likewise.  Return the original
8157         operand if it isn't defined by a vectorized statement.
8158         (vect_build_gather_load_calls): Remove the mask_dt argument and
8159         update calls to vect_get_vec_def_for_stmt_copy.
8160         (vectorizable_bswap): Likewise the dt argument.
8161         (vectorizable_call): Update calls to vectorizable_bswap and
8162         vect_get_vec_def_for_stmt_copy.
8163         (vectorizable_simd_clone_call, vectorizable_assignment)
8164         (vectorizable_shift, vectorizable_operation, vectorizable_condition)
8165         (vectorizable_comparison): Update calls to
8166         vect_get_vec_def_for_stmt_copy.
8167         (vectorizable_store): Likewise.  Remove now-unnecessary calls to
8168         vect_is_simple_use.
8169         (vect_get_loop_based_defs): Remove dt argument and update call
8170         to vect_get_vec_def_for_stmt_copy.
8171         (vectorizable_conversion): Update calls to vect_get_loop_based_defs
8172         and vect_get_vec_def_for_stmt_copy.
8173         (vectorizable_load): Update calls to vect_build_gather_load_calls
8174         and vect_get_vec_def_for_stmt_copy.
8175         * tree-vect-loop.c (vect_create_epilog_for_reduction)
8176         (vectorizable_reduction, vectorizable_live_operation): Update calls
8177         to vect_get_vec_def_for_stmt_copy.
8179 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
8181         * tree-vect-data-refs.c (vect_record_base_alignment): Replace vec_info
8182         and gimple stmt arguments with a stmt_vec_info.
8183         (vect_record_base_alignments): Update calls accordingly.
8184         * tree-vect-slp.c (vect_record_max_nunits): Replace vec_info
8185         and gimple stmt arguments with a stmt_vec_info.
8186         (vect_build_slp_tree_1): Remove vinfo argument and update call
8187         to vect_record_max_nunits.
8188         (vect_build_slp_tree_2): Update calls to vect_build_slp_tree_1
8189         and vect_record_max_nunits.
8191 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
8193         * tree-vectorizer.h (nested_in_vect_loop_p): Move further down
8194         file and take a stmt_vec_info instead of a gimple stmt.
8195         (supportable_widening_operation, vect_finish_replace_stmt)
8196         (vect_finish_stmt_generation, vect_get_store_rhs)
8197         (vect_get_vec_def_for_operand_1, vect_get_vec_def_for_operand)
8198         (vect_get_vec_defs, vect_init_vector, vect_transform_stmt)
8199         (vect_remove_stores, vect_analyze_stmt, vectorizable_condition)
8200         (vect_get_smallest_scalar_type, vect_check_gather_scatter)
8201         (vect_create_data_ref_ptr, bump_vector_ptr)
8202         (vect_permute_store_chain, vect_setup_realignment)
8203         (vect_transform_grouped_load, vect_record_grouped_load_vectors)
8204         (vect_create_addr_base_for_vector_ref, vectorizable_live_operation)
8205         (vectorizable_reduction, vectorizable_induction)
8206         (get_initial_def_for_reduction, is_simple_and_all_uses_invariant)
8207         (vect_get_place_in_interleaving_chain): Take stmt_vec_infos rather
8208         than gimple stmts as arguments.
8209         * tree-vect-data-refs.c (vect_get_smallest_scalar_type)
8210         (vect_preserves_scalar_order_p, vect_slp_analyze_node_dependences)
8211         (can_group_stmts_p, vect_check_gather_scatter)
8212         (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
8213         (bump_vector_ptr, vect_permute_store_chain, vect_setup_realignment)
8214         (vect_permute_load_chain, vect_shift_permute_load_chain)
8215         (vect_transform_grouped_load)
8216         (vect_record_grouped_load_vectors): Likewise.
8217         * tree-vect-loop.c (vect_fixup_reduc_chain)
8218         (get_initial_def_for_reduction, vect_create_epilog_for_reduction)
8219         (vectorize_fold_left_reduction, is_nonwrapping_integer_induction)
8220         (vectorizable_reduction, vectorizable_induction)
8221         (vectorizable_live_operation, vect_loop_kill_debug_uses): Likewise.
8222         * tree-vect-patterns.c (type_conversion_p, adjust_bool_stmts)
8223         (vect_get_load_store_mask): Likewise.
8224         * tree-vect-slp.c (vect_get_place_in_interleaving_chain)
8225         (vect_analyze_slp_instance, vect_mask_constant_operand_p): Likewise.
8226         * tree-vect-stmts.c (vect_mark_relevant)
8227         (is_simple_and_all_uses_invariant)
8228         (exist_non_indexing_operands_for_use_p, process_use)
8229         (vect_init_vector_1, vect_init_vector, vect_get_vec_def_for_operand_1)
8230         (vect_get_vec_def_for_operand, vect_get_vec_defs)
8231         (vect_finish_stmt_generation_1, vect_finish_replace_stmt)
8232         (vect_finish_stmt_generation, vect_truncate_gather_scatter_offset)
8233         (compare_step_with_zero, vect_get_store_rhs, get_group_load_store_type)
8234         (get_negative_load_store_type, get_load_store_type)
8235         (vect_check_load_store_mask, vect_check_store_rhs)
8236         (vect_build_gather_load_calls, vect_get_strided_load_store_ops)
8237         (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
8238         (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
8239         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
8240         (get_group_alias_ptr_type, vectorizable_store, hoist_defs_of_uses)
8241         (vectorizable_load, vectorizable_condition, vectorizable_comparison)
8242         (vect_analyze_stmt, vect_transform_stmt, vect_remove_stores)
8243         (supportable_widening_operation): Likewise.
8245 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
8247         * tree-vect-data-refs.c (vect_describe_gather_scatter_call): Take
8248         a stmt_vec_info instead of a gcall.
8249         (vect_check_gather_scatter): Update call accordingly.
8250         * tree-vect-loop-manip.c (iv_phi_p): Take a stmt_vec_info instead
8251         of a gphi.
8252         (vect_can_advance_ivs_p, vect_update_ivs_after_vectorizer)
8253         (slpeel_update_phi_nodes_for_loops):): Update calls accordingly.
8254         * tree-vect-loop.c (vect_transform_loop_stmt): Take a stmt_vec_info
8255         instead of a gimple stmt.
8256         (vect_transform_loop): Update calls accordingly.
8257         * tree-vect-slp.c (vect_split_slp_store_group): Take and return
8258         stmt_vec_infos instead of gimple stmts.
8259         (vect_analyze_slp_instance): Update use accordingly.
8260         * tree-vect-stmts.c (read_vector_array, write_vector_array)
8261         (vect_clobber_variable, vect_stmt_relevant_p, permute_vec_elements)
8262         (vect_use_strided_gather_scatters_p, vect_build_all_ones_mask)
8263         (vect_build_zero_merge_argument, vect_get_gather_scatter_ops)
8264         (vect_gen_widened_results_half, vect_get_loop_based_defs)
8265         (vect_create_vectorized_promotion_stmts, can_vectorize_live_stmts):
8266         Take a stmt_vec_info instead of a gimple stmt and pass stmt_vec_infos
8267         down to subroutines.
8269 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
8271         * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Change the type
8272         of the worklist from a vector of gimple stmts to a vector of
8273         stmt_vec_infos.
8274         * tree-vect-stmts.c (vect_mark_relevant, process_use)
8275         (vect_mark_stmts_to_be_vectorized): Likewise
8277 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
8279         * tree-vect-loop.c (vect_analyze_loop_operations): Look up the
8280         statement before passing it to vect_analyze_stmt.
8281         (vect_create_epilog_for_reduction): Use a stmt_vec_info to walk
8282         the chain of phi vector definitions.  Track the exit phi via its
8283         stmt_vec_info.
8284         (vectorizable_reduction): Set cond_stmt_vinfo directly from the
8285         STMT_VINFO_REDUC_DEF.
8286         * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Use
8287         stmt_vec_infos to handle the statement chains.
8288         (vect_get_slp_defs): Record the first statement in the node
8289         using a stmt_vec_info.
8290         * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Look up
8291         statements here and pass their stmt_vec_info down to subroutines.
8292         (vect_init_vector_1): Hoist call to vinfo_for_stmt and pass it
8293         down to vect_finish_stmt_generation.
8294         (vect_init_vector, vect_get_vec_defs, vect_finish_replace_stmt)
8295         (vect_finish_stmt_generation): Call vinfo_for_stmt and pass
8296         stmt_vec_infos to subroutines.
8297         (vect_remove_stores): Use stmt_vec_infos to handle the statement
8298         chains.
8300 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
8302         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences):
8303         (vect_check_gather_scatter, vect_create_data_ref_ptr, bump_vector_ptr)
8304         (vect_permute_store_chain, vect_setup_realignment)
8305         (vect_permute_load_chain, vect_shift_permute_load_chain)
8306         (vect_transform_grouped_load): Use stmt_vec_info rather than gimple
8307         stmts internally, and when passing values to other vectorizer routines.
8308         * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
8309         * tree-vect-loop.c (vect_analyze_scalar_cycles_1)
8310         (vect_analyze_loop_operations, get_initial_def_for_reduction)
8311         (vect_create_epilog_for_reduction, vectorize_fold_left_reduction)
8312         (vectorizable_reduction, vectorizable_induction)
8313         (vectorizable_live_operation, vect_transform_loop_stmt)
8314         (vect_transform_loop): Likewise.
8315         * tree-vect-patterns.c (vect_reassociating_reduction_p)
8316         (vect_recog_widen_op_pattern, vect_recog_mixed_size_cond_pattern)
8317         (vect_recog_bool_pattern, vect_recog_gather_scatter_pattern): Likewise.
8318         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
8319         (vect_slp_analyze_node_operations_1): Likewise.
8320         * tree-vect-stmts.c (vect_mark_relevant, process_use)
8321         (exist_non_indexing_operands_for_use_p, vect_init_vector_1)
8322         (vect_mark_stmts_to_be_vectorized, vect_get_vec_def_for_operand)
8323         (vect_finish_stmt_generation_1, get_group_load_store_type)
8324         (get_load_store_type, vect_build_gather_load_calls)
8325         (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
8326         (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
8327         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
8328         (vectorizable_store, vectorizable_load, vectorizable_condition)
8329         (vectorizable_comparison, vect_analyze_stmt, vect_transform_stmt)
8330         (supportable_widening_operation): Likewise.
8331         (vect_get_vector_types_for_stmt): Likewise.
8332         * tree-vectorizer.h (vect_dr_behavior): Likewise.
8334 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
8336         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
8337         (vect_slp_analyze_node_dependences, vect_analyze_data_ref_accesses)
8338         (vect_permute_store_chain, vect_permute_load_chain)
8339         (vect_shift_permute_load_chain, vect_transform_grouped_load): Avoid
8340         repeated stmt_vec_info lookups.
8341         * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
8342         (vect_update_ivs_after_vectorizer): Likewise.
8343         * tree-vect-loop.c (vect_is_simple_reduction): Likewise.
8344         (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
8345         * tree-vect-patterns.c (adjust_bool_stmts): Likewise.
8346         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
8347         (vect_bb_slp_scalar_cost): Likewise.
8348         * tree-vect-stmts.c (get_group_alias_ptr_type): Likewise.
8350 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
8352         * tree-vect-data-refs.c (vect_check_gather_scatter): Pass the
8353         gcall rather than the generic gimple stmt to gimple_call_internal_fn.
8354         (vect_get_smallest_scalar_type, can_group_stmts_p): Use dyn_cast
8355         to get gassigns and gcalls, rather than operating on generc gimple
8356         stmts.
8357         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p)
8358         (vect_mark_stmts_to_be_vectorized, vectorizable_store)
8359         (vectorizable_load, vect_analyze_stmt): Likewise.
8360         * tree-vect-loop.c (vectorizable_reduction): Likewise gphi.
8362 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
8364         * tree-vectorizer.h (get_earlier_stmt, get_later_stmt): Take and
8365         return stmt_vec_infos rather than gimple stmts.  Do not accept
8366         null arguments.
8367         (vect_find_last_scalar_stmt_in_slp): Return a stmt_vec_info instead
8368         of a gimple stmt.
8369         * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
8370         Update use of get_later_stmt.
8371         (vect_get_constant_vectors): Update call accordingly.
8372         (vect_schedule_slp_instance): Likewise
8373         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Likewise.
8374         (vect_slp_analyze_instance_dependence): Likewise.
8375         (vect_preserves_scalar_order_p): Update use of get_earlier_stmt.
8377 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
8379         * tree-vectorizer.h (stmt_info_for_cost::stmt): Replace with...
8380         (stmt_info_for_cost::stmt_info): ...this new field.
8381         (add_stmt_costs): Update accordingly.
8382         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
8383         (vect_get_known_peeling_cost): Likewise.
8384         (vect_estimate_min_profitable_iters): Likewise.
8385         * tree-vect-stmts.c (record_stmt_cost): Likewise.
8387 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
8389         * tree-vectorizer.h (_loop_vec_info::may_misalign_stmts): Change
8390         from an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
8391         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
8392         accordingly.
8393         * tree-vect-loop-manip.c (vect_create_cond_for_align_checks): Likewise.
8395 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
8397         * tree-vectorizer.h (_stmt_vec_info::same_dr_stmt): Change from
8398         a gimple stmt to a stmt_vec_info.
8399         * tree-vect-stmts.c (vectorizable_load): Update accordingly.
8401 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
8403         * tree-vectorizer.h (vec_info::grouped_stores): Change from
8404         an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
8405         (_loop_vec_info::reduction_chains): Likewise.
8406         * tree-vect-loop.c (vect_fixup_scalar_cycles_with_patterns): Update
8407         accordingly.
8408         * tree-vect-slp.c (vect_analyze_slp): Likewise.
8410 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
8412         * tree-vectorizer.h (_stmt_vec_info::first_element): Change from
8413         a gimple stmt to a stmt_vec_info.
8414         (_stmt_vec_info::next_element): Likewise.
8415         * tree-vect-data-refs.c (vect_update_misalignment_for_peel)
8416         (vect_slp_analyze_and_verify_node_alignment)
8417         (vect_analyze_group_access_1, vect_analyze_group_access)
8418         (vect_small_gap_p, vect_prune_runtime_alias_test_list)
8419         (vect_create_data_ref_ptr, vect_record_grouped_load_vectors)
8420         (vect_supportable_dr_alignment): Update accordingly.
8421         * tree-vect-loop.c (vect_fixup_reduc_chain): Likewise.
8422         (vect_fixup_scalar_cycles_with_patterns, vect_is_slp_reduction)
8423         (vect_is_simple_reduction, vectorizable_reduction): Likewise.
8424         * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
8425         * tree-vect-slp.c (vect_build_slp_tree_1)
8426         (vect_attempt_slp_rearrange_stmts, vect_supported_load_permutation_p)
8427         (vect_split_slp_store_group, vect_analyze_slp_instance)
8428         (vect_analyze_slp, vect_transform_slp_perm_load): Likewise.
8429         * tree-vect-stmts.c (vect_model_store_cost, vect_model_load_cost)
8430         (get_group_load_store_type, get_load_store_type)
8431         (get_group_alias_ptr_type, vectorizable_store, vectorizable_load)
8432         (vect_transform_stmt, vect_remove_stores): Likewise.
8434 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
8436         * tree-vectorizer.h (vect_dr_stmt): Return a stmt_vec_info rather
8437         than a gimple stmt.
8438         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
8439         (vect_slp_analyze_data_ref_dependence, vect_record_base_alignments)
8440         (vect_calculate_target_alignmentm, vect_compute_data_ref_alignment)
8441         (vect_update_misalignment_for_peel, vect_verify_datarefs_alignment)
8442         (vector_alignment_reachable_p, vect_get_data_access_cost)
8443         (vect_get_peeling_costs_all_drs, vect_peeling_hash_get_lowest_cost)
8444         (vect_peeling_supportable, vect_enhance_data_refs_alignment)
8445         (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
8446         (vect_analyze_group_access_1, vect_analyze_group_access)
8447         (vect_analyze_data_ref_access, vect_analyze_data_ref_accesses)
8448         (vect_vfa_access_size, vect_small_gap_p, vect_analyze_data_refs)
8449         (vect_supportable_dr_alignment): Remove vinfo_for_stmt from the
8450         result of vect_dr_stmt and use the stmt_vec_info instead of
8451         the associated gimple stmt.
8452         * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
8453         (vect_gen_prolog_loop_niters): Likewise.
8454         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
8456 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
8458         * tree-vectorizer.h (_slp_tree::stmts): Change from a vec<gimple *>
8459         to a vec<stmt_vec_info>.
8460         * tree-vect-slp.c (vect_free_slp_tree): Update accordingly.
8461         (vect_create_new_slp_node): Take a vec<gimple *> instead of a
8462         vec<stmt_vec_info>.
8463         (_slp_oprnd_info::def_stmts): Change from a vec<gimple *>
8464         to a vec<stmt_vec_info>.
8465         (bst_traits::value_type, bst_traits::value_type): Likewise.
8466         (bst_traits::hash): Update accordingly.
8467         (vect_get_and_check_slp_defs): Change the stmts parameter from
8468         a vec<gimple *> to a vec<stmt_vec_info>.
8469         (vect_two_operations_perm_ok_p, vect_build_slp_tree_1): Likewise.
8470         (vect_build_slp_tree): Likewise.
8471         (vect_build_slp_tree_2): Likewise.  Update uses of
8472         SLP_TREE_SCALAR_STMTS.
8473         (vect_print_slp_tree): Update uses of SLP_TREE_SCALAR_STMTS.
8474         (vect_mark_slp_stmts, vect_mark_slp_stmts_relevant)
8475         (vect_slp_rearrange_stmts, vect_attempt_slp_rearrange_stmts)
8476         (vect_supported_load_permutation_p, vect_find_last_scalar_stmt_in_slp)
8477         (vect_detect_hybrid_slp_stmts, vect_slp_analyze_node_operations_1)
8478         (vect_slp_analyze_node_operations, vect_slp_analyze_operations)
8479         (vect_bb_slp_scalar_cost, vect_slp_analyze_bb_1)
8480         (vect_get_constant_vectors, vect_get_slp_defs)
8481         (vect_transform_slp_perm_load, vect_schedule_slp_instance)
8482         (vect_remove_slp_scalar_calls, vect_schedule_slp): Likewise.
8483         (vect_analyze_slp_instance): Build up a vec of stmt_vec_infos
8484         instead of gimple stmts.
8485         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Change
8486         the stores parameter for a vec<gimple *> to a vec<stmt_vec_info>.
8487         (vect_slp_analyze_instance_dependence): Update uses of
8488         SLP_TREE_SCALAR_STMTS.
8489         (vect_slp_analyze_and_verify_node_alignment): Likewise.
8490         (vect_slp_analyze_and_verify_instance_alignment): Likewise.
8491         * tree-vect-loop.c (neutral_op_for_slp_reduction): Likewise.
8492         (get_initial_defs_for_reduction): Likewise.
8493         (vect_create_epilog_for_reduction): Likewise.
8494         (vectorize_fold_left_reduction): Likewise.
8495         * tree-vect-stmts.c (vect_prologue_cost_for_slp_op): Likewise.
8496         (vect_model_simple_cost, vectorizable_shift, vectorizable_load)
8497         (can_vectorize_live_stmts): Likewise.
8499 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
8501         * tree-vectorizer.h (_loop_vec_info::reductions): Change from an
8502         auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
8503         (vect_force_simple_reduction): Take and return stmt_vec_infos rather
8504         than gimple stmts.
8505         * tree-parloops.c (valid_reduction_p): Take a stmt_vec_info instead
8506         of a gimple stmt.
8507         (gather_scalar_reductions): Update after above interface changes.
8508         * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Likewise.
8509         (vect_is_simple_reduction): Take and return stmt_vec_infos rather
8510         than gimple stmts.
8511         (vect_force_simple_reduction): Likewise.
8512         * tree-vect-patterns.c (vect_pattern_recog_1): Update use of
8513         LOOP_VINFO_REDUCTIONS.
8514         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
8516 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
8518         * tree-vectorizer.h (_stmt_vec_info::reduc_def): Change from
8519         a gimple stmt to a stmt_vec_info.
8520         * tree-vect-loop.c (vect_active_double_reduction_p)
8521         (vect_force_simple_reduction, vectorizable_reduction): Update
8522         accordingly.
8524 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
8526         * tree-vectorizer.h (_slp_tree::vec_stmts): Change from a
8527         vec<gimple *> to a vec<stmt_vec_info>.
8528         * tree-vect-loop.c (vect_create_epilog_for_reduction): Change
8529         the reduction_phis argument from a vec<gimple *> to a
8530         vec<stmt_vec_info>.
8531         (vectorizable_reduction): Likewise the phis local variable that
8532         is passed to vect_create_epilog_for_reduction.  Update for new type
8533         of SLP_TREE_VEC_STMTS.
8534         (vectorizable_induction): Update for new type of SLP_TREE_VEC_STMTS.
8535         (vectorizable_live_operation): Likewise.
8536         * tree-vect-slp.c (vect_get_slp_vect_defs): Likewise.
8537         (vect_transform_slp_perm_load, vect_schedule_slp_instance): Likewise.
8539 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
8541         * tree-vectorizer.h (_stmt_vec_info::vectorized_stmt): Change from
8542         a gimple stmt to a stmt_vec_info.
8543         (vectorizable_condition, vectorizable_live_operation)
8544         (vectorizable_reduction, vectorizable_induction): Pass back the
8545         vectorized statement as a stmt_vec_info.
8546         * tree-vect-data-refs.c (vect_record_grouped_load_vectors): Update
8547         use of STMT_VINFO_VEC_STMT.
8548         * tree-vect-loop.c (vect_create_epilog_for_reduction): Likewise,
8549         accumulating the inner phis that feed the STMT_VINFO_VEC_STMT
8550         as stmt_vec_infos rather than gimple stmts.
8551         (vectorize_fold_left_reduction): Change vec_stmt from a gimple stmt
8552         to a stmt_vec_info.
8553         (vectorizable_live_operation): Likewise.
8554         (vectorizable_reduction, vectorizable_induction): Likewise,
8555         updating use of STMT_VINFO_VEC_STMT.
8556         * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Update use
8557         of STMT_VINFO_VEC_STMT.
8558         (vect_build_gather_load_calls, vectorizable_bswap, vectorizable_call)
8559         (vectorizable_simd_clone_call, vectorizable_conversion)
8560         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
8561         (vectorizable_store, vectorizable_load, vectorizable_condition)
8562         (vectorizable_comparison, can_vectorize_live_stmts): Change vec_stmt
8563         from a gimple stmt to a stmt_vec_info.
8564         (vect_transform_stmt): Update use of STMT_VINFO_VEC_STMT.  Pass a
8565         pointer to a stmt_vec_info to the vectorizable_* routines.
8567 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
8569         * tree-vectorizer.h (_stmt_vec_info::related_stmt): Change from
8570         a gimple stmt to a stmt_vec_info.
8571         (is_pattern_stmt_p): Update accordingly.
8572         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Likewise.
8573         (vect_record_grouped_load_vectors): Likewise.
8574         * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
8575         (vect_fixup_reduc_chain, vect_update_vf_for_slp): Likewise.
8576         (vect_model_reduction_cost): Likewise.
8577         (vect_create_epilog_for_reduction): Likewise.
8578         (vectorizable_reduction, vectorizable_induction): Likewise.
8579         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
8580         Return the stmt_vec_info for the pattern statement.
8581         (vect_set_pattern_stmt): Update use of STMT_VINFO_RELATED_STMT.
8582         (vect_split_statement, vect_mark_pattern_stmts): Likewise.
8583         * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
8584         (vect_detect_hybrid_slp, vect_get_slp_defs): Likewise.
8585         * tree-vect-stmts.c (vect_mark_relevant): Likewise.
8586         (vect_get_vec_def_for_operand_1, vectorizable_call): Likewise.
8587         (vectorizable_simd_clone_call, vect_analyze_stmt, new_stmt_vec_info)
8588         (free_stmt_vec_info, vect_is_simple_use): Likewise.
8590 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
8592         * tree-vectorizer.h (vect_finish_replace_stmt): Return a stmt_vec_info
8593         (vect_finish_stmt_generation): Likewise.
8594         * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
8595         (vect_finish_replace_stmt, vect_finish_stmt_generation): Likewise.
8596         (vect_build_gather_load_calls): Use the return value of the above
8597         functions instead of a separate call to vinfo_for_stmt.  Use narrow
8598         scopes for the input gimple stmt and wider scopes for the associated
8599         stmt_vec_info.  Use vec_info::lookup_def when setting these
8600         stmt_vec_infos from an SSA_NAME definition.
8601         (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
8602         (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
8603         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
8604         (vectorizable_store, vectorizable_load, vectorizable_condition)
8605         (vectorizable_comparison): Likewise.
8606         * tree-vect-loop.c (vectorize_fold_left_reduction): Likewise.
8607         (vectorizable_reduction): Likewise.
8609 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
8611         * tree-vectorizer.h (vect_is_simple_use): Add an optional
8612         stmt_vec_info * parameter before the optional gimple **.
8613         * tree-vect-stmts.c (vect_is_simple_use): Likewise.
8614         (process_use, vect_get_vec_def_for_operand_1): Update callers.
8615         (vect_get_vec_def_for_operand, vectorizable_shift): Likewise.
8616         * tree-vect-loop.c (vectorizable_reduction): Likewise.
8617         (vectorizable_live_operation): Likewise.
8618         * tree-vect-patterns.c (type_conversion_p): Likewise.
8619         (vect_look_through_possible_promotion): Likewise.
8620         (vect_recog_rotate_pattern): Likewise.
8621         * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
8623 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
8625         * tree-vectorizer.h (stmt_vec_info): Temporarily change from
8626         a typedef to a wrapper class.
8627         (NULL_STMT_VEC_INFO): New macro.
8628         (vec_info::stmt_infos): Change to vec<stmt_vec_info>.
8629         (stmt_vec_info::operator*): New function.
8630         (stmt_vec_info::operator gimple *): Likewise.
8631         (set_vinfo_for_stmt): Use NULL_STMT_VEC_INFO.
8632         (add_stmt_costs): Likewise.
8633         * tree-vect-loop-manip.c (iv_phi_p): Likewise.
8634         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
8635         (vect_get_known_peeling_cost): Likewise.
8636         (vect_estimate_min_profitable_iters): Likewise.
8637         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
8638         * tree-vect-slp.c (vect_remove_slp_scalar_calls): Likewise.
8639         * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
8640         (vectorizable_store, free_stmt_vec_infos): Likewise.
8641         (new_stmt_vec_info): Change return type of xcalloc to
8642         _stmt_vec_info *.
8644 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
8646         * tree-vectorizer.h (vec_info::lookup_single_use): Declare.
8647         * tree-vectorizer.c (vec_info::lookup_single_use): New function.
8648         * tree-vect-loop.c (vectorizable_reduction): Use it instead of
8649         a single_imm_use-based sequence.
8650         * tree-vect-stmts.c (supportable_widening_operation): Likewise.
8652 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
8654         * tree-vectorizer.h (vec_info::lookup_def): Declare.
8655         * tree-vectorizer.c (vec_info::lookup_def): New function.
8656         * tree-vect-patterns.c (vect_get_internal_def): Use it.
8657         (vect_widened_op_tree): Likewise.
8658         * tree-vect-stmts.c (vect_is_simple_use): Likewise.
8659         * tree-vect-loop.c (vect_analyze_loop_operations): Likewise.
8660         (vectorizable_reduction): Likewise.
8661         (vect_valid_reduction_input_p): Take a stmt_vec_info instead
8662         of a gimple *.
8663         (vect_is_slp_reduction): Update calls accordingly.  Use
8664         vec_info::lookup_def.
8665         (vect_is_simple_reduction): Likewise
8666         * tree-vect-slp.c (vect_detect_hybrid_slp_1): Use vec_info::lookup_def.
8668 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
8670         * tree-vectorizer.h (vec_info::lookup_stmt): Declare.
8671         * tree-vectorizer.c (vec_info::lookup_stmt): New function.
8672         * tree-vect-loop.c (vect_determine_vf_for_stmt): Use it instead
8673         of vinfo_for_stmt.
8674         (vect_determine_vectorization_factor, vect_analyze_scalar_cycles_1)
8675         (vect_compute_single_scalar_iteration_cost, vect_analyze_loop_form)
8676         (vect_update_vf_for_slp, vect_analyze_loop_operations)
8677         (vect_is_slp_reduction, vectorizable_induction)
8678         (vect_transform_loop_stmt, vect_transform_loop): Likewise.
8679         * tree-vect-patterns.c (vect_init_pattern_stmt):
8680         (vect_determine_min_output_precision_1, vect_determine_precisions)
8681         (vect_pattern_recog): Likewise.
8682         * tree-vect-stmts.c (vect_analyze_stmt, vect_transform_stmt): Likewise.
8683         * config/powerpcspe/powerpcspe.c (rs6000_density_test): Likewise.
8684         * config/rs6000/rs6000.c (rs6000_density_test): Likewise.
8685         * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
8686         (vect_detect_hybrid_slp_1, vect_detect_hybrid_slp_2)
8687         (vect_detect_hybrid_slp): Likewise.  Change the walk_stmt_info
8688         info field from a loop to a loop_vec_info.
8690 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
8692         * tree-vectorizer.h (stmt_vec_info): Move typedef earlier in file.
8693         (vec_info::add_stmt): Declare.
8694         * tree-vectorizer.c (vec_info::add_stmt): New function.
8695         * tree-vect-data-refs.c (vect_create_data_ref_ptr): Use it.
8696         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Likewise.
8697         (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
8698         (vectorizable_induction): Likewise.
8699         * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Likewise.
8700         * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
8701         (vectorizable_simd_clone_call, vectorizable_store): Likewise.
8702         (vectorizable_load): Likewise.
8703         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
8704         (vect_recog_bool_pattern, vect_recog_mask_conversion_pattern)
8705         (vect_recog_gather_scatter_pattern): Likewise.
8706         (append_pattern_def_seq): Likewise.  Remove a check that is
8707         performed by add_stmt itself.
8709 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
8711         * tree-vect-loop.c (vectorizable_reduction): Fix an instance in
8712         which make_ssa_name was called with new_stmt before new_stmt
8713         had been created.
8715 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
8717         * tree-vect-loop.c (vect_valid_reduction_input_p): New function,
8718         split out from...
8719         (vect_is_slp_reduction): ...here...
8720         (vect_is_simple_reduction): ...and here.  Remove repetition of tests
8721         that are already known to be false.
8723 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
8725         * tree-vectorizer.h (vect_free_slp_instance): Add a final_p parameter.
8726         * tree-vect-slp.c (vect_free_slp_tree): Likewise.  Don't update
8727         STMT_VINFO_NUM_SLP_USES when it's true.
8728         (vect_free_slp_instance): Add a final_p parameter and pass it to
8729         vect_free_slp_tree.
8730         (vect_build_slp_tree_2): Update call to vect_free_slp_instance.
8731         (vect_analyze_slp_instance): Likewise.
8732         (vect_slp_analyze_operations): Likewise.
8733         (vect_slp_analyze_bb_1): Likewise.
8734         * tree-vectorizer.c (vec_info): Likewise.
8735         * tree-vect-loop.c (vect_transform_loop): Likewise.
8737 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
8739         * tree-vect-loop.c (vectorizable_reduction): Assert that the
8740         function is not called for second and subsequent members of
8741         a reduction group.
8743 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
8745         * tree-vect-loop.c (get_initial_def_for_reduction): Move special
8746         cases for nested loops from here to ...
8747         (vect_create_epilog_for_reduction): ...here.  Only call
8748         vect_is_simple_use for inner-loop reductions.
8750 2018-07-31  Martin Liska  <mliska@suse.cz>
8752         PR gcov-profile/85338
8753         PR gcov-profile/85350
8754         PR gcov-profile/85372
8755         * profile.c (struct location_triplet): New.
8756         (struct location_triplet_hash): Likewise.
8757         (output_location): Do not output a BB that
8758         is already recorded for a line.
8759         (branch_prob): Use streamed_locations.
8761 2018-07-31  Martin Liska  <mliska@suse.cz>
8763         PR gcov-profile/85370
8764         * coverage.c (coverage_begin_function): Do not mark target
8765         clones as artificial functions.
8767 2018-07-31  Martin Liska  <mliska@suse.cz>
8769         PR gcov-profile/83813
8770         PR gcov-profile/84758
8771         PR gcov-profile/85217
8772         PR gcov-profile/85332
8773         * profile.c (branch_prob): Do not record GOTO expressions
8774         for GIMPLE statements which locations are already streamed.
8776 2018-07-31  Olivier Hainque  <hainque@adacore.com>
8778         * gcc.c (handle_spec_function): Accept a soft_matched_part
8779         argument, as do_spec_1.  Pass it down to ...
8780         (eval_spec_function): Accept a soft_matched_part argument,
8781         and pass it down to ...
8782         (do_spec_2): Accept a soft_matched_part argument, and pass
8783         it down to do_spec_1.
8784         (do_spec_1): Pass soft_matched_part to handle_spec_function.
8785         (handle_braces): Update call to handle_spec_function.
8786         (driver::set_up_specs): Update calls to do_spec_2.
8787         (compare_debug_dump_opt_spec_function): Likewise.
8788         (compare_debug_self_opt_spec_function): Likewise.
8790 2018-07-31  Olivier Hainque  <hainque@adacore.com>
8792         * common.opt (nolibc): New option.
8793         * doc/invoke.texi (Link Options): Document it.
8794         * gcc.c (LINK_GCC_C_SEQUENCE_SPEC): Honor nolibc.
8795         * config/alpha/linux.h: Likewise.
8796         * config/arc/elf.h: Likewise.
8797         * config/arm/uclinux-elf.h: Likewise.
8798         * config/arm/unknown-elf.h: Likewise.
8799         * config/avr/avrlibc.h: Likewise.
8800         * config/bfin/bfin.h: Likewise.
8801         * config/bfin/linux.h: Likewise.
8802         * config/bfin/uclinux.h: Likewise.
8803         * config/darwin.h: Likewise.
8804         * config/darwin10.h: Likewise.
8805         * config/darwin12.h: Likewise.
8806         * config/gnu-user.h: Likewise.
8807         * config/lm32/uclinux-elf.h: Likewise.
8808         * config/pa/pa-hpux11.h: Likewise.
8809         * config/pa/pa64-hpux.h: Likewise.
8810         * config/sparc/sparc.h: Likewise.
8812 2018-07-31  Olivier Hainque  <hainque@adacore.com>
8814         * gcc.c (getenv_spec_function): Prepend '/' to value for allowed
8815         undefined variables.
8817 2018-07-30  Segher Boessenkool  <segher@kernel.crashing.org>
8819         PR target/86640
8820         * config/arm/arm.c (arm_block_set_aligned_vect): Use gen_int_mode
8821         instead of GEN_INT.
8823 2018-07-30  Bernd Edlinger  <bernd.edlinger@hotmail.de>
8825         * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
8826         terminated string literal.
8828 2018-07-30  Segher Boessenkool  <segher@kernel.crashing.org>
8830         PR rtl-optimization/85160
8831         * combine.c (is_just_move): New function.
8832         (try_combine): Allow combining two instructions into two if neither of
8833         the original instructions was a move.
8835 2018-07-30  Alexander Monakov  <amonakov@ispras.ru>
8837         PR target/86673
8838         * doc/extend.texi (Global Register Variables): Discourage use of type
8839         qualifiers.
8840         (Local Register Variables): Likewise.
8842 2018-07-30  Richard Sandiford  <richard.sandiford@arm.com>
8844         PR tree-optimization/86506
8845         * hwint.h (ceil_log2): Resync with hwint.c implementation.
8847 2018-07-30  Ilya Leoshkevich  <iii@linux.ibm.com>
8849         PR target/86547
8850         * lra-constraints.c (spill_hard_reg_in_range): When selecting the
8851         hard_regno, make sure no insn between `from` and `to` clobbers it.
8853 2018-07-30  Cesar Philippidis  <cesar@codesourcery.com>
8854             Tom de Vries  <tdevries@suse.de>
8856         * config/nvptx/nvptx.c (PTX_GANG_DEFAULT): Rename to ...
8857         (PTX_DEFAULT_RUNTIME_DIM): ... this.
8858         (nvptx_goacc_validate_dims): Set default worker and gang dims to
8859         PTX_DEFAULT_RUNTIME_DIM.
8860         (nvptx_dim_limit): Ignore GOMP_DIM_WORKER.
8862 2018-07-29  John David Anglin  <danglin@gcc.gnu.org>
8864         * config/pa/pa.c (pa_output_addr_vec): Align address table.
8865         * config/pa/pa.h (JUMP_TABLES_IN_TEXT_SECTION): Revise comment.
8866         * config/pa/pa32-linux.h (JUMP_TABLES_IN_TEXT_SECTION): Define.
8868 2018-07-27  Michael Meissner  <meissner@linux.ibm.com>
8870         * config/rs6000/constraints.md (wG constraint): Delete, no longer
8871         used.
8872         * config/rs6000/predicates.md (p9_fusion_reg_operand): Rename
8873         predicate to reflect toc fusion has been deleted.
8874         (toc_fusion_mem_raw): Delete, no longer used.
8875         (toc_fusion_mem_wrapped): Likewise.
8876         * config/rs6000/rs6000-cpus.def (POWERPC_MASKS): Delete toc
8877         fusion mask bit.
8878         * config/rs6000/rs6000-protos.h (fusion_wrap_memory_address):
8879         Delete, no longer used.
8880         * config/rs6000/rs6000.c (struct rs6000_reg_addr): Delete fields
8881         meant to be used for toc fusion.
8882         (rs6000_debug_print_mode): Delete toc fusion debugging.
8883         (rs6000_debug_reg_global): Likewise.
8884         (rs6000_init_hard_regno_mode_ok): Delete setting up fields for toc
8885         fusion and secondary reload support that were never used.
8886         (rs6000_option_override_internal): Delete TOC fusion, that was only
8887         partially defined, and it did not work unless you also used the
8888         -mcmodel= switch.
8889         (rs6000_legitimate_address_p): Delete TOC fusion support.
8890         (rs6000_opt_masks): Likewise.
8891         (fusion_wrap_memory_address): Delete function, no longer used.
8892         (fusion_split_address); Delete TOC fusion support.
8893         * config/rs6000/rs6000.h (TARGET_TOC_FUSION_INT): Delete, no
8894         longer used with toc fusion being deleted.
8895         (TARGET_TOC_FUSION_FP): Likewise.
8896         * config/rs6000/rs6000.md (UNSPEC_FUSION_ADDIS): Delete TOC fusion
8897         UNSPEC.
8898         (toc fusion spliter): Delete TOC fusion support.
8899         (toc_fusionload_<mode>): Likewise.
8900         (toc_fusionload_di): Likewise.
8901         (fusion_gpr_load_<mode>): Delete generator function, this insn no
8902         longer needs to be named.  Rename predicate to delete TOC fusion.
8903         (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
8904         (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
8905         (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
8906         (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
8907         (p9 fusion peephole2s): Rename predicate to delete TOC fusion.
8909 2018-07-27  Kelvin Nilsen  <kelvin@gcc.gnu.org>
8911         * doc/extend.texi (Basic PowerPC Built-in Functions Available on
8912         ISA 2.05):  Replace __uint128_t with __uint128 and __int128_t with
8913         __int128 in built-in function prototypes.
8914         (PowerPC AltiVec Built-in Functions on ISA 2.07): Likewise.
8915         (PowerPC AltiVec Built-in Functions on ISA 3.0): Likewise.
8917 2018-07-27  Martin Sebor  <msebor@redhat.com>
8919         PR tree-optimization/86696
8920         * tree-ssa-strlen.c (get_min_string_length): Handle all integer
8921         types, including enums.
8922         (handle_char_store): Be prepared for the above function to fail.
8924 2018-07-26  Qing Zhao  <qing.zhao@oracle.com>
8926         * builtins.c (inline_expand_builtin_string_cmp): Disable inlining
8927         when optimization level is lower than 2 or optimize for size.
8929 2018-07-26  Martin Sebor  <msebor@redhat.com>
8931         PR tree-optimization/86043
8932         PR tree-optimization/86042
8933         * tree-ssa-strlen.c (handle_builtin_memcpy): Handle strict overlaps.
8934         (get_string_cst_length): Rename...
8935         (get_min_string_length): ...to this.  Add argument.
8936         (handle_char_store): Extend to handle multi-character stores by
8937         MEM_REF.
8938         * tree.c (initializer_zerop): Use new argument.  Handle MEM_REF.
8939         * tree.h (initializer_zerop): Add argument.
8941 2018-07-26  Jakub Jelinek  <jakub@redhat.com>
8943         PR middle-end/86660
8944         * omp-low.c (scan_sharing_clauses): Don't ignore map clauses for
8945         declare target to variables if they have always,{to,from,tofrom} map
8946         kinds.
8948 2018-07-26  Martin Liska  <mliska@suse.cz>
8950         PR lto/86548
8951         * lto-wrapper.c: Add linker_output as prefix
8952         for ltrans_output_file.
8954 2018-07-26  Segher Boessenkool  <segher@kernel.crashing.org>
8956         PR rtl-optimization/85805
8957         * combine.c (reg_nonzero_bits_for_combine): Only use the last set
8958         value for hard registers if that was written in the same mode.
8960 2018-07-26  Martin Liska  <mliska@suse.cz>
8962         PR gcov-profile/86536
8963         * gcov.c (format_gcov): Use printf format %.*f directly
8964         and do not handle special values.
8966 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
8968         * common/config/arc/arc-common.c (arc_option_optimization_table):
8969         Update default optimizations for size.
8971 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
8973         * config/arc/arc.md (movsf_insn): Add short instruction selection.
8974         * config/arc/constraints.md (CfZ): New constraint.
8975         * config/arc/fpu.md (addssf3_fpu): Use CfZ constraint.
8976         (subsf3_fpu): Likewise.
8977         (cmpsf_fpu): Likewise.
8978         (cmpsf_fpu_uneq): Likewise.
8980 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
8982         * config/arc/arc.c (compact_memory_operand_p): Check for uncached
8983         accesses as well.
8984         (arc_is_uncached_mem_p): uncached applies to both the variable and
8985         the pointer.
8987 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
8989         * config/arc/arc.h (ADDITIONAL_REGISTER_NAMES): Add additional
8990         register names.
8992 2018-07-25  David Malcolm  <dmalcolm@redhat.com>
8994         * optinfo-emit-json.cc (class optrecord_json_writer): Convert
8995         field "m_scopes" from vec to auto_vec.
8997 2018-07-25  Martin Liska  <mliska@suse.cz>
8999         * config/powerpcspe/powerpcspe-protos.h (rs6000_loop_align): Fix
9000         return type.
9002 2018-07-25  Richard Biener  <rguenther@suse.de>
9004         PR debug/86654
9005         * dwarf2out.c (dwarf2out_decl): Do not handle nested functions
9006         special wrt context_die late.
9007         (gen_subprogram_die): Re-use DIEs in local scope.
9009 2018-07-25  Richard Sandiford  <richard.sandiford@arm.com>
9011         PR tree-optimization/86644
9012         * hwint.c (ceil_log2): Fix comment.  Return 0 for 0.
9014 2018-07-25  Martin Liska  <mliska@suse.cz>
9016         PR middle-end/86645
9017         * dumpfile.c: And excluded values with TDF_ALL_VALUES.
9018         * dumpfile.h (enum dump_flag): Defince TDF_ALL_VALUES.
9020 2018-07-25  Martin Liska  <mliska@suse.cz>
9022         PR sanitizer/79635
9023         * params.def: Explain ASan abbreviation and provide
9024         a documentation link.
9026 2018-07-24  Martin Sebor  <msebor@redhat.com>
9028         PR tree-optimization/86622
9029         PR tree-optimization/86532
9030         * builtins.h (string_length): Declare.
9031         * builtins.c (c_strlen): Correct handling of non-constant offsets.
9032         (check_access): Be prepared for non-constant length ranges.
9033         (string_length): Make extern.
9034         * expr.c (string_constant): Only handle the minor non-constant
9035         array index.  Use string_constant to compute the length of
9036         a generic string constant.
9038 2018-07-24  Richard Sandiford  <richard.sandiford@arm.com>
9040         PR tree-optimization/86618
9041         * tree-vect-stmts.c (vectorizable_call): Don't take the address
9042         of LOOP_VINFO_MASKS (loop_vinfo) when loop_vinfo is null.
9044 2018-07-24  David Malcolm  <dmalcolm@redhat.com>
9046         PR tree-optimization/86636
9047         * json.cc (json::object::set): Fix comment.  Add assertions.
9048         (json::array::append): Move here from json.h.  Add comment and an
9049         assertion.
9050         (json::string::string): Likewise.
9051         * json.h (json::array::append): Move to json.cc.
9052         (json::string::string): Likewise.
9053         * optinfo-emit-json.cc
9054         (optrecord_json_writer::impl_location_to_json): Assert that we
9055         aren't attempting to write out UNKNOWN_LOCATION, or an ad-hoc
9056         wrapper around it.  Expand the location once, rather than three
9057         times.
9058         (optrecord_json_writer::inlining_chain_to_json): Fix the check for
9059         UNKNOWN_LOCATION, to use LOCATION_LOCUS to look through ad-hoc
9060         wrappers.
9061         (optrecord_json_writer::optinfo_to_json): Likewise, in four
9062         places.  Fix some overlong lines.
9064 2018-07-24  Matthew Malcomson  <matthew.malcomson@arm.com>
9066         * config/aarch64/aarch64-simd.md
9067         (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>): Split into...
9068         (aarch64_<ANY_EXTEND:su>subw<mode>): ... This...
9069         (aarch64_<ANY_EXTEND:su>addw<mode>): ... And this.
9070         (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>_internal): Split into...
9071         (aarch64_<ANY_EXTEND:su>subw<mode>_internal): ... This...
9072         (aarch64_<ANY_EXTEND:su>addw<mode>_internal): ... And this.
9073         (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w2<mode>_internal): Split into...
9074         (aarch64_<ANY_EXTEND:su>subw2<mode>_internal): ... This...
9075         (aarch64_<ANY_EXTEND:su>addw2<mode>_internal): ... And this.
9077 2018-07-24  Jakub Jelinek  <jakub@redhat.com>
9079         PR middle-end/86627
9080         * expmed.c (expand_divmod): Punt if d == HOST_WIDE_INT_MIN
9081         and size > HOST_BITS_PER_WIDE_INT.  For size > HOST_BITS_PER_WIDE_INT
9082         and abs_d == d, do the power of two handling if profitable.
9084 2018-07-24  Richard Biener  <rguenther@suse.de>
9086         * match.pd: Add BIT_FIELD_REF canonicalizations.
9088 2018-07-23  Bernd Edlinger  <bernd.edlinger@hotmail.de>
9090         PR c/86617
9091         * genmatch.c (dt_operand::gen_match_op): Avoid folding volatile values.
9093 2018-07-23  Bernd Edlinger  <bernd.edlinger@hotmail.de>
9095         * gimple-fold.c (gimple_fold_builtin_printf): Don't create a not NUL
9096         terminated STRING_CST object.
9098 2018-07-23  Bernd Edlinger  <bernd.edlinger@hotmail.de>
9100         hsa-dump.c (dump_hsa_symbol): Avoid out of scope access to buf.
9102 2018-07-23  Segher Boessenkool  <segher@kernel.crashing.org>
9104         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Adjust.
9105         * config/rs6000/rs6000-protos.h (rs6000_split_v4si_init): Delete.
9106         * config/rs6000/rs6000.c (rs6000_expand_vector_init): Always force
9107         the elements into a register.
9108         (rs6000_split_v4si_init_di_reg): Delete.
9109         (rs6000_split_v4si_init): Delete.
9110         * config/rs6000/vsx.md (unspec): Delete UNSPEC_VSX_VEC_INIT.
9111         (vsx_init_v4si): Rewrite as a define_expand.
9113 2018-07-23  Segher Boessenkool  <segher@kernel.crashing.org>
9115         * config/rs6000/rs6000.md (splitters for rldimi and rlwimi with the
9116         zero_extend argument from memory): New.
9118 2018-07-22  Martin Sebor  <msebor@redhat.com>
9120         PR bootstrap/86621
9121         * gimple-ssa-warn-alloca.c (alloca_call_type_by_arg): Avoid
9122         diagnosing calls with unknown arguments unless -Walloca-larger-than
9123         is restricted to less than PTRDIFF_MAX bytes.
9125 2018-07-22  Gerald Pfeifer  <gerald@pfeifer.com>
9127         * doc/gcov.texi (Invoking Gcov): Editorial changes.
9129 2018-07-20  David Malcolm  <dmalcolm@redhat.com>
9131         * pretty-print.c (text_info::set_location): Remove redundant
9132         "line_table" parameter from call to rich_location::set_range.
9134 2018-07-20  Martin Sebor  <msebor@redhat.com>
9136         PR middle-end/82063
9137         * builtins.c (expand_builtin_alloca): Adjust.
9138         * calls.c (alloc_max_size): Simplify.
9139         * cgraphunit.c (cgraph_node::expand): Adjust.
9140         * common.opt (larger_than_size, warn_frame_larger_than): Remove
9141         variables.
9142         (frame_larger_than_size): Same.
9143         (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Change options
9144         to take a HOST_WIDE_INT argument and accept a byte-size suffix.
9145         Initialize.
9146         * doc/invoke.texi (GCC Command Options): Document option arguments.
9147         Explain byte-size arguments and suffixes.
9148         (-Wvla-larger-than, -Wno-alloc-size-larger-than): Update.
9149         (-Wno-alloca-larger-than, -Wno-vla-larger-than): Same.
9150         (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Same.
9151         * doc/options.texi (UInteger): Expand.
9152         (Host_Wide_Int, ByteSize): Document new properties.
9153         * final.c (final_start_function_1): Include sizes in an error message.
9154         * function.c (frame_offset_overflow): Same.
9155         * gimple-ssa-warn-alloca.c (pass_walloca::gate): Adjust.
9156         (alloca_call_type_by_arg): Change function argument to HOST_WIDE_INT.
9157         Diagnose unbounded alloca calls only for limits of less than
9158         PTRDIFF_MAX.
9159         (alloca_call_type): Adjust.  Diagnose possibly out-of-bounds alloca
9160         calls and VLA size only for limits of less than PTRDIFF_MAX.  Same
9161         for alloca(0).
9162         (pass_walloca::execute): Adjust.  Diagnose alloca calls in loops
9163         only for limits of less than PTRDIFF_MAX.
9164         * langhooks-def.h (lhd_handle_option): Change function argument
9165         to HOST_WIDE_INT.
9166         * langhooks.c (lhd_handle_option): Same.
9167         * langhooks.h (handle_option): Same.
9168         * opt-functions.awk (switch_bit_fields): Handle Host_Wide_Int and
9169         ByteSize flags.
9170         (var_type, var_type_struct): Same.
9171         (var_set): Handle ByteSize flag.
9172         * optc-gen.awk: Add comments to output to ease debugging.  Make
9173         use of HOST_WIDE_INT where appropriate.
9174         * opts-gen-save.awk:  Use %lx to format unsigned long.
9175         * opth-gen.awk: Change function argument to HOST_WIDE_INT.
9176         * opts-common.c (integral_argument): Return HOST_WIDE_INT and add
9177         arguments.  Parse bytes-size suffixes.
9178         (enum_arg_to_value): Change function argument to HOST_WIDE_INT.
9179         (enum_value_to_arg): Same.
9180         (decode_cmdline_option): Handle cl_host_wide_int.  Adjust.
9181         (handle_option): Adjust.
9182         (generate_option): Change function argument to HOST_WIDE_INT.
9183         (cmdline_handle_error): Adjust.
9184         (read_cmdline_option): Change function argument to HOST_WIDE_INT.
9185         (set_option): Change function argument to HOST_WIDE_INT.
9186         (option_enabled): Handle cl_host_wide_int.
9187         (get_option_state): Handle CLVC_SIZE.
9188         (control_warning_option): Same.
9189         * opts.c (common_handle_option): Change function argument to
9190         HOST_WIDE_INT.  Remove handling of OPT_Walloca_larger_than_ and
9191         OPT_Wvla_larger_than_.
9192         * opts.h (enum cl_var_type): Add an enumerator.
9193         * stor-layout.c (layout_decl): Print a more meaningful warning.
9194         * toplev.c (output_stack_usage): Adjust.
9196 2018-07-20  Qing Zhao  <qing.zhao@oracle.com>
9198         * builtins.c (expand_builtin_memcmp): Delete the last parameter for
9199         call to inline_expand_builtin_string_cmp.
9200         (expand_builtin_strcmp): Likewise.
9201         (expand_builtin_strncmp): Likewise.
9202         (inline_string_cmp): Delete the last parameter, change char_type_node
9203         to unsigned_char_type_node for strcmp/strncmp, add conversions to the
9204         two operands.
9205         (inline_expand_builtin_string_cmp): Delete the last parameter, give up
9206         the inlining expansion on target where the type of the call has same or
9207         narrower precision than unsigned char.
9209 2018-07-20  David Malcolm  <dmalcolm@redhat.com>
9211         * Makefile.in (OBJS): Add json.o and optinfo-emit-json.o.
9212         (CFLAGS-optinfo-emit-json.o): Define TARGET_NAME.
9213         * common.opt (fsave-optimization-record): New option.
9214         * coretypes.h (struct kv_pair): Move here from dumpfile.c.
9215         * doc/invoke.texi (-fsave-optimization-record): New option.
9216         * dumpfile.c: Include "optinfo-emit-json.h".
9217         (struct kv_pair): Move to coretypes.h.
9218         (optgroup_options): Make non-static.
9219         (dump_context::end_scope): Call
9220         optimization_records_maybe_pop_dump_scope.
9221         * dumpfile.h (optgroup_options): New decl.
9222         * json.cc: New file.
9223         * json.h: New file.
9224         * optinfo-emit-json.cc: New file.
9225         * optinfo-emit-json.h: New file.
9226         * optinfo.cc: Include "optinfo-emit-json.h".
9227         (optinfo::emit): Call optimization_records_maybe_record_optinfo.
9228         (optinfo_enabled_p): Check optimization_records_enabled_p.
9229         (optinfo_wants_inlining_info_p): Likewise.
9230         * optinfo.h: Update comment.
9231         * profile-count.c (profile_quality_as_string): New function.
9232         * profile-count.h (profile_quality_as_string): New decl.
9233         (profile_count::quality): New accessor.
9234         * selftest-run-tests.c (selftest::run_tests): Call json_cc_tests
9235         and optinfo_emit_json_cc_tests.
9236         * selftest.h (selftest::json_cc_tests): New decl.
9237         (selftest::optinfo_emit_json_cc_tests): New decl.
9238         * toplev.c: Include "optinfo-emit-json.h".
9239         (compile_file): Call optimization_records_finish.
9240         (do_compile): Call optimization_records_start.
9241         * tree-ssa-live.c: Include optinfo.h.
9242         (remove_unused_scope_block_p): Retain inlining information if
9243         optinfo_wants_inlining_info_p returns true.
9245 2018-07-20  Richard Biener  <rguenther@suse.de>
9247         PR debug/86585
9248         * dwarf2out.c (dwarf2out_die_ref_for_decl): Test in_lto_p
9249         to cover -flto-partition=none.
9251 2018-07-20  Martin Liska  <mliska@suse.cz>
9253         * tree.h (DECL_LOCATION_RANGE): Remove unused macro.
9254         (get_decl_source_range): Remove unused function.
9256 2018-07-20  Richard Biener  <rguenther@suse.de>
9258         * tree-ssa-sccvn.h (struct vn_nary_op_s): Add next member.
9259         (struct vn_phi_s): Likewise.
9260         (struct vn_reference_s): Likewise.
9261         * tree-ssa-sccvn.c (vn_nary_op_hasher::equal): Add shortcut
9262         for searching the slot of an entry known to be in the hash itself.
9263         (vn_phi_hasher::equal): Likewise.
9264         (vn_reference_hasher::equal): Likewise.
9265         (last_inserted_ref, last_inserted_phi, last_inserted_nary): New
9266         globals.
9267         (optimistic_info, current_info): Remove, keeping only valid_info.
9268         (vn_reference_lookup_1): Remove fallback lookup.
9269         (vn_reference_lookup_2): Likewise.
9270         (vn_nary_op_lookup_1): Likewise.
9271         (vn_phi_lookup): Likewise.
9272         (vn_nary_build_or_lookup_1): Make sure to not chain the built
9273         hash element.
9274         (vn_reference_insert): Adjust, chain the inserted hash element
9275         at last_inserted_ref.
9276         (vn_reference_insert_pieces): Likewise.
9277         (visit_reference_op_call): Likewise.
9278         (vn_nary_op_insert_into): Chain the inserted hash element at
9279         last_inserted_nary.
9280         (vn_nary_op_insert_pieces): Adjust.
9281         (vn_nary_op_insert): Likewise.
9282         (vn_nary_op_insert_stmt): Likewise.
9283         (vn_phi_insert): Adjust, chain the inserted hash element at
9284         last_inserted_phi.
9285         (process_scc): Remove clearing and copying the optimistic
9286         table.  Instead remove elements inserted during an optimistic
9287         iteration from the single table we maintain.
9288         (init_scc_vn): Adjust.
9289         (free_scc_vn): Likewise.
9290         (sccvn_dom_walker::record_cond): Likewise.
9291         (sccvn_dom_walker::after_dom_children): Likewise.
9293 2018-07-19  Martin Sebor  <msebor@redhat.com>
9295         PR tree-optimization/84047
9296         PR tree-optimization/83776
9297         * tree-vrp.c (vrp_prop::check_mem_ref): New function.
9298         (check_array_bounds): Call it.
9300 2018-07-19  Martin Sebor  <msebor@redhat.com>
9302         * align.h (align_flags): Use member initialization.
9304 2018-07-19  David Malcolm  <dmalcolm@redhat.com>
9306         * Makefile.in (OBJS): Add optinfo.o.
9307         * coretypes.h (class symtab_node): New forward decl.
9308         (struct cgraph_node): New forward decl.
9309         (class varpool_node): New forward decl.
9310         * dump-context.h: New file.
9311         * dumpfile.c: Include "optinfo.h", "dump-context.h", "cgraph.h",
9312         "tree-pass.h".
9313         (refresh_dumps_are_enabled): Use optinfo_enabled_p.
9314         (set_dump_file): Call dumpfile_ensure_any_optinfo_are_flushed.
9315         (set_alt_dump_file): Likewise.
9316         (dump_context::~dump_context): New dtor.
9317         (dump_gimple_stmt): Move implementation to...
9318         (dump_context::dump_gimple_stmt): ...this new member function.
9319         Add the stmt to any pending optinfo, creating one if need be.
9320         (dump_gimple_stmt_loc): Move implementation to...
9321         (dump_context::dump_gimple_stmt_loc): ...this new member function.
9322         Start a new optinfo and add the stmt to it.
9323         (dump_gimple_expr): Move implementation to...
9324         (dump_context::dump_gimple_expr): ...this new member function.
9325         Add the stmt to any pending optinfo, creating one if need be.
9326         (dump_gimple_expr_loc): Move implementation to...
9327         (dump_context::dump_gimple_expr_loc): ...this new member function.
9328         Start a new optinfo and add the stmt to it.
9329         (dump_generic_expr): Move implementation to...
9330         (dump_context::dump_generic_expr): ...this new member function.
9331         Add the tree to any pending optinfo, creating one if need be.
9332         (dump_generic_expr_loc): Move implementation to...
9333         (dump_context::dump_generic_expr_loc): ...this new member
9334         function.  Add the tree to any pending optinfo, creating one if
9335         need be.
9336         (dump_printf): Move implementation to...
9337         (dump_context::dump_printf_va): ...this new member function.  Add
9338         the text to any pending optinfo, creating one if need be.
9339         (dump_printf_loc): Move implementation to...
9340         (dump_context::dump_printf_loc_va): ...this new member function.
9341         Start a new optinfo and add the stmt to it.
9342         (dump_dec): Move implementation to...
9343         (dump_context::dump_dec): ...this new member function.  Add the
9344         value to any pending optinfo, creating one if need be.
9345         (dump_context::dump_symtab_node): New member function.
9346         (dump_context::get_scope_depth): New member function.
9347         (dump_context::begin_scope): New member function.
9348         (dump_context::end_scope): New member function.
9349         (dump_context::ensure_pending_optinfo): New member function.
9350         (dump_context::begin_next_optinfo): New member function.
9351         (dump_context::end_any_optinfo): New member function.
9352         (dump_context::s_current): New global.
9353         (dump_context::s_default): New global.
9354         (dump_scope_depth): Delete global.
9355         (dumpfile_ensure_any_optinfo_are_flushed): New function.
9356         (dump_symtab_node): New function.
9357         (get_dump_scope_depth): Reimplement in terms of dump_context.
9358         (dump_begin_scope): Likewise.
9359         (dump_end_scope): Likewise.
9360         (selftest::temp_dump_context::temp_dump_context): New ctor.
9361         (selftest::temp_dump_context::~temp_dump_context): New dtor.
9362         (selftest::verify_item): New function.
9363         (ASSERT_IS_TEXT): New macro.
9364         (ASSERT_IS_TREE): New macro.
9365         (ASSERT_IS_GIMPLE): New macro.
9366         (selftest::test_capture_of_dump_calls): New test.
9367         (selftest::dumpfile_c_tests): Call it.
9368         * dumpfile.h (dump_printf, dump_printf_loc, dump_basic_block)
9369         (dump_generic_expr_loc, dump_generic_expr, dump_gimple_stmt_loc)
9370         (dump_gimple_stmt, dump_dec): Gather these related decls and add a
9371         descriptive comment.
9372         (dump_function, print_combine_total_stats, enable_rtl_dump_file)
9373         (dump_node, dump_bb): Move these unrelated decls.
9374         (class dump_manager): Add leading comment.
9375         * optinfo.cc: New file.
9376         * optinfo.h: New file.
9378 2018-07-19  Michael Collison  <michael.collison@arm.com>
9379             Richard Henderson <rth@redhat.com>
9381         * config/aarch64/aarch64.md (subv<GPI>4, usubv<GPI>4): New patterns.
9382         (subti): Handle op1 zero.
9383         (subvti4, usub4ti4): New.
9384         (*sub<GPI>3_compare1_imm): New.
9385         (sub<GPI>3_carryinCV): New.
9386         (*sub<GPI>3_carryinCV_z1_z2, *sub<GPI>3_carryinCV_z1): New.
9387         (*sub<GPI>3_carryinCV_z2, *sub<GPI>3_carryinCV): New.
9389 2018-07-19  Michael Collison  <michael.collison@arm.com>
9390             Richard Henderson <rth@redhat.com>
9392         * config/aarch64/aarch64.md: (addv<GPI>4, uaddv<GPI>4): New.
9393         (addti3): Create simpler code if low part is already known to be 0.
9394         (addvti4, uaddvti4): New.
9395         (*add<GPI>3_compareC_cconly_imm): New.
9396         (*add<GPI>3_compareC_cconly): New.
9397         (*add<GPI>3_compareC_imm): New.
9398         (*add<GPI>3_compareC): Rename from add<GPI>3_compare1; do not
9399         handle constants within this pattern..
9400         (*add<GPI>3_compareV_cconly_imm): New.
9401         (*add<GPI>3_compareV_cconly): New.
9402         (*add<GPI>3_compareV_imm): New.
9403         (add<GPI>3_compareV): New.
9404         (add<GPI>3_carryinC, add<GPI>3_carryinV): New.
9405         (*add<GPI>3_carryinC_zero, *add<GPI>3_carryinV_zero): New.
9406         (*add<GPI>3_carryinC, *add<GPI>3_carryinV): New.
9407         ((*add<GPI>3_compareC_cconly_imm): Replace 'ne' operator
9408         with 'comparison' operator.
9409         (*add<GPI>3_compareV_cconly_imm): Ditto.
9410         (*add<GPI>3_compareV_cconly): Ditto.
9411         (*add<GPI>3_compareV_imm): Ditto.
9412         (add<GPI>3_compareV): Ditto.
9413         (add<mode>3_carryinC): Ditto.
9414         (*add<mode>3_carryinC_zero): Ditto.
9415         (*add<mode>3_carryinC): Ditto.
9416         (add<mode>3_carryinV): Ditto.
9417         (*add<mode>3_carryinV_zero): Ditto.
9418         (*add<mode>3_carryinV): Ditto.
9420 2018-07-19  Michael Collison  <michael.collison@arm.com>
9421             Richard Henderson <rth@redhat.com>
9423         * config/aarch64/aarch64-modes.def (CC_V): New.
9424         * config/aarch64/aarch64-protos.h
9425         (aarch64_addti_scratch_regs): Declare
9426         (aarch64_subvti_scratch_regs): Declare.
9427         (aarch64_expand_subvti): Declare.
9428         (aarch64_gen_unlikely_cbranch): Declare
9429         * config/aarch64/aarch64.c (aarch64_select_cc_mode): Test
9430         for signed overflow using CC_Vmode.
9431         (aarch64_get_condition_code_1): Handle CC_Vmode.
9432         (aarch64_gen_unlikely_cbranch): New function.
9433         (aarch64_addti_scratch_regs): New function.
9434         (aarch64_subvti_scratch_regs): New function.
9435         (aarch64_expand_subvti): New function.
9437 2018-07-19  Andre Vieira  <andre.simoesdiasvieira@arm.com>
9439         * config/aarch64/aarch64-option-extensions.def: New entry for profile
9440         extension.
9441         * config/aarch64/aarch64.h (AARCH64_FL_PROFILE): New.
9442         * doc/invoke.texi (aarch64-feature-modifiers): New entry for profile
9443         extension.
9445 2018-07-19  Andre Vieira  <andre.simoesdiasvieira@arm.com>
9447         PR target/83009
9448         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
9449         address check not strict.
9451 2018-07-19  Andre Vieira  <andre.simoesdiasvieira@arm.com>
9453         * config/aarch64/aarch64-simd.md (aarch64_simd_mov<VQ:mode>): Replace
9454         Umq with Umn.
9455         (store_pair_lanes<mode>): Likewise.
9456         * config/aarch64/aarch64-protos.h (aarch64_addr_query_type): Add new
9457         enum value 'ADDR_QUERY_LDP_STP_N'.
9458         * config/aarch64/aarch64.c (aarch64_addr_query_type): Likewise.
9459         (aarch64_print_address_internal): Add declaration.
9460         (aarch64_print_ldpstp_address): Remove.
9461         (aarch64_classify_address): Adapt mode for 'ADDR_QUERY_LDP_STP_N'.
9462         (aarch64_print_operand): Change printing of 'y'.
9463         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Use
9464         new enum value 'ADDR_QUERY_LDP_STP_N', don't hardcode mode and use
9465         'true' rather than '1'.
9466         * config/aarch64/constraints.md (Uml): Likewise.
9467         (Uml): Rename to Umn.
9468         (Umq): Remove.
9470 2018-07-19  Richard Biener  <rguenther@suse.de>
9472         * tree-ssa-sccvn.h (struct vn_phi_s): Make phiargs member
9473         a trailing array.
9474         * tree-ssa-sccvn.c: Remove alloc-pool.h use.
9475         (vn_phi_hasher): Derive from nofree_ptr_hash and remove remove method.
9476         (vn_reference_hasher): Likewise.
9477         (struct vn_tables_s): Remove obstack and alloc-pool members.
9478         (vn_tables_obstack, vn_tables_insert_obstack): New global obstacks.
9479         (vn_nary_build_or_lookup_1): Manually build in vn_tables_insert_obstack.
9480         (vn_reference_insert): Allocate from obstack instead of from alloc-pool.
9481         (vn_reference_insert_pieces): Likewise.
9482         (alloc_vn_nary_op_noinit): Adjust.
9483         (vn_nary_op_insert_stmt): Allocate phiargs in-place.
9484         (vn_phi_eq): Adjust.
9485         (shared_lookup_phiargs): Remove.
9486         (vn_phi_lookup): Allocate temporary vn_phi_s on the stack.
9487         (vn_phi_insert): Allocate from obstack instead of from alloc-pool.
9488         (visit_reference_op_call): Likewise.
9489         (copy_nary, copy_phi, copy_reference): Remove.
9490         (process_scc): Rewind the obstack when iterating.  Do not
9491         copy the elements to valid_info but just move them from one
9492         hashtable to the other.
9493         (allocate_vn_table): Adjust.
9494         (free_vn_table): Likewise.
9495         (init_scc_vn): Likewise.
9496         (free_scc_vn): Likewise.
9498 2018-07-19  H.J. Lu  <hongjiu.lu@intel.com>
9500         PR target/86560
9501         * config/i386/i386.c (rest_of_insert_endbranch): Lookup
9502         indirect_return as function type attribute.
9503         (ix86_attribute_table): Change indirect_return to function
9504         type attribute.
9505         * doc/extend.texi: Update indirect_return attribute.
9507 2018-07-19  Aldy Hernandez  <aldyh@redhat.com>
9509         * wide-int.h (widest2_int): New.
9510         * gimple-fold.c (arith_overflowed_p): Use it.
9511         * tree.h (widest2_int_cst): New.
9512         * tree-vrp.c (wide_int_binop_overflow): Rename from
9513         vrp_int_const_binop.
9514         Rewrite to work on trees.
9515         (extract_range_from_multiplicative_op_1): Abstract code to...
9516         (wide_int_range_min_max): ...here.
9517         (wide_int_range_cross_product): ...and here.
9518         (extract_range_from_binary_expr_1): Abstract overflow code to...
9519         (wide_int_range_mult_wrapping): ...here.
9520         * tree-vrp.h (wide_int_range_cross_product): New.
9521         (wide_int_range_mult_wrapping): New.
9523 2018-07-19  Andrew Senkevich  <andrew.senkevich@intel.com>
9524             Julia Koval  <julia.koval@intel.com>
9526         * config/i386/x86-tune-costs.h (skylake_memcpy,
9527         skylake_memset): Replace rep_prefix with unrolling for size 512.
9529 2018-07-18  Kugan Vivekanandarajah  <kuganv@linaro.org>
9531         PR middle-end/86544
9532         * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): Handle
9533         comparision with EQ_EXPR in last stmt.
9535 2018-07-18  Kelvin Nilsen  <kelvin@gcc.gnu.org>
9537         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Rename
9538         this subsection to "PowerPC AltiVec/VSX Built-in Functions".
9539         (PowerPC AltiVec/VSX Built-in Functions): New name for subsection
9540         previously known as "PowerPC AltiVec Built-in Functions".  Move
9541         some material to new subsubsections "PowerPC AltiVec Built-in
9542         Functions on ISA 2.06" and "PowerPC AltiVec Built-in Functions on
9543         ISA 2.07".
9544         (PowerPC Altivec Built-in Functions on ISA 2.05): New subsubsection.
9545         (PowerPC Altivec Built-in Functions on ISA 2.06): Likewise.
9546         (PowerPC Altivec Built-in Functions on ISA 2.07): Likewise.
9547         (PowerPC Altivec Built-in Functions on ISA 3.0): Likewise.
9549 2018-07-18  Richard Biener  <rguenther@suse.de>
9551         PR tree-optimization/86557
9552         * tree-vect-patterns.c (vect_recog_divmod_pattern): Also handle
9553         EXACT_DIV_EXPR.
9555 2018-07-18  Ilya Leoshkevich  <iii@linux.ibm.com>
9557         * config/s390/s390.c (s390_function_profiler): Generate CFI.
9559 2018-07-17  Jeff Law  <law@redhat.com>
9561         * config/arm/arm.c (get_label_padding): Update for recent
9562         changes to label_to_alignment.
9564         PR tree-optimization/86010
9565         * tree-ssa-dse.c (compute_trims): Fix typo/thinko.
9567         * config/mips/mips.c (vr4130_align_insns): Update for recent
9568         changes to label_to_alignment.
9570         * config/frv/frv.c (frv_label_align): Update for recent changes
9571         to label_to_alignment.
9573         * config/nios2/nios2.c (nios2_label_align): Update for recent
9574         changes which dropped ALIGN_LABELS_LOG.
9576 2018-07-17  Andreas Schwab  <schwab@linux-m68k.org>
9578         * config/m68k/m68k.md (umulsi3_highpart+1, const_umulsi3_highpart)
9579         (smulsi3_highpart+1, const_smulsi3_highpart): Add CC_STATUS_INIT.
9581 2018-07-17  Claudiu Zissulescu  <claziss@synopsys.com>
9583         * config/arc/arc.c (arc_label_align): Use align_labels instead of
9584         deprecated align_labels_log.
9586 2018-07-17  Richard Biener  <rguenther@suse.de>
9588         PR lto/86456
9589         * dwarf2out.c (init_sections_and_labels): Always generate
9590         a debug_line_str_section for early LTO debug.
9591         (dwarf2out_finish): Reset debug_line_str_hash output early.
9592         Bump counter for extra dwarf5 .debug_loc labels to not conflict
9593         with fat LTO part.
9594         (dwarf2out_early_finish): Output debug_line_str.
9596 2018-07-17  Robin Dapp  <rdapp@linux.ibm.com>
9598         * config/s390/s390.c (preferred_la_operand_p): Do not use LA with
9599         index register on z196 or later.
9601 2018-07-17  Robin Dapp  <rdapp@linux.ibm.com>
9603         * config/s390/s390.c (s390_default_align): Set default function
9604         alignment to 16.
9605         (s390_override_options_after_change): Call s390_default align.
9606         (s390_option_override_internal): Call s390_default_align.
9607         (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Define.
9609 2018-07-17  Jakub Jelinek  <jakub@redhat.com>
9611         PR middle-end/86542
9612         * omp-low.c (create_task_copyfn): Copy over also fields corresponding
9613         to _looptemp_ clauses, other than the first two.
9615 2018-07-17  Martin Liska  <mliska@suse.cz>
9617         * opts.c: Do not enable OPT_falign_* for -Os.
9619 2018-07-17  Martin Liska  <mliska@suse.cz>
9621         * align.h (MAX_CODE_ALIGN): New.
9622         (MAX_CODE_ALIGN_VALUE): New.
9623         * common/config/i386/i386-common.c (ix86_handle_option):
9624         (MAX_CODE_ALIGN): Moved to align.h.
9625         * final.c (MAX_CODE_ALIGN): Likewise.
9626         * opts.c (parse_and_check_align_values):
9627         (MAX_CODE_ALIGN): Likewise.
9628         (MAX_CODE_ALIGN_VALUE): Likewise.
9630 2018-07-17  Martin Liska  <mliska@suse.cz>
9632         * config/i386/att.h (ASM_OUTPUT_ALIGN): Fix spacing
9633         in order to fulfil coding style.
9634         * config/i386/cygming.h (ASM_OUTPUT_ALIGN): Likewise.
9635         * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
9636         * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
9637         * config/iq2000/iq2000.h (ASM_OUTPUT_ALIGN): Likewise.
9638         * config/pa/pa.h (ASM_OUTPUT_ALIGN): Likewise.
9639         * config/sparc/sol2.h (ASM_OUTPUT_ALIGN_WITH_NOP): Likewise.
9640         * config/sparc/sparc.h (ASM_OUTPUT_ALIGN): Likewise.
9641         * config/visium/visium.h (ASM_OUTPUT_ALIGN): Likewise.
9642         (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
9644 2018-07-17  Martin Liska  <mliska@suse.cz>
9646         * align.h: New file.
9647         * config/alpha/alpha.c (alpha_align_insns_1): Use align_functions
9648         directly.
9649         * config/i386/i386.c (ix86_avoid_jump_mispredicts): Use new return type
9650         align_flags of label_to_alignment.
9651         * config/m32r/m32r.h (LOOP_ALIGN): Wrap returned values into
9652         align_flags class.
9653         * config/m68k/m68k.c: Do not use removed align_labels_value and
9654         align_loops_value.
9655         * config/nds32/nds32.h (JUMP_ALIGN): Wrap result into align_flags class.
9656         (LOOP_ALIGN): Likewise.
9657         (LABEL_ALIGN): Likewise.
9658         * config/powerpcspe/powerpcspe.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
9659         Remove not used macro.
9660         (rs6000_loop_align): Change return type to align_flags.
9661         (rs6000_loop_align_max_skip): Remove.
9662         * config/rs6000/rs6000-protos.h (rs6000_loop_align):
9663         Change return type to align_flags.
9664         * config/rs6000/rs6000.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
9665         Remove not used macro.
9666         (rs6000_loop_align):  Change return type to align_flags.
9667         (rs6000_loop_align_max_skip): Remove.
9668         * config/rx/rx.h (JUMP_ALIGN): Wrap integer values
9669         * config/rx/rx-protos.h (rx_align_for_label): Make it
9670         static function.
9671         * config/rx/rx.c (rx_align_for_label): Change return type
9672         to align_flags.
9673         (rx_max_skip_for_label): Remove TARGET_ASM_*_ALIGN_MAX_SKIP
9674         macro definitions.
9675         into align_flags class.
9676         (LABEL_ALIGN): Likewise.
9677         (LOOP_ALIGN): Likewise.
9678         * config/s390/s390.c (s390_label_align): Use align_flags
9679         class member.
9680         (s390_asm_output_function_label): Likewise.
9681         * config/sh/sh.c (sh_override_options_after_change):
9682         Use align_flags class directly without macros.
9683         (find_barrier): Likewise.
9684         (barrier_align): Likewise.
9685         (sh_loop_align): Likewise.
9686         * config/spu/spu.c (spu_option_override):
9687         Use align_flags_tuple::get_value instead of removed macros.
9688         (spu_sched_init): Likewise.
9689         * config/spu/spu.h (GTY): Likewise.
9690         * config/visium/visium.c (visium_option_override):
9691         Set "8" as default secondary alignment.
9692         * config/visium/visium.h (SUBALIGN_LOG): Define to 3
9693         in order to guarantee secondary alignment of 8.
9694         * coretypes.h: Include align.h header file.
9695         * doc/tm.texi: Remove TARGET_ASM_JUMP_ALIGN_MAX_SKIP,
9696         TARGET_ASM_LOOP_ALIGN_MAX_SKIP, TARGET_ASM_LABEL_ALIGN_MAX_SKIP
9697         and TARGET_ASM_LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP macros.
9698         * doc/tm.texi.in: Likewise.
9699         * final.c (struct label_alignment): Remove not used structure.
9700         (LABEL_ALIGN): Change type to align_flags.
9701         (LOOP_ALIGN): Likewise.
9702         (JUMP_ALIGN): Likewise.
9703         (default_loop_align_max_skip): Remove.
9704         (default_label_align_max_skip): Likewise.
9705         (default_jump_align_max_skip): Likewise.
9706         (default_label_align_after_barrier_max_skip):
9707         (LABEL_TO_ALIGNMENT): Change to access label_align vector.
9708         (LABEL_TO_MAX_SKIP): Remove.
9709         (label_to_alignment): Return align_flags type instead of integer.
9710         (label_to_max_skip): Remove.
9711         (align_fuzz): Use align_flags type.
9712         (compute_alignments): Use align_flags type and use align_flags::max
9713         to combine multiple alignments.
9714         (grow_label_align): Grow vec instead of C array.
9715         (update_alignments): Assign just LABEL_TO_ALIGNMENT.
9716         (shorten_branches):  Use align_flags type and use align_flags::max
9717         to combine multiple alignments.
9718         (final_scan_insn_1): Remove usage of secondary alignment that comes
9719         from label alignment, but instead use proper secondary alignment
9720         which is computed in grow_label_align.
9721         * flags.h (struct align_flags_tuple): Move to align.h.
9722         (struct align_flags): Likewise.
9723         (state_align_loops): Rename to align_loops.
9724         (state_align_jumps): Rename to align_jumps.
9725         (state_align_labels): Rename to align_labels.
9726         (state_align_functions): Rename to align_functions.
9727         (align_loops_log): Remove.
9728         (align_jumps_log): Remove.
9729         (align_labels_log): Remove.
9730         (align_functions_log): Remove.
9731         (align_loops_max_skip): Remove.
9732         (align_jumps_max_skip): Remove.
9733         (align_labels_max_skip): Remove.
9734         (align_functions_max_skip): Remove.
9735         (align_loops_value): Remove.
9736         (align_jumps_value): Remove.
9737         (align_labels_value): Remove.
9738         (align_functions_value): Remove.
9739         * output.h (label_to_alignment): Change return type to align_flags.
9740         (label_to_max_skip): Remove.
9741         * target.def: Remove loop_align_max_skip, label_align_max_skip,
9742         jump_align_max_skip macros.
9743         * targhooks.h (default_loop_align_max_skip): Remove.
9744         (default_label_align_max_skip): Likewise.
9745         (default_jump_align_max_skip): Likewise.
9746         (default_label_align_after_barrier_max_skip): Remove.
9747         * toplev.c (read_log_maxskip): Use ::normalize function.
9748         (parse_N_M): Remove not used argument and also call ::normalize.
9749         (parse_alignment_opts): Do not pass unused arguments.
9750         * varasm.c (assemble_start_function): Use directly align_functions
9751         instead of removed macros.
9752         * system.h: Do not poison removed macros.
9754 2018-07-17  Jakub Jelinek  <jakub@redhat.com>
9756         PR middle-end/86539
9757         * gimplify.c (gimplify_omp_for): Ensure taskloop firstprivatized init
9758         and cond temporaries don't have reference type if iterator has
9759         pointer type.  For init use &for_pre_body instead of pre_p if
9760         for_pre_body is non-empty.
9762 2018-07-16  Segher Boessenkool  <segher@kernel.crashing.org>
9764         * config/rs6000/rs6000.md (trunc<mode>sf2): Expand truncates of
9765         double-double modes to SFmode directly directly.
9766         (trunc<mode>sf2_fprs): Delete.
9768 2018-07-16  Segher Boessenkool  <segher@kernel.crashing.org>
9770         * config/rs6000/rs6000.c (init_float128_ibm): Use the correct names
9771         for conversions between IFmode and the decimal floating point modes.
9772         (init_float128_ieee): Use the correct names for conversions between
9773         KFmode and the decimal floating point modes.
9775 2018-07-16  Segher Boessenkool  <segher@kernel.crashing.org>
9777         * config/rs6000/rs6000.c (init_float128_ibm): Use more correct names
9778         for the conversions between TDmode and IFmode.
9779         (init_float128_ieee): Use more correct names for the conversions
9780         between TDmode and KFmode.
9782 2018-07-16  Jakub Jelinek  <jakub@redhat.com>
9784         PR tree-optimization/86526
9785         * builtins.c (expand_builtin_memcmp): Formatting fixes.
9786         (inline_expand_builtin_string_cmp): Likewise.
9787         (inline_string_cmp): Likewise.  Use c_readstr instead of
9788         builtin_memcpy_read_str.  Add unit_mode temporary.
9790 2018-07-16  Bernd Edlinger  <bernd.edlinger@hotmail.de>
9792         PR middle-end/86528
9793         * builtins.c (check_access): Bail out if range[0] is no INTEGER_CST.
9794         * expr.c (string_constant): Fix the element size of ARRAY_TYPE.
9796 2018-07-16  Kelvin Nilsen  <kelvin@gcc.gnu.org>
9798         * doc/extend.texi (PowerPC AltiVec Built-in Functions):
9799         Alphabetize prototypes of built-in functions, separating out
9800         built-in functions that are listed in this section but should be
9801         described elsewhere.
9803 2018-07-16  Uros Bizjak  <ubizjak@gmail.com>
9805         PR target/86511
9806         * expmed.c (emit_store_flag): Do not emit setcc followed by a
9807         conditional move when trapping comparison was split to a
9808         non-trapping one (and vice versa).
9810 2018-07-16  Ilya Leoshkevich  <iii@linux.ibm.com>
9812         * config/s390/s390.c (s390_function_profiler): Generate nops
9813         instead of profiler call sequences.
9814         * config/s390/s390.opt: Add the new option.
9816 2018-07-16  Ilya Leoshkevich  <iii@linux.ibm.com>
9818         * config/s390/s390.c (s390_function_profiler): Generate
9819         __mcount_loc section.
9820         * config/s390/s390.opt: Add the new option.
9822 2018-07-16  Ilya Leoshkevich  <iii@linux.ibm.com>
9824         * common.opt: Add the new warning.
9825         * config/s390/s390.c (s390_function_profiler): Emit "brasl
9826         %r0,__fentry__" when -mfentry is specified.
9827         (s390_option_override_internal): Disallow -mfentry for 31-bit
9828         CPUs.
9829         * config/s390/s390.opt: Add the new option.
9831 2018-07-16  Richard Biener  <rguenther@suse.de>
9833         PR lto/86523
9834         * dwarf2out.c (dwarf2out_register_external_die): Assign DIE parents
9835         for function-local FUNCTION_DECL and RESULT_DECL immediately.
9837 2018-07-16  Martin Liska  <mliska@suse.cz>
9839         PR ipa/86529
9840         * ipa-pure-const.c (malloc_candidate_p): Revert ::get
9841         to ::get_create.
9843 2017-07-16  Claudiu Zissulescu  <claziss@synopsys.com>
9845         * config/arc/arcHS.md: Update ARCHS scheduling rules.
9847 2017-07-16  Claudiu Zissulescu  <claziss@synopsys.com>
9849         * config/arc/arc-arch.h (arc_tune_attr): Add new tune parameters
9850         for ARCHS4x.
9851         * config/arc/arc-cpus.def (hs4x): New cpu.
9852         (hs4xd): Likewise.
9853         * config/arc/arc-tables.opt: Regenerate.
9854         * config/arc/arc.c (arc_sched_issue_rate): New function.
9855         (TARGET_SCHED_ISSUE_RATE): Define.
9856         (TARGET_SCHED_EXPOSED_PIPELINE): Likewise.
9857         * config/arc/arc.md (attr type): Add fpu_fuse, fpu_sdiv, fpu_ddiv,
9858         fpu_cvt.
9859         (attr tune): Add ARCHS4x tune values.
9860         (attr tune_dspmpy): Define.
9861         (*tst): Correct instruction type.
9862         * config/arc/arcHS.md: Don't use this automaton for ARCHS4x cpus.
9863         * config/arc/arcHS4x.md: New file.
9864         * config/arc/fpu.md: Update instruction type attributes.
9865         * config/arc/t-multilib: Regenerate.
9867 2018-07-16  Tom de Vries  <tdevries@suse.de>
9869         PR debug/86455
9870         * var-tracking.c (vt_initialize): Fix pre_dec handling.
9872 2018-07-16  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
9874         * config/aarch64/atomics.md (aarch64_store_execlusive<mode>): Add
9875         early clobber.
9877 2018-07-16  Eric Botcazou  <ebotcazou@adacore.com>
9879         PR tree-optimization/86514
9880         * tree-ssa-reassoc.c (init_range_entry) <CASE_CONVERT>: Return for a
9881         conversion to a boolean type from a type with greater precision.
9883 2018-07-16  Tom de Vries  <tdevries@suse.de>
9885         * var-tracking.c (vt_initialize): Print adjusted insn slim if
9886         dump_flags request TDF_SLIM.
9888 2018-07-16  Aldy Hernandez  <aldyh@redhat.com>
9890         * fold-const.c (int_const_binop_1): Abstract...
9891         (wide_int_binop): ...wide int code here.
9892         (poly_int_binop): ...poly int code here.
9893         Abstract the rest of int_const_binop_1 into int_const_binop.
9894         * fold-const.h (wide_int_binop): New.
9895         * tree-vrp.c (vrp_int_const_binop): Call wide_int_binop.
9896         Remove useless PLUS/MINUS_EXPR case.
9897         (zero_nonzero_bits_from_vr): Move wide int code...
9898         (zero_nonzero_bits_from_bounds): ...here.
9899         (extract_range_from_binary_expr_1): Move mask optimization code...
9900         (range_easy_mask_min_max): ...here.
9901         * tree-vrp.h (zero_nonzero_bits_from_bounds): New.
9902         (range_easy_mask_min_max): New.
9904 2018-07-15  Jeff Law  <law@redhat.com>
9906         PR target/85993
9907         * config/sh/sh.c (output_mi_thunk): Remove dead conditional
9908         block.
9910 2018-07-14  Jim Wilson  <jimw@sifive.com>
9912         * config/riscv/linux.h (TARGET_ASM_FILE_END): New.
9914 2018-07-14  Paul Koning  <ni1d@arrl.net>
9916         * config/pdp11/pdp11.c (pdp11_rtx_costs): Bugfixes.
9918 2018-07-13  Jan Hubicka  <hubicka@ucw.cz>
9920         * lto-streamer-out.c (copy_function_or_variable): Dump info about
9921         copying section.
9923 2018-07-13  Bill Schmidt  <wschmidt@linux.ibm.com>
9924             Steve Munroe  <munroesj52@gmail.com>
9926         * config/rs6000/emmintrin.h (_mm_and_si128): New function.
9927         (_mm_andnot_si128): Likewise.
9928         (_mm_or_si128): Likewise.
9929         (_mm_xor_si128): Likewise.
9931 2018-07-13  Qing Zhao  <qing.zhao@oracle.com>
9933         PR middle-end/78809
9934         * builtins.c (expand_builtin_memcmp): Inline the calls first
9935         when result_eq is false.
9936         (expand_builtin_strcmp): Inline the calls first.
9937         (expand_builtin_strncmp): Likewise.
9938         (inline_string_cmp): New routine. Expand a string compare
9939         call by using a sequence of char comparison.
9940         (inline_expand_builtin_string_cmp): New routine. Inline expansion
9941         a call to str(n)cmp/memcmp.
9942         * doc/invoke.texi (--param builtin-string-cmp-inline-length):
9943         New option.
9944         * params.def (BUILTIN_STRING_CMP_INLINE_LENGTH): New.
9946 2018-07-13  Richard Earnshaw  <rearnsha@arm.com>
9948         * config/arm/driver-arm.c: Include arm-native.h.
9949         (host_detect_local_cpu): Use auto-generated data tables.
9950         (vendors, arm_cpu_table): Delete.  Move part information to ...
9951         * config/arm/arm-cpus.in: ... here.
9952         * config/arm/parsecpu.awk (gen_native): New function.
9953         (vendor, part): New CPU fields.
9954         (END): Add support for building the native CPU detection tables.
9955         * config/arm/t-arm (arm-native.h): Add build rule.
9956         (driver-arm.o): Add dependency on arm-native.h.
9958 2018-07-13  Richard Biener  <rguenther@suse.de>
9960         PR middle-end/85974
9961         * match.pd (addr1 - addr2): Allow either of the operand to
9962         have a conversion.
9964 2018-07-13  Tom de Vries  <tdevries@suse.de>
9966         * tree-inline.c (remap_ssa_name): Save and reuse debug exprs generated
9967         in remap_ssa_name.
9969 2018-07-13  Jackson Woodruff  <jackson.woodruff@arm.com>
9971         * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp): Use
9972         arrays instead of numbered variables.
9974 2018-07-13  Eric Botcazou  <ebotcazou@adacore.com>
9976         * config/sparc/sparc-protos.h (sparc_compute_frame_size): Delete.
9977         * config/sparc/sparc.c (sparc_compute_frame_size): Make static.
9979 2018-07-13  Richard Biener  <rguenther@suse.de>
9981         PR debug/86452
9982         * dwarf2out.c (gen_type_die_with_usage): Use scope_die_for
9983         instead of get_context_die.
9985 2018-07-13  Kugan Vivekanandarajah  <kuganv@linaro.org>
9986             Richard Biener  <rguenther@suse.de>
9988         PR middle-end/86489
9989         * tree-ssa-loop-niter.c (number_of_iterations_popcount): Check
9990         that the loop latch destination where phi is defined.
9992 2018-07-12  Kito Cheng  <kito.cheng@gmail.com>
9994         * config/riscv/riscv.c (enum riscv_privilege_levels): Add UNKNOWN_MODE.
9995         (riscv_expand_epilogue): Add assertion to check interrupt mode.
9996         (riscv_set_current_function): Extract getting interrupt type to new
9997         function.
9998         (riscv_get_interrupt_type): New function.
9999         (riscv_merge_decl_attributes): New function, checking interrupt type is
10000         same.
10001         (TARGET_MERGE_DECL_ATTRIBUTES): Define.
10003 2018-07-12  Paul Koning  <ni1d@arrl.net>
10005         * config/pdp11/pdp11.c (pdp11_output_def): Fix typo in .set
10006         directive.
10008 2018-07-12  Paul Koning  <ni1d@arrl.net>
10010         * doc/rtl.texi (REG_NONNEG): Remove decrement and branch until
10011         zero reference, add doloop_end instead.
10012         * doc/md.texi (decrement_and_branch_until_zero): Remove.
10013         (Looping patterns): Remove decrement_and_branch_until_zero.  Add
10014         detail for doloop_end.
10016 2018-07-12  Martin Sebor  <msebor@redhat.com>
10018         PR c/86453
10019         * attribs.c (decl_attributes): Reject conflicting attributes before
10020         calling attribute handlers.
10022 2018-07-12  Jan Hubicka  <hubicka@ucw.cz>
10024         * dumpfile.c (gcc::dump_manager::get_dump_file_name): Add PART
10025          parameter.
10026         (gcc::dump_manager::get_dump_file_name): likewise.
10027         (dump_begin): Likewise.
10028         * dumpfile.h (dump_begin): Update prototype.
10029         (gcc::dump_manager::get_dump_file_name,
10030         gcc::dump_manager::get_dump_file_name): Update prototype.
10032 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
10034         * internal-fn.h (vectorizable_internal_fn_p): New function.
10035         * tree-vect-slp.c (compatible_calls_p): Likewise.
10036         (vect_build_slp_tree_1): Remove nops argument.  Handle calls
10037         to internal functions.
10038         (vect_build_slp_tree_2): Update call to vect_build_slp_tree_1.
10040 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
10042         * fold-const.h (inverse_conditions_p): Declare.
10043         * fold-const.c (inverse_conditions_p): New function.
10044         * match.pd: Use inverse_conditions_p.  Add folds of view_converts
10045         that test the inverse condition of a conditional internal function.
10046         * internal-fn.h (vectorized_internal_fn_supported_p): Declare.
10047         * internal-fn.c (internal_fn_mask_index): Handle conditional
10048         internal functions.
10049         (vectorized_internal_fn_supported_p): New function.
10050         * tree-if-conv.c: Include internal-fn.h and fold-const.h.
10051         (any_pred_load_store): Replace with...
10052         (need_to_predicate): ...this new variable.
10053         (redundant_ssa_names): New variable.
10054         (ifcvt_can_use_mask_load_store): Move initial checks to...
10055         (ifcvt_can_predicate): ...this new function.  Handle tree codes
10056         for which a conditional internal function exists.
10057         (if_convertible_gimple_assign_stmt_p): Use ifcvt_can_predicate
10058         instead of ifcvt_can_use_mask_load_store.  Update after variable
10059         name change.
10060         (predicate_load_or_store): New function, split out from
10061         predicate_mem_writes.
10062         (check_redundant_cond_expr): New function.
10063         (value_available_p): Likewise.
10064         (predicate_rhs_code): Likewise.
10065         (predicate_mem_writes): Rename to...
10066         (predicate_statements): ...this.  Use predicate_load_or_store
10067         and predicate_rhs_code.
10068         (combine_blocks, tree_if_conversion): Update after above name changes.
10069         (ifcvt_local_dce): Handle redundant_ssa_names.
10070         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): Handle
10071         general conditional functions.
10072         * tree-vect-stmts.c (vectorizable_call): Likewise.
10074 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
10075             Alan Hayward  <alan.hayward@arm.com>
10076             David Sherwood  <david.sherwood@arm.com>
10078         * internal-fn.h (can_interpret_as_conditional_op_p): Declare.
10079         * internal-fn.c (can_interpret_as_conditional_op_p): New function.
10080         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Handle conditional
10081         plus and minus and convert them into IFN_COND_FMA-based sequences.
10082         (convert_mult_to_fma): Handle conditional plus and minus.
10084 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
10086         * doc/md.texi (cond_fma, cond_fms, cond_fnma, cond_fnms): Document.
10087         * optabs.def (cond_fma_optab, cond_fms_optab, cond_fnma_optab)
10088         (cond_fnms_optab): New optabs.
10089         * internal-fn.def (COND_FMA, COND_FMS, COND_FNMA, COND_FNMS): New
10090         internal functions.
10091         (FMA): Use DEF_INTERNAL_FLT_FN rather than DEF_INTERNAL_FLT_FLOATN_FN.
10092         * internal-fn.h (get_conditional_internal_fn): Declare.
10093         (get_unconditional_internal_fn): Likewise.
10094         * internal-fn.c (cond_ternary_direct): New macro.
10095         (expand_cond_ternary_optab_fn): Likewise.
10096         (direct_cond_ternary_optab_supported_p): Likewise.
10097         (FOR_EACH_COND_FN_PAIR): Likewise.
10098         (get_conditional_internal_fn): New function.
10099         (get_unconditional_internal_fn): Likewise.
10100         * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 5.
10101         (gimple_match_op::gimple_match_op): Add a new overload for 5
10102         operands.
10103         (gimple_match_op::set_op): Likewise.
10104         (gimple_resimplify5): Declare.
10105         * genmatch.c (decision_tree::gen): Generate simplifications for
10106         5 operands.
10107         * gimple-match-head.c (gimple_simplify): Define an overload for
10108         5 operands.  Handle calls with 5 arguments in the top-level overload.
10109         (convert_conditional_op): Handle conversions from unconditional
10110         internal functions to conditional ones.
10111         (gimple_resimplify5): New function.
10112         (build_call_internal): Pass a fifth operand.
10113         (maybe_push_res_to_seq): Likewise.
10114         (try_conditional_simplification): Try converting conditional
10115         internal functions to unconditional internal functions.
10116         Handle 3-operand unconditional forms.
10117         * match.pd (UNCOND_TERNARY, COND_TERNARY): Operator lists.
10118         Define ternary equivalents of the current rules for binary conditional
10119         internal functions.
10120         * config/aarch64/aarch64.c (aarch64_preferred_else_value): Handle
10121         ternary operations.
10122         * config/aarch64/iterators.md (UNSPEC_COND_FMLA, UNSPEC_COND_FMLS)
10123         (UNSPEC_COND_FNMLA, UNSPEC_COND_FNMLS): New unspecs.
10124         (optab): Handle them.
10125         (SVE_COND_FP_TERNARY): New int iterator.
10126         (sve_fmla_op, sve_fmad_op): New int attributes.
10127         * config/aarch64/aarch64-sve.md (cond_<optab><mode>)
10128         (*cond_<optab><mode>_2, *cond_<optab><mode_4)
10129         (*cond_<optab><mode>_any): New SVE_COND_FP_TERNARY patterns.
10131 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
10133         * target.def (preferred_else_value): New target hook.
10134         * doc/tm.texi.in (TARGET_PREFERRED_ELSE_VALUE): New hook.
10135         * doc/tm.texi: Regenerate.
10136         * targhooks.h (default_preferred_else_value): Declare.
10137         * targhooks.c (default_preferred_else_value): New function.
10138         * internal-fn.h (conditional_internal_fn_code): Declare.
10139         * internal-fn.c (FOR_EACH_CODE_MAPPING): New macro.
10140         (get_conditional_internal_fn): Use it.
10141         (conditional_internal_fn_code): New function.
10142         * gimple-match.h (gimple_match_cond): New struct.
10143         (gimple_match_op): Add a cond member function.
10144         (gimple_match_op::gimple_match_op): Update all forms to take a
10145         gimple_match_cond.
10146         * genmatch.c (expr::gen_transform): Use the same condition as res_op
10147         for the suboperation, but don't specify a particular else_value.
10148         * tree-ssa-sccvn.c (vn_nary_simplify, vn_reference_lookup_3)
10149         (visit_nary_op, visit_reference_op_load): Pass
10150         gimple_match_cond::UNCOND to the gimple_match_op constructor.
10151         * gimple-match-head.c: Include tree-eh.h
10152         (convert_conditional_op): New function.
10153         (maybe_resimplify_conditional_op): Likewise.
10154         (gimple_resimplify1): Call maybe_resimplify_conditional_op.
10155         (gimple_resimplify2): Likewise.
10156         (gimple_resimplify3): Likewise.
10157         (gimple_resimplify4): Likewise.
10158         (maybe_push_res_to_seq): Return null for conditional operations.
10159         (try_conditional_simplification): New function.
10160         (gimple_simplify): Call it.  Pass conditions to the gimple_match_op
10161         constructor.
10162         * match.pd: Fold VEC_COND_EXPRs of an IFN_COND_* call to a new
10163         IFN_COND_* call.
10164         * config/aarch64/aarch64.c (aarch64_preferred_else_value): New
10165         function.
10166         (TARGET_PREFERRED_ELSE_VALUE): Redefine.
10168 2018-07-12  Jan Hubicka  <hubicka@ucw.cz>
10170         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
10171         DECL_FCONTEXT
10172         (hash_tree): Do not hash DECL_FCONTEXT
10173         * tree-streamer-in.c (lto_input_ts_field_decl_tree_pointers):
10174         Do not stream DECL_FCONTEXT.
10175         * tree-streamer-out.c (write_ts_field_decl_tree_pointers): Likewise.
10176         * tree.c (free_lang_data_in_decl): Free DECL_FCONTEXT.
10178 2018-07-12  Richard Biener  <rguenther@suse.de>
10180         PR debug/86462
10181         * dwarf2out.c (gen_block_die): Only output blocks when they have
10182         at least one !DECL_IGNORED_P variable.
10184 2018-07-12  Richard Biener  <rguenther@suse.de>
10186         PR target/84829
10187         * config/gnu-user.h (GNU_USER_TARGET_NO_PTHREADS_LIB_SPEC):
10188         Remove -mieee-fp handling.
10190 2018-07-12  Richard Biener  <rguenther@suse.de>
10192         * tree-ssa-sccvn.c (vn_lookup_simplify_result): Remove bogus
10193         left-over from last patch.
10195 2018-07-12  Jakub Jelinek  <jakub@redhat.com>
10197         PR tree-optimization/86492
10198         * gimple-ssa-store-merging.c
10199         (imm_store_chain_info::coalesce_immediate_stores): Call
10200         check_no_overlap even for the merge_overlapping case.  Formatting fix.
10202 2018-07-12  Richard Biener  <rguenther@suse.de>
10204         PR middle-end/86479
10205         * fold-const.c (fold_binary_op_with_conditional_arg): Do not
10206         move possibly trapping operations into the conditional.
10208 2018-07-12  Richard Biener  <rguenther@suse.de>
10210         * tree-ssa-sccvn.c (mprts_hook_cnt): Remove.
10211         (vn_lookup_simplify_result): Remove recursion limit applied
10212         here.
10213         (vn_nary_build_or_lookup_1): Adjust.
10214         (try_to_simplify): Likewise.
10215         * gimple-match-head.c (gimple_resimplify1): Instead apply one
10216         here.
10217         (gimple_resimplify2): Likewise.
10218         (gimple_resimplify3): Likewise.
10219         (gimple_resimplify4): Likewise.
10221 2018-07-11  Jakub Jelinek  <jakub@redhat.com>
10223         * config/i386/avx512bitalgintrin.h (_mm512_mask_bitshuffle_epi64_mask):
10224         Use __mmask64 type instead of __mmask8 for __M argument.
10225         * config/i386/avx512fintrin.h (_mm512_mask_xor_epi64,
10226         _mm512_maskz_xor_epi64): Use __mmask8 type instead of __mmask16 for
10227         __U argument.
10228         (_mm512_mask_cmpneq_epi64_mask): Use __mmask8 type instead of
10229         __mmask16 for __M argument.
10230         (_mm512_maskz_insertf32x4, _mm512_maskz_inserti32x4,
10231         _mm512_mask_insertf32x4, _mm512_mask_inserti32x4): Cast last argument
10232         to __mmask16 instead of __mmask8.
10233         * config/i386/avx512vlintrin.h (_mm_mask_add_ps, _mm_maskz_add_ps,
10234         _mm256_mask_add_ps, _mm256_maskz_add_ps, _mm_mask_sub_ps,
10235         _mm_maskz_sub_ps, _mm256_mask_sub_ps, _mm256_maskz_sub_ps,
10236         _mm256_maskz_cvtepi32_ps, _mm_maskz_cvtepi32_ps): Use __mmask8 type
10237         instead of __mmask16 for __U argument.
10238         * config/i386/avx512vlbwintrin.h (_mm_mask_cmp_epi8_mask): Use
10239         __mmask16 instead of __mmask8 for __U argument.
10240         (_mm256_mask_cmp_epi8_mask): Use __mmask32 instead of __mmask16 for
10241         __U argument.
10242         (_mm256_cmp_epi8_mask): Use __mmask32 return type instead of
10243         __mmask16.
10244         (_mm_mask_cmp_epu8_mask): Use __mmask16 instead of __mmask8 for __U
10245         argument.
10246         (_mm256_mask_cmp_epu8_mask): Use __mmask32 instead of __mmask16 for
10247         __U argument.
10248         (_mm256_cmp_epu8_mask): Use __mmask32 return type instead of
10249         __mmask16.
10250         (_mm_mask_cmp_epi16_mask): Cast last argument to __mmask8 instead
10251         of __mmask16.
10252         (_mm256_mask_cvtepi8_epi16): Use __mmask16 instead of __mmask32 for
10253         __U argument.
10254         (_mm_mask_cvtepi8_epi16): Use __mmask8 instead of __mmask32 for
10255         __U argument.
10256         (_mm256_mask_cvtepu8_epi16): Use __mmask16 instead of __mmask32 for
10257         __U argument.
10258         (_mm_mask_cvtepu8_epi16): Use __mmask8 instead of __mmask32 for
10259         __U argument.
10260         (_mm256_mask_cmpneq_epu8_mask, _mm256_mask_cmplt_epu8_mask,
10261         _mm256_mask_cmpge_epu8_mask, _mm256_mask_cmple_epu8_mask): Change
10262         return type as well as __M argument type and all casts from __mmask8
10263         to __mmask32.
10264         (_mm256_mask_cmpneq_epu16_mask, _mm256_mask_cmplt_epu16_mask,
10265         _mm256_mask_cmpge_epu16_mask, _mm256_mask_cmple_epu16_mask): Change
10266         return type as well as __M argument type and all casts from __mmask8
10267         to __mmask16.
10268         (_mm256_mask_cmpneq_epi8_mask, _mm256_mask_cmplt_epi8_mask,
10269         _mm256_mask_cmpge_epi8_mask, _mm256_mask_cmple_epi8_mask): Change
10270         return type as well as __M argument type and all casts from __mmask8
10271         to __mmask32.
10272         (_mm256_mask_cmpneq_epi16_mask, _mm256_mask_cmplt_epi16_mask,
10273         _mm256_mask_cmpge_epi16_mask, _mm256_mask_cmple_epi16_mask): Change
10274         return type as well as __M argument type and all casts from __mmask8
10275         to __mmask16.
10276         * config/i386/avx512vbmi2vlintrin.h (_mm_mask_shrdi_epi32,
10277         _mm_mask_shldi_epi32): Cast last argument to __mmask8 instead of
10278         __mmask16.
10280 2018-07-11  Grazvydas Ignotas  <notasas@gmail.com>
10282         * config/i386/avx512bwintrin.h: (_mm512_mask_cmp_epi8_mask,
10283         _mm512_mask_cmp_epu8_mask): Use __mmask64 type instead of __mmask32
10284         for __U argument.
10286 2018-07-11  Paul Koning  <ni1d@arrl.net>
10288         * doc/md.texi (define_subst): Document how multiple occurrences of
10289         the same argument in the replacement pattern are handled.
10291 2018-07-11  Paul Koning  <ni1d@arrl.net>
10293         * doc/extend.texi (Common Variable Attributes): Move "mode" into
10294         alphabetical order.
10295         (Common Type Attributes): Add "mode" attribute.
10297 2018-07-11  Jan Hubicka  <hubicka@ucw.cz>
10299         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not
10300         stream DECL_ORIGINAL_TYPE.
10301         (DFS::DFS_write_tree_body): Drop hack handling local external decls.
10302         (hash_tree): Do not walk DECL_ORIGINAL_TYPE.
10303         * tree-streamer-in.c (lto_input_ts_decl_non_common_tree_pointers):
10304         Do not walk original type.
10305         * tree-streamer-out.c (streamer_write_chain): Drop hack handling
10306         external decls.
10307         (write_ts_decl_non_common_tree_pointers): Do not stream
10308         DECL_ORIGINAL_TYPE
10309         * tree.c (free_lang_data_in_decl): Clear DECL_ORIGINAL_TYPE.
10310         (find_decls_types_r): Do not walk DEC_ORIGINAL_TYPE.
10312 2018-07-11  Aldy Hernandez  <aldyh@redhat.com>
10314         * tree-ssa-threadupdate.c (thread_through_all_blocks): Do not jump
10315         thread twice from the same starting edge.
10317 2018-07-11  Aldy Hernandez  <aldyh@redhat.com>
10319         * vr-values.c (gimple_stmt_nonzero_p): Abstract common code to...
10320         * gimple.c (gimple_call_nonnull_result_p): ...here...
10321         (gimple_call_nonnull_arg): ...and here.
10322         * gimple.h (gimple_call_nonnull_result_p): New.
10323         (gimple_call_nonnull_arg): New.
10325 2018-07-11  Richard Earnshaw  <rearnsha@arm.com>
10327         * config/arm/arm-cpus.in: Move information from fpu field of each
10328         cpu definition to the isa field.
10329         * config/arm/parsecpu.awk (fpu): Delete match rule.
10330         (gen_comm_data): Don't add bits from the CPU's FPU entry.
10332 2018-07-11  Richard Biener  <rguenther@suse.de>
10334         PR debug/86457
10335         * dwarf2out.c (init_sections_and_labels): Use
10336         output_asm_line_debug_info consistently.
10337         (dwarf2out_early_finish): Likewise.
10338         (dwarf2out_finish): Remove DW_AT_stmt_list from early generated
10339         type units.
10341 2018-07-11  Richard Biener  <rguenther@suse.de>
10343         * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1):
10344         Rework father_bb setting in a way to avoid propagating constants
10345         multiple times on a loop body.
10347 2018-07-10  Mark Wielaard  <mark@klomp.org>
10349         PR debug/86459
10350         * dwarf2out.c (output_macinfo_op): Fix dwarf_FORM typo in gcc_assert.
10352 2018-07-10  Richard Biener  <rguenther@suse.de>
10354         * hash-map.h (hash_map::iterator::operator*): Return
10355         references to key and value.
10357 2018-07-10  Jakub Jelinek  <jakub@redhat.com>
10359         PR c++/86443
10360         * gimplify.c (find_combined_omp_for): Add DATA argument, in addition
10361         to finding the inner OMP_FOR/OMP_SIMD stmt find non-trivial wrappers,
10362         BLOCKs with BLOCK_VARs, OMP_PARALLEL in between, OMP_FOR in between.
10363         (gimplify_omp_for): For composite loops, move outer
10364         OMP_{DISTRIBUTE,TASKLOOP,FOR,PARALLEL} right around innermost
10365         OMP_FOR/OMP_SIMD if there are any non-trivial wrappers.  For class
10366         iterators add any needed clauses.  Allow OMP_FOR_ORIG_DECLS to contain
10367         TREE_LIST for both the original class iterator and the "last" helper
10368         var.  Gimplify OMP_FOR_PRE_BODY before the outermost composite
10369         loop, remember has_decl_expr from outer composite loops for the
10370         innermost OMP_SIMD in TREE_PRIVATE bit on OMP_FOR_INIT.
10372 2018-07-09  Martin Sebor  <msebor@redhat.com>
10374         PR middle-end/77357
10375         PR middle-end/86428
10376         * builtins.c (c_strlen): Avoid out-of-bounds warnings when
10377         accessing implicitly initialized array elements.
10378         * expr.c (string_constant): Handle string initializers of
10379         character arrays within aggregates.
10380         * gimple-fold.c (fold_array_ctor_reference): Add argument.
10381         Store element offset.  As a special case, handle zero size.
10382         (fold_nonarray_ctor_reference): Same.
10383         (fold_ctor_reference): Add argument.  Store subobject offset.
10384         * gimple-fold.h (fold_ctor_reference): Add argument.
10386 2018-07-09  Paul Koning  <ni1d@arrl.net>
10388         * config/pdp11/pdp11.c (pdp11_addr_cost): New function.
10389         (pdp11_insn_cost): New function.
10390         (pdp11_md_asm_adjust): New function.
10391         (TARGET_INVALID_WITHIN_DOLOOP): Define.
10392         (pdp11_rtx_costs): Update to match machine better.
10393         (output_addr_const_pdp11): Correct format mismatch warnings.
10394         * config/pdp11/pdp11.h (SLOW_BYTE_ACCESS): Correct definition.
10395         * config/pdp11/pdp11.md: General change to add base_cost and/or
10396         length attributes for use by new pdp11_insn_cost function.
10397         (MIN_BRANCH): Correct definition.
10398         (MIN_SOB): Ditto.
10399         (doloop_end): Use standard pattern name for looping pattern.
10400         (doloop_end_nocc): New.
10401         (movsf): Add another constraint alternative.
10402         (zero_extendqihi2): Add constraint alternatives for not in place
10403         extend.
10404         (zero_extendhisi2): Remove.
10405         (shift patterns): Add CC handling variants.
10406         (bswaphi2): New.
10407         (bswapsi2): New.
10408         (rothi3): New.
10409         (define_peephole2): New peephole to recognize mov that sets CC for
10410         subsequent test.
10412 2018-07-09  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
10414         * config/sparc/sparc.c (sparc_fold_builtin) <SPARC_BUILTIN_PDIST,
10415         SPARC_BUILTIN_PDISTN>: Adapt for signature change of wi::neg,
10416         wi::add.
10418 2018-07-09  Jakub Jelinek  <jakub@redhat.com>
10420         PR c/86420
10421         * real.c (real_nextafter): Return true if result is denormal.
10423 2018-07-09  Martin Liska  <mliska@suse.cz>
10425         * common.opt: Add back wrongly removed attribute.
10427 2018-07-09  Richard Biener  <rguenther@suse.de>
10429         PR debug/86413
10430         * dwarf2out.c (gen_block_die): For an early generated DIE
10431         always output high/low PC attributes.
10433 2018-07-09  Tom de Vries  <tdevries@suse.de>
10435         * cfgexpand.c (expand_debug_source_expr): Handle VAR_DECL.
10436         * tree-inline.c (remap_ssa_name): Handle default def ssa_name mapping
10437         onto VAR_DECL with abstract origin.
10439 2018-07-07  Jim Wilson  <jimw@sifive.com>
10441         * config/riscv/riscv.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): New.
10443 2018-07-07  Tom de Vries  <tdevries@suse.de>
10445         * tree-dfa.c (dump_enumerated_decls): Handle cfun->cfg == NULL.
10447 2018-07-07  Aldy Hernandez  <aldyh@redhat.com>
10449         * tree-vrp.c (vrp_int_const_binop): Change overflow type to
10450         overflow_type.
10451         (combine_bound): Use wide-int overflow calculation instead of
10452         rolling our own.
10453         * calls.c (maybe_warn_alloc_args_overflow): Change overflow type to
10454         overflow_type.
10455         * fold-const.c (int_const_binop_2): Same.
10456         (extract_muldiv_1): Same.
10457         (fold_div_compare): Same.
10458         (fold_abs_const): Same.
10459         * match.pd: Same.
10460         * poly-int.h (add): Same.
10461         (sub): Same.
10462         (neg): Same.
10463         (mul): Same.
10464         * predict.c (predict_iv_comparison): Same.
10465         * profile-count.c (slow_safe_scale_64bit): Same.
10466         * simplify-rtx.c (simplify_const_binary_operation): Same.
10467         * tree-chrec.c (tree_fold_binomial): Same.
10468         * tree-data-ref.c (split_constant_offset_1): Same.
10469         * tree-if-conv.c (idx_within_array_bound): Same.
10470         * tree-scalar-evolution.c (iv_can_overflow_p): Same.
10471         * tree-ssa-phiopt.c (minmax_replacement): Same.
10472         * tree-vect-loop.c (is_nonwrapping_integer_induction): Same.
10473         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Same.
10474         * vr-values.c (vr_values::adjust_range_with_scev): Same.
10475         * wide-int.cc (wi::add_large): Same.
10476         (wi::mul_internal): Same.
10477         (wi::sub_large): Same.
10478         (wi::divmod_internal): Same.
10479         * wide-int.h: Change overflow type to overflow_type for neg, add,
10480         mul, smul, umul, div_trunc, div_floor, div_ceil, div_round,
10481         mod_trunc, mod_ceil, mod_round, add_large, sub_large,
10482         mul_internal, divmod_internal.
10483         (overflow_type): New enum.
10484         (accumulate_overflow): New.
10486 2018-07-06  Kugan Vivekanandarajah  <kugan.vivekanandarajah@linaro.org>
10488         * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): New.
10489         (tree_ssa_phiopt_worker): Call cond_removal_in_popcount_pattern.
10491 2018-07-06  Kugan Vivekanandarajah  <kuganv@linaro.org>
10493         * tree-ssa-loop-niter.c (number_of_iterations_popcount): If popcount
10494         argument is checked for zero before entering loop, avoid checking again.
10496 2018-07-06  Kugan Vivekanandarajah  <kuganv@linaro.org>
10498         * gimplify.h (generic_expr_could_trap_p): Set as global function.
10499         * gimplify.h (generic_expr_could_trap_p): Likwise.
10500         * tree-scalar-evolution.c (expression_expensive_p): Handle COND_EXPR.
10502 2018-07-06  Jakub Jelinek  <jakub@redhat.com>
10504         PR tree-optimization/86401
10505         * fold-const.c (fold_binary_loc) <case BIT_AND_EXPR>: Move the
10506         ((A & N) + B) & M -> (A + B) & M etc. optimization into ...
10507         (fold_bit_and_mask): ... here.  New helper function for match.pd.
10508         * fold-const.h (fold_bit_and_mask): Declare.
10509         * match.pd (((A & N) + B) & M -> (A + B) & M): New optimization.
10511 2018-07-06  Peter Bergner  <bergner@linux.ibm.com>
10513         PR target/86324
10514         * target.def (translate_mode_attribute): New hook.
10515         * targhooks.h (default_translate_mode_attribute): Declare.
10516         * targhooks.c (default_translate_mode_attribute): New function.
10517         * doc/tm.texi.in (TARGET_TRANSLATE_MODE_ATTRIBUTE): New hook.
10518         * doc/tm.texi: Regenerate.
10519         * config/rs6000/rs6000.c (TARGET_TRANSLATE_MODE_ATTRIBUTE): Define.
10520         (rs6000_translate_mode_attribute): New function.
10522 2018-07-06  Paul Koning  <ni1d@arrl.net>
10524         * doc/md.texi (define_split): Document DONE and FAIL.
10525         (define_peephole2): Ditto.
10527 2018-07-05  Jeff Law  <law@redhat.com>
10529         PR tree-optimization/86010
10530         * tree-ssa-dse.c (compute_trims): More aggressively trim at
10531         both the head and tail of mem* and str* calls.
10533 2018-07-05  Jim Wilson  <jimw@sifive.com>
10535         * config.gcc (riscv*-*-*): When setting xlen, handle riscv-*.
10537 2018-07-05  Indu Bhagat  <indu.bhagat@oracle.com>
10539         * config/aarch64/aarch64-simd.md: correct flags text for
10540         MIN_EXPR replacement.
10542 2018-07-05  James Clarke  <jrtc27@jrtc27.com>
10544         * configure: Regenerated.
10546 2018-07-05  Carl Love  <cel@us.ibm.com>
10548         * config/rs6000/rs6000-c.c: Map ALTIVEC_BUILTIN_VEC_UNPACKH for
10549         float argument to VSX_BUILTIN_DOUBLEH_V4SF.
10550         Map ALTIVEC_BUILTIN_VEC_UNPACKL for float argument to
10551         VSX_BUILTIN_DOUBLEL_V4SF.
10553 2018-07-05  Martin Sebor  <msebor@redhat.com>
10555         PR c++/86400
10556         * tree-ssa-strlen.c (maybe_set_strlen_range): Use type size rather
10557         than its domain to compute its the upper bound of a char array.
10559 2018-07-05  Nathan Sidwell  <nathan@acm.org>
10561         Replace NO_IMPLICIT_EXTERN_C with SYSTEM_IMPLICIT_EXTERN_C.
10562         * doc/cpp.texi: Update comment.
10563         * doc/tm.texi: Rebuilt.
10564         * doc/tm.texi.in (NO_IMPLICIT_EXTERN_C): Replace with ...
10565         (SYSTEM_IMPLICIT_EXTERN_C): ... this, opposite sense.
10566         * doc/extend.texi (Backwards Compatibility): Clarify it is system
10567         headers affected by extern "C".
10568         * system.h: Poison NO_IMPLICIT_EXTERN_C.
10569         * config/alpha/alpha.h, config/arm/uclinux-elf.h,
10570         config/bfin/elf.h, config/cris/cris.h, config/darwin.h,
10571         config/dragonfly.h, config/freebsd.h, config/gnu-user.h,
10572         config/i386/cygming.h, config/i386/djgpp.h, config/i386/nto.h,
10573         config/ia64/hpux.h, config/lm32/lm32.h, config/lm32/uclinux-elf.h,
10574         config/lynx.h, config/mips/elf.h, config/mmix/mmix.h,
10575         config/netbsd.h, config/pa/pa-hpux.h, config/powerpcspe/sysv4.h,
10576         config/riscv/elf.h, config/rs6000/sysv4.h, config/rtems.h,
10577         config/s390/tpf.h, config/sh/newlib.h, config/sol2.h,
10578         config/sparc/openbsd64.h, config/sparc/sp-elf.h,
10579         config/sparc/sp64-elf.h, config/spu/spu.h,
10580         config/stormy16/stormy16.h, config/v850/v850.h,
10581         config/visium/visium.h, config/vx-common.h, config/xtensa/elf.h: Don't
10582         define NO_IMPLICIT_EXTERN_C.
10583         * config/rs6000/aix.h: Set SYSTEM_IMPLICIT_EXTERN_C.
10585 2018-07-05  Tamar Christina  <tamar.christina@arm.com>
10587         PR target/84711
10588         * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
10589         instead of GET_MODE_SIZE when comparing Units.
10591 2018-07-05  Tamar Christina  <tamar.christina@arm.com>
10593         PR target/84711
10594         * rtlanal.c (set_noop_p): Constrain on mode change,
10595         include hard-reg-set.h
10597 2018-07-05  Tamar Christina  <tamar.christina@arm.com>
10599         * config/aarch64/aarch64.c (aarch64_expand_movmem): Fix mode size.
10601 2018-07-05  Jakub Jelinek  <jakub@redhat.com>
10603         Revert
10604         2018-07-04  Maxim Ostapenko  <m.ostapenko@samsung.com>
10606         PR sanitizer/84250
10607         * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
10608         libasan.
10609         * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
10611 2018-07-04  Maxim Ostapenko  <m.ostapenko@samsung.com>
10613         PR sanitizer/84250
10614         * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
10615         libasan.
10616         * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
10618 2018-07-04  Eric Botcazou  <ebotcazou@adacore.com>
10620         PR middle-end/86380
10621         * expmed.c (choose_multiplier): Fix incorrect comparison with mask.
10623 2018-07-04  Aldy Hernandez  <aldyh@redhat.com>
10625         * tree-vrp.c (extract_range_from_binary_expr_1): Initialize
10626         neg_*_op* variables.
10628 2018-07-04  Martin Liska  <mliska@suse.cz>
10630         * tree-switch-conversion.c: Define
10631         max_ratio_for_speed and max_ratio_for_size constants.
10633 2018-07-04  Denys Vlasenko  <dvlasenk@redhat.com>
10634             Martin Liska  <mliska@suse.cz>
10636         PR middle-end/66240
10637         PR target/45996
10638         PR c/84100
10639         * common.opt: Rename align options with 'str_' prefix.
10640         * common/config/i386/i386-common.c (set_malign_value): New
10641         function.
10642         (ix86_handle_option): Use it to set -falign-* options/
10643         * config/aarch64/aarch64-protos.h (struct tune_params): Change
10644         type from int to string.
10645         * config/aarch64/aarch64.c: Update default values from int
10646         to string.
10647         * config/alpha/alpha.c (alpha_override_options_after_change):
10648         Likewise.
10649         * config/arm/arm.c (arm_override_options_after_change_1): Likewise.
10650         * config/i386/dragonfly.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
10651         max skip conditionally.
10652         * config/i386/freebsd.h (SUBALIGN_LOG): New.
10653         (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
10654         max skip conditionally.
10655         * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
10656         max skip conditionally.
10657         * config/i386/gnu-user.h (SUBALIGN_LOG): New.
10658         (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
10659         max skip conditionally.
10660         * config/i386/i386.c (struct ptt): Change type from int to
10661         string.
10662         (ix86_default_align): Set default values.
10663         * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Print
10664         max skip conditionally.
10665         * config/i386/iamcu.h (SUBALIGN_LOG): New.
10666         (ASM_OUTPUT_MAX_SKIP_ALIGN):
10667         * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN):
10668         * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
10669         max skip conditionally.
10670         * config/i386/openbsdelf.h (SUBALIGN_LOG): New.
10671         (ASM_OUTPUT_MAX_SKIP_ALIGN) Print max skip conditionally.:
10672         * config/i386/x86-64.h (SUBALIGN_LOG): New.
10673         (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
10674         max skip conditionally.
10675         (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
10676         * config/ia64/ia64.c (ia64_option_override): Set default values
10677         for alignment options.
10678         * config/m68k/m68k.c: Handle new str_align_* options.
10679         * config/mips/mips.c (mips_set_compression_mode): Change
10680         type of constants.
10681         (mips_option_override): Set default values for options.
10682         * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
10683         Likewise.
10684         * config/rs6000/rs6000.c (rs6000_option_override_internal):
10685         Likewise.
10686         * config/rx/rx.c (rx_option_override): Likewise.
10687         * config/rx/rx.h (JUMP_ALIGN): Use align_jumps_log.
10688         (LABEL_ALIGN): Use align_labels_log.
10689         (LOOP_ALIGN): Use align_loops_align.
10690         * config/s390/s390.c (s390_asm_output_function_label): Use new
10691         macros.
10692         * config/sh/sh.c (sh_override_options_after_change):
10693         Change type of constants.
10694         * config/spu/spu.c (spu_sched_init): Likewise.
10695         * config/sparc/sparc.c (sparc_option_override): Set default
10696         values for options.
10697         * config/visium/visium.c (visium_option_override): Likewise.
10698         * config/visium/visium.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Do not
10699         emit p2align format with last argument if it's not needed.
10700         * doc/invoke.texi: Document extended format of -falign-*.
10701         * final.c: Use align_labels alignment.
10702         * flags.h (struct target_flag_state): Change type to use
10703         align_flags.
10704         (struct align_flags_tuple): New.
10705         (struct align_flags): Likewise.
10706         (align_loops_log): Redefine macro to use new types.
10707         (align_loops_max_skip): Redefine macro to use new types.
10708         (align_jumps_log): Redefine macro to use new types.
10709         (align_jumps_max_skip): Redefine macro to use new types.
10710         (align_labels_log): Redefine macro to use new types.
10711         (align_labels_max_skip): Redefine macro to use new types.
10712         (align_functions_log): Redefine macro to use new types.
10713         (align_loops): Redefine macro to use new types.
10714         (align_jumps): Redefine macro to use new types.
10715         (align_labels): Redefine macro to use new types.
10716         (align_functions): Redefine macro to use new types.
10717         (align_functions_max_skip): Redefine macro to use new types.
10718         (align_loops_value): New macro.
10719         (align_jumps_value): New macro.
10720         (align_labels_value): New macro.
10721         (align_functions_value): New macro.
10722         * function.c (invoke_set_current_function_hook): Propagate
10723         alignment values from flags to global variables default in
10724         topleev.h.
10725         * ipa-icf.c (sem_function::equals_wpa): Use
10726         cl_optimization_option_eq instead of memcmp.
10727         * lto-streamer.h (cl_optimization_stream_out): Support streaming
10728         of string types.
10729         (cl_optimization_stream_in): Likewise.
10730         * optc-save-gen.awk: Support strings in cl_optimization.
10731         * opth-gen.awk: Likewise.
10732         * opts.c (finish_options): Remove error checking of invalid
10733         value ranges.
10734         (MAX_CODE_ALIGN): Remove.
10735         (MAX_CODE_ALIGN_VALUE): Likewise.
10736         (parse_and_check_align_values): New function.
10737         (check_alignment_argument): Likewise.
10738         (common_handle_option): Use check_alignment_argument.
10739         * opts.h (parse_and_check_align_values): Declare.
10740         * toplev.c (init_alignments): Remove.
10741         (read_log_maxskip): New.
10742         (parse_N_M): Likewise.
10743         (parse_alignment_opts): Likewise.
10744         (backend_init_target): Remove usage of init_alignments.
10745         * toplev.h (parse_alignment_opts): Declare.
10746         * tree-streamer-in.c (streamer_read_tree_bitfields): Add new
10747         argument.
10748         * tree-streamer-out.c (streamer_write_tree_bitfields): Likewise.
10749         * tree.c (cl_option_hasher::equal): New.
10750         * varasm.c: Use new global macros.
10752 2018-07-04  Denys Vlasenko  <dvlasenk@redhat.com>
10754         * config/i386/dragonfly.h: (ASM_OUTPUT_MAX_SKIP_ALIGN):
10755         Use a simpler align directive also if MAXSKIP = ALIGN-1.
10756         * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
10757         * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
10758         * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
10759         * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
10760         * config/i386/freebsd.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Remove "If N
10761         is large, do at least 8 byte alignment" code. Add SUBALIGN_LOG
10762         define. Use a simpler align directive also if MAXSKIP = ALIGN-1.
10763         * config/i386/gnu-user.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
10764         * config/i386/iamcu.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
10765         * config/i386/openbsdelf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
10766         * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
10768 2018-07-04  Martin Liska  <mliska@suse.cz>
10769             Jonathan Wakely  <jwakely@redhat.com>
10771         * coverage.c: Use correct type.
10772         * doc/invoke.texi: Language correction.
10774 2018-07-03  H.J. Lu  <hongjiu.lu@intel.com>
10776         PR target/85620
10777         * config/i386/i386.c (rest_of_insert_endbranch): Also generate
10778         ENDBRANCH for non-tail call which may return via indirect branch.
10779         * doc/extend.texi: Document indirect_return attribute.
10781 2018-07-03  Martin Sebor  <msebor@redhat.com>
10783         PR tree-optimization/86274
10784         * gimple-ssa-sprintf.c (fmtresult::type_max_digits): Verify
10785         precondition.
10786         (format_floating): Correct handling of infinities and NaNs.
10788 2018-07-03  Martin Sebor  <msebor@redhat.com>
10790         * print-tree.c (print_real_cst): New function.
10791         (print_node_brief): Call it.
10792         (print_node): Ditto.
10794 2018-07-03  Jeff Law  <law@redhat.com>
10796         * config/h8300/h8300.md (logical<mode>3_sn, logical<mode>3): Merge
10797         into a single pattern.
10799         * config/h8300/h8300.md (ors code_iterator): New.
10800         (bsetqi_msx, bnotqi_msx patterns and splitters): Consolidate into
10801         a single pattern and single splitter.
10802         (bsethi_msx, bnothi_msx patterns): Consolidate into a single pattern.
10803         (iorqi3_1, xorqi3_1): Likewise.
10804         (iorqi3, xorqi3 expanders): Similarly.
10806         * config/h8300/h8300.md (movmd_internal_normal): Consolidated with
10807         (movmd_internal) into a single pattern using the P mode iterator.
10808         (movmd splitters): Similarly.
10809         (stpcpy_internal_normal, stpcpy_internal): Similarly for thes patterns.
10810         (movsd splitters): Similarly.
10812         * config/h8300/h8300.c (h8300_insn_length_from_table): Consolidate
10813         ADDB, ADDW and ADDL into a single ADD attribute which selects the
10814         right table based on the size of the operand.
10815         * config/h8300/h8300.md (length_table): Corresponding changes. All
10816         references to "addb", "addw" and "addl" changed to "add".
10817         (btst patterns): Merge two variants into a single pattern.
10818         (tstqi, tsthi): Likewise.
10819         (addhi3_incdec, addsi3_incdec): Likewise.
10820         (subhi3_h8300hs, subsi3_h8300hs): Likewise.
10821         (mulhi3, mulsi3): Likewise.
10822         (udivhi3, udivsi3): Likewise.
10823         (divhi3, divsi3): Likewise.
10824         (andorqi3, andorhi3, andorsi3): Likewise.
10826 2018-07-03  Uros Bizjak  <ubizjak@gmail.com>
10828         PR target/85694
10829         * config/i386/sse.md (uavg<mode>3_ceil): New expander.
10830         (<sse2_avx2>_uavg<mode>3<mask_name>): Simplify expander.
10832 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
10834         PR tree-optimization/85694
10835         * config/aarch64/iterators.md (HADD, RHADD): New int iterators.
10836         (u): Handle UNSPEC_SHADD, UNSPEC_UHADD, UNSPEC_SRHADD and
10837         UNSPEC_URHADD.
10838         * config/aarch64/aarch64-simd.md (<u>avg<mode>3_floor)
10839         (<u>avg<mode>3_ceil): New patterns.
10841 2018-07-03  David Malcolm  <dmalcolm@redhat.com>
10843         * gcc.dg/vect/slp-perm-1.c: Remove "note: " prefix from
10844         scan-tree-dump directive.
10845         * gcc.dg/vect/slp-perm-2.c: Likewise.
10846         * gcc.dg/vect/slp-perm-3.c: Likewise.
10847         * gcc.dg/vect/slp-perm-5.c: Likewise.
10848         * gcc.dg/vect/slp-perm-6.c: Likewise.
10849         * gcc.dg/vect/slp-perm-7.c: Likewise.
10850         * gcc.dg/vect/slp-perm-8.c: Likewise.
10852 2018-07-03  Marek Polacek  <polacek@redhat.com>
10854         PR middle-end/86202
10855         * gimple-fold.c (size_must_be_zero_p): Check the type of the size.
10857 2018-07-03  Richard Biener  <rguenther@suse.de>
10859         PR ipa/86389
10860         * tree-ssa-structalias.c (find_func_clobbers): Properly
10861         handle indirect calls.
10863 2018-07-03  Jeff Law  <law@redhat.com>
10865         * config/h8300/h8300.md (HSI, QHSI, QHSIF): New mode iterators.
10866         (shifts): New code iterator.
10867         (movqi, movhi, movsi, movsf expanders): Consolidate into a single
10868         expander.  Fix HImode handling on H8/SX.
10869         (addqi3, addhi3, addsi3 expanders): Consolidate into a single expander.
10870         (subqi3, subhi3, subsi3 expanders): Likewise.
10871         (andqi3, andhi3, andsi3 expanders): Likewise.
10872         (iorqi3, iorhi3, iorsi3 expanders): Likewise.
10873         (xorqi3, xorhi3, xorsi3 expanders): Likewise.
10874         (negqi2, neghi2, negsi2, negsf2 expanders): Likewise.
10875         (one_cmplqi2, one_cmplhi2, one_cmplsi2): Likewise.
10876         (zero_extendqihi2, zero_extendqisi2): Likewise.
10877         (extendqihi2, extendqisi2): Likewise.
10878         (rotlqi3, rotlhi3, rotlsi3): Likewise.
10879         (neghi2_h8300, negsi2_h8300): Likewise for these patterns.
10880         (rotlqi3_1, rotlhi3_1): Likewise.
10881         (logicalhi3_sn, logicalsi3_sn): Likewise.
10882         (logicalhi3, logicalsi3): Likewise.
10884 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
10886         * tree-vect-patterns.c (vect_recog_rotate_pattern)
10887         (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
10888         (vect_recog_mixed_size_cond_pattern, adjust_bool_pattern_cast)
10889         (adjust_bool_pattern, vect_recog_bool_pattern): Pass the vector
10890         type to append_pattern_def_seq instead of creating a stmt_vec_info
10891         directly.
10892         (build_mask_conversion): Likewise.  Remove vinfo argument.
10893         (vect_add_conversion_to_patterm): Likewise, renaming to...
10894         (vect_add_conversion_to_pattern): ...this.
10895         (vect_recog_mask_conversion_pattern): Update call to
10896         build_mask_conversion.  Pass the vector type to
10897         append_pattern_def_seq here too.
10898         (vect_recog_gather_scatter_pattern): Update call to
10899         vect_add_conversion_to_pattern.
10901 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
10903         * tree-vect-patterns.c (new_pattern_def_seq): Delete.
10904         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
10905         (vect_recog_widen_op_pattern, vect_recog_over_widening_pattern)
10906         (vect_recog_rotate_pattern, vect_synth_mult_by_constant): Don't set
10907         STMT_VINFO_PATTERN_DEF_SEQ to null here.
10908         (vect_recog_pow_pattern, vect_recog_vector_vector_shift_pattern)
10909         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern): Use
10910         append_pattern_def_seq instead of new_pattern_def_seq.
10911         (vect_recog_divmod_pattern): Do both of the above.
10912         (vect_pattern_recog_1): Assert that STMT_VINO_PATTERN_DEF_SEQ
10913         is null.
10915 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
10917         * tree-vect-patterns.c (vect_recog_dot_prod_pattern):
10918         (vect_recog_sad_pattern, vect_recog_widen_op_pattern)
10919         (vect_recog_widen_mult_pattern, vect_recog_pow_pattern):
10920         (vect_recog_widen_sum_pattern, vect_recog_over_widening_pattern)
10921         (vect_recog_average_pattern, vect_recog_cast_forwprop_pattern)
10922         (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
10923         (vect_recog_vector_vector_shift_pattern, vect_synth_mult_by_constant)
10924         (vect_recog_mult_pattern, vect_recog_divmod_pattern)
10925         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
10926         (vect_recog_mask_conversion_pattern): Replace vec<gimple *>
10927         parameter with a single stmt_vec_info.
10928         (vect_recog_func_ptr): Likewise.
10929         (vect_recog_gather_scatter_pattern): Likewise, folding in...
10930         (vect_try_gather_scatter_pattern): ...this.
10931         (vect_pattern_recog_1): Remove stmts_to_replace and just pass
10932         the stmt_vec_info of the statement to be matched.  Don't clear
10933         STMT_VINFO_RELATED_STMT.
10934         (vect_pattern_recog): Update call accordingly.
10936 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
10938         PR tree-optimization/85694
10939         * doc/md.texi (avgM3_floor, uavgM3_floor, avgM3_ceil)
10940         (uavgM3_ceil): Document new optabs.
10941         * doc/sourcebuild.texi (vect_avg_qi): Document new target selector.
10942         * internal-fn.def (IFN_AVG_FLOOR, IFN_AVG_CEIL): New internal
10943         functions.
10944         * optabs.def (savg_floor_optab, uavg_floor_optab, savg_ceil_optab)
10945         (savg_ceil_optab): New optabs.
10946         * tree-vect-patterns.c (vect_recog_average_pattern): New function.
10947         (vect_vect_recog_func_ptrs): Add it.
10948         * tree-vect-stmts.c (vectorizable_call): Get the type of the zero
10949         constant directly from the associated lhs.
10951 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
10953         * tree-vect-patterns.c (vect_split_statement): New function.
10954         (vect_convert_input): Use it to try to split an existing cast.
10956 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
10958         * poly-int.h (print_hex): New function.
10959         * dumpfile.h (dump_dec, dump_hex): Declare.
10960         * dumpfile.c (dump_dec, dump_hex): New poly_wide_int functions.
10961         * tree-vectorizer.h (_stmt_vec_info): Add min_output_precision,
10962         min_input_precision, operation_precision and operation_sign.
10963         * tree-vect-patterns.c (vect_get_range_info): New function.
10964         (vect_same_loop_or_bb_p, vect_single_imm_use)
10965         (vect_operation_fits_smaller_type): Delete.
10966         (vect_look_through_possible_promotion): Add an optional
10967         single_use_p parameter.
10968         (vect_recog_over_widening_pattern): Rewrite to use new
10969         stmt_vec_info infomration.  Handle one operation at a time.
10970         (vect_recog_cast_forwprop_pattern, vect_narrowable_type_p)
10971         (vect_truncatable_operation_p, vect_set_operation_type)
10972         (vect_set_min_input_precision): New functions.
10973         (vect_determine_min_output_precision_1): Likewise.
10974         (vect_determine_min_output_precision): Likewise.
10975         (vect_determine_precisions_from_range): Likewise.
10976         (vect_determine_precisions_from_users): Likewise.
10977         (vect_determine_stmt_precisions, vect_determine_precisions): Likewise.
10978         (vect_vect_recog_func_ptrs): Put over_widening first.
10979         Add cast_forwprop.
10980         (vect_pattern_recog): Call vect_determine_precisions.
10982 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
10984         * tree-vect-patterns.c (vect_mark_pattern_stmts): Remove pattern
10985         statements that have been replaced by further pattern statements.
10986         (vect_pattern_recog_1): Clear STMT_VINFO_PATTERN_DEF_SEQ on failure.
10988 2018-07-03  Richard Biener  <rguenther@suse.de>
10990         * tree-vect-stmts.c (vect_is_simple_use): Consolidate dumping,
10991         always set *dt.  Dump vectype in vectype overload.
10992         * dumpfile.h (dump_gimple_expr): New function.
10993         (dump_gimple_expr_loc): Likewise.
10994         * dumpfile.c (dump_gimple_expr): New function.
10995         (dump_gimple_expr_loc): Likewise.
10997 2018-07-02  Jeff Law  <law@redhat.com>
10999         * config/h8300/h8300.md (movqi_h8300, movqi_h8300hs): Consolidate
11000         the H8/300, H8/300H and H8/S variants into a single pattern.
11001         (movhi_h8300, movqi_h8300hs): Similarly.
11002         (pushqi_h8300hs, pushhi_h8300hs): Consolidate into a single pattern.
11003         (QHI mode iterator): New.
11005         * config/h8300/h8300.md: Remove trailing whitespace.
11007 2018-07-02  Jim Wilson  <jimw@sifive.com>
11009         * config/riscv/riscv.c (riscv_expand_epilogue): Use emit_jump_insn
11010         instead of emit_insn for interrupt returns.
11011         * config/riscv/riscv.md (riscv_met): Add (return) to rtl.
11012         (riscv_sret, riscv_uret): Likewise.
11014 2018-07-02  David Malcolm  <dmalcolm@redhat.com>
11016         * pretty-print.c (selftest::test_pp_format): Move save and restore
11017         of quotes to class auto_fix_quotes, and add an instance.
11018         * selftest.c: Include "intl.h".
11019         (selftest::auto_fix_quotes::auto_fix_quotes): New ctor.
11020         (selftest::auto_fix_quotes::~auto_fix_quotes): New dtor.
11021         * selftest.h (selftest::auto_fix_quotes): New class.
11023 2018-07-02  Richard Henderson  <richard.henderson@linaro.org>
11025         * config/aarch64/aarch64-protos.h, config/aarch64/aarch64.c
11026         (aarch64_sve_prepare_conditional_op): Remove.
11027         * config/aarch64/aarch64-sve.md (cond_<SVE_INT_BINARY><SVE_I>):
11028         Allow aarch64_simd_reg_or_zero as select operand; remove
11029         the aarch64_sve_prepare_conditional_op call.
11030         (cond_<SVE_INT_BINARY_SD><SVE_SDI>): Likewise.
11031         (cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
11032         (*cond_<SVE_INT_BINARY><SVE_I>_z): New pattern.
11033         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_z): New pattern.
11034         (*cond_<SVE_COND_FP_BINARY><SVE_F>_z): New pattern.
11035         (*cond_<SVE_INT_BINARY><SVE_I>_any): New pattern.
11036         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_any): New pattern.
11037         (*cond_<SVE_COND_FP_BINARY><SVE_F>_any): New pattern
11038         and a splitters to match all of the *_any patterns.
11039         * config/aarch64/predicates.md (aarch64_sve_any_binary_operator): New.
11041         * config/aarch64/iterators.md (SVE_INT_BINARY_REV): Remove.
11042         (SVE_COND_FP_BINARY_REV): Remove.
11043         (sve_int_op_rev, sve_fp_op_rev): New.
11044         * config/aarch64/aarch64-sve.md (*cond_<SVE_INT_BINARY><SVE_I>_0): New.
11045         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_0): New.
11046         (*cond_<SVE_COND_FP_BINARY><SVE_F>_0): New.
11047         (*cond_<SVE_INT_BINARY><SVE_I>_2): Rename, add movprfx alternative.
11048         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_2): Similarly.
11049         (*cond_<SVE_COND_FP_BINARY><SVE_F>_2): Similarly.
11050         (*cond_<SVE_INT_BINARY><SVE_I>_3): Similarly; use sve_int_op_rev.
11051         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_3): Similarly.
11052         (*cond_<SVE_COND_FP_BINARY><SVE_F>_3): Similarly; use sve_fp_op_rev.
11054         * config/aarch64/aarch64-sve.md (cond_<SVE_COND_FP_BINARY><SVE_F>):
11055         Remove match_dup 1 from the inner unspec.
11056         (*cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
11058         * config/aarch64/aarch64.md (movprfx): New attr.
11059         (length): Default movprfx to 8.
11060         * config/aarch64/aarch64-sve.md (*mul<SVE_I>3): Add movprfx alt.
11061         (*madd<SVE_I>, *msub<SVE_I): Likewise.
11062         (*<su>mul<SVE_I>3_highpart): Likewise.
11063         (*<SVE_INT_BINARY_SD><SVE_SDI>3): Likewise.
11064         (*v<ASHIFT><SVE_I>3): Likewise.
11065         (*<su><MAXMIN><SVE_I>3): Likewise.
11066         (*<su><MAXMIN><SVE_F>3): Likewise.
11067         (*fma<SVE_F>4, *fnma<SVE_F>4): Likewise.
11068         (*fms<SVE_F>4, *fnms<SVE_F>4): Likewise.
11069         (*div<SVE_F>4): Likewise.
11071 2018-07-02  Richard Sandiford  <richard.sandiford@arm.com>
11073         * tree-vect-patterns.c (vect_recog_widen_shift_pattern): Fix typo
11074         in dump string.
11076 2018-07-02  Richard Biener  <rguenther@suse.de>
11078         PR tree-optimization/86363
11079         * tree-ssa-sccvn.c (vn_reference_lookup_3): Check the
11080         memset argument refers to a non-variable address.
11082 2018-07-02  Aldy Hernandez  <aldyh@redhat.com>
11084         * tree-vrp.c (extract_range_from_binary_expr_1): Abstract a lot of the
11085         {PLUS,MINUS}_EXPR code to...
11086         (adjust_symbolic_bound): ...here,
11087         (combine_bound): ...here,
11088         (set_value_range_with_overflow): ...and here.
11090 2018-07-02  Aldy Hernandez  <aldyh@redhat.com>
11092         * tree-vrp.c (extract_range_from_unary_expr): Abstract ABS_EXPR
11093         code...
11094         (extract_range_from_abs_expr): ...here.
11096 2018-07-02  Eric Botcazou  <ebotcazou@adacore.com>
11098         * config/i386/i386.c (ix86_finalize_stack_frame_flags): Do not overrule
11099         -fno-omit-frame-pointer when not optimizing.
11101 2018-07-02  Martin Liska  <mliska@suse.cz>
11103         PR ipa/86279
11104         * ipa-pure-const.c (malloc_candidate_p): Revert usage of ::get.
11105         (propagate_nothrow): Likewise.
11107 2018-07-02  Martin Liska  <mliska@suse.cz>
11109         PR ipa/86323
11110         * ipa-inline.c (early_inliner): Revert wrongly added ::get call.
11112 2018-07-02  David Malcolm  <dmalcolm@redhat.com>
11114         * dumpfile.c (dump_generic_expr_loc): Undo removal of this
11115         function in r262149, changing "loc" param from source_location to
11116         const dump_location_t &.
11117         * dumpfile.h (dump_generic_expr_loc): Undo removal of this
11118         declaration, as above.
11120 2018-07-01  Paul Koning  <ni1d@arrl.net>
11122         * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
11123         -munit-asm, -mgnu-asm, -mdec-asm.
11124         * config/pdp11/pdp11-protos.h (pdp11_gen_int_label): New.
11125         (pdp11_output_labelref): New.
11126         (pdp11_output_def): New.
11127         (pdp11_output_addr_vec_elt): New.
11128         * config/pdp11/pdp11.c: Use tab between opcode and operands.  Use
11129         %# and %@ format codes.
11130         (pdp11_option_override): New.
11131         (TARGET_ASM_FILE_START_FILE_DIRECTIVE): Define.
11132         (pdp11_output_ident): New.
11133         (pdp11_asm_named_section): New.
11134         (pdp11_asm_init_sections): New.
11135         (pdp11_file_start): New.
11136         (pdp11_file_end): New.
11137         (output_ascii): Use .ascii/.asciz for -mdec-asm.
11138         (pdp11_asm_print_operand): Update %# and %$ for -mdec-asm.  Add
11139         %o, like %c but octal.
11140         (pdp11_option_override): New.
11141         * config/pdp11/pdp11.h (TEXT_SECTION_ASM_OP): Update for
11142         -mdec-asm.
11143         (DATA_SECTION_ASM_OP): Ditto.
11144         (READONLY_DATA_SECTION_ASM_OP): New.
11145         (IS_ASM_LOGICAL_LINE_SEPARATOR): New.
11146         (ASM_GENERATE_INTERNAL_LABEL): Use new function.
11147         (ASM_OUTPUT_LABELREF): Ditto.
11148         (ASM_OUTPUT_DEF): Ditto.
11149         (ASM_OUTPUT_EXTERNAL): New.
11150         (ASM_OUTPUT_SOURCE_FILENAME): New.
11151         (ASM_OUTPUT_ADDR_VEC_ELT): Use new function.
11152         (ASM_OUTPUT_SKIP): Update for -mdec-asm.
11153         * config/pdp11/pdp11.md: Use tab between opcode and operands.  Use
11154         %# and %@ format codes.
11155         * config/pdp11/pdp11.opt (mgnu-asm): New.
11156         (mdec-asm): Conflicts with -mgnu-asm and -munix-asm.
11157         (munix-asm): Conflicts with -mdec-asm and -mgnu-asm.
11158         * doc/invoke.txt (PDP-11 Options): Add -mgnu-asm.
11160 2018-07-01  Aldy Hernandez  <aldyh@redhat.com>
11162         * tree-ssa-threadupdate.c (mark_threaded_blocks): Avoid
11163         dereferencing path[] beyond its length.
11164         (debug_path): New.
11165         (debug_all_paths): New.
11166         (rewire_first_differing_edge): New.
11167         (adjust_paths_after_duplication): New.
11168         (duplicate_thread_path): Call adjust_paths_after_duplication.
11169         Add new argument.
11170         (thread_through_all_blocks): Add new argument to
11171         duplicate_thread_path.
11173 2018-06-30  Jim Wilson  <jimw@sifive.com>
11175         * config/riscv/predicates.md (p2m1_shift_operand): New.
11176         (high_mask_shift_operand): New.
11177         * config/riscv/riscv.md (lshrsi3_zero_extend_3+1): New combiner
11178         pattern using p2m1_shift_operand.
11179         (lshsi3_zero_extend_3+2): New combiner pattern using
11180         high_mask_shift_operand.
11182 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
11184         * tree-vect-patterns.c (vect_get_external_def_edge): New function,
11185         split out from...
11186         (vect_recog_rotate_pattern): ...here.
11187         (vect_convert_input): Try to insert casts of invariants in the
11188         preheader.
11189         * tree-vect-loop-manip.c (vect_loop_versioning): Don't require the
11190         preheader to be empty.
11192 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
11194         * tree-vect-patterns.c (append_pattern_def_seq): Take an optional
11195         vector type.  If given, install it in the new statement's
11196         STMT_VINFO_VECTYPE.
11197         (vect_element_precision): New function.
11198         (vect_unpromoted_value): New struct.
11199         (vect_unpromoted_value::vect_unpromoted_value): New function.
11200         (vect_unpromoted_value::set_op): Likewise.
11201         (vect_look_through_possible_promotion): Likewise.
11202         (vect_joust_widened_integer, vect_joust_widened_type): Likewise.
11203         (vect_widened_op_tree, vect_convert_input): Likewise.
11204         (vect_convert_inputs, vect_convert_output): Likewise.
11205         (vect_recog_dot_prod_pattern): Use vect_look_through_possible_promotion
11206         to handle the optional cast of the multiplication result and
11207         vect_widened_op_tree to detect the widened multiplication itself.
11208         Do not require the input and output of promotion casts to have
11209         the same sign, but base the signedness of the operation on the
11210         input rather than the result.  If the pattern includes two
11211         promotions, check that those promotions have the same sign.
11212         Do not restrict the MULT_EXPR handling to a double-width result;
11213         handle quadruple-width results and wider.  Use vect_convert_inputs
11214         to convert the inputs to the common type.
11215         (vect_recog_sad_pattern):  Use vect_look_through_possible_promotion
11216         to handle the optional cast of the ABS result.  Also allow a sign
11217         change or a sign extension between the ABS and MINUS.
11218         Use vect_widened_op_tree to detect the widened subtraction and use
11219         vect_convert_inputs to convert the inputs to the common type.
11220         (vect_handle_widen_op_by_const): Delete.
11221         (vect_recog_widen_op_pattern): New function.
11222         (vect_recog_widen_mult_pattern): Use it.
11223         (vect_recog_widen_shift_pattern): Likewise.
11224         (vect_recog_widen_sum_pattern): Use
11225         vect_look_through_possible_promotion to handle the promoted
11226         PLUS_EXPR operand.
11228 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
11230         * gimple-iterator.c (gsi_for_stmt): Add a new overload that takes
11231         the containing gimple_seq *.
11232         * gimple-iterator.h (gsi_for_stmt): Declare it.
11233         * tree-vect-patterns.c (vect_recog_dot_prod_pattern)
11234         (vect_recog_sad_pattern, vect_recog_widen_sum_pattern)
11235         (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
11236         (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
11237         (vect_recog_mask_conversion_pattern): Remove STMT_VINFO_IN_PATTERN_P
11238         checks.
11239         (vect_init_pattern_stmt, vect_set_pattern_stmt): New functions,
11240         split out from...
11241         (vect_mark_pattern_stmts): ...here.  Handle cases in which the
11242         statement being replaced is part of an existing pattern
11243         definition sequence, inserting the new pattern statements before
11244         the original one.
11245         (vect_pattern_recog_1): Don't return a bool.  If the statement
11246         is already part of a pattern, instead apply pattern matching
11247         to the pattern definition statements.  Don't clear the
11248         STMT_VINFO_RELATED_STMT if is_pattern_stmt_p.
11249         (vect_pattern_recog): Don't break after the first match;
11250         continue processing the pattern definition statements instead.
11251         Don't bail out for STMT_VINFO_IN_PATTERN_P here.
11253 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
11255         * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
11256         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
11257         (vect_recog_widen_sum_pattern): Use it.
11259 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
11261         * tree-vect-loop.c (vectorizable_reduction): Assert that the
11262         phi is not a pattern statement and has not been replaced by
11263         a pattern statement.
11264         * tree-vect-patterns.c (type_conversion_p): Don't check
11265         STMT_VINFO_IN_PATTERN_P.
11266         (vect_recog_vector_vector_shift_pattern): Likewise.
11267         (vect_recog_dot_prod_pattern): Expect vect_is_simple_use to return
11268         the pattern statement rather than the original statement; check
11269         directly for a WIDEN_MULT_EXPR here.
11270         * tree-vect-slp.c (vect_get_and_check_slp_defs): Expect
11271         vect_is_simple_use to return the pattern statement rather
11272         than the original statement; use is_pattern_stmt_p to check
11273         for such a pattern statement.
11274         * tree-vect-stmts.c (process_use): Expect vect_is_simple_use
11275         to return the pattern statement rather than the original statement;
11276         don't do the same transformation here.
11277         (vect_is_simple_use): If the defining statement has been replaced
11278         by a pattern statement, return the pattern statement instead.
11279         Remove the corresponding (local) transformation from the vectype
11280         overload.
11282 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
11284         * tree-vectorizer.h (vect_is_simple_use): Move the gimple ** to the
11285         end and default to null.
11286         * tree-vect-loop.c (vect_create_epilog_for_reduction)
11287         (vectorizable_reduction): Update calls accordingly, dropping the
11288         gimple ** argument if the passed-back statement isn't needed.
11289         * tree-vect-patterns.c (vect_get_internal_def, type_conversion_p)
11290         (vect_recog_rotate_pattern): Likewise.
11291         (vect_recog_mask_conversion_pattern): Likewise.
11292         * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
11293         (vect_mask_constant_operand_p): Likewise.
11294         * tree-vect-stmts.c (is_simple_and_all_uses_invariant, process_use):
11295         (vect_model_simple_cost, vect_get_vec_def_for_operand): Likewise.
11296         (get_group_load_store_type, get_load_store_type): Likewise.
11297         (vect_check_load_store_mask, vect_check_store_rhs): Likewise.
11298         (vectorizable_call, vectorizable_simd_clone_call): Likewise.
11299         (vectorizable_conversion, vectorizable_assignment): Likewise.
11300         (vectorizable_shift, vectorizable_operation): Likewise.
11301         (vectorizable_store, vect_is_simple_cond): Likewise.
11302         (vectorizable_condition, vectorizable_comparison): Likewise.
11303         (get_same_sized_vectype, vect_get_mask_type_for_stmt): Likewise.
11304         (vect_is_simple_use): Rename the def_stmt argument to def_stmt_out
11305         and move it to the end.  Cope with null def_stmt_outs.
11307 2018-06-30  Bernd Edlinger  <bernd.edlinger@hotmail.de>
11309         * Makefile.in (FLAGS_TO_PASS): Add RANLIB_FOR_TARGET.
11311 2018-06-29  Jeff Law  <law@redhat.com>
11313         * config/v850/v850.c (v850_legitimate_address_p): Handle large
11314         displacements for TARGET_V850E2V3 and newer.
11315         (TARGET_LRA_P): Remove.  Defaults to LRA now.
11316         * config/v850/v850.md (sign23byte_load): Remove.
11317         (unsign23byte_load, sign23hword_load, unsign23hword_load): Likewise.
11318         (23word_load, 23byte_store, 23hword_store, 23word_store): Likewise.
11320 2018-06-29  Martin Liska  <mliska@suse.cz>
11322         PR lto/85759
11323         * coverage.c (coverage_init): Mangle full path name.
11324         * doc/invoke.texi: Document the change.
11325         * gcov-io.c (mangle_path): New.
11326         * gcov-io.h (mangle_path): Likewise.
11327         * gcov.c (mangle_name): Use mangle_path for path mangling.
11329 2018-06-29  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
11331         * config/arm/arm.c (output_move_double): Don't allow STRD instructions
11332         if starting source register is not even.
11334 2018-06-29  Martin Liska  <mliska@suse.cz>
11336         PR tree-optimization/86263
11337         * tree-switch-conversion.c (switch_decision_tree::try_switch_expansion):
11338         Make edge redirection.
11340 2018-06-29  David Malcolm  <dmalcolm@redhat.com>
11342         * dumpfile.c (dump_loc): Add indentation based on scope depth.
11343         (dump_scope_depth): New variable.
11344         (get_dump_scope_depth): New function.
11345         (dump_begin_scope): New function.
11346         (dump_end_scope): New function.
11347         * dumpfile.h (get_dump_scope_depth): New declaration.
11348         (dump_begin_scope): New declaration.
11349         (dump_end_scope): New declaration.
11350         (class auto_dump_scope): New class.
11351         (AUTO_DUMP_SCOPE): New macro.
11352         * tree-vectorizer.h (DUMP_VECT_SCOPE): Reimplement in terms of
11353         AUTO_DUMP_SCOPE.
11355 2018-06-29  Richard Biener  <rguenther@suse.de>
11357         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences): Assert
11358         compute_all_dependences succeeds.
11359         * tree-vect-loop.c (vect_get_datarefs_in_loop): Fail early if we
11360         exceed --param loop-max-datarefs-for-datadeps.
11362 2018-06-29  Jakub Jelinek  <jakub@redhat.com>
11364         * config/rs6000/t-rs6000: Append rs6000-modes.h to TM_H.
11366 2018-06-28  Uros Bizjak  <ubizjak@gmail.com>
11368         PR target/86348
11369         * config/i386/sse.md (*vec_extractv4si_0_zext_sse4): Use
11370         alternative 0 in preferred_for_speed attribute.
11372 2018-06-28  Paul Koning  <ni1d@arrl.net>
11374         * config/pdp11/pdp11-protos.h (pdp11_shift_length): New function.
11375         * config/pdp11/pdp11.c (pdp11_shift_length): New function.
11376         * config/pdp11/pdp11.h (ADJUST_INSN_LENGTH): Remove.
11377         * config/pdp11/pdp11.md: Correct "length" attribute calculation
11378         for shift insn patterns.
11380 2018-06-28  David Malcolm  <dmalcolm@redhat.com>
11382         * cgraph.c (cgraph_node::get_body): Replace assignments to
11383         "dump_file" with calls to set_dump_file.
11384         * dumpfile.c (alt_dump_file): Make static, and group with...
11385         (alt_flags): ...this definition.
11386         (dumps_are_enabled): New variable.
11387         (refresh_dumps_are_enabled): New function.
11388         (set_dump_file): New function.
11389         (set_alt_dump_file): New function.
11390         (gcc::dump_manager::dump_start): Replace assignments to
11391         "dump_file" and "alt_dump_file" with calls to set_dump_file and
11392         set_alt_dump_file.
11393         (gcc::dump_manager::dump_finish): Likewise.
11394         * dumpfile.h (alt_dump_file): Delete decl.
11395         (dumps_are_enabled): New variable decl.
11396         (set_dump_file): New function decl.
11397         (dump_enabled_p): Rewrite in terms of new "dumps_are_enabled"
11398         global.
11399         * tree-nested.c (lower_nested_functions): Replace assignments to
11400         "dump_file" with calls to set_dump_file.
11402 2018-06-28  Eric Botcazou  <ebotcazou@adacore.com>
11404         * tree-cfg.c (verify_gimple_in_cfg): Call verify_location on the
11405         goto_locus of each outgoing edge of each basic block.
11407 2018-06-28  Richard Biener  <rguenther@suse.de>
11409         * dwarf2out.c (decl_scope_table): Remove.
11410         (push_decl_scope): Likewise.
11411         (pop_decl_scope): Likewise.
11412         (gen_type_die_for_member): Do not call push/pop_decl_scope.
11413         (gen_struct_or_union_type_die): Likewise.
11414         (gen_tagged_type_die): Likewise.
11415         (dwarf2out_init): Do not initialize decl_scope_table.
11416         (dwarf2out_c_finalize): Do not free it.
11418 2018-06-28  Richard Biener  <rguenther@suse.de>
11420         * dwarf2out.c (gen_subprogram_die): Use is_unit_die when
11421         deciding whether to not re-use a DIE.
11423 2018-06-28  Richard Biener  <rguenther@suse.de>
11425         * dwarf2out.c (gen_subprogram_die): Always re-use DIEs with an
11426         DW_AT_abstract_origin attribute.
11428 2018-06-28  Martin Liska  <mliska@suse.cz>
11430         * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
11431         Use newly introduced constants.
11432         * tree-switch-conversion.h (struct jump_table_cluster):
11433         Define max_ratio_for_size and max_ratio_for_speed.
11435 2018-06-28  Martin Liska  <mliska@suse.cz>
11437         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
11438         Add new checking assert to catch invalid state.
11439         (jump_table_cluster::can_be_handled): Handle single case
11440         clusters.
11441         (jump_table_cluster::is_beneficial): Bail out for such case.
11442         (bit_test_cluster::find_bit_tests):
11443         Add new checking assert to catch invalid state.
11444         (bit_test_cluster::can_be_handled): Handle single case
11445         clusters.
11446         (bit_test_cluster::is_beneficial): Bail out for such case.
11447         (switch_decision_tree::analyze_switch_statement):
11448         Fix comment.
11450 2018-06-28  Martin Liska  <mliska@suse.cz>
11452         * common.opt: Introduce -completion option.
11453         * gcc.c (driver_handle_option): Handle it.
11454         (driver::main): Print completions if completion
11455         is set.
11456         * opt-suggestions.c (option_proposer::get_completions):
11457         New function.
11458         (option_proposer::suggest_completion): Likewise.
11459         (option_proposer::find_param_completions): Likewise.
11460         (verify_autocompletions): Likewise.
11461         (test_completion_valid_options): Likewise.
11462         (test_completion_valid_params): Likewise.
11463         (in_completion_p): Likewise.
11464         (empty_completion_p): Likewise.
11465         (test_completion_partial_match): Likewise.
11466         (test_completion_garbage): Likewise.
11467         (opt_proposer_c_tests): Likewise.
11468         * opt-suggestions.h: Declare new functions.
11469         * opts.c (common_handle_option): Handle OPT__completion_.
11470         * selftest-run-tests.c (selftest::run_tests): Add
11471         opt_proposer_c_tests.
11472         * selftest.c (assert_str_startswith): New.
11473         * selftest.h (assert_str_startswith): Likewise.
11474         (opt_proposer_c_tests): New.
11475         (ASSERT_STR_STARTSWITH): Likewise.
11477 2018-06-28  Martin Liska  <mliska@suse.cz>
11479         * Makefile.in: Add opt-suggestions.o.
11480         * gcc-main.c: Include opt-suggestions.h.
11481         * gcc.c (driver::driver): Likewise.
11482         (driver::~driver): Remove m_option_suggestions.
11483         (driver::build_option_suggestions): Moved to option_proposer.
11484         (driver::suggest_option): Likewise.
11485         (driver::handle_unrecognized_options): Use option_proposer.
11486         * gcc.h (class driver): Add new memver m_option_proposer.
11487         * opt-suggestions.c: New file.
11488         * opt-suggestions.h: New file.
11490 2018-06-28  Martin Liska  <mliska@suse.cz>
11492         * vec.h (class auto_string_vec): New (moved from auto_argvec).
11493         (auto_string_vec::~auto_string_vec): Likewise.
11495 2018-06-28  Eric Botcazou  <ebotcazou@adacore.com>
11497         * tree-inline.h (struct copy_body_data): Move remapping_type_depth and
11498         prevent_decl_creation_for_types fields up and add reset_location field.
11499         * tree-inline.c (remap_gimple_stmt): Force input_location on the new
11500         statement if id->reset_location is true.
11501         (copy_edges_for_bb): Do not set goto_locus on the new edges if
11502         id->reset_location is true.
11503         (copy_phis_for_bb): Force input_location on the arguments if
11504         id->reset_location is true.
11505         (expand_call_inline): Set id->reset_location if DECL_IGNORED_P
11506         is set on the function to be inlined.
11508 2018-06-27  Stephan Bergmann  <sbergman@redhat.com>
11510         * doc/invoke.texi (Debugging Options): Add -gsplit-dwarf.
11512 2018-06-27  Dimitar Dimitrov  <dimitar@dinux.eu>
11514         * lra-eliminations.c (update_reg_eliminate): Mark all spanning hard
11515         registers for Pmode.
11516         * lra-lives.c (check_pseudos_live_through_calls): Mark all spanning
11517         hard registers for the clobbered pseudo.
11519 2018-06-27  Paul Koning  <ni1d@arrl.net>
11521         * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
11522         mutually exclusive options.
11523         * config/pdp11/constraints.md (h): New constraint.
11524         (O): Update definition to match shift code generation.
11525         (D): New constraint.
11526         * config/pdp11/pdp11-modes.def (CCNZ): Define mode.
11527         (CCFP): Remove.
11528         * config/pdp11/pdp11-protos.h (int_no_side_effect_operand): New
11529         function.
11530         (output_jump): Change arguments.
11531         (pdp11_fixed_cc_regs): New function.
11532         (pdp11_cc_mode): Ditto.
11533         (pdp11_expand_shift): Ditto.
11534         (pdp11_assemble_shift): Ditto.
11535         (pdp11_small_shift): Ditto.
11536         (pdp11_branch_cost): Remove.
11537         * config/pdp11/pdp11.c (pdp11_assemble_integer): Remove comments
11538         from output.
11539         (pdp11_register_move_cost): Update for CC registers.
11540         (pdp11_rtx_costs): Add case for LSHIFTRT.
11541         (pdp11_output_jump): Add CCNZ mode conditional branches.
11542         (notice_update_cc_on_set): Remove.
11543         (pdp11_cc_mode): New function.
11544         (simple_memory_operand): Correct pre/post decrement case.
11545         (no_side_effect_operand): New function.
11546         (pdp11_regno_reg_class): Add CC_REGS class.
11547         (pdp11_fixed_cc_regs): New function.
11548         (pdp11_small_shift): New function.
11549         (pdp11_expand_shift): New function to expand shift insns.
11550         (pdp11_assemble_shift): New function to output shifts.
11551         (pdp11_branch_cost): Remove.
11552         (pdp11_modes_tieable_p): Make QI/HI modes tieable.
11553         * config/pdp11/pdp11.h (SIZE_TYPE): Ensure 16-bit type.
11554         (WCHAR_TYPE): Ditto.
11555         (PTRDIFF_TYPE): Ditto.
11556         (ADJUST_INSN_LENGTH): New macro.
11557         (FIXED_REGISTERS): Add CC registers.
11558         (CALL_USED_REGISTERS): Ditto.
11559         (reg_class): Ditto.
11560         (REG_CLASS_NAMES): Ditto.
11561         (REG_CLASS_CONTENTS): Ditto.
11562         (SELECT_CC_MODE): Use new function.
11563         (TARGET_FLAGS_REGNUM): New macro.
11564         (TARGET_FIXED_CONDITION_CODE_REGS): Ditto.
11565         (cc0_reg_rtx): Remove.
11566         (CC_STATUS_MDEP): Remove.
11567         (CC_STATUS_MDEFP_INIT): Remove.
11568         (CC_IN_FPU): Remove.
11569         (NOTICE_UPDATE_CC): Remove.
11570         (REGISTER_NAMES): Add CC registers.
11571         (BRANCH_COST): Change to constant 1.
11572         * config/pdp11/pdp11.md: Rewrite for CCmode condition code
11573         handling.
11574         * config/pdp11/pdp11.opt (mbcopy): Remove.
11575         (mbcopy-builtin): Remove.
11576         (mbranch-cheap): Remove.
11577         (mbranch-expensive): Remove.
11578         * config/pdp11/predicates.md (expand_shift_operand): Update to
11579         match shift code generation.
11580         (ccnz_operator): New predicate.
11581         * doc/invoke.texi (PDP-11 Options): Remove deleted options
11582         -mbcopy, -mbcopy-builtin, -mbranch-cheap, -mbranch-expensive.
11583         Remove non-existent option -mabshi, -mno-abshi.  Document mutually
11584         exclusive options.
11585         * doc/md.texi (PDP-11): Document new D and h constraints.  Update
11586         description of O constraint.
11588 2018-06-27  Jeff Law  <law@redhat.com>
11589             Austin Law  <austinklaw@gmail.com>
11591         * config/v850/v850.md (addsi3_set_flags): New pattern.
11592         (subsi3_set_flags, negsi2_set_flags, andsi3_set_flags): Likewise.
11593         (iorsi3_set_flags, xorsi3_set_flags, one_cmplsi2_set_flags): Likewise.
11594         (zero_extendhisi2_v850_set_flags): Likewise.
11595         (zero_extendqisi2_v850_set_flags): Likewise.
11596         (ashlsi3_set_flags, ashlsi3_v850e2_set_flags): Likewise.
11597         (lshrsi3_set_flags, lshrsi3_v850e2_set_flags): Likewise.
11598         (ashrsi3_set_flags, ashrsi3_v850e2_set_flags): Likewise.
11600         * config/v850/v850-protos.h (notice_update_cc): Remove.
11601         * config/v850/v850.c (v850_compare_op0, v850_compare_op1): Remove.
11602         (v850_print_operand): Handle 'D' and "d".
11603         (v850_select_cc_mode): Remove ATTRIBUTE_UNUSED for last argument.
11604         Add handling of arithmetic/logical operations compared against zero.
11605         (v850_gen_float_compare): Remove ATTRIBUTE_UNUSED for last argument.
11606         Do not look at v850_compare_op, instead get mode from last argument.
11607         (v850_gen_compare): Remove
11608         (increment_stack): Use addsi3_clobber_flags to avoid splitting failure
11609         after reload for prologue insns.
11610         (expand_prologue): Account for CLOBBER of CC_REGNUM in various
11611         patterns.
11612         (construct_save_jarl): Likewise.
11613         (TARGET_FLAGS_REGNUM): Define.
11614         * config/v850/v850.h (v850_compare_op0, v850_compare_op1): Remove.
11615         (NOTICE_UPDATE_CC): Remove.
11616         * config/v850/v850.md (v850_tst1): Use (reg:CCZ CC_REGNUM) rather
11617         than cc0.  Conditionalize on reload_completed.
11618         (cmpsi_insn, setfcc_insn): Likewise.
11619         (tst1 splitter): Turn into define_and_split which sets the flags
11620         after reload.
11621         (cstoresi4, cbranchsf4, cbranchdf4, cbranchsi4_insn): Likewise.
11622         (cbranchsi4, branch_normal, branch_invert): Do not expose cc0 here.
11623         (cstoresf4, cstoredf4): Clobber the flags.
11624         (cmpsi, cmpsf, cmpdf): Remove expanders.
11625         (setf_insn): Remove pattern.
11626         (addsi3): Turn into define_and_split which clobbers the flags after
11627         reload and a suitable pattern (addsi3_clobber_flags) for use after
11628         reload.
11629         (subsi3, negsi2, andsi3, iorsi3, xorsi3, one_cmplsi2) Likewise.
11630         (ashlsi3, ashlsi3_v850e2, lshrsi3, lsh4si3_v850e2): Likewise.
11631         (ashrsi3, ashrsi3_v850e2): Likewise.
11632         (bins): Clobber the flags.
11633         (movsicc_normal_cc, movsicc_normal, movsicc_tst1): Likewise.
11634         (movsicc_tst1_revesed, sasf, swap and rotate patterns): Likewise.
11635         (fix_loop_counter, call_internal_short, call_internal_long): Likewise.
11636         (call_value_internal_short, call_value_internal_long): Likewise.
11637         (callt_save_interrupt, callt_return_interrupt): Likewise.
11638         (save_interrupt, return_interrupt): Likewise.
11639         (callt_save_all_interrupt, save_all_interrupt): Likewise.
11640         (_save_all_interrupt, callt_restore_all_interrupt): Likewise.
11641         (restore_all_interrupt, _restore_all_interrupt): Likewise.
11642         (All FP comparisons): Only allow after reload has completed.
11643         (trfsr): Likewise.
11644         (divh, divhu): Tweak output template.
11645         (branch_z_normal, branch_z_invert): Remove
11646         (branch_nz_normal, branch_nz_invert): Likewise.
11647         (extendhisi_insn, extendqisi_insn): Do not clobber flags.
11649         * config/v850/v850-modes.def (CCZ, CCNZ): Add new modes.
11650         * config/v850/v850.c (notice_update_cc): Remove.
11651         * config/v850/v850.h  (CC_OVERFLOW_UNUSABLE): Remove
11652         (CC_NO_CARRY): Likewise.
11653         (NOTICE_UPDATE_CC): Define to nothing.
11654         * config/v850/v850.md: Remove block comment on cc0 handling
11655         Remove "cc" attribute from all patterns.  Remove cc_status handling
11656         from all patterns.  Minor formatting fixes.
11658 2018-06-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
11660         * config/aarch64/aarch64-cores.def (cortex-a76): New entry.
11661         (cortex-a76.cortex-a55): Likewise.
11662         * config/aarch64/aarch64-tune.md: Regenerate.
11663         * doc/invoke.texi (AArch64 Options): Document cortex-a76 and
11664         cortex-a76.cortex-a55.
11666 2018-06-27  Jeff Law  <law@redhat.com>
11668         * config/v850/t-v850 (MULTILIB_OPTIONS): Remove 8byte-align.
11669         (MULTILIB_DIRNAMES): Similarly.
11671 2018-06-27  Eric Botcazou  <ebotcazou@adacore.com>
11673         * gimple.h (gimple_return_retbnd): Delete.
11674         (gimple_return_set_retbnd): Likewise.
11675         * cgraphunit.c (cgraph_node::expand_thunk): Remove call to
11676         gimple_return_set_retbnd.
11677         * gimple-pretty-print.c (dump_gimple_return): Remove call to
11678         gimple_return_retbnd and adjust.
11679         * tree-inline.h (struct copy_body_data): Remove retbnd field.
11680         * tree-inline.c (remap_gimple_stmt): Remove handling of retbnd.
11681         Explicitly return NULL in a couple more cases.  Move assertion
11682         on debug statements and remove unreachable code.
11683         (reset_debug_binding): Do not test id->retbnd.
11684         (expand_call_inline): Do not set it.
11686 2018-06-27  Rasmus Villemoes  <rv@rasmusvillemoes.dk>
11688         * configure.ac: Add --disable-gcov option.
11689         * configure: Regenerate.
11690         * Makefile.in: Honour @enable_gcov@.
11691         * doc/install.texi: Document --disable-gcov.
11693 2018-06-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
11695         * config/arm/arm-cpus.in (cortex-a76): New entry.
11696         (cortex-a76.cortex-a55): Likewise.
11697         * config/arm/arm-tables.opt: Regenerate.
11698         * config/arm/arm-tune.md: Likewise.
11699         * config/arm/driver-arm.c (arm_cpu_table): Add Cortex-A76 entry.
11700         * doc/invoke.texi (ARM Options): Document cortex-a76 and
11701         cortex-a76.cortex-a55.
11703 2018-06-27  Tamar Christina  <tamar.christina@arm.com>
11705         PR target/85769
11706         * config/aarch64/aarch64.md (*movhf_aarch64): Add dup v0.4h pattern.
11708 2018-06-27  Siddhesh Poyarekar  <siddhesh@sourceware.org>
11710         * config/aarch64/aarch64.h (CALL_USE_REGISTERS): Fix obsolete
11711         comment.
11712         (EPILOGUE_USES): Likewise.
11714 2018-06-26  Eric Botcazou  <ebotcazou@adacore.com>
11716         * tree-inline.c (remap_location): New function extracted from...
11717         (copy_edges_for_bb): Add ID parameter.  Remap goto_locus.
11718         (copy_phis_for_bb): ...here.  Call remap_location.
11719         (copy_cfg_body): Adjust call to copy_edges_for_bb.
11721 2018-06-26  Aaron Sawdey  <acsawdey@linux.ibm.com>
11723         * config/rs6000/rs6000-string.c (expand_block_clear): Don't use
11724         unaligned vsx for 16B memset.
11726 2018-06-26  Segher Boessenkool  <segher@kernel.crashing.org>
11728         PR target/86285
11729         * config/rs6000/rs6000.c (rs6000_init_builtins): Do not set
11730         ieee128_float_type_node to long_double_type_node unless
11731         TARGET_LONG_DOUBLE_128 is set.
11733 2018-06-26  David Malcolm  <dmalcolm@redhat.com>
11735         * cfgloop.c (get_loop_location): Convert return type from
11736         location_t to dump_user_location_t, replacing INSN_LOCATION lookups
11737         by implicit construction from rtx_insn *, and using
11738         dump_user_location_t::from_function_decl for the fallback case.
11739         * cfgloop.h (get_loop_location): Convert return type from
11740         location_t to dump_user_location_t.
11741         * cgraphunit.c (walk_polymorphic_call_targets): Update call to
11742         dump_printf_loc to pass in a dump_location_t rather than a
11743         location_t, via the gimple stmt.
11744         * coverage.c (get_coverage_counts): Update calls to
11745         dump_printf_loc to pass in dump_location_t rather than a
11746         location_t.
11747         * doc/optinfo.texi (Dump types): Convert example of
11748         dump_printf_loc from taking "locus" to taking "insn".  Update
11749         description of the "_loc" calls to cover dump_location_t.
11750         * dumpfile.c: Include "backend.h", "gimple.h", "rtl.h", and
11751         "selftest.h".
11752         (dump_user_location_t::dump_user_location_t): New constructors,
11753         from gimple *stmt and rtx_insn *.
11754         (dump_user_location_t::from_function_decl): New function.
11755         (dump_loc): Make static.
11756         (dump_gimple_stmt_loc): Convert param "loc" from location_t to
11757         const dump_location_t &.
11758         (dump_generic_expr_loc): Delete.
11759         (dump_printf_loc): Convert param "loc" from location_t to
11760         const dump_location_t &.
11761         (selftest::test_impl_location): New function.
11762         (selftest::dumpfile_c_tests): New function.
11763         * dumpfile.h: Include "profile-count.h".
11764         (class dump_user_location_t): New class.
11765         (struct dump_impl_location_t): New struct.
11766         (class dump_location_t): New class.
11767         (dump_printf_loc): Convert 2nd param from source_location to
11768         const dump_location_t &.
11769         (dump_generic_expr_loc): Delete.
11770         (dump_gimple_stmt_loc): Convert 2nd param from source_location to
11771         const dump_location_t &.
11772         * gimple-fold.c (fold_gimple_assign): Update call to
11773         dump_printf_loc to pass in a dump_location_t rather than a
11774         location_t, via the gimple stmt.
11775         (gimple_fold_call): Likewise.
11776         * gimple-loop-interchange.cc
11777         (loop_cand::analyze_iloop_reduction_var): Update for change to
11778         check_reduction_path.
11779         (tree_loop_interchange::interchange): Update for change to
11780         find_loop_location.
11781         * graphite-isl-ast-to-gimple.c (scop_to_isl_ast): Update for
11782         change in return-type of find_loop_location.
11783         (graphite_regenerate_ast_isl): Likewise.
11784         * graphite-optimize-isl.c (optimize_isl): Likewise.
11785         * graphite.c (graphite_transform_loops): Likewise.
11786         * ipa-devirt.c (ipa_devirt): Update call to dump_printf_loc to
11787         pass in a dump_location_t rather than a location_t, via the
11788         gimple stmt.
11789         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
11790         * ipa.c (walk_polymorphic_call_targets): Likewise.
11791         * loop-unroll.c (report_unroll): Convert "locus" param from
11792         location_t to dump_location_t.
11793         (decide_unrolling): Update for change to get_loop_location's
11794         return type.
11795         * omp-grid.c (struct grid_prop): Convert field "target_loc" from
11796         location_t to dump_user_location_t.
11797         (grid_find_single_omp_among_assignments_1): Updates calls to
11798         dump_printf_loc to pass in a dump_location_t rather than a
11799         location_t, via the gimple stmt.
11800         (grid_parallel_clauses_gridifiable): Convert "tloc" from
11801         location_t to dump_location_t.  Updates calls to dump_printf_loc
11802         to pass in a dump_location_t rather than a location_t, via the
11803         gimple stmt.
11804         (grid_inner_loop_gridifiable_p): Likewise.
11805         (grid_dist_follows_simple_pattern): Likewise.
11806         (grid_gfor_follows_tiling_pattern): Likewise.
11807         (grid_target_follows_gridifiable_pattern): Likewise.
11808         (grid_attempt_target_gridification): Convert initialization
11809         of local "grid" from memset to zero-initialization; FIXME: does
11810         this require C++11?  Update call to dump_printf_loc to pass in a
11811         optinfo_location rather than a location_t, via the gimple stmt.
11812         * profile.c (read_profile_edge_counts): Updates call to
11813         dump_printf_loc to pass in a dump_location_t rather than a
11814         location_t
11815         (compute_branch_probabilities): Likewise.
11816         * selftest-run-tests.c (selftest::run_tests): Call
11817         dumpfile_c_tests.
11818         * selftest.h (dumpfile_c_tests): New decl.
11819         * tree-loop-distribution.c (pass_loop_distribution::execute):
11820         Update for change in return type of find_loop_location.
11821         * tree-parloops.c (parallelize_loops): Likewise.
11822         * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Convert
11823         "locus" from location_t to dump_user_location_t.
11824         (canonicalize_loop_induction_variables): Likewise.
11825         * tree-ssa-loop-ivopts.c (tree_ssa_iv_optimize_loop): Update
11826         for change in return type of find_loop_location.
11827         * tree-ssa-loop-niter.c (number_of_iterations_exit): Update call
11828         to dump_printf_loc to pass in a dump_location_t rather than a
11829         location_t, via the stmt.
11830         * tree-ssa-sccvn.c (eliminate_dom_walker::before_dom_children):
11831         Likewise.
11832         * tree-vect-loop-manip.c (find_loop_location): Convert return
11833         type from source_location to dump_user_location_t.
11834         (vect_do_peeling): Update for above change.
11835         (vect_loop_versioning): Update for change in type of
11836         vect_location.
11837         * tree-vect-loop.c (check_reduction_path): Convert "loc" param
11838         from location_t to dump_user_location_t.
11839         (vect_estimate_min_profitable_iters): Update for change in type
11840         of vect_location.
11841         * tree-vect-slp.c (vect_print_slp_tree): Convert param "loc" from
11842         location_t to dump_location_t.
11843         (vect_slp_bb): Update for change in type of vect_location.
11844         * tree-vectorizer.c (vect_location): Convert from source_location
11845         to dump_user_location_t.
11846         (try_vectorize_loop_1): Update for change in vect_location's type.
11847         (vectorize_loops): Likewise.
11848         (increase_alignment): Likewise.
11849         * tree-vectorizer.h (vect_location): Convert from source_location
11850         to dump_user_location_t.
11851         (find_loop_location): Convert return type from source_location to
11852         dump_user_location_t.
11853         (check_reduction_path): Convert 1st param from location_t to
11854         dump_user_location_t.
11855         * value-prof.c (check_counter): Update call to dump_printf_loc to
11856         pass in a dump_user_location_t rather than a location_t; update
11857         call to error_at for change in type of "locus".
11858         (check_ic_target): Update call to dump_printf_loc to
11859         pass in a dump_user_location_t rather than a location_t, via the
11860         call_stmt.
11862 2018-06-26  Robin Dapp  <rdapp@linux.vnet.ibm.com>
11864         * config/s390/s390.h (enum processor_flags): Do not use
11865         default tune parameter when -march was specified.
11867 2018-06-26  Jakub Jelinek  <jakub@redhat.com>
11869         PR target/86314
11870         * config/i386/i386.md (setcc + movzbl to xor + setcc peephole2s):
11871         Check reg_overlap_mentioned_p in addition to reg_set_p with the same
11872         operands.
11874 2018-06-26  Richard Biener  <rguenther@suse.de>
11876         PR tree-optimization/86287
11877         PR bootstrap/86316
11878         * tree-vect-loop.c (vect_transform_loop_stmt): Fix read-after-free.
11879         (vect_analyze_loop): Initialize n_stmts.
11881 2018-06-26  Richard Biener  <rguenther@suse.de>
11883         PR middle-end/86271
11884         * fold-const.c (fold_convertible_p): Pointer extension
11885         isn't valid.
11887 2018-06-26  Alexandre Oliva <aoliva@redhat.com>
11889         PR debug/86064
11890         * dwarf2out.c (loc_list_has_views): Adjust comments.
11891         (dw_loc_list): Split single cross-partition range with
11892         nonzero locview.
11894 2018-06-25  Jeff Law  <law@redhat.com>
11896         * common/config/v850/v850-common.c (TARGET_DEFAULT_TARGET_FLAGS): Turn
11897         on -mbig-switch by default.
11899         * config/v850/predicates.md (const_float_1_operand): Fix match_code
11900         test.
11901         (const_float_0_operand): Remove unused predicate.
11902         * config/v850/v850.md (define_constants): Remove UNSPEC_LOOP.
11903         (define_c_enum unspec): Add LOOP, RCP and RSQRT constants.
11904         (recipsf2): New expander.  Original pattern now called
11905         (recipsf2_insn).
11906         (recipdf2, recipdf2_insn): Similarly.
11907         (rsqrtsf2, rsqrtsf2_insn): Similarly
11908         (rsqrtdf2, rsqrtdf2_insn): Similarly
11910 2018-06-26  Gerald Pfeifer  <gerald@pfeifer.com>
11912         * ginclude/stddef.h: Remove an obsolete comment on FreeBSD 5.
11913         Simplify logic for FreeBSD (twice).
11915 2018-06-25  Martin Sebor  <msebor@redhat.com>
11917         PR tree-optimization/86204
11918         * tree-ssa-strlen.c (handle_builtin_strlen): Avoid storing
11919         a strnlen result if it's less than the length of the string.
11921 2018-06-25  Martin Sebor  <msebor@redhat.com>
11923         PR tree-optimization/85700
11924         * gimple-fold.c (gimple_fold_builtin_strncat): Adjust comment.
11925         * tree-ssa-strlen.c (is_strlen_related_p): Handle integer subtraction.
11926         (maybe_diag_stxncpy_trunc): Distinguish strncat from strncpy.
11928 2018-06-25  Martin Sebor  <msebor@redhat.com>
11930         * doc/extend.texi (Zero-length arrays): Update and clarify.
11932 2018-06-25  Michael Meissner  <meissner@linux.ibm.com>
11934         * config.gcc (powerpc64le*): Revert January 16th, 2018 patch that
11935         added IEEE/IBM long double multilib support on PowerPC little
11936         endian Linux systems.
11937         * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Likewise.
11938         (MULTILIB_DEFAULTS): Likewise.
11939         * config/rs6000/rs6000.c (rs6000_option_override_internal):
11940         Likewise.
11941         * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Likewise.
11942         * config/rs6000/t-ldouble-linux64le-ibm: Delete, no longer used.
11943         * config/rs6000/t-ldouble-linux64le-ieee: Delete, no longer used.
11945 2018-06-25  Alexander Monakov  <amonakov@ispras.ru>
11947         PR middle-end/86311
11948         * sort.cc (REORDER_23): Avoid memcpy with same destination and source.
11949         (REORDER_45): Likewise.
11951 2018-06-25  Jeff Law  <law@redhat.com>
11953         * config/v850/v850.md (divmodhi4): Make sure to sign extend the
11954         dividend to 32 bits.  Adjust length.
11955         (udivmodhi4): Cleanup output template.  Fix length.
11957 2018-06-25  Carl Love  <cel@us.ibm.com>
11959         * config/rs6000/vsx.md: Change word selector to prefered location.
11961 2018-06-25  Richard Biener  <rguenther@suse.de>
11963         PR tree-optimization/86304
11964         * tree-vectorizer.c (vectorize_loops): Walk over new possibly
11965         epilogue-if-converted loops as well.
11967 2018-06-25  Jan Hubicka  <hubicka@ucw.cz>
11969         * lto-section-out.c (lto_begin_section): Do not print section
11970         name for noaddr and unnumbered dumps.
11972 2018-06-25  Richard Biener  <rguenther@suse.de>
11974         * tree-vectorizer.h (struct vec_info_shared): New structure
11975         with parts split out from struct vec_info and loop_nest from
11976         struct _loop_vec_info.
11977         (struct vec_info): Adjust accordingly.
11978         (struct _loop_vec_info): Likewise.
11979         (LOOP_VINFO_LOOP_NEST): Adjust.
11980         (LOOP_VINFO_DATAREFS): Likewise.
11981         (LOOP_VINFO_DDRS): Likewise.
11982         (struct _bb_vec_info): Likewise.
11983         (BB_VINFO_DATAREFS): Likewise.
11984         (BB_VINFO_DDRS): Likewise.
11985         (struct _stmt_vec_info): Add dr_aux member.
11986         (DR_VECT_AUX): Adjust to refer to member of DR_STMTs vinfo.
11987         (DR_MISALIGNMENT_UNINITIALIZED): New.
11988         (set_dr_misalignment): Adjust.
11989         (dr_misalignment): Assert misalign isn't DR_MISALIGNMENT_UNINITIALIZED.
11990         (vect_analyze_loop): Adjust prototype.
11991         (vect_analyze_loop_form): Likewise.
11992         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
11993         Compute dependences lazily.
11994         (vect_record_base_alignments): Use shared datarefs/ddrs.
11995         (vect_verify_datarefs_alignment): Likewise.
11996         (vect_analyze_data_refs_alignment): Likewise.
11997         (vect_analyze_data_ref_accesses): Likewise.
11998         (vect_analyze_data_refs): Likewise.
11999         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Add
12000         constructor parameter for shared part.
12001         (vect_analyze_loop_form): Pass in shared part and adjust.
12002         (vect_analyze_loop_2): Pass in storage for the number of
12003         stmts.  Move loop nest finding to the caller.  Compute
12004         datarefs lazily.
12005         (vect_analyze_loop): Pass in shared part.
12006         (vect_transform_loop): Verify shared datarefs are unchanged.
12007         * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Add
12008         constructor parameter for shared part.
12009         (vect_slp_analyze_bb_1): Pass in shared part and adjust.
12010         (vect_slp_bb): Verify shared datarefs are unchanged before
12011         transform.
12012         * tree-vect-stmts.c (ensure_base_align): Adjust for DR_AUX
12013         change.
12014         (new_stmt_vec_info): Initialize DR_AUX misalignment to
12015         DR_MISALIGNMENT_UNINITIALIZED.
12016         * tree-vectorizer.c (vec_info::vec_info): Add constructor
12017         parameter for shared part.
12018         (vec_info::~vec_info): Adjust.
12019         (vec_info_shared::vec_info_shared): New.
12020         (vec_info_shared::~vec_info_shared): Likewise.
12021         (vec_info_shared::save_datarefs): Likewise.
12022         (vec_info_shared::check_datarefs): Likewise.
12023         (try_vectorize_loop_1): Construct shared part live for analyses
12024         of a single loop for multiple vector sizes.
12025         * tree-parloops.c (gather_scalar_reductions): Adjust.
12027 2018-06-25  Richard Biener  <rguenther@suse.de>
12029         * tree-vect-data-refs.c (vect_find_stmt_data_reference): Modify
12030         DR for SIMD lane accesses here and mark DR with (void *)-1 aux.
12031         (vect_analyze_data_refs): Remove similar code from here and
12032         simplify accordingly.
12034 2018-06-25  Richard Biener  <rguenther@suse.de>
12036         * tree-vect-data-refs.c (vect_check_gather_scatter): Fail
12037         for reverse storage order accesses rather than asserting
12038         they cannot happen here.
12040 2018-06-25  Tom de Vries  <tdevries@suse.de>
12042         PR debug/86257
12043         * config/i386/i386.md (define_insn "*tls_global_dynamic_64_<mode>"):
12044         Use data16 instead of .byte for insn prefix.
12046 2018-06-25  Andreas Krebbel  <krebbel@linux.ibm.com>
12048         PR C++/86082
12049         * parser.c (make_char_string_pack): Pass this literal chars
12050         through cpp_interpret_string.
12051         (cp_parser_userdef_numeric_literal): Check the result of
12052         make_char_string_pack.
12054 2018-06-24  Maya Rashish  <coypu@sdf.org>
12056         * ginclude/stddef.h: Simplify conditions around avoiding
12057         re-definition of __size_t.
12059 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
12061         * lto-streamer-out.c (tree_is_indexable): Make LABEL_DECL nonindexable
12062         unless it is forced or nonlocal; assert that we stream no IMPORTED_DECL.
12064 2018-06-22  Maya Rashish  <coypu@sdf.org>
12066         * doc/invoke.texi (mno-fancy-math-387): Update for changes
12067         made to OpenBSD and NetBSD through the years.
12069 2018-06-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
12071         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
12072         behavior of vec_pack (vector double, vector double) to match
12073         behavior of vec_float2 (vector double, vector double).
12075 2018-06-22  Olivier Hainque  <hainque@adacore.com>
12077         * gimplify.c (gimplify_function_tree): Prevent creation
12078         of a trampoline for the address of the current function
12079         passed to entry/exit instrumentation hooks.
12081 2018-06-22  Aaron Sawdey  <acsawdey@linux.ibm.com>
12083         PR target/86222
12084         * config/rs6000/rs6000-string.c (expand_strn_compare): Handle -m32
12085         correctly.
12087 2018-06-22  Martin Liska  <mliska@suse.cz>
12089         PR tree-optimization/86263
12090         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
12091         Bail out if is_enabled is false.
12092         * tree-switch-conversion.h (jump_table_cluster::is_enabled):
12093         New declaration.
12094         (jump_table_cluster::is_enabled): New function.
12096 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
12098         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
12099         BINFO_BASE_ACCESSES and BINFO_VPTR_FIELD.
12100         * tree-streamer-in.c (streamer_read_tree_bitfields): Likewise.
12101         (lto_input_ts_binfo_tree_pointers): Likewise.
12102         * tree-streamer-out.c (streamer_write_tree_bitfields,
12103         write_ts_binfo_tree_pointers): Likewise.
12104         * tree.c (free_lang_data_in_binfo): Clear BINFO_VPTR_FIELD.
12106 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
12108         * tree.c (free_lang_data_in_type): Free all TYPE_VFIELDs.
12110 2018-06-22  Martin Liska  <mliska@suse.cz>
12112         * symbol-summary.h (get): Make it pure and inline move
12113         functionality from ::get function.
12114         (get): Remove and inline into ::get and ::get_create.
12115         (get_create): Move code from ::get function.
12117 2018-06-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
12119         PR target/85994
12120         * config/i386/sol2.h (CPP_SPEC): Don't pass -P for
12121         -x assembler-with-cpp.
12123 2018-06-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
12125         * config/sol2.h (TARGET_OS_CPP_BUILTINS): Define
12126         _FILE_OFFSET_BITS=64 for C++.
12128 2018-06-21  Michael Meissner  <meissner@linux.ibm.com>
12130         * config/rs6000/rs6000.md (extendtfif2): Add missing 128-bit
12131         conversion insn that shows up when pr85657-3.c is compiled using
12132         IEEE 128-bit long double.
12133         (neg<mode>2_internal): Use the correct mode to check whether the
12134         mode is IBM extended.
12135         * config/rs6000/rs6000.c (init_float128_ieee): Prevent complex
12136         multiply and divide external functions from being created more
12137         than once.
12139 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
12141         * cfgrtl.c (fixup_reorder_chain): Do not emit NOPs in DECL_IGNORED_P
12142         functions.
12143         (rtl_merge_blocks): Likewise.  Do not emit a NOP if the location of
12144         the edge can be forwarded.
12145         (cfg_layout_merge_blocks): Likewise.
12147 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
12149         * except.c (finish_eh_generation): Commit edge insertions only after
12150         the EH edges have been redirected from post-landing to landing pads.
12152 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
12154         * tree-nested.c (get_frame_type): Use create_tmp_var_raw instead of
12155         create_tmp_var_for to create the FRAME decl.
12156         (finalize_nesting_tree_1): Do not unchain the FRAME decl.
12158 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
12160         * tree-inline.c (copy_edges_for_bb): Minor tweak.
12161         (maybe_move_debug_stmts_to_successors): Also reset the locus of the
12162         debug statement when resetting its value.
12163         (expand_call_inline): Copy the locus of the call onto the assignment
12164         of the return value, if any.  Use local variable in more cases.
12166 2018-06-21  Martin Liska  <mliska@suse.cz>
12168         * ipa-pure-const.c (propagate_nothrow): Use
12169         funct_state_summaries->get.
12170         (dump_malloc_lattice): Likewise.
12171         (propagate_malloc): Likewise.
12173 2018-06-21  Richard Biener  <rguenther@suse.de>
12175         * lto-streamer-out.c (DFS::DFS_write_tree_body): Update outdated
12176         comment.  Follow BLOCK_ABSTRACT_ORIGIN unconditionally.
12177         * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Update
12178         comment.
12179         * tree-streamer-out.c (write_ts_block_tree_pointers): Stream
12180         BLOCK_ABSTRACT_ORIGIN unconditionally.
12182 2018-06-21  David Malcolm  <dmalcolm@redhat.com>
12184         * ipa-cp.c (ipcp_driver): Set edge_clone_summaries to NULL after
12185         deleting it.
12186         * ipa-reference.c (ipa_reference_c_finalize): Delete
12187         ipa_ref_opt_sum_summaries and set it to NULL.
12189 2018-06-21  Tom de Vries  <tdevries@suse.de>
12191         PR tree-optimization/85859
12192         * tree-ssa-tail-merge.c (stmt_local_def): Copy gimple_is_call
12193         test with comment from bb_no_side_effects_p.
12195 2018-06-21  Richard Biener  <rguenther@suse.de>
12197         PR tree-optimization/86232
12198         * tree-ssa-loop-niter.c (number_of_iterations_popcount): Adjust
12199         max for constant niter.
12201 2018-06-21  Andre Vieira  <andre.simoesdiasvieira@arm.com>
12203         * config/aarch64/aarch64-simd.md
12204         (*aarch64_crypto_aes<aes_op>v16qi_xor_combine): New.
12206 2018-06-21  Andre Vieira  <andre.simoesdiasvieira@arm.com>
12208         * config/aarch64/aarch64-simd.md (aarch64_crypto_aes<aes_op>v16qi):
12209         Make opernads of the unspec commutative.
12211 2018-06-21  Richard Biener  <rguenther@suse.de>
12213         * tree-data-ref.c (dr_step_indicator): Handle NULL DR_STEP.
12214         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
12215         Avoid calling vect_mark_for_runtime_alias_test with gathers or scatters.
12216         (vect_analyze_data_ref_dependence): Re-order checks to deal with
12217         NULL DR_STEP.
12218         (vect_record_base_alignments): Do not record base alignment
12219         for gathers or scatters.
12220         (vect_compute_data_ref_alignment): Drop return value that is always
12221         true.  Bail out early for gathers or scatters.
12222         (vect_enhance_data_refs_alignment): Bail out early for gathers
12223         or scatters.
12224         (vect_find_same_alignment_drs): Likewise.
12225         (vect_analyze_data_refs_alignment): Remove dead code.
12226         (vect_slp_analyze_and_verify_node_alignment): Likewise.
12227         (vect_analyze_data_refs): For possible gathers or scatters do
12228         not create an alternate DR, just check their possible validity
12229         and mark them.  Adjust DECL_NONALIASED handling to not rely
12230         on DR_BASE_ADDRESS.
12231         * tree-vect-loop-manip.c (vect_update_inits_of_drs): Do not
12232         update inits of gathers or scatters.
12233         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern):
12234         Also copy gather/scatter flag to pattern vinfo.
12236 2018-06-20  Kelvin Nilsen  <kelvin@gcc.gnu.org>
12238         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
12239         behavior of vec_packsu (vector unsigned long long, vector unsigned
12240         long long) to match behavior of vec_packs with same signature.
12242 2018-06-20  Chung-Lin Tang <cltang@codesourcery.com>
12243             Thomas Schwinge <thomas@codesourcery.com>
12244             Cesar Philippidis  <cesar@codesourcery.com>
12246         * gimplify.c (gimplify_scan_omp_clauses): Add support for
12247         OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
12248         (gimplify_adjust_omp_clauses): Likewise.
12249         (gimplify_oacc_declare_1): Add support for GOMP_MAP_RELEASE, remove
12250         support for GOMP_MAP_FORCE_{ALLOC,TO,FROM,TOFROM}.
12251         (gimplify_omp_target_update): Update handling of acc update and
12252         enter/exit data.
12253         * omp-low.c (install_var_field): Remove unused parameter
12254         base_pointers_restrict.
12255         (scan_sharing_clauses): Remove base_pointers_restrict parameter.
12256         Update call to install_var_field. Handle OMP_CLAUSE_{IF_PRESENT,
12257         FINALIZE}
12258         (omp_target_base_pointers_restrict_p): Delete.
12259         (scan_omp_target): Update call to scan_sharing_clauses.
12260         * tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_{IF_PRESENT,
12261         FINALIZE}.
12262         * tree-nested.c (convert_nonlocal_omp_clauses): Handle
12263         OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
12264         (convert_local_omp_clauses): Likewise.
12265         * tree-pretty-print.c (dump_omp_clause): Likewise.
12266         * tree.c (omp_clause_num_ops): Add entries for  OMP_CLAUSE_{IF_PRESENT,
12267         FINALIZE}.
12268         (omp_clause_code_name): Likewise.
12270 2018-06-20  Jakub Jelinek  <jakub@redhat.com>
12272         PR debug/86194
12273         * var-tracking.c (use_narrower_mode_test): Check if shift amount can
12274         be narrowed.
12276         PR tree-optimization/86231
12277         * tree-vrp.c (union_ranges): For (  [  )  ] or (   )[   ] range and
12278         anti-range don't overwrite *vr0min before using it to compute *vr0max.
12280 2018-06-20  Tom de Vries  <tdevries@suse.de>
12282         PR tree-optimization/86097
12283         * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Also convert *nit to
12284         iv type if signedness of iv type is not the same as that of *nit.
12286 2018-06-20  Jakub Jelinek  <jakub@redhat.com>
12288         * cfgrtl.c (rtl_verify_edges): Formatting fix.  If bb->preds has any
12289         EDGE_EH edges, verify they are all EDGE_EH.
12291 2018-06-20  Maya Rashish  <coypu@sdf.org>
12293         * ginclude/stddef.h: Limit #include <machine/ansi.h> to NetBSD.
12295 2018-06-20  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
12297         * config/aarch64/aarch64-tuning-flags.def (no_ldp_stp_qregs): New.
12298         * config/aarch64/aarch64.c (xgene1_tunings): Add
12299         AARCH64_EXTRA_TUNE_NO_LDP_STP_QREGS to tune_flags.
12300         (aarch64_mode_valid_for_sched_fusion_p):
12301         Allow 16-byte modes.
12302         (aarch64_classify_address): Allow 16-byte modes for load_store_pair_p.
12303         * config/aarch64/aarch64-ldpstp.md: Add peepholes for LDP STP of
12304         128-bit modes.
12305         * config/aarch64/aarch64-simd.md (load_pair<VQ:mode><VQ2:mode>):
12306         New pattern.
12307         (vec_store_pair<VQ:mode><VQ2:mode>): Likewise.
12308         * config/aarch64/iterators.md (VQ2): New mode iterator.
12310 2018-06-20  Martin Liska  <mliska@suse.cz>
12312         * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
12313         Change default ratio from 10 to 8.
12315 2018-06-20  Martin Liska  <mliska@suse.cz>
12317         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
12318         New.
12319         (bit_test_cluster::find_bit_tests): Likewise.
12320         (switch_decision_tree::analyze_switch_statement): Find clusters.
12321         * tree-switch-conversion.h (struct jump_table_cluster): Document
12322         hierarchy.
12324 2018-06-20  Martin Liska  <mliska@suse.cz>
12326         * tree-switch-conversion.c (switch_conversion::collect):
12327         Record m_uniq property.
12328         (switch_conversion::expand): Bail out for special conditions.
12329         (group_cluster::~group_cluster): New.
12330         (group_cluster::group_cluster): Likewise.
12331         (group_cluster::dump): Likewise.
12332         (jump_table_cluster::emit): New.
12333         (switch_decision_tree::fix_phi_operands_for_edges): New.
12334         (struct case_node): Remove struct.
12335         (jump_table_cluster::can_be_handled): New.
12336         (case_values_threshold): Moved to header.
12337         (reset_out_edges_aux): Likewise.
12338         (jump_table_cluster::is_beneficial): New.
12339         (bit_test_cluster::can_be_handled): Likewise.
12340         (add_case_node): Remove.
12341         (bit_test_cluster::is_beneficial): New.
12342         (case_bit_test::cmp): New.
12343         (bit_test_cluster::emit): New.
12344         (expand_switch_as_decision_tree_p): Remove.
12345         (bit_test_cluster::hoist_edge_and_branch_if_true): New.
12346         (fix_phi_operands_for_edge): Likewise.
12347         (switch_decision_tree::analyze_switch_statement): New.
12348         (compute_cases_per_edge): Move ...
12349         (switch_decision_tree::compute_cases_per_edge): ... here.
12350         (try_switch_expansion): Likewise.
12351         (switch_decision_tree::try_switch_expansion): Likewise.
12352         (record_phi_operand_mapping): Likewise.
12353         (switch_decision_tree::record_phi_operand_mapping): Likewise.
12354         (emit_case_decision_tree): Likewise.
12355         (switch_decision_tree::emit): Likewise.
12356         (balance_case_nodes): Likewise.
12357         (switch_decision_tree::balance_case_nodes): Likewise.
12358         (dump_case_nodes): Likewise.
12359         (switch_decision_tree::dump_case_nodes): Likewise.
12360         (emit_jump): Likewise.
12361         (switch_decision_tree::emit_jump): Likewise.
12362         (emit_cmp_and_jump_insns): Likewise.
12363         (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
12364         (emit_case_nodes): Likewise.
12365         (switch_decision_tree::emit_case_nodes): Likewise.
12366         (conditional_probability): Remove.
12367         * tree-switch-conversion.h (enum cluster_type): New.
12368         (PRINT_CASE): New.
12369         (struct cluster): Likewise.
12370         (cluster::cluster): Likewise.
12371         (struct simple_cluster): Likewise.
12372         (simple_cluster::simple_cluster): Likewise.
12373         (struct group_cluster): Likewise.
12374         (struct jump_table_cluster): Likewise.
12375         (struct bit_test_cluster): Likewise.
12376         (struct min_cluster_item): Likewise.
12377         (struct case_tree_node): Likewise.
12378         (case_tree_node::case_tree_node): Likewise.
12379         (jump_table_cluster::case_values_threshold): Likewise.
12380         (struct case_bit_test): Likewise.
12381         (struct switch_decision_tree): Likewise.
12382         (struct switch_conversion): Likewise.
12383         (switch_decision_tree::reset_out_edges_aux): Likewise.
12385 2018-06-20  Martin Liska  <mliska@suse.cz>
12387         * tree-switch-conversion.c (MAX_CASE_BIT_TESTS): Remove.
12388         (hoist_edge_and_branch_if_true): Likewise.
12389         (expand_switch_using_bit_tests_p): Likewise.
12390         (struct case_bit_test): Likewise.
12391         (case_bit_test_cmp): Likewise.
12392         (emit_case_bit_tests): Likewise.
12393         (switch_conversion::switch_conversion): New class.
12394         (struct switch_conv_info): Remove old struct.
12395         (collect_switch_conv_info): More to ...
12396         (switch_conversion::collect): ... this.
12397         (check_range): Likewise.
12398         (switch_conversion::check_range): Likewise.
12399         (check_all_empty_except_final): Likewise.
12400         (switch_conversion::check_all_empty_except_final): Likewise.
12401         (check_final_bb): Likewise.
12402         (switch_conversion::check_final_bb): Likewise.
12403         (create_temp_arrays): Likewise.
12404         (switch_conversion::create_temp_arrays): Likewise.
12405         (free_temp_arrays): Likewise.
12406         (gather_default_values): Likewise.
12407         (switch_conversion::gather_default_values): Likewise.
12408         (build_constructors): Likewise.
12409         (switch_conversion::build_constructors): Likewise.
12410         (constructor_contains_same_values_p): Likewise.
12411         (switch_conversion::contains_same_values_p): Likewise.
12412         (array_value_type): Likewise.
12413         (switch_conversion::array_value_type): Likewise.
12414         (build_one_array): Likewise.
12415         (switch_conversion::build_one_array): Likewise.
12416         (build_arrays): Likewise.
12417         (switch_conversion::build_arrays): Likewise.
12418         (gen_def_assigns): Likewise.
12419         (switch_conversion::gen_def_assigns): Likewise.
12420         (prune_bbs): Likewise.
12421         (switch_conversion::prune_bbs): Likewise.
12422         (fix_phi_nodes): Likewise.
12423         (switch_conversion::fix_phi_nodes): Likewise.
12424         (gen_inbound_check): Likewise.
12425         (switch_conversion::gen_inbound_check): Likewise.
12426         (process_switch): Use the newly created class.
12427         (switch_conversion::expand): New.
12428         (switch_conversion::~switch_conversion): New.
12429         * tree-switch-conversion.h: New file.
12431 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
12433         * tree-vectorizer.h (NUM_PATTERNS, vect_recog_func_ptr): Move to
12434         tree-vect-patterns.c.
12435         * tree-vect-patterns.c (vect_supportable_direct_optab_p): New function.
12436         (vect_recog_dot_prod_pattern): Use it.  Remove the type_in argument.
12437         (vect_recog_sad_pattern): Likewise.
12438         (vect_recog_widen_sum_pattern): Likewise.
12439         (vect_recog_pow_pattern): Likewise.  Check for a null vectype.
12440         (vect_recog_widen_shift_pattern): Remove the type_in argument.
12441         (vect_recog_rotate_pattern): Likewise.
12442         (vect_recog_mult_pattern): Likewise.
12443         (vect_recog_vector_vector_shift_pattern): Likewise.
12444         (vect_recog_divmod_pattern): Likewise.
12445         (vect_recog_mixed_size_cond_pattern): Likewise.
12446         (vect_recog_bool_pattern): Likewise.
12447         (vect_recog_mask_conversion_pattern): Likewise.
12448         (vect_try_gather_scatter_pattern): Likewise.
12449         (vect_recog_widen_mult_pattern): Likewise.  Check for a null vectype.
12450         (vect_recog_over_widening_pattern): Likewise.
12451         (vect_recog_gather_scatter_pattern): Likewise.
12452         (vect_recog_func_ptr): Move from tree-vectorizer.h
12453         (vect_vect_recog_func_ptrs): Move further down the file.
12454         (vect_recog_func): Likewise.  Remove the third argument.
12455         (NUM_PATTERNS): Define based on vect_vect_recog_func_ptrs.
12456         (vect_pattern_recog_1): Expect the pattern function to do any
12457         necessary target tests.  Also expect it to provide a vector type.
12458         Remove the type_in handling.
12460 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
12462         * tree-vect-patterns.c (vect_pattern_detected): New function.
12463         (vect_recog_dot_prod_patternm, vect_recog_sad_pattern)
12464         (vect_recog_widen_mult_pattern, vect_recog_widen_sum_pattern)
12465         (vect_recog_over_widening_pattern, vect_recog_widen_shift_pattern
12466         (vect_recog_rotate_pattern, vect_recog_vector_vector_shift_pattern)
12467         (vect_recog_mult_pattern, vect_recog_divmod_pattern)
12468         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
12469         (vect_recog_mask_conversion_pattern)
12470         (vect_try_gather_scatter_pattern): Likewise.
12472 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
12474         * tree-vect-patterns.c (vect_get_internal_def): New function.
12475         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
12476         (vect_recog_vector_vector_shift_pattern, check_bool_pattern)
12477         (search_type_for_mask_1): Use it.
12479 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
12481         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
12482         redundant WIDEN_SUM_EXPR handling.
12483         (vect_recog_sad_pattern): Likewise.
12485 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
12487         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
12488         redundant check that the types of a PLUS_EXPR or MULT_EXPR agree.
12489         (vect_recog_sad_pattern): Likewise PLUS_EXPR, ABS_EXPR and MINUS_EXPR.
12490         (vect_recog_widen_mult_pattern): Likewise MULT_EXPR.
12491         (vect_recog_widen_sum_pattern): Likewise PLUS_EXPR.
12493 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
12495         * tree-vect-stmts.c (vectorizable_call): Make sure that we
12496         use the stmt_vec_info of the original bb statement for the
12497         new zero assignment, even if the call is part of a pattern.
12499 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
12501         * tree-vectorizer.h (_stmt_vec_info): Note above pattern_def_seq
12502         that the sequence is attached to the original statement rather
12503         than the pattern statement.
12504         * tree-vect-loop.c (vect_determine_vf_for_stmt): Take the
12505         PATTERN_DEF_SEQ from the original statement rather than
12506         the main pattern statement.
12507         * tree-vect-stmts.c (free_stmt_vec_info): Likewise.
12508         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Likewise.
12509         (vect_mark_pattern_stmts): Don't copy the PATTERN_DEF_SEQ.
12511 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
12513         * tree-vect-stmts.c (vect_analyze_stmt): Move the handling of pattern
12514         definition statements before the early exit for statements that aren't
12515         live or relevant.
12516         * tree-vect-loop.c (vect_transform_loop_stmt): New function,
12517         split out from...
12518         (vect_transform_loop): ...here.  Process pattern definition
12519         statements without first checking whether the main pattern
12520         statement is live or relevant.
12522 2018-06-19  Eric Botcazou  <ebotcazou@adacore.com>
12524         * tree-cfgcleanup.c (tree_forwarder_block_p): Do not return false at
12525         -O0 if the locus represent UNKNOWN_LOCATION but have different values.
12527 2018-06-19  Aaron Sawdey  <acsawdey@linux.ibm.com>
12529         * config/rs6000/rs6000-string.c (select_block_compare_mode): Check
12530         TARGET_EFFICIENT_OVERLAPPING_UNALIGNED here instead of in caller.
12531         (do_and3, do_and3_mask, do_compb3, do_rotl3): New functions.
12532         (expand_block_compare): Change select_block_compare_mode call.
12533         (expand_strncmp_align_check): Use new functions, fix comment.
12534         (emit_final_str_compare_gpr): New function.
12535         (expand_strn_compare): Refactor and clean up code.
12536         * config/rs6000/vsx.md (vsx_mov<mode>_64bit): Remove *.
12538 2018-06-19  Tony Reix  <tony.reix@atos.com>
12539             Damien Bergamini  <damien.bergamini@atos.com>
12540             David Edelsohn  <dje.gcc@gmail.com>
12542         * collect2.c (static_obj): New variable.
12543         (static_libs): New variable.
12544         (is_in_list): Uncomment declaration.
12545         (main): Track AIX libraries linked statically.
12546         (is_in_list): Uncomment definition.
12547         (scan_prog_file): Don't add AIX shared libraries initializer
12548         to constructor list if linking statically.
12550 2018-06-19  Max Filippov  <jcmvbkbc@gmail.com>
12552         * config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec
12553         constant.
12554         (allocate_stack, frame_blockage, *frame_blockage): New patterns.
12556 2018-06-19  Jan Hubicka  <hubicka@ucw.cz>
12558         * tree.c (find_decls_types_r): Remove all non-VAR_DECLs from
12559         blocks.
12561 2018-06-19  Martin Liska  <mliska@suse.cz>
12563         * config/i386/i386.c (ix86_can_inline_p): Do not use
12564         ipa_fn_summaries::get_create.
12565         * ipa-cp.c (ipcp_cloning_candidate_p): Replace get_create with
12566         get.
12567         (devirtualization_time_bonus): Likewise.
12568         (ipcp_propagate_stage): Likewise.
12569         * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
12570         (edge_set_predicate): Likewise.
12571         (evaluate_conditions_for_known_args): Likewise.
12572         (evaluate_properties_for_edge): Likewise.
12573         (ipa_call_summary::reset): Tranform to ...
12574         (ipa_call_summary::~ipa_call_summary): ... this.
12575         (ipa_fn_summary::reset): Transform to ...
12576         (ipa_fn_summary::~ipa_fn_summary): ... this.
12577         (ipa_fn_summary_t::remove): Rename to ...
12578         (ipa_fn_summary_t::remove_callees): ... this.
12579         (ipa_fn_summary_t::duplicate): Use placement new
12580         instead of memory copy.
12581         (ipa_call_summary_t::duplicate): Likewise.
12582         (ipa_call_summary_t::remove): Remove.
12583         (dump_ipa_call_summary): Change get_create to get.
12584         (ipa_dump_fn_summary): Dump only when summary exists.
12585         (analyze_function_body): Use symbol_summary::get instead
12586         of get_create.
12587         (compute_fn_summary): Likewise.
12588         (estimate_edge_devirt_benefit): Likewise.
12589         (estimate_edge_size_and_time): Likewise.
12590         (inline_update_callee_summaries): Likewise.
12591         (remap_edge_change_prob): Likewise.
12592         (remap_edge_summaries): Likewise.
12593         (ipa_merge_fn_summary_after_inlining): Likewise.
12594         (write_ipa_call_summary): Likewise.
12595         (ipa_fn_summary_write): Likewise.
12596         (ipa_free_fn_summary): Likewise.
12597         * ipa-fnsummary.h (struct GTY): Add new ctor and copy ctor.
12598         (struct ipa_call_summary): Likewise.
12599         * ipa-icf.c (sem_function::merge): Use symbol_summary::get instead
12600         of get_create.
12601         * ipa-inline-analysis.c (do_estimate_edge_time): Likewise.
12602         (estimate_size_after_inlining): Likewise.
12603         (estimate_growth): Likewise.
12604         (growth_likely_positive): Likewise.
12605         * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
12606         (inline_call): Likewise.
12607         * ipa-inline.c (caller_growth_limits): Likewise.
12608         (can_inline_edge_p): Likewise.
12609         (can_inline_edge_by_limits_p): Likewise.
12610         (compute_uninlined_call_time): Likewise.
12611         (compute_inlined_call_time): Likewise.
12612         (want_inline_small_function_p): Likewise.
12613         (edge_badness): Likewise.
12614         (update_caller_keys): Likewise.
12615         (update_callee_keys): Likewise.
12616         (inline_small_functions): Likewise.
12617         (inline_to_all_callers_1): Likewise.
12618         (dump_overall_stats): Likewise.
12619         (early_inline_small_functions): Likewise.
12620         (early_inliner): Likewise.
12621         * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
12622         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
12623         * ipa-pure-const.c (malloc_candidate_p): Likewise.
12624         * ipa-split.c (execute_split_functions): Likewise.
12625         * symbol-summary.h: Likewise.
12626         * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
12628 2018-06-19  Richard Biener  <rguenther@suse.de>
12630         * tree-vectorizer.c (try_vectorize_loop_1): Split out of ...
12631         (vectorize_loops): ... here.  Fix dbgcnt handling.
12632         (try_vectorize_loop): Wrap try_vectorize_loop_1.
12634 2018-06-19  Segher Boessenkool  <segher@kernel.crashing.org>
12636         PR target/86197
12637         * config/rs6000/rs6000.md (rs6000_discover_homogeneous_aggregate): An
12638         ieee128 argument takes up only one (vector) register, not two (floating
12639         point) registers.
12641 2018-06-19  Eric Botcazou  <ebotcazou@adacore.com>
12643         * gimplify.c (gimplify_init_constructor): Really never clear for an
12644         incomplete constructor if CONSTRUCTOR_NO_CLEARING is set.
12646 2018-06-19  Richard Biener  <rguenther@suse.de>
12648         PR tree-optimization/86179
12649         * tree-vect-patterns.c (vect_pattern_recog_1): Clean up
12650         after failed recognition.
12652 2018-06-18  Martin Sebor  <msebor@redhat.com>
12654         PR middle-end/85602
12655         * calls.c (maybe_warn_nonstring_arg): Handle strncat.
12656         * tree-ssa-strlen.c (is_strlen_related_p): Make extern.
12657         Handle integer subtraction.
12658         (maybe_diag_stxncpy_trunc): Handle nonstring source arguments.
12659         * tree-ssa-strlen.h (is_strlen_related_p): Declare.
12661 2018-06-18  David Malcolm  <dmalcolm@redhat.com>
12663         * config/frv/frv-protos.h (frv_ifcvt_modify_insn): Strengthen 3rd
12664         param from rtx to rtx_insn *.
12665         * config/frv/frv.c (frv_ifcvt_add_insn): Likewise for "insn"
12666         param.
12667         (frv_ifcvt_modify_insn): Likwise.
12668         (frv_ifcvt_modify_final): Likwise for local "existing_insn",
12669         adding an as_a <rtx_insn *> cast.  Likewise for local "insn".
12670         * config/mips/mips.c (r10k_insert_cache_barriers): Add an
12671         as_a <rtx_insn *> cast to local "unprotected_region" once
12672         it's been established that it's not NULL or pc_rtx.
12673         * config/nds32/nds32-relax-opt.c (nds32_group_insns): Strengthen
12674         param "sethi" from rtx to rtx_insn *.
12675         (nds32_group_float_insns): Likewise for param "insn".
12676         * config/vax/vax-protos.h (vax_output_int_add): Likewise for 1st
12677         param.
12678         (vax_output_int_subtract): Likewise.
12679         * config/vax/vax.c (vax_output_int_add): Likewise for param
12680         "insn".
12681         (vax_output_int_subtract): Likewise.
12682         * emit-rtl.c (set_insn_deleted): Likewise, removing cast.
12683         (emit_pattern_after): Likewise for param "after".
12684         (emit_insn_after): Likewise.
12685         (emit_jump_insn_after): Likewise.
12686         (emit_call_insn_after): Likewise.
12687         (emit_debug_insn_after): Likewise.
12688         (emit_pattern_before): Likewise for param "before".
12689         (emit_insn_before): Likewise.
12690         (emit_jump_insn_before): Likewise.
12691         * final.c (get_insn_template): Likewise for param "insn", removing
12692         a cast.
12693         * output.h (get_insn_template): Likewise for 2nd param.
12694         * rtl.h (emit_insn_before): Likewise.
12695         (emit_jump_insn_before): Likewise.
12696         (emit_debug_insn_before_noloc): Likewise.
12697         (emit_insn_after): Likewise.
12698         (emit_jump_insn_after): Likewise.
12699         (emit_call_insn_after): Likewise.
12700         (emit_debug_insn_after): Likewise.
12701         (set_insn_deleted): Likewise for param.
12703 2018-06-18  Michael Meissner  <meissner@linux.ibm.com>
12705         PR target/85358
12706         * config/rs6000/rs6000-modes.def (toplevel): Rework the 128-bit
12707         floating point modes, so that IFmode is numerically greater than
12708         TFmode, which is greater than KFmode using FRACTIONAL_FLOAT_MODE
12709         to declare the ordering.  This prevents IFmode from being
12710         converted to TFmode when long double is IEEE 128-bit on an ISA 3.0
12711         machine.  Include rs6000-modes.h to share the fractional values
12712         between genmodes* and the rest of the compiler.
12713         (IFmode): Likewise.
12714         (KFmode): Likewise.
12715         (TFmode): Likewise.
12716         * config/rs6000/rs6000-modes.h: New file.
12717         * config/rs6000/rs6000.c (rs6000_debug_reg_global): Change the
12718         meaning of rs6000_long_double_size so that 126..128 selects an
12719         appropriate 128-bit floating point type.
12720         (rs6000_option_override_internal): Likewise.
12721         * config/rs6000/rs6000.h (toplevel): Include rs6000-modes.h.
12722         (TARGET_LONG_DOUBLE_128): Change the meaning of
12723         rs6000_long_double_size so that 126..128 selects an appropriate
12724         128-bit floating point type.
12725         (LONG_DOUBLE_TYPE_SIZE): Update comment.
12726         * config/rs6000/rs6000.md (trunciftf2): Correct the modes of the
12727         source and destination to match the standard usage.
12728         (truncifkf2): Likewise.
12729         (copysign<mode>3, IEEE iterator): Rework copysign of float128 on
12730         ISA 2.07 to use an explicit clobber, instead of passing in a
12731         temporary.
12732         (copysign<mode>3_soft): Likewise.
12734 2018-06-18  David Malcolm  <dmalcolm@redhat.com>
12736         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
12737         Replace dump_printf_loc call with DUMP_VECT_SCOPE.
12738         (vect_slp_analyze_instance_dependence): Likewise.
12739         (vect_enhance_data_refs_alignment): Likewise.
12740         (vect_analyze_data_refs_alignment): Likewise.
12741         (vect_slp_analyze_and_verify_instance_alignment
12742         (vect_analyze_data_ref_accesses): Likewise.
12743         (vect_prune_runtime_alias_test_list): Likewise.
12744         (vect_analyze_data_refs): Likewise.
12745         * tree-vect-loop-manip.c (vect_update_inits_of_drs): Likewise.
12746         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
12747         (vect_analyze_scalar_cycles_1): Likewise.
12748         (vect_get_loop_niters): Likewise.
12749         (vect_analyze_loop_form_1): Likewise.
12750         (vect_update_vf_for_slp): Likewise.
12751         (vect_analyze_loop_operations): Likewise.
12752         (vect_analyze_loop): Likewise.
12753         (vectorizable_induction): Likewise.
12754         (vect_transform_loop): Likewise.
12755         * tree-vect-patterns.c (vect_pattern_recog): Likewise.
12756         * tree-vect-slp.c (vect_analyze_slp): Likewise.
12757         (vect_make_slp_decision): Likewise.
12758         (vect_detect_hybrid_slp): Likewise.
12759         (vect_slp_analyze_operations): Likewise.
12760         (vect_slp_bb): Likewise.
12761         * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Likewise.
12762         (vectorizable_bswap): Likewise.
12763         (vectorizable_call): Likewise.
12764         (vectorizable_simd_clone_call): Likewise.
12765         (vectorizable_conversion): Likewise.
12766         (vectorizable_assignment): Likewise.
12767         (vectorizable_shift): Likewise.
12768         (vectorizable_operation): Likewise.
12769         * tree-vectorizer.h (DUMP_VECT_SCOPE): New macro.
12771 2018-06-18  Martin Sebor  <msebor@redhat.com>
12773         PR tree-optimization/81384
12774         * builtin-types.def (BT_FN_SIZE_CONST_STRING_SIZE): New.
12775         * builtins.c (expand_builtin_strnlen): New function.
12776         (expand_builtin): Call it.
12777         (fold_builtin_n): Avoid setting TREE_NO_WARNING.
12778         * builtins.def (BUILT_IN_STRNLEN): New.
12779         * calls.c (maybe_warn_nonstring_arg): Handle BUILT_IN_STRNLEN.
12780         Warn for bounds in excess of maximum object size.
12781         * tree-ssa-strlen.c (maybe_set_strlen_range): Return tree representing
12782         single-value ranges.  Handle strnlen.
12783         (handle_builtin_strlen): Handle strnlen.
12784         (strlen_check_and_optimize_stmt): Same.
12785         * doc/extend.texi (Other Builtins): Document strnlen.
12787 2018-06-18  Maya Rashish  <coypu@sdf.org>
12789         * config/alpha/openbsd.h (TARGET_DEFAULT): Define.
12790         (LINK_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Likewise.
12791         (INTMAX_TYPE, UINTMAX_TYPE, WINT_TYPE): Likewise.
12793         * config/alpha/elf.h (STARTFILE_SPEC, ENDFILE_SPEC): Move from
12794         here to ...
12795         * config/alpha/linux.h (STARTFILE_SPEC, ENDFILE_SPEC): Here.
12797 2018-06-18  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
12799         * tree.c (escaped_string::escape): Replace cast to char * by
12800         const_cast<char *> (unescaped).
12802 2018-06-18  Nick Clifton  <nickc@redhat.com>
12804         PR 84195
12805         * tree.c (escaped_string): New class.  Converts an unescaped
12806         string into its escaped equivalent.
12807         (warn_deprecated_use): Use the new class to convert the
12808         deprecation message, if present.
12809         (test_escaped_strings): New self test.
12810         (test_c_tests): Add test_escaped_strings.
12811         * doc/extend.texi (deprecated): Add a note that the
12812         deprecation message is affected by the -fmessage-length
12813         option, and that control characters will be escaped.
12814         (#pragma GCC error): Document this pragma.
12815         (#pragma GCC warning): Likewise.
12816         * doc/invoke.texi (-fmessage-length): Document this option's
12817         effect on the #warning and #error preprocessor directives and
12818         the deprecated attribute.
12820 2018-06-18  Eric Botcazou  <ebotcazou@adacore.com>
12822         * tree.c (decl_value_expr_lookup): Revert latest change.
12823         (decl_value_expr_insert): Likewise.
12825 2018-06-17  Eric Botcazou  <ebotcazou@adacore.com>
12827         * gimplify.c (nonlocal_vlas): Delete.
12828         (nonlocal_vla_vars): Likewise.
12829         (gimplify_var_or_parm_decl): Do not add debug VAR_DECLs for non-local
12830         referenced VLAs.
12831         (gimplify_body): Do not create and destroy nonlocal_vlas.
12832         * tree-nested.c: Include diagnostic.h.
12833         (use_pointer_in_frame): Tweak.
12834         (lookup_field_for_decl): Add assertion and declare the transformation.
12835         (convert_nonlocal_reference_op) <PARM_DECL>: Rework and issue an
12836         internal error when the reference is in a wrong context.  Do not
12837         create a debug decl by default.
12838         (note_nonlocal_block_vlas): Delete.
12839         (convert_nonlocal_reference_stmt) <GIMPLE_BIND>: Do not call it.
12840         (convert_local_reference_op) <PARM_DECL>: Skip the frame decl.  Do not
12841         create a debug decl by default.
12842         (convert_gimple_call) <GIMPLE_CALL>: Issue an internal error when the
12843         call is in a wrong context.
12844         (fixup_vla_decls): New function.
12845         (finalize_nesting_tree_1): Adjust comment.  Call fixup_vla_decls if no
12846         debug variables were created.
12847         * tree.c (decl_value_expr_lookup): Add checking assertion.
12848         (decl_value_expr_insert): Likewise.
12850 2018-06-16  Kugan Vivekanandarajah  <kuganv@linaro.org>
12852         PR middle-end/82479
12853         * ipa-fnsummary.c (will_be_nonconstant_expr_predicate): Handle CALL_EXPR.
12854         * tree-scalar-evolution.c (interpret_expr): Likewise.
12855         (expression_expensive_p): Likewise.
12856         * tree-ssa-loop-ivopts.c (contains_abnormal_ssa_name_p): Likewise.
12857         * tree-ssa-loop-niter.c (number_of_iterations_popcount): New.
12858         (number_of_iterations_exit_assumptions): Use number_of_iterations_popcount.
12859         (ssa_defined_by_minus_one_stmt_p): New.
12861 2018-06-16  Kugan Vivekanandarajah  <kuganv@linaro.org>
12863         PR middle-end/64946
12864         * cfgexpand.c (expand_debug_expr): Hande ABSU_EXPR.
12865         * config/i386/i386.c (ix86_add_stmt_cost): Likewise.
12866         * dojump.c (do_jump): Likewise.
12867         * expr.c (expand_expr_real_2): Check operand type's sign.
12868         * fold-const.c (const_unop): Handle ABSU_EXPR.
12869         (fold_abs_const): Likewise.
12870         * gimple-pretty-print.c (dump_unary_rhs): Likewise.
12871         * gimple-ssa-backprop.c (backprop::process_assign_use): Likesie.
12872         (strip_sign_op_1): Likesise.
12873         * match.pd: Add new pattern to generate ABSU_EXPR.
12874         * optabs-tree.c (optab_for_tree_code): Handle ABSU_EXPR.
12875         * tree-cfg.c (verify_gimple_assign_unary): Likewise.
12876         * tree-eh.c (operation_could_trap_helper_p): Likewise.
12877         * tree-inline.c (estimate_operator_cost): Likewise.
12878         * tree-pretty-print.c (dump_generic_node): Likewise.
12879         * tree-vect-patterns.c (vect_recog_sad_pattern): Likewise.
12880         * tree.def (ABSU_EXPR): New.
12882 2018-06-16  Jakub Jelinek  <jakub@redhat.com>
12884         PR middle-end/86095
12885         * common.opt (Wunsafe-loop-optimizations): Add Ignore, remove Var,
12886         documented as preserved for backward compatibility only.
12887         * doc/invoke.texi: Remove -Wunsafe-loop-optimizations documentation.
12889         PR rtl-optimization/86108
12890         * bb-reorder.c (create_forwarder_block): Renamed to ...
12891         (create_eh_forwarder_block): ... this.  Split OLD_BB after labels and
12892         jump from new landing pad to the second part.
12893         (sjlj_fix_up_crossing_landing_pad, dw2_fix_up_crossing_landing_pad):
12894         Adjust callers.
12896 2018-06-15  Jakub Jelinek  <jakub@redhat.com>
12898         PR middle-end/85878
12899         * expr.c (expand_assignment): Remove now redundant COMPLEX_MODE_P
12900         check from first store_expr, use to_mode instead of GET_MODE (to_rtx).
12901         Only call store_expr for halves if the mode is the same.
12903         PR middle-end/86123
12904         * match.pd ((X / Y) == 0 -> X < Y): Don't transform complex divisions.
12905         Fix up comment formatting.
12907 2018-06-15  Bernd Edlinger  <bernd.edlinger@hotmail.de>
12909         * typed-splay-tree.h (typed_splay_tree::remove): New function.
12910         (typed_splay_tree::closure,
12911         typed_splay_tree::inner_foreach_fn, typed_splay_tree::m_inner): Deleted.
12912         (typed_splay_tree::typed_splay_tree,
12913         typed_splay_tree::operator =): Declared private.
12914         (typed_splay_tree::splay_tree_key, typed_splay_tree::splay_tree_value,
12915         typed_splay_tree::splay_tree_node_s, typed_splay_tree::KDEL,
12916         typed_splay_tree::VDEL, typed_splay_tree::splay_tree_delete_helper,
12917         typed_splay_tree::rotate_left, typed_splay_tree::rotate_right,
12918         typed_splay_tree::splay_tree_splay,
12919         typed_splay_tree::splay_tree_foreach_helper,
12920         typed_splay_tree::splay_tree_insert,
12921         typed_splay_tree::splay_tree_remove,
12922         typed_splay_tree::splay_tree_lookup,
12923         typed_splay_tree::splay_tree_predecessor,
12924         typed_splay_tree::splay_tree_successor,
12925         typed_splay_tree::splay_tree_min,
12926         typed_splay_tree::splay_tree_max): Took over from splay-tree.c/.h.
12927         (typed_splay_tree::root, typed_splay_tree::comp,
12928         typed_splay_tree::delete_key,
12929         typed_splay_tree::delete_value): New data members.
12930         * typed-splay-tree.c (selftest::test_str_to_int): Add a test for
12931         typed_splay_tree::remove.
12933 2018-06-15  Matthew Fortune  <matthew.fortune@mips.com>
12935         * config/mips/mips.h (ASM_SPEC): Pass through -mcrc, -mno-crc,
12936         -mginv and -mno-ginv to the assembler.
12937         * config/mips/mips.opt (-mcrc): New option.
12938         (-mginv): Likewise.
12939         * doc/invoke.text (-mcrc): Document.
12940         (-mginv): Likewise.
12942 2018-06-15  Nick Clifton  <nickc@redhat.com>
12944         PR 84195
12945         * tree.c (escaped_string): New class.  Converts an unescaped
12946         string into its escaped equivalent.
12947         (warn_deprecated_use): Use the new class to convert the
12948         deprecation message, if present.
12949         (test_escaped_strings): New self test.
12950         (test_c_tests): Add test_escaped_strings.
12951         * doc/extend.texi (deprecated): Add a note that the
12952         deprecation message is affected by the -fmessage-length
12953         option, and that control characters will be escaped.
12954         (#pragma GCC error): Document this pragma.
12955         (#pragma GCC warning): Likewise.
12956         * doc/invoke.texi (-fmessage-length): Document this option's
12957         effect on the #warning and #error preprocessor directives and
12958         the deprecated attribute.
12960 2018-06-15  Richard Biener  <rguenther@suse.de>
12962         * tree-vect-slp.c (vect_slp_bb): Dump MSG_OPTIMIZED_LOCATIONS
12963         here, also noting vector size used.
12964         * tree-vectorizer.c (vectorize_loops): Adjust.  Note vector
12965         size used in MSG_OPTIMIZED_LOCATIONS dump.
12966         (pass_slp_vectorize::execute): Adjust.
12968 2018-06-15  Claudiu Zissulescu  <claziss@synopsys.com>
12970         PR target/85968
12971         * config/arc/arc.c (arc_return_address_register): Fix
12972         if-condition.
12974 2018-06-15  Richard Biener  <rguenther@suse.de>
12976         PR middle-end/86159
12977         * tree-cfg.c (gimplify_build3): Do not strip sign conversions,
12978         leave useless conversion stripping to force_gimple_operand_gsi.
12979         (gimplify_build2): Likewise.
12980         (gimplify_build1): Likewise.
12982 2018-06-15  Richard Biener  <rguenther@suse.de>
12984         PR middle-end/86076
12985         * tree-cfg.c (move_stmt_op): unshare invariant addresses
12986         before adjusting their block.
12988 2018-06-15  Sebastian Huber  <sebastian.huber@embedded-brains.de>
12990         * config.gcc (riscv*-*-elf* | riscv*-*-rtems*): Use custom
12991         multilibs for *-*-rtems*.
12992         * config/riscv/t-rtems: New file.
12994 2018-06-14  Jakub Jelinek  <jakub@redhat.com>
12996         PR middle-end/86122
12997         * match.pd ((A +- CST1) +- CST2): Punt if last resort
12998         unsigned_type_for returns NULL.
13000         PR target/85945
13001         * lower-subreg.c (find_decomposable_subregs): Don't decompose float
13002         subregs of multi-word pseudos unless the float mode has word size.
13004 2018-06-14  Richard Biener  <rguenther@suse.de>
13006         PR middle-end/86139
13007         * tree-vect-generic.c (build_word_mode_vector_type): Remove
13008         duplicate and harmful type_hash_canon.
13009         * tree.c (type_hash_canon): Assert we didn't find ourselves.
13011 2018-06-14  Richard Biener  <rguenther@suse.de>
13013         PR ipa/86124
13014         * tree-ssa-struct-alias.c (create_variable_info_for): Handle
13015         NULL cgraph_node.
13017 2018-06-14  Sebastian Huber  <sebastian.huber@embedded-brains.de>
13019         * config/rtems.h (STDINT_LONG32): Define.
13021 2018-06-13  Matthew Fortune  <matthew.fortune@mips.com>
13022             Prachi Godbole  <prachi.godbole@imgtec.com>
13024         * config/mips/mips-cpus.def: Define P6600.
13025         * config/mips/mips-tables.opt: Regenerate.
13026         * config/mips/mips.c (mips_ucbranch_type): New enum.
13027         (mips_rtx_cost_data): Add support for P6600.
13028         (mips_issue_rate): Likewise.
13029         (mips_multipass_dfa_lookahead): Likewise.
13030         (mips_avoid_hazard): Likewise.
13031         (mips_reorg_process_insns): Likewise.
13032         (mips_classify_branch_p6600): New function.
13033         * config/mips/mips.h (TUNE_P6600): New define.
13034         (MIPS_ISA_LEVEL_SPEC): Infer mips64r6 from p6600.
13035         (ENABLE_LD_ST_PAIRS): Enable load/store bonding for p6600.
13036         * config/mips/mips.md: Include p6600.md.
13037         (processor): Add p6600.
13038         * config/mips/p6600.md: New file.
13039         * doc/invoke.texi: Add p6600 to supported architectures.
13041 2018-06-13  Martin Sebor  <msebor@redhat.com>
13043         PR tree-optimization/86114
13044         * gimple-fold.c (gimple_fold_builtin_strlen): Only handle LHS
13045         of integer types.
13046         * tree-ssa-strlen.c (maybe_set_strlen_range): Same.
13048 2018-06-13  Richard Biener  <rguenther@suse.de>
13050         * tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern):
13051         Properly set vector type of the intermediate stmt.
13052         * tree-vect-stmts.c (vectorizable_operation): The destination
13053         var always has vectype_out type.
13055 2018-06-13  Jeff Law  <law@redhat.com>
13057         * config/rl78/rl78.c (move_elim_pass): Use TDF_NONE rather than
13058         integer 0 for argument to print_rtl_with_bb.
13059         (rl78_reorg): Likewise.
13061 2018-06-13  David Malcolm  <dmalcolm@redhat.com>
13063         * config/arc/arc.c (hwloop_optimize): Strengthen local "end_label"
13064         from rtx to rtx_insn *.
13065         * config/bfin/bfin.c (hwloop_optimize): Likewise for local
13066         "label".
13067         (add_sched_insns_for_speculation): Likewise for local "target",
13068         converting usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
13069         * config/c6x/c6x.c (reorg_split_calls): Strengthen param "call_labels"
13070         from rtx_insn ** to rtx_code_label **.
13071         (reorg_emit_nops): Likewise.
13072         (c6x_reorg): Likewise for local "call_labels".
13073         * config/sh/sh-protos.h (get_dest_uid): Strengthen 1st param from
13074         rtx to rtx_insn *.
13075         * config/sh/sh.c (dump_table): Strengthen local "lab" from rtx to
13076         rtx_code_label *, adding safe_as_a <rtx_code_label *> casts to
13077         the loops over LABEL_REFS.
13078         (fixup_addr_diff_vecs): Add as_a <rtx_insn *> to usage of
13079         braf_label.
13080         (barrier_align): Convert usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
13081         (get_dest_uid): Strengthen param "label" from rtx to rtx_insn *.
13082         (split_branches): Strengthen local "olabel" from rtx to
13083         rtx_insn *, adding a safe_as_a cast.
13084         * emit-rtl.c (next_real_insn): Strengthen param from "rtx"
13085         to "rtx_insn *".
13086         (add_insn_after): Likewise for first two params.
13087         (add_insn_before): Likewise.
13088         (remove_insn): Likewise for param.
13089         (emit_pattern_before_noloc): Likewise for second and third params.
13090         (emit_jump_insn_before_noloc): Convert NULL_RTX to NULL.
13091         (emit_call_insn_before_noloc): Likewise.
13092         (emit_debug_insn_before_noloc): Strengthen "before" param from "rtx"
13093         to "rtx_insn *".
13094         (emit_barrier_before): Likewise.
13095         (emit_label_before): Strengthen "label" param from "rtx" to
13096         "rtx_code_label *".  Strengthen "before" param from "rtx" to
13097         "rtx_insn *".
13098         (emit_insn_after_1): Strengthen "after" param from "rtx" to
13099         "rtx_insn *".
13100         (emit_pattern_after_noloc): Likewise.
13101         (emit_insn_after_noloc): Likewise.
13102         (emit_jump_insn_after_noloc): Likewise.
13103         (emit_call_insn_after_noloc): Likewise.
13104         (emit_debug_insn_after_noloc): Likewise.
13105         (emit_barrier_after): Likewise.
13106         (emit_label_after): Likewise for both params.
13107         (emit_pattern_after_setloc): Likewise for "after" param.  Convert
13108         "loc" param from "int" to "location_t".
13109         (emit_insn_after_setloc): Likewise.
13110         (emit_jump_insn_after_setloc): Likewise.
13111         (emit_call_insn_after_setloc): Likewise.
13112         (emit_debug_insn_after_setloc): Likewise.
13113         (emit_pattern_before_setloc): Likewise for "before" param.  Convert
13114         "loc" param from "int" to "location_t".
13115         (emit_pattern_before): Convert NULL_RTX to NULL.
13116         (emit_insn_before_setloc): Convert "loc" param from "int" to
13117         "location_t".
13118         (emit_jump_insn_before_setloc): Likewise.
13119         (emit_call_insn_before_setloc): Likewise.
13120         (emit_debug_insn_before_setloc): Strengthen "before" param from rtx to
13121         rtx_insn *.  Convert "loc" param from "int" to "location_t".
13122         * rtl.h (emit_insn_before_setloc, emit_jump_insn_before_setloc,
13123         emit_call_insn_before_setloc, emit_debug_insn_before_setloc):
13124         Convert 3rd param from "int" to "location_t".
13125         (emit_barrier_before, emit_barrier_after, next_real_insn):
13126         Strengthen param from rtx to rtx_insn *.
13127         (emit_label_before): Strengthen 1st param from "rtx" to
13128         "rtx_code_label *".  Strengthen 2nd param from "rtx" to
13129         "rtx_insn *".
13130         (emit_insn_after_noloc, emit_jump_insn_after_noloc,
13131         emit_call_insn_after_noloc, emit_debug_insn_after_noloc):
13132         Strengthen 2nd param from "rtx" to "rtx_insn *".
13133         (emit_insn_after_setloc, emit_jump_insn_after_setloc)
13134         emit_call_insn_after_setloc, emit_debug_insn_after_setloc):
13135         Likewise. Convert 3rd param from "int" to "location_t".
13136         (emit_label_after): Strengthen 1st param from "rtx" to
13137         "rtx_code_label *".
13138         (next_real_insn, remove_insn): Strengthen param from "rtx" to
13139         "rtx_insn *".
13140         (add_insn_before, add_insn_after): Strengthen 1st and 2nd params
13141         from "rtx" to "rtx_insn *".
13143 2018-06-13  Jan Hubicka  <hubicka@gcc.gnu.org>
13145         * cgraph.c (cgraph_node::get_untransformed_body): Dump function
13146         bodies streamed in with -Q.
13147         * dumpfile.c (dump_files): Add lto-stream-out dump file.
13148         * dumpfile.h (tree_dump_index): Add lto_stream_out.
13149         * gimple-streamer-out.c: Include gimple-pretty-print.h
13150         (output_bb): Dump stmts streamed.
13151         * lto-section-out.c: Include print-tree.h
13152         (lto_begin_section): Dump sections created.
13153         (lto_output_decl_index): Dump decl encoded.
13154         * lto-streamer-out.c: Include print-tree.h
13155         (create_output_block): Dump output block created.
13156         (DFS::DFS_write_tree_body): Dump DFS SCCs streamed.
13157         (output_function): Dump function output.
13158         (output_constructor): Dump constructor streamed.
13159         (write_global_stream): Output indexes encoded.
13160         (produce_asm_for_decls): Dump streams encoded.
13161         * lto-streamer.c (streamer_dump_file): New global var.
13162         * lto-streamer.h (streamer_dump_file): Declare.
13163         * passes.c (ipa_write_summaries): Initialize streamer dump.
13164         * varpool.c (varpool_node::get_constructor): Dump constructors streamed
13165         in.
13167 2018-06-13  Eric Botcazou  <ebotcazou@adacore.com>
13169         PR target/86048
13170         * config/i386/winnt.c (i386_pe_seh_cold_init): Do not emit negative
13171         offsets for register save directives.  Emit a second batch of save
13172         directives, if need be, when the function accesses prior frames.
13174 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
13176         * config/arc/fpu.md (fmasf4): Force operand to register.
13177         (fnmasf4): Likewise.
13179 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
13181         * config/arc/arc-protos.h (arc_pad_return): Remove.
13182         * config/arc/arc.c (machine_function): Remove force_short_suffix
13183         and size_reason.
13184         (arc_print_operand): Adjust printing of '&'.
13185         (arc_verify_short): Remove conditional printing of short suffix.
13186         (arc_final_prescan_insn): Remove reference to size_reason.
13187         (pad_return): New function.
13188         (arc_reorg): Call pad_return.
13189         (arc_pad_return): Remove.
13190         (arc_init_machine_status): Remove reference to force_short_suffix.
13191         * config/arc/arc.md (vunspec): Add VUNSPEC_ARC_BLOCKAGE.
13192         (attr length): When attribute iscompact is true force to 2
13193         regardless; in the case of maybe check if we want to force the
13194         instruction to have 4 bytes length.
13195         (nopv): Change it to generate 4 byte long nop as well.
13196         (blockage): New pattern.
13197         (simple_return): Remove call to arc_pad_return.
13198         (p_return_i): Likewise.
13200 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
13202         * config/arc/elf.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
13204 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
13206         * config/arc/builtins.def (SYNC): SYNC instruction is valid on all
13207         ARC cores.
13209 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
13211         * config/arc/arc.c (atomic_exchangesi): EX instruction is default
13212         for ARC700 and ARCv2.
13214 2018-06-13  Chenghua Xu <paul.hua.gm@gmail.com>
13216         PR target/86076
13217         * config/mips/loongson.md (vec_setv4hi): Gen_lowpart for
13218         operands[2] instead of operands[1].
13221 2018-06-12  Richard Sandiford  <richard.sandiford@linaro.org>
13223         * lra-constraints.c (simplify_operand_subreg): In the paradoxical
13224         case, check whether the outer register overlaps an unallocatable
13225         register, not just whether it fits the required class.
13227 2018-06-12  Richard Sandiford  <richard.sandiford@linaro.org>
13229         * poly-int.h (can_div_trunc_p): Add new overload in which all values
13230         are poly_ints.
13231         * alias.c (get_addr): Extend CONST_INT handling to poly_int_rtx_p.
13232         (memrefs_conflict_p): Likewise.
13233         (init_alias_analysis): Likewise.
13234         * cfgexpand.c (expand_debug_expr): Likewise.
13235         * combine.c (combine_simplify_rtx, force_int_to_mode): Likewise.
13236         * cse.c (fold_rtx): Likewise.
13237         * explow.c (adjust_stack, anti_adjust_stack): Likewise.
13238         * expr.c (emit_block_move_hints): Likewise.
13239         (clear_storage_hints, push_block, emit_push_insn): Likewise.
13240         (store_expr_with_bounds, reduce_to_bit_field_precision): Likewise.
13241         (emit_group_load_1): Use rtx_to_poly_int64 for group offsets.
13242         (emit_group_store): Likewise.
13243         (find_args_size_adjust): Use strip_offset.  Use rtx_to_poly_int64
13244         to read the PRE/POST_MODIFY increment.
13245         * calls.c (store_one_arg): Use strip_offset.
13246         * rtlanal.c (rtx_addr_can_trap_p_1): Extend CONST_INT handling to
13247         poly_int_rtx_p.
13248         (set_noop_p): Use rtx_to_poly_int64 for the elements selected
13249         by a VEC_SELECT.
13250         * simplify-rtx.c (avoid_constant_pool_reference): Use strip_offset.
13251         (simplify_binary_operation_1): Extend CONST_INT handling to
13252         poly_int_rtx_p.
13253         * var-tracking.c (compute_cfa_pointer): Take a poly_int64 rather
13254         than a HOST_WIDE_INT.
13255         (hard_frame_pointer_adjustment): Change from HOST_WIDE_INT to
13256         poly_int64.
13257         (adjust_mems, add_stores): Update accodingly.
13258         (vt_canonicalize_addr): Track polynomial offsets.
13259         (emit_note_insn_var_location): Likewise.
13260         (vt_add_function_parameter): Likewise.
13261         (vt_initialize): Likewise.
13263 2018-06-12  Jeff Law  <law@redhat.com>
13265         * config.gcc (alpha*-*-freebsd*): Remove.
13266         * config/alpha/freebsd.h: Remove.
13268 2018-06-12  David Malcolm  <dmalcolm@redhat.com>
13270         PR other/69968
13271         * spellcheck-tree.c (levenshtein_distance): Rename to...
13272         (get_edit_distance): ...this, and update for underlying renaming.
13273         * spellcheck-tree.h (levenshtein_distance): Rename to...
13274         (get_edit_distance): ...this.
13275         * spellcheck.c (levenshtein_distance): Rename to...
13276         (get_edit_distance): ...this.  Convert from Levenshtein distance
13277         to Damerau-Levenshtein distance by supporting transpositions of
13278         adjacent characters.  Rename "v1" to "v_next" and "v0" to
13279         "v_one_ago".
13280         (selftest::levenshtein_distance_unit_test_oneway): Rename to...
13281         (selftest::test_edit_distance_unit_test_oneway): ...this, and
13282         update for underlying renaming.
13283         (selftest::levenshtein_distance_unit_test): Rename to...
13284         (selftest::test_get_edit_distance_unit): ...this, and update for
13285         underlying renaming.
13286         (selftest::test_find_closest_string): Add example from PR 69968
13287         where transposition helps
13288         (selftest::test_metric_conditions): Update for renaming.
13289         (selftest::test_metric_conditions): Likewise.
13290         (selftest::spellcheck_c_tests): Likewise.
13291         * spellcheck.h (levenshtein_distance): Rename both overloads to...
13292         (get_edit_distance): ...this.
13293         (best_match::consider): Update for renaming.
13295 2018-06-12  Martin Sebor  <msebor@redhat.com>
13297         PR tree-optimization/85259
13298         * builtins.c (compute_objsize): Handle constant offsets.
13299         * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return
13300         true iff a warning has been issued.
13301         * gimple.h (gimple_nonartificial_location): New function.
13302         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Call
13303         gimple_nonartificial_location and handle -Wno-system-headers.
13304         (handle_builtin_stxncpy): Same.
13306 2018-06-12  Martin Sebor  <msebor@redhat.com>
13308         PR c/85931
13309         * fold-const.c (operand_equal_p): Handle SAVE_EXPR.
13311 2018-06-12  Will Schmidt  <will_schmidt@vnet.ibm.com>
13313         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
13314         BUILTIN_VEC_XST entries for pointer to double and long long.
13316 2018-06-12  H.J. Lu  <hongjiu.lu@intel.com>
13318         PR target/85990
13319         * config/i386/gnu-user.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
13320         Update comments.
13321         * config/i386/gnu-user64.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
13322         Likewise.
13324 2018-06-12  Martin Liska  <mliska@suse.cz>
13326         * doc/options.texi: Document IntegerRange.
13328 2018-06-12  Martin Liska  <mliska@suse.cz>
13330         * config/i386/i386.opt: Make MPX-related options as Deprecated.
13331         * opt-functions.awk: Handle Deprecated flag.
13332         * opts-common.c (decode_cmdline_option): Handle cl_deprecated
13333         and report error.
13334         (read_cmdline_option): Report warning for a deprecated option.
13335         * opts.h (struct cl_option): Add new field cl_deprecated.
13336         (CL_ERR_DEPRECATED): New.
13338 2018-06-12  Martin Liska  <mliska@suse.cz>
13340         * doc/options.texi: Document Deprecated option flag.
13342 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
13344         * config/arc/arc-arch.h (arc_extras): New enum.
13345         (arc_cpu_t):Add field extra.
13346         (arc_cpu_types): Consider the extras.
13347         * config/arc/arc-cpus.def: Add extras info.
13348         * config/arc/arc-opts.h (processor_type): Consider extra field.
13349         * config/arc/arc.c (arc_override_options): Handle extra field.
13351 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
13353         * config/arc/arc-arch.h: Update ARC_OPTX macro.
13354         * config/arc/arc-options.def (ARC_OPTX): Introduce a new doc
13355         field.
13356         * config/arc/arc.c (arc_init): Update pic warning.
13357         (irq_range): Update irq range parsing warnings.
13358         (arc_override_options): Update various warning messages.
13359         (arc_handle_aux_attribute): Likewise.
13361 2018-06-12  Robert Suchanek  <robert.suchanek@mips.com>
13363         * config/mips/i6400.md (i6400_fpu_fadd): Remove frint.
13365 2018-06-12  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
13367         * doc/sourcebuild.texi: Document usage of line number 0 in verify
13368         compiler messages directives.
13370 2018-06-12  Matthew Fortune  <mfortune@gmail.com>
13372         * config/mips/mips-cpus.def: New MIPS_CPU for i6500.
13373         * config/mips/mips-tables.opt: Regenerate.
13374         * config/mips/mips.h (MIPS_ISA_LEVEL_SPEC): Mark i6500 as
13375         mips64r6.
13376         * doc/invoke.texi: Document -march=i6500.
13378 2018-06-12  Prachi Godbole  <prachi.godbole@imgtec.com>
13380         * config/mips/i6400.md (i6400_gpmuldiv): Remove cpu_unit.
13381         (i6400_gpmul): Add cpu_unit.
13382         (i6400_gpdiv): Likewise.
13383         (i6400_msa_add_d): Update reservations.
13384         (i6400_msa_int_add) Likewise.
13385         (i6400_msa_short_logic3) Likewise.
13386         (i6400_msa_short_logic2) Likewise.
13387         (i6400_msa_short_logic) Likewise.
13388         (i6400_msa_move) Likewise.
13389         (i6400_msa_cmp) Likewise.
13390         (i6400_msa_short_float2) Likewise.
13391         (i6400_msa_div_d) Likewise.
13392         (i6400_msa_long_logic1) Likewise.
13393         (i6400_msa_long_logic2) Likewise.
13394         (i6400_msa_mult) Likewise.
13395         (i6400_msa_long_float2) Likewise.
13396         (i6400_msa_long_float4) Likewise.
13397         (i6400_msa_long_float5) Likewise.
13398         (i6400_msa_long_float8) Likewise.
13399         (i6400_fpu_fadd): Include frint type.
13400         (i6400_fpu_store): New define_insn_reservation.
13401         (i6400_fpu_load): Likewise.
13402         (i6400_fpu_move): Likewise.
13403         (i6400_fpu_fcmp): Likewise.
13404         (i6400_fpu_fmadd): Likewise.
13405         (i6400_int_mult): Include imul3nc type and update reservation.
13406         (i6400_int_div): Include idiv3 type and update reservation.
13407         (i6400_int_load): Update to check type not move_type.
13408         (i6400_int_store): Likewise.
13409         (i6400_int_prefetch): Set zero latency.
13411 2018-06-12  Eric Botcazou  <ebotcazou@adacore.com>
13413         * gcc.c: Document new %@{...} sequence.
13414         (LINK_COMMAND_SPEC): Use it for the -L switches.
13415         (cpp_unique_options): Use it for the -I switches.
13416         (at_file_argbuf): New global variable.
13417         (in_at_file): Likewise.
13418         (alloc_args): Create at_file_argbuf.
13419         (clear_args): Truncate at_file_argbuf.
13420         (store_arg): If in_at_file, push the argument onto at_file_argbuf.
13421         (open_at_file): New function.
13422         (close_at_file): Likewise.
13423         (create_at_file): Delete.
13424         (do_spec_1) <'i'>: Use open_at_file/close_at_file.
13425         <'o'>: Likewise.
13426         <'@'>: New case.
13427         (validate_switches_from_spec): Deal with %@{...} sequence.
13428         (validate_switches): Likewise.
13429         (driver::finalize): Call clear_args.
13431 2018-06-11  Rasmus Villemoes  <rasmus.villemoes@prevas.dk>
13433         * config/vx-common.h (USE_TM_CLONE_REGISTRY): #define to 0.
13435 2018-06-11  Martin Sebor  <msebor@redhat.com>
13437         * doc/invoke.texi (-Wall): List -Wc++17-compat.
13438         (Wno-class-memaccess): Add @opindex.
13439         (Wno-templates, Wno-multiple-inheritance): Same.
13440         (Wno-virtual-inheritance, Wno-namespaces): Same.
13441         (Wno-pedantic, Wno-chkp, Wcoverage-mismatch): Same.
13442         (Wno-format-overflow, Wno-format-truncation): Same.
13443         (Wno-unused-local-typedefs, Walloc-size-larger-than): Same.
13444         (Wno-alloc-size-larger-than, Wframe-larger-than): Same
13445         (Wno-stack-usage, Wno-c++-compat, Wno-c++11-compat): Same.
13446         (Wno-c++14-compat, Wno-c++17-compat, Wno-openmp-simd): Same.
13447         (Wno-unsuffixed-float-constants, Wno-addr-space-convert): Same.
13448         (Wno-misspelled-isr): Same.
13450 2018-06-11  Martin Sebor  <msebor@redhat.com>
13452         * PR tree-optimization/86083
13453         * tree-ssa-strlen.c (handle_char_store): Use tree_expr_nonzero_p.
13455 2018-06-11  Zhouyi Zhou <zhouzhouyi@gmail.com>
13457         * tree-eh.c (lower_eh_constructs_2): Add a comma to comment.
13459 2018-06-11  Segher Boessenkool  <segher@kernel.crashing.org>
13461         PR target/85755
13462         * config/rs6000/rs6000.md (*movdi_internal32): Put constraint modifiers
13463         on the correct operand.
13464         (*movdi_internal64): Ditto.
13466 2018-06-11  Martin Liska  <mliska@suse.cz>
13468         PR tree-optimization/86089
13469         * tree-ssa-strlen.c (get_string_length): Move back removed hunk.
13471 2018-06-11  Julia Koval  <julia.koval@intel.com>
13473         * config/i386/vaesintrin.h (_mm_aesdec_epi128, _mm_aesdeclast_epi128)
13474         _mm_aesenc_epi128, _mm_aesenclast_epi128: Remove.
13475         * config/i386/vpclmulqdqintrin.h (_mm_clmulepi64_epi128): Remove.
13477 2018-06-11  Olivier Hainque  <hainque@adacore.com>
13479         * dwarf2out.c (gen_compile_unit_die): Fallout to DW_LANG_Ada83
13480         for Ada with strict dwarf2.
13482 2018-06-08  Peter Bergner  <bergner@vnet.ibm.com>
13484         PR target/85755
13485         * config/rs6000/rs6000.c (mem_operand_gpr): Enable PRE_INC and PRE_DEC
13486         addresses.
13488 2018-06-08  Jan Hubicka  <hubicka@ucw.cz>
13490         * dumpfile.c (FIRST_ME_AUTO_NUMBERED_DUMP): Bump to 4.
13492 2018-06-08  David Edelsohn  <dje.gcc@gmail.com>
13494         * config/rs6000/rs6000.c (rs6000_passes_ieee128): Protect with #if
13495         TARGET_ELF.
13497 2018-06-08  Martin Liska  <mliska@suse.cz>
13499         * tree-cfg.h (debug_function): Fix argument type to match
13500         implementation.
13502 2018-06-08  Martin Liska  <mliska@suse.cz>
13504         * config/powerpcspe/powerpcspe.c (rs6000_xcoff_visibility):
13505         Remove usage of MPX-related (and removed) fields.
13506         * config/rs6000/rs6000.c (rs6000_xcoff_visibility): Likewise.
13508 2018-06-08  David Malcolm  <dmalcolm@redhat.com>
13510         * cfg.c (debug): Use TDF_NONE rather than 0.
13511         * cfghooks.c (debug): Likewise.
13512         * dumpfile.c (DUMP_FILE_INFO): Likewise; also for OPTGROUP.
13513         (struct dump_option_value_info): Convert to...
13514         (struct kv_pair): ...this template type.
13515         (dump_options): Convert to kv_pair<dump_flags_t>; use TDF_NONE
13516         rather than 0.
13517         (optinfo_verbosity_options): Likewise.
13518         (optgroup_options): Convert to kv_pair<optgroup_flags_t>; use
13519         OPTGROUP_NONE.
13520         (gcc::dump_manager::dump_register): Use optgroup_flags_t rather
13521         than int for "optgroup_flags" param.
13522         (dump_generic_expr_loc): Use dump_flags_t rather than int for
13523         "dump_kind" param.
13524         (dump_dec): Likewise.
13525         (dump_finish): Use TDF_NONE rather than 0.
13526         (gcc::dump_manager::opt_info_enable_passes): Use optgroup_flags_t
13527         rather than int for "optgroup_flags" param.  Use TDF_NONE rather
13528         than 0.  Update for change to option_ptr.
13529         (opt_info_switch_p_1): Convert "optgroup_flags" param from int *
13530         to optgroup_flags_t *.  Use TDF_NONE and OPTGROUP_NONE rather than
13531         0.  Update for changes to optinfo_verbosity_options and
13532         optgroup_options.
13533         (opt_info_switch_p): Convert optgroup_flags from int to
13534         optgroup_flags_t.
13535         (dump_basic_block): Use dump_flags_t rather than int
13536         for "dump_kind" param.
13537         * dumpfile.h (TDF_ADDRESS, TDF_SLIM, TDF_RAW, TDF_DETAILS,
13538         TDF_STATS, TDF_BLOCKS, TDF_VOPS, TDF_LINENO, TDF_UID)
13539         TDF_STMTADDR, TDF_GRAPH, TDF_MEMSYMS, TDF_RHS_ONLY, TDF_ASMNAME,
13540         TDF_EH, TDF_NOUID, TDF_ALIAS, TDF_ENUMERATE_LOCALS, TDF_CSELIB,
13541         TDF_SCEV, TDF_GIMPLE, TDF_FOLDING, MSG_OPTIMIZED_LOCATIONS,
13542         MSG_MISSED_OPTIMIZATION, MSG_NOTE, MSG_ALL, TDF_COMPARE_DEBUG,
13543         TDF_NONE): Convert from macros to...
13544         (enum dump_flag): ...this new enum.
13545         (dump_flags_t): Update to use enum.
13546         (operator|, operator&, operator~, operator|=, operator&=):
13547         Implement for dump_flags_t.
13548         (OPTGROUP_NONE, OPTGROUP_IPA, OPTGROUP_LOOP, OPTGROUP_INLINE,
13549         OPTGROUP_OMP, OPTGROUP_VEC, OPTGROUP_OTHER, OPTGROUP_ALL):
13550         Convert from macros to...
13551         (enum optgroup_flag): ...this new enum.
13552         (optgroup_flags_t): New typedef.
13553         (operator|, operator|=): Implement for optgroup_flags_t.
13554         (struct dump_file_info): Convert field "alt_flags" to
13555         dump_flags_t.  Convert field "optgroup_flags" to
13556         optgroup_flags_t.
13557         (dump_basic_block): Use dump_flags_t rather than int for param.
13558         (dump_generic_expr_loc): Likewise.
13559         (dump_dec): Likewise.
13560         (dump_register): Convert param "optgroup_flags" to
13561         optgroup_flags_t.
13562         (opt_info_enable_passes): Likewise.
13563         * early-remat.c (early_remat::dump_edge_list): Use TDF_NONE rather
13564         than 0.
13565         * gimple-pretty-print.c (debug): Likewise.
13566         * gimple-ssa-store-merging.c (bswap_replace): Likewise.
13567         (merged_store_group::apply_stores): Likewise.
13568         * gimple-ssa-strength-reduction.c (insert_initializers): Likewise.
13569         * gimple.c (verify_gimple_pp): Likewise.
13570         * graphite-poly.c (print_pbb_body): Likewise.
13571         * passes.c (pass_manager::register_one_dump_file): Convert
13572         local "optgroup_flags" to optgroup_flags_t.
13573         * print-tree.c (print_node): Use TDF_NONE rather than 0.
13574         (debug): Likewise.
13575         (debug_body): Likewise.
13576         * tree-pass.h (struct pass_data): Convert field "optgroup_flags"
13577         to optgroup_flags_t.
13578         * tree-pretty-print.c (print_struct_decl): Use TDF_NONE rather
13579         than 0.
13580         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Likewise.
13581         (convert_mult_to_fma): Likewise.
13582         * tree-ssa-reassoc.c (undistribute_ops_list): Likewise.
13583         * tree-ssa-sccvn.c (vn_eliminate): Likewise.
13584         * tree-vect-data-refs.c (dump_lower_bound): Convert param
13585         "dump_kind" to dump_flags_t.
13587 2018-06-08  Segher Boessenkool  <segher@kernel.crashing.org>
13589         * config/rs6000/rs6000.c (min, max): Delete.
13591 2018-06-08  Segher Boessenkool  <segher@kernel.crashing.org>
13593         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete mention of
13594         -mabi=spe and -mabi=no-spe.
13596 2018-06-08  Martin Liska  <mliska@suse.cz>
13598         * ipa-pure-const.c (propagate_pure_const): Use ::get at places
13599         where we expect an existing summary.
13601 2018-06-08  Martin Liska  <mliska@suse.cz>
13603         * ipa-inline-analysis.c (simple_edge_hints): Use ::get method.
13604         * ipa-inline.h (estimate_edge_growth): Likewise.
13606 2018-06-08  Martin Liska  <mliska@suse.cz>
13608         * cgraph.c (function_version_hasher::hash): Use
13609         cgraph_node::get_uid ().
13610         (function_version_hasher::equal):
13611         * cgraph.h (cgraph_node::get_uid): New method.
13612         * ipa-inline.c (update_caller_keys): Use
13613         cgraph_node::get_uid ().
13614         (update_callee_keys): Likewise.
13615         * ipa-utils.c (searchc): Likewise.
13616         (ipa_reduced_postorder): Likewise.
13617         * lto-cgraph.c (input_node): Likewise.
13618         * passes.c (is_pass_explicitly_enabled_or_disabled): Likewise.
13619         * symbol-summary.h (symtab_insertion): Likewise.
13620         (symtab_removal): Likewise.
13621         (symtab_duplication): Likewise.
13622         * tree-pretty-print.c (dump_function_header): Likewise.
13623         * tree-sra.c (convert_callers_for_node): Likewise.
13625 2018-06-08  Martin Liska  <mliska@suse.cz>
13627         * cgraph.c (symbol_table::create_edge): Always assign a new
13628         unique number.
13629         (symbol_table::free_edge): Do not recycle numbers.
13630         * cgraph.h (cgraph_edge::get): New method.
13631         * symbol-summary.h (symtab_removal): Use it.
13632         (symtab_duplication): Likewise.
13633         (call_summary::hashable_uid): Remove.
13635 2018-06-08  Martin Liska  <mliska@suse.cz>
13637         * ipa-inline-analysis.c (inline_edge_removal_hook): Remove.
13638         (initialize_growth_caches): Remove.
13639         (free_growth_caches): Likewise.
13640         (do_estimate_edge_time): Use edge_growth_cache.
13641         (do_estimate_edge_size): Likewise.
13642         (do_estimate_edge_hints): Likewise.
13643         * ipa-inline.c (reset_edge_caches): Likewise.
13644         (recursive_inlining): Likewise.
13645         (inline_small_functions): Likewise.
13646         * ipa-inline.h (initialize_growth_caches): Remove.
13647         (estimate_edge_size): Likewise.
13648         (estimate_edge_time): Likewise.
13649         (estimate_edge_hints): Likewise.
13650         (reset_edge_growth_cache): Likewise.
13651         * symbol-summary.h (call_summary::remove): New method.
13653 2018-06-08  Martin Liska  <mliska@suse.cz>
13655         * ipa-cp.c (class edge_clone_summary): New summary.
13656         (grow_edge_clone_vectors): Remove.
13657         (ipcp_edge_duplication_hook): Remove.
13658         (class edge_clone_summary_t): New call_summary class.
13659         (ipcp_edge_removal_hook): Remove.
13660         (edge_clone_summary_t::duplicate): New function.
13661         (get_next_cgraph_edge_clone): Use edge_clone_summaries.
13662         (create_specialized_node): Likewise.
13663         (ipcp_driver): Initialize edge_clone_summaries and do not
13664         register hooks.
13666 2018-06-08  Martin Liska  <mliska@suse.cz>
13668         * symbol-summary.h (get): New function.
13669         (call_summary::m_initialize_when_cloning): New class member.
13671 2018-06-08  Martin Liska  <mliska@suse.cz>
13673         * cgraph.c (cgraph_node::remove): Do not recycle uid.
13674         * cgraph.h (symbol_table::release_symbol): Do not pass uid.
13675         (symbol_table::allocate_cgraph_symbol): Do not set uid.
13676         * passes.c (uid_hash_t): Record removed_nodes by their uids.
13677         (remove_cgraph_node_from_order): Use the removed_nodes set.
13678         (do_per_function_toporder): Likwise.
13679         * symbol-summary.h (symtab_insertion): Use cgraph_node::uid
13680         instead of summary_uid.
13681         (symtab_removal): Likewise.
13682         (symtab_duplication): Likewise.
13684 2018-06-08  Martin Liska  <mliska@suse.cz>
13686         * ipa-cp.c (ipcp_store_bits_results): Use
13687         ipcp_transformation_sum.
13688         (ipcp_store_vr_results): Likewise.
13689         * ipa-prop.c (ipcp_grow_transformations_if_necessary): Renamed
13690         to ...
13691         (ipcp_transformation_initialize): ... this.
13692         (ipa_set_node_agg_value_chain):
13693         (ipa_node_params_t::duplicate): Use ipcp_transformation_sum.
13694         (write_ipcp_transformation_info): Likewise.
13695         (read_ipcp_transformation_info): Likewise.
13696         (ipcp_update_bits): Likewise.
13697         (ipcp_update_vr): Likewise.
13698         (ipcp_transform_function): Likewise.
13699         * ipa-prop.h: Rename ipcp_transformation_summary to
13700         ipcp_transformation.
13701         (class ipcp_transformation_t): New function summary.
13702         (ipcp_get_transformation_summary): Use ipcp_transformation_sum.
13703         (ipa_get_agg_replacements_for_node): Likewise.
13705 2018-06-08  Martin Liska  <mliska@suse.cz>
13707         * ipa-pure-const.c (struct funct_state_d): Do it class instead
13708         of struct.
13709         (class funct_state_summary_t): New function_summary class.
13710         (has_function_state): Remove.
13711         (get_function_state): Likewise.
13712         (set_function_state): Likewise.
13713         (add_new_function): Likewise.
13714         (funct_state_summary_t::insert): New function.
13715         (duplicate_node_data): Remove.
13716         (remove_node_data): Remove.
13717         (funct_state_summary_t::duplicate): New function.
13718         (register_hooks): Create new funct_state_summaries.
13719         (pure_const_generate_summary): Use it.
13720         (pure_const_write_summary): Likewise.
13721         (pure_const_read_summary): Likewise.
13722         (propagate_pure_const): Likewise.
13723         (propagate_nothrow): Likewise.
13724         (dump_malloc_lattice): Likewise.
13725         (propagate_malloc): Likewise.
13726         (execute): Do not register hooks, just remove summary
13727         instead.
13728         (pass_ipa_pure_const::pass_ipa_pure_const): Simplify
13729         constructor.
13731 2018-06-08  Martin Liska  <mliska@suse.cz>
13733         * ipa-reference.c (remove_node_data): Remove.
13734         (duplicate_node_data): Likewise.
13735         (class ipa_ref_var_info_summary_t): New class.
13736         (class ipa_ref_opt_summary_t): Likewise.
13737         (get_reference_vars_info): Use ipa_ref_var_info_summaries.
13738         (get_reference_optimization_summary): Use
13739         ipa_ref_opt_sum_summaries.
13740         (set_reference_vars_info): Remove.
13741         (set_reference_optimization_summary): Likewise.
13742         (ipa_init): Create summaries.
13743         (init_function_info): Use function summary.
13744         (ipa_ref_opt_summary_t::duplicate): New function.
13745         (ipa_ref_opt_summary_t::remove): New function.
13746         (get_read_write_all_from_node): Fix GNU coding style.
13747         (propagate): Use function summary.
13748         (write_node_summary_p): Fix GNU coding style.
13749         (stream_out_bitmap): Likewise.
13750         (ipa_reference_read_optimization_summary): Use function summary.
13751         (ipa_reference_c_finalize): Do not release hooks.
13753 2018-06-08  Martin Liska  <mliska@suse.cz>
13755         * ipa-fnsummary.c (dump_ipa_call_summary): Use ::get method.
13756         (analyze_function_body): Extract multiple calls of get_create.
13757         * ipa-inline-analysis.c (simple_edge_hints): Likewise.
13758         * ipa-inline.c (recursive_inlining): Use ::get method.
13759         * ipa-inline.h (estimate_edge_growth): Likewise.
13761 2018-06-08  Martin Liska  <mliska@suse.cz>
13763         * hsa-common.h (enum hsa_function_kind): Rename HSA_NONE to
13764         HSA_INVALID.
13765         (hsa_function_summary::hsa_function_summary): Use the new enum
13766         value.
13767         (hsa_gpu_implementation_p): Use hsa_summaries::get.
13768         * hsa-gen.c (hsa_get_host_function): Likewise.
13769         (get_brig_function_name): Likewise.
13770         * ipa-hsa.c (process_hsa_functions): Likewise.
13771         (ipa_hsa_write_summary): Likewise.
13772         * symbol-summary.h (symtab_duplication): Use ::get function/
13773         (get): New function.
13775 2018-06-08  Martin Liska  <mliska@suse.cz>
13777         * config/i386/i386.c (ix86_can_inline_p): Use get_create instead
13778         of get.
13779         * hsa-common.c (hsa_summary_t::link_functions): Likewise.
13780         (hsa_register_kernel): Likewise.
13781         * hsa-common.h (hsa_gpu_implementation_p): Likewise.
13782         * hsa-gen.c (hsa_get_host_function): Likewise.
13783         (get_brig_function_name): Likewise.
13784         (generate_hsa): Likewise.
13785         (pass_gen_hsail::execute): Likewise.
13786         * ipa-cp.c (ipcp_cloning_candidate_p): Likewise.
13787         (devirtualization_time_bonus): Likewise.
13788         (ipcp_propagate_stage): Likewise.
13789         * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
13790         (edge_set_predicate): Likewise.
13791         (evaluate_conditions_for_known_args): Likewise.
13792         (evaluate_properties_for_edge): Likewise.
13793         (ipa_fn_summary::reset): Likewise.
13794         (ipa_fn_summary_t::duplicate): Likewise.
13795         (dump_ipa_call_summary): Likewise.
13796         (ipa_dump_fn_summary): Likewise.
13797         (analyze_function_body): Likewise.
13798         (compute_fn_summary): Likewise.
13799         (estimate_edge_devirt_benefit): Likewise.
13800         (estimate_edge_size_and_time): Likewise.
13801         (estimate_calls_size_and_time): Likewise.
13802         (estimate_node_size_and_time): Likewise.
13803         (inline_update_callee_summaries): Likewise.
13804         (remap_edge_change_prob): Likewise.
13805         (remap_edge_summaries): Likewise.
13806         (ipa_merge_fn_summary_after_inlining): Likewise.
13807         (ipa_update_overall_fn_summary): Likewise.
13808         (read_ipa_call_summary): Likewise.
13809         (inline_read_section): Likewise.
13810         (write_ipa_call_summary): Likewise.
13811         (ipa_fn_summary_write): Likewise.
13812         (ipa_free_fn_summary): Likewise.
13813         * ipa-hsa.c (process_hsa_functions): Likewise.
13814         (ipa_hsa_write_summary): Likewise.
13815         (ipa_hsa_read_section): Likewise.
13816         * ipa-icf.c (sem_function::merge): Likewise.
13817         * ipa-inline-analysis.c (simple_edge_hints): Likewise.
13818         (do_estimate_edge_time): Likewise.
13819         (estimate_size_after_inlining): Likewise.
13820         (estimate_growth): Likewise.
13821         (growth_likely_positive): Likewise.
13822         * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
13823         (inline_call): Likewise.
13824         * ipa-inline.c (caller_growth_limits): Likewise.
13825         (can_inline_edge_p): Likewise.
13826         (can_inline_edge_by_limits_p): Likewise.
13827         (compute_uninlined_call_time): Likewise.
13828         (compute_inlined_call_time): Likewise.
13829         (want_inline_small_function_p): Likewise.
13830         (edge_badness): Likewise.
13831         (update_caller_keys): Likewise.
13832         (update_callee_keys): Likewise.
13833         (recursive_inlining): Likewise.
13834         (inline_small_functions): Likewise.
13835         (inline_to_all_callers_1): Likewise.
13836         (dump_overall_stats): Likewise.
13837         (early_inline_small_functions): Likewise.
13838         (early_inliner): Likewise.
13839         * ipa-inline.h (estimate_edge_growth): Likewise.
13840         * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
13841         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
13842         * ipa-prop.h (IPA_NODE_REF): Likewise.
13843         (IPA_EDGE_REF): Likewise.
13844         * ipa-pure-const.c (malloc_candidate_p): Likewise.
13845         (propagate_malloc): Likewise.
13846         * ipa-split.c (execute_split_functions): Likewise.
13847         * symbol-summary.h: Rename get to get_create.
13848         (get): Likewise.
13849         (get_create): Likewise.
13850         * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
13852 2018-06-08  Martin Liska  <mliska@suse.cz>
13854         * symbol-summary.h (release): Move definition out of class
13855         declaration.
13856         (symtab_removal): Likewise.
13857         (symtab_duplication): Likewise.
13859 2018-06-08  Martin Liska  <mliska@suse.cz>
13861         * symbol-summary.h (function_summary): Move constructor
13862         implementation out of class declaration.
13863         (release): Likewise.
13864         (symtab_insertion): Likewise.
13865         (symtab_removal): Likewise.
13866         (symtab_duplication): Likewise.
13867         (get): Likewise.
13869 2018-06-08  Martin Liska  <mliska@suse.cz>
13871         * Makefile.in: Remove support for MPX (macros, related functions,
13872         fields in cgraph_node, ...).
13873         * builtin-types.def (BT_BND): Likewise.
13874         (BT_FN_BND_CONST_PTR): Likewise.
13875         (BT_FN_CONST_PTR_BND): Likewise.
13876         (BT_FN_VOID_PTR_BND): Likewise.
13877         (BT_FN_BND_CONST_PTR_SIZE): Likewise.
13878         (BT_FN_VOID_CONST_PTR_BND_CONST_PTR): Likewise.
13879         * builtins.c (expand_builtin_memcpy_with_bounds): Likewise.
13880         (expand_builtin_mempcpy_with_bounds): Likewise.
13881         (expand_builtin_memset_with_bounds): Likewise.
13882         (expand_builtin_memset_args): Likewise.
13883         (std_expand_builtin_va_start): Likewise.
13884         (expand_builtin): Likewise.
13885         (expand_builtin_with_bounds): Likewise.
13886         * builtins.def (DEF_BUILTIN_CHKP): Likewise.
13887         (DEF_LIB_BUILTIN_CHKP): Likewise.
13888         (DEF_EXT_LIB_BUILTIN_CHKP): Likewise.
13889         (DEF_CHKP_BUILTIN): Likewise.
13890         (BUILT_IN_MEMCPY): Likewise.
13891         (BUILT_IN_MEMMOVE): Likewise.
13892         (BUILT_IN_MEMPCPY): Likewise.
13893         (BUILT_IN_MEMSET): Likewise.
13894         (BUILT_IN_STPCPY): Likewise.
13895         (BUILT_IN_STRCAT): Likewise.
13896         (BUILT_IN_STRCHR): Likewise.
13897         (BUILT_IN_STRCPY): Likewise.
13898         (BUILT_IN_STRLEN): Likewise.
13899         (BUILT_IN_MEMCPY_CHK): Likewise.
13900         (BUILT_IN_MEMMOVE_CHK): Likewise.
13901         (BUILT_IN_MEMPCPY_CHK): Likewise.
13902         (BUILT_IN_MEMSET_CHK): Likewise.
13903         (BUILT_IN_STPCPY_CHK): Likewise.
13904         (BUILT_IN_STRCAT_CHK): Likewise.
13905         (BUILT_IN_STRCPY_CHK): Likewise.
13906         * calls.c (store_bounds): Likewise.
13907         (emit_call_1): Likewise.
13908         (special_function_p): Likewise.
13909         (maybe_warn_nonstring_arg): Likewise.
13910         (initialize_argument_information): Likewise.
13911         (finalize_must_preallocate): Likewise.
13912         (compute_argument_addresses): Likewise.
13913         (expand_call): Likewise.
13914         * cfgexpand.c (expand_call_stmt): Likewise.
13915         (expand_return): Likewise.
13916         (expand_gimple_stmt_1): Likewise.
13917         (pass_expand::execute): Likewise.
13918         * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
13919         (cgraph_node::remove): Likewise.
13920         (cgraph_node::dump): Likewise.
13921         (cgraph_node::verify_node): Likewise.
13922         * cgraph.h (chkp_function_instrumented_p): Likewise.
13923         (symtab_node::get_alias_target): Likewise.
13924         (cgraph_node::can_remove_if_no_direct_calls_and_refs_p): Likewise.
13925         (cgraph_local_p): Likewise.
13926         * cgraphbuild.c (cgraph_edge::rebuild_edges): Likewise.
13927         (cgraph_edge::rebuild_references): Likewise.
13928         * cgraphunit.c (varpool_node::finalize_decl): Likewise.
13929         (walk_polymorphic_call_targets): Likewise.
13930         (cgraph_node::expand_thunk): Likewise.
13931         (symbol_table::output_weakrefs): Likewise.
13932         * common/config/i386/i386-common.c (OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET): Likewise.
13933         (ix86_handle_option): Likewise.
13934         * config/i386/constraints.md: Likewise.
13935         * config/i386/i386-builtin-types.def (BND): Likewise.
13936         (VOID): Likewise.
13937         (PVOID): Likewise.
13938         (ULONG): Likewise.
13939         * config/i386/i386-builtin.def (BDESC_END): Likewise.
13940         (BDESC_FIRST): Likewise.
13941         (BDESC): Likewise.
13942         * config/i386/i386-c.c (ix86_target_macros_internal): Likewise.
13943         * config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): Likewise.
13944         * config/i386/i386.c (enum reg_class): Likewise.
13945         (ix86_target_string): Likewise.
13946         (ix86_option_override_internal): Likewise.
13947         (ix86_conditional_register_usage): Likewise.
13948         (ix86_valid_target_attribute_inner_p): Likewise.
13949         (ix86_set_indirect_branch_type): Likewise.
13950         (ix86_set_current_function): Likewise.
13951         (ix86_function_arg_regno_p): Likewise.
13952         (init_cumulative_args): Likewise.
13953         (ix86_function_arg_advance): Likewise.
13954         (ix86_function_arg): Likewise.
13955         (ix86_pass_by_reference): Likewise.
13956         (ix86_function_value_regno_p): Likewise.
13957         (ix86_function_value_1): Likewise.
13958         (ix86_function_value_bounds): Likewise.
13959         (ix86_return_in_memory): Likewise.
13960         (ix86_setup_incoming_vararg_bounds): Likewise.
13961         (ix86_va_start): Likewise.
13962         (indirect_thunk_need_prefix): Likewise.
13963         (print_reg): Likewise.
13964         (ix86_print_operand): Likewise.
13965         (ix86_expand_call): Likewise.
13966         (ix86_output_function_return): Likewise.
13967         (reg_encoded_number): Likewise.
13968         (BDESC_VERIFYS): Likewise.
13969         (ix86_init_mpx_builtins): Likewise.
13970         (ix86_init_builtins): Likewise.
13971         (ix86_emit_cmove): Likewise.
13972         (ix86_emit_move_max): Likewise.
13973         (ix86_expand_builtin): Likewise.
13974         (ix86_builtin_mpx_function): Likewise.
13975         (ix86_get_arg_address_for_bt): Likewise.
13976         (ix86_load_bounds): Likewise.
13977         (ix86_store_bounds): Likewise.
13978         (ix86_load_returned_bounds): Likewise.
13979         (ix86_store_returned_bounds): Likewise.
13980         (ix86_class_likely_spilled_p): Likewise.
13981         (ix86_hard_regno_mode_ok): Likewise.
13982         (x86_order_regs_for_local_alloc): Likewise.
13983         (ix86_mitigate_rop): Likewise.
13984         (ix86_bnd_prefixed_insn_p): Likewise.
13985         (ix86_mpx_bound_mode): Likewise.
13986         (ix86_make_bounds_constant): Likewise.
13987         (ix86_initialize_bounds): Likewise.
13988         (TARGET_LOAD_BOUNDS_FOR_ARG): Likewise.
13989         (TARGET_STORE_BOUNDS_FOR_ARG): Likewise.
13990         (TARGET_LOAD_RETURNED_BOUNDS): Likewise.
13991         (TARGET_STORE_RETURNED_BOUNDS): Likewise.
13992         (TARGET_CHKP_BOUND_MODE): Likewise.
13993         (TARGET_BUILTIN_CHKP_FUNCTION): Likewise.
13994         (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): Likewise.
13995         (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): Likewise.
13996         (TARGET_CHKP_INITIALIZE_BOUNDS): Likewise.
13997         * config/i386/i386.h (TARGET_MPX): Likewise.
13998         (TARGET_MPX_P): Likewise.
13999         (VALID_BND_REG_MODE): Likewise.
14000         (FIRST_BND_REG): Likewise.
14001         (LAST_BND_REG): Likewise.
14002         (enum reg_class): Likewise.
14003         (BND_REG_P): Likewise.
14004         (BND_REGNO_P): Likewise.
14005         (BNDmode): Likewise.
14006         (ADJUST_INSN_LENGTH): Likewise.
14007         * config/i386/i386.md: Likewise.
14008         * config/i386/i386.opt: Likewise.
14009         * config/i386/linux-common.h (LIBMPX_LIBS): Likewise.
14010         (defined): Likewise.
14011         (LINK_MPX): Likewise.
14012         (MPX_SPEC): Likewise.
14013         (LIBMPX_SPEC): Likewise.
14014         (LIBMPXWRAPPERS_SPEC): Likewise.
14015         (CHKP_SPEC): Likewise.
14016         * config/i386/predicates.md: Likewise.
14017         * dbxout.c (dbxout_type): Likewise.
14018         * doc/extend.texi: Likewise.
14019         * doc/invoke.texi: Likewise.
14020         * doc/md.texi: Likewise.
14021         * doc/tm.texi: Likewise.
14022         * doc/tm.texi.in: Likewise.
14023         * dwarf2out.c (is_base_type): Likewise.
14024         (gen_formal_types_die): Likewise.
14025         (gen_subprogram_die): Likewise.
14026         (gen_type_die_with_usage): Likewise.
14027         (gen_decl_die): Likewise.
14028         (dwarf2out_late_global_decl): Likewise.
14029         * expr.c (expand_assignment): Likewise.
14030         (emit_storent_insn): Likewise.
14031         (store_expr_with_bounds): Likewise.
14032         (store_expr): Likewise.
14033         (expand_expr_real_1): Likewise.
14034         * expr.h (store_expr_with_bounds): Likewise.
14035         * function.c (use_register_for_decl): Likewise.
14036         (struct bounds_parm_data): Likewise.
14037         (assign_parms_augmented_arg_list): Likewise.
14038         (assign_parm_find_entry_rtl): Likewise.
14039         (assign_parm_is_stack_parm): Likewise.
14040         (assign_parm_load_bounds): Likewise.
14041         (assign_bounds): Likewise.
14042         (assign_parms): Likewise.
14043         (expand_function_start): Likewise.
14044         * gcc.c (CHKP_SPEC): Likewise.
14045         * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
14046         * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Likewise.
14047         (wrestrict_dom_walker::check_call): Likewise.
14048         * gimple.c (gimple_build_call_from_tree): Likewise.
14049         * gimple.h (enum gf_mask): Likewise.
14050         (gimple_call_with_bounds_p): Likewise.
14051         (gimple_call_set_with_bounds): Likewise.
14052         * gimplify.c (gimplify_init_constructor): Likewise.
14053         * ipa-cp.c (initialize_node_lattices): Likewise.
14054         (propagate_constants_across_call): Likewise.
14055         (find_more_scalar_values_for_callers_subset): Likewise.
14056         * ipa-hsa.c (process_hsa_functions): Likewise.
14057         * ipa-icf-gimple.c (func_checker::compare_gimple_call): Likewise.
14058         * ipa-icf.c (sem_function::merge): Likewise.
14059         * ipa-inline.c (early_inliner): Likewise.
14060         * ipa-pure-const.c (warn_function_noreturn): Likewise.
14061         (warn_function_cold): Likewise.
14062         (propagate_pure_const): Likewise.
14063         * ipa-ref.h (enum GTY): Likewise.
14064         * ipa-split.c (find_retbnd): Likewise.
14065         (consider_split): Likewise.
14066         (split_function): Likewise.
14067         * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
14068         * ipa.c (walk_polymorphic_call_targets): Likewise.
14069         (symbol_table::remove_unreachable_nodes): Likewise.
14070         (process_references): Likewise.
14071         (cgraph_build_static_cdtor_1): Likewise.
14072         * lto-cgraph.c (lto_output_node): Likewise.
14073         (output_refs): Likewise.
14074         (compute_ltrans_boundary): Likewise.
14075         (input_overwrite_node): Likewise.
14076         (input_node): Likewise.
14077         (input_cgraph_1): Likewise.
14078         * params.def (PARAM_CHKP_MAX_CTOR_SIZE): Likewise.
14079         * passes.c (pass_manager::execute_early_local_passes): Likewise.
14080         (class pass_chkp_instrumentation_passes): Likewise.
14081         (make_pass_chkp_instrumentation_passes): Likewise.
14082         * passes.def: Likewise.
14083         * rtl.h (struct GTY): Likewise.
14084         (CALL_EXPR_WITH_BOUNDS_P): Likewise.
14085         * stor-layout.c (layout_type): Likewise.
14086         * symtab.c: Likewise.
14087         * target.def: Likewise.
14088         * targhooks.c (default_chkp_bound_type): Likewise.
14089         (default_chkp_bound_mode): Likewise.
14090         (default_builtin_chkp_function): Likewise.
14091         (default_chkp_function_value_bounds): Likewise.
14092         (default_chkp_make_bounds_constant): Likewise.
14093         (default_chkp_initialize_bounds): Likewise.
14094         * targhooks.h (default_chkp_bound_type): Likewise.
14095         (default_chkp_bound_mode): Likewise.
14096         (default_builtin_chkp_function): Likewise.
14097         (default_chkp_function_value_bounds): Likewise.
14098         (default_chkp_make_bounds_constant): Likewise.
14099         (default_chkp_initialize_bounds): Likewise.
14100         * toplev.c (compile_file): Likewise.
14101         (process_options): Likewise.
14102         * tree-core.h (DEF_BUILTIN): Likewise.
14103         (DEF_BUILTIN_CHKP): Likewise.
14104         * tree-inline.c (declare_return_variable): Likewise.
14105         (remap_gimple_stmt): Likewise.
14106         (copy_bb): Likewise.
14107         (initialize_inlined_parameters): Likewise.
14108         (expand_call_inline): Likewise.
14109         * tree-pass.h (make_pass_ipa_chkp_versioning): Likewise.
14110         (make_pass_ipa_chkp_early_produce_thunks): Likewise.
14111         (make_pass_ipa_chkp_produce_thunks): Likewise.
14112         (make_pass_chkp): Likewise.
14113         (make_pass_chkp_opt): Likewise.
14114         (make_pass_chkp_instrumentation_passes): Likewise.
14115         * tree-pretty-print.c (dump_generic_node): Likewise.
14116         * tree-ssa-ccp.c (insert_clobber_before_stack_restore): Likewise.
14117         * tree-ssa-dce.c (propagate_necessity): Likewise.
14118         (eliminate_unnecessary_stmts): Likewise.
14119         * tree-ssa-pre.c (create_expression_by_pieces): Likewise.
14120         * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
14121         * tree-ssa-sccvn.h: Likewise.
14122         * tree-ssa-strlen.c (get_string_length): Likewise.
14123         (valid_builtin_call): Likewise.
14124         (adjust_last_stmt): Likewise.
14125         (handle_builtin_strchr): Likewise.
14126         (handle_builtin_strcpy): Likewise.
14127         (handle_builtin_stxncpy): Likewise.
14128         (handle_builtin_memcpy): Likewise.
14129         (handle_builtin_strcat): Likewise.
14130         (strlen_check_and_optimize_stmt): Likewise.
14131         * tree-stdarg.c (expand_ifn_va_arg_1): Likewise.
14132         * tree-streamer-in.c: Likewise.
14133         * tree-streamer.c (record_common_node): Likewise.
14134         * tree.c (tree_code_size): Likewise.
14135         (wide_int_to_tree_1): Likewise.
14136         (type_contains_placeholder_1): Likewise.
14137         (build_common_tree_nodes): Likewise.
14138         * tree.def (POINTER_BOUNDS_TYPE): Likewise.
14139         * tree.h (POINTER_BOUNDS_TYPE_P): Likewise.
14140         (POINTER_BOUNDS_P): Likewise.
14141         (BOUNDED_TYPE_P): Likewise.
14142         (BOUNDED_P): Likewise.
14143         (CALL_WITH_BOUNDS_P): Likewise.
14144         (pointer_bounds_type_node): Likewise.
14145         * value-prof.c (gimple_ic): Likewise.
14146         * var-tracking.c (vt_add_function_parameters): Likewise.
14147         * varasm.c (make_decl_rtl): Likewise.
14148         (assemble_start_function): Likewise.
14149         (output_constant): Likewise.
14150         (maybe_assemble_visibility): Likewise.
14151         * varpool.c (ctor_for_folding): Likewise.
14152         * chkp-builtins.def: Remove.
14153         * ipa-chkp.c: Remove.
14154         * ipa-chkp.h: Remove.
14155         * rtl-chkp.c: Remove.
14156         * rtl-chkp.h: Remove.
14157         * tree-chkp-opt.c: Remove.
14158         * tree-chkp.c: Remove.
14159         * tree-chkp.h: Remove.
14161 2018-06-07  Carl Love  <cel@us.ibm.com>
14163         * config/rs6000/vsx.md (vextract_fp_from_shorth,
14164         vextract_fp_from_shortl): Add BE support.
14166 2018-06-07  Paul Koning  <ni1d@arrl.net>
14168         * compare-elim.c (try_merge_compare): Don't merge compare if
14169         address contains a side effect.
14170         (try_eliminate_compare): Likewise.
14172 2018-06-07  Olga Makhotina  <olga.makhotina@intel.com>
14174         * config.gcc: Support "tremont".
14175         * config/i386/driver-i386.c (host_detect_local_cpu): Detect "tremont".
14176         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
14177         PROCESSOR_TREMONT.
14178         * config/i386/i386.c (m_TREMONT): Define.
14179         (processor_target_table): Add "tremont".
14180         (PTA_TREMONT): Define.
14181         (ix86_lea_outperforms): Add TARGET_TREMONT.
14182         (get_builtin_code_for_version): Handle PROCESSOR_TREMONT.
14183         (fold_builtin_cpu): Add M_INTEL_TREMONT, replace M_INTEL_GOLDMONT
14184         and M_INTEL_GOLDMONT_PLUS.
14185         (fold_builtin_cpu): Add "tremont".
14186         (ix86_add_stmt_cost): Add TARGET_TREMONT.
14187         (ix86_option_override_internal): Add "tremont".
14188         * config/i386/i386.h (processor_costs): Define TARGET_TREMONT.
14189         (processor_type): Add PROCESSOR_TREMONT.
14190         * config/i386/x86-tune.def: Add m_TREMONT.
14191         * doc/invoke.texi: Add tremont as x86 -march=/-mtune= CPU type.
14193 2018-06-07  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
14195         * config/msp430/msp430.c (msp430_mcu_name): Set the "i" in the
14196         symbol defined for msp430i* devices to be lower case.
14198 2018-06-07  Richard Biener  <rguenther@suse.de>
14200         * graphite-sese-to-poly.c (extract_affine): Avoid unneded
14201         wrapping.  Properly wrap the result of a BIT_NOT_EXPR.
14202         Properly wrap signed arithmetic if overflow wraps.
14204 2018-06-07  Jakub Jelinek  <jakub@redhat.com>
14206         PR tree-optimization/69615
14207         * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If rhs2 is lhs
14208         of a cast from a same precision integral SSA_NAME in a bb dominated
14209         by first_bb, retry with rhs2 set to the rhs1 of the cast.  Don't emit
14210         cast to utype if rhs2 has already a compatible type.
14212 2018-06-07  Richard Biener  <rguenther@suse.de>
14214         PR tree-optimization/85935
14215         * graphite-scop-detection.c (find_params_in_bb): Analyze
14216         condition operands with respect to the correct loop.  Assert
14217         the analysis doesn't fail.
14219 2018-06-04  Carl Love  <cel@us.ibm.com>
14221         * config/rs6000/vsx.md (first_match_index_<mode>): Calculate index
14222         using natural element order.  Use gen_lshrsi3 instead of gen_ashrsi3
14223         as it is slightly cheaper.
14224         (first_match_or_eos_index_<mode>):
14225         Calculate index using natural element order.
14226         (first_match_index_<mode>):
14227         Calculate index using natural element order.
14228         (first_match_or_eos_index_<mode>):
14229         Calculate index using natural order.
14230         (define_insn vclzlsbb): Change to define_insn vclzlsbb_<mode>.
14231         for BE and LE modes.
14232         * config/rs6000/rs6000-c.c: Rename P9V_BUILTIN_VCLZLSBB,
14233         P9V_BUILTIN_VCLZLSBB_V16QI.
14234         * config/rs6000/rs6000-builtin.def: Make VCLZLSBB mode
14235         specific.
14237 2018-06-06  Kelvin Nilsen  <kelvin@gcc.gnu.org>
14239         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
14240         indentation and line wrap for many prototypes.  Add missing
14241         @smallexample directives around block of prototypes for vec_xl and
14242         vec_xst.
14244 2018-06-05  Michael Meissner  <meissner@linux.ibm.com>
14246         * config/rs6000/rs6000.c (rs6000_passes_ieee128): New boolean to
14247         track if we pass or return IEEE 128-bit floating point.
14248         (ieee128_mangling_gcc_8_1): New boolean to say whether to generate
14249         C++ mangling that is compatible with GCC 8.1.
14250         (TARGET_ASM_GLOBALIZE_DECL_NAME): Override target hook.
14251         (init_cumulative_args): Note if we pass or return IEEE 128-bit
14252         floating point types.
14253         (rs6000_function_arg_advance_1): Likewise.
14254         (rs6000_mangle_type): Optionally generate mangled names that match
14255         what GCC 8.1 generated for IEEE 128-bit floating point types.
14256         (rs6000_globalize_decl_name): If we have an external function that
14257         passes or returns IEEE 128-bit types, generate a weak reference
14258         from the mangled name used in GCC 8.1 to the current mangled
14259         name.
14260         (rs6000_init_builtins): Make __ibm128 use the long double type if
14261         long double is IBM extended double.  Make __float128 use the long
14262         double type if long double is IEEE 128-bit.
14264         PR target/85657
14265         * config/rs6000/rs6000-builtin.def (BU_IBM128_2): New helper
14266         macro for __ibm128 built-in functions.
14267         (PACK_IF): Add __ibm128 pack/unpack functions.
14268         (UNPACK_IF): Likewise.
14269         * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Do not
14270         enable long double built-in functions if long double is IEEE
14271         128-bit floating point.
14272         (rs6000_invalid_builtin): Update long double built-in function
14273         error message.
14274         (rs6000_expand_builtin): For PACK_IF and UNPACK_IF built-in
14275         functions, adjust the built-in function to use the long double
14276         built-in function if __ibm128 and long double are the same type.
14277         * doc/extend.texi (PowerPC builtins): Update documention for
14278         __builtin_{,un}pack_longdouble.  Add documentation for
14279         __builtin_{,un}pack_ibm128.
14281 2018-06-06  Jim Wilson  <jimw@sifive.com>
14283         * config/riscv/riscv.c (enum riscv_privilege_levels): New.
14284         (struct machine_function): New field interrupt_mode.
14285         (riscv_handle_type_attribute): New function.  Add forward declaration.
14286         (riscv_attribute_table) <interrupt>: Use riscv_handle_type_attribute.
14287         (riscv_expand_epilogue): Check interrupt_mode field.
14288         (riscv_set_current_function): Check interrupt attribute args and
14289         set interrupt_mode field.
14290         * config/riscv/riscv.md (UNSPECV_SRET, UNSPECV_URET): New.
14291         (riscv_sret, riscv_uret): New.
14292         * doc/extend.texi (RISC-V Function Attributes) <interrupt>: Document
14293         new arguments to interrupt attribute.
14295 2018-06-06  Peter Bergner  <bergner@vnet.ibm.com>
14297         PR target/63177
14298         * /config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for -mpower9.
14299         Don't handle -mcpu=power8 if -mpower9-vector is also used.
14301 2018-06-06  Kelvin Nilsen  <kelvin@gcc.gnu.org>
14303         * config/rs6000/rs6000-builtin.def (VSX_BUILTIN_VEC_LD,
14304         VSX_BUILTIN_VEC_ST): Add comment to explain non-traditional uses.
14305         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
14306         several redundant entries.
14308 2018-06-06  David Malcolm  <dmalcolm@redhat.com>
14310         * config/i386/i386-protos.h (ix86_expand_call): Strengthen return
14311         type from "rtx" to "rtx_insn *".
14312         * config/i386/i386.c (ix86_expand_split_stack_prologue): Likewise
14313         for local "call_insn", removing cast.
14314         (ix86_expand_call): Likewise, introducing a "call_insn" local.
14316 2018-06-06  Eric Botcazou  <ebotcazou@adacore.com>
14318         PR tree-optimization/86066
14319         * gimple-ssa-store-merging.c (process_store): Do not bypass BIT_NOT_EXPR
14320         for BIT_INSERT_EXPR stores.
14322 2018-06-06  Richard Biener  <rguenther@suse.de>
14324         PR tree-optimization/86062
14325         * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
14326         component refs ontop
14327         of to be offsetted base.
14329 2018-06-06  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
14331         * config/msp430/msp430.c (msp430_attr): Allow interrupt handlers
14332         to be static and remove check on interrupt attribute name.
14334 2018-06-05  Kelvin Nilsen  <kelvin@gcc.gnu.org>
14336         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
14337         volatile qualifier from vec_lvsl and vec_lvsr argument prototypes.
14339 2018-06-05  Steve Ellcey  <sellcey@cavium.com>
14341         PR target/79924
14342         * config/aarch64/aarch64-protos.h (aarch64_err_no_fpadvsimd): Remove
14343         second argument.
14344         * config/aarch64/aarch64-protos..c (aarch64_err_no_fpadvsimd):
14345         Remove second argument, change how error is called.
14346         (aarch64_layout_arg): Remove second argument from
14347         aarch64_err_no_fpadvsimd call.
14348         (aarch64_init_cumulative_args): Ditto.
14349         (aarch64_gimplify_va_arg_expr): Ditto.
14350         * config/aarch64/aarch64.md (mov<mode>): Ditto.
14352 2018-06-05  Uros Bizjak  <ubizjak@gmail.com>
14354         * config/i386/i386.md (simple_return_indirect_internal): New expander.
14355         (*simple_return_indirect_internal<mode>): Rename from
14356         simple_return_indirect_internal.  Use W mode iterator.
14357         (rstorssp): New expander.
14358         (*rstorssp<mode>): Rename from rstorssp.  Use P mode iterator.
14359         (clrssbsy): New expander.
14360         (*clrssbsy<mode>): Rename from clrssbsy.  Use P mode iterator.
14362 2018-06-05  Andre Vieira  <andre.simoesdiasvieira@arm.com>
14364         * config/arm/arm_cmse.h (cmse_nsfptr_create): Change typeof to
14365         __typeof__.
14366         (cmse_check_pointed_object): Likewise.
14368 2018-06-05  Martin Liska  <mliska@suse.cz>
14370         PR gcov-profile/47618
14371         * doc/invoke.texi: Document how -fprofile-dir format
14372         is extended.
14374 2018-06-05  Richard Biener  <rguenther@suse.de>
14376         * tree-cfgcleanup.c (cleanup_control_flow_pre): For edge
14377         removal pretend DOM info isn't available so we do not update
14378         it and only remove edges, not dominated blocks.  Actually free
14379         DOM info in case we removed something.  Remove unreachable blocks.
14380         (mfb_keep_latches): Work with either DOM info or marked backedges.
14381         (cleanup_tree_cfg_noloop): Do not remove unreachable blocks
14382         first.  Mark backedges if DOM info isn't available.
14383         (Re-)compute DOM info after cleanup_control_flow_pre.
14385 2018-06-05  Richard Biener  <rguenther@suse.de>
14387         * tree-cfg.c (struct locus_discrim_map): Store line, not location.
14388         (locus_discrim_hasher::hash): Adjust.
14389         (locus_discrim_hasher::equal): Likewise.
14390         (next_discriminator_for_locus): Work on line directly.
14391         (same_line_p): Pass in expanded locus1 as well.
14392         (assign_discriminators): Avoid redundant location expansions.
14394 2018-06-05  Richard Biener  <rguenther@suse.de>
14396         PR tree-optimization/86046
14397         * tree-ssa.c (maybe_optimize_var): Clear DECL_GIMPLE_REG_P
14398         if required after clearing TREE_ADDRESSABLE.
14400 2018-06-05  Richard Biener  <rguenther@suse.de>
14402         PR tree-optimization/86047
14403         * tree-ssa-loop.c (for_each_index): Glob handling of all
14404         decls and constants and really handle all of them.
14406 2018-06-05  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
14408         PR target/81497
14409         * config/arm/arm-builtins.c (arm_type_qualifiers): Add
14410         qualifier_void_pointer and qualifier_const_void_pointer.
14411         (arm_ldc_qualifiers, arm_stc_qualifiers): Use the above.
14412         (arm_init_builtins): Handle the above.
14413         * config/arm/arm_acle.h (__arm_cdp, __arm_ldc, __arm_ldcl, __arm_stc,
14414         __arm_stcl, __arm_mcr, __arm_cdp2, __arm_ldc2, __arm_ldcl2, __arm_stc2,
14415         __arm_stcl2,__arm_mcr2, __arm_mcrr, __arm_mcrr2): Remove return for
14416         void intrinsics.
14418 2018-06-05  Martin Liska  <mliska@suse.cz>
14420         * auto-profile.c (read_autofdo_file): Do not use
14421         gcov_ctr_summary struct.
14422         (afdo_callsite_hot_enough_for_early_inline): Likewise.
14423         * coverage.c (struct counts_entry): Likewise.
14424         (read_counts_file): Read just single summary entry.
14425         (get_coverage_counts): Use gcov_summary struct.
14426         * coverage.h (get_coverage_counts): Likewise.
14427         * gcov-dump.c (dump_working_sets): Likewise.
14428         (tag_summary): Dump just single summary.
14429         * gcov-io.c (gcov_write_summary): Write just histogram
14430         summary.
14431         (gcov_read_summary): Read just single summary.
14432         (compute_working_sets): Use gcov_summary struct.
14433         * gcov-io.h (GCOV_TAG_SUMMARY_LENGTH): Remove usage
14434         of GCOV_COUNTERS_SUMMABLE.
14435         (GCOV_COUNTERS_SUMMABLE): Remove.
14436         (GCOV_FIRST_VALUE_COUNTER): Replace with
14437         GCOV_COUNTER_V_INTERVAL.
14438         (struct gcov_ctr_summary): Remove.
14439         (struct gcov_summary): Directly use fields of former
14440         gcov_ctr_summary.
14441         (compute_working_sets): Use gcov_summary struct.
14442         * gcov.c (read_count_file): Do not use ctrs fields.
14443         * lto-cgraph.c (merge_profile_summaries): Use gcov_summary
14444         struct.
14445         * lto-streamer.h (struct GTY): Make profile_info gcov_summary
14446         struct.
14447         * profile.c: Likewise.
14448         * profile.h: Likewise.
14450 2018-06-05  Martin Liska  <mliska@suse.cz>
14452         PR gcov-profile/84846
14453         * gcov.c (output_lines): Print working directory only
14454         in intermediate format.
14456 2018-06-05  Andreas Krebbel  <krebbel@linux.ibm.com>
14458         * config/s390/s390-builtin-types.def: Add void function type.
14459         * config/s390/s390-builtins.def: Use the function type for the
14460         tbeginc builtin.
14462 2018-06-04  Jim Wilson  <jimw@sifive.com>
14464         * config/riscv/riscv-protos.h (riscv_expand_epilogue): Change bool arg
14465         to int.
14466         * config/riscv/riscv.c (riscv_for_each_saved_reg): New args epilogue
14467         and maybe_eh_return.  Change regno to unsigned int.  Use new args to
14468         handle EH_RETURN_DATA_REGNO registers properly.
14469         (riscv_expand_prologue): Pass new args to riscv_for_each_saved_reg.
14470         (riscv_expand_epilogue): Update comment.  Change argument name and
14471         type.  Update code to use new name and type.  Pass new args to
14472         riscv_for_each_saved_reg.  Only use EH_RETURN_STACKADJ_RTX when
14473         EXCEPTION_RETURN.
14474         * config/riscv/riscv.md (NORMAL_RETURN): New.
14475         (SIBCALL_RETURN, EXCEPTION_RETURN): New.
14476         (epilogue, sibcall_epilogue): Update riscv_expand_epilogue arg.
14477         (eh_return): Call gen_eh_return_internal and emit barrier.
14478         (eh_return_internal): Call riscv_expand_epilogue.
14480 2018-06-04  Eric Botcazou  <ebotcazou@adacore.com>
14482         * gimple-ssa-store-merging.c (struct merged_store_group): Move up
14483         bit_insertion field and declare can_be_merged_into method.
14484         (merged_store_group::can_be_merged_into): New method.
14485         (imm_store_chain_info::coalesce_immediate): Call it to decide whether
14486         consecutive non-overlapping stores can be merged.  Turn MEM_REF stores
14487         into BIT_INSERT_EXPR stores if the group contains a non-MEM_REF store.
14489 2018-06-04  Richard Biener  <rguenther@suse.de>
14491         PR tree-optimization/85955
14492         * builtins.c (fold_builtin_sincos): Convert pointers to
14493         destination to appropriate type before dereferencing.
14495 2018-06-04  Segher Boessenkool  <segher@kernel.crashing.org>
14497         * config/rs6000/rs6000.md (abs<mode>2 for FLOAT128): Handle IFmode.
14499 2018-06-04  Richard Sandiford  <richard.sandiford@linaro.org>
14501         * expr.c (expand_expr_real_1): Force the operand into memory if
14502         its TYPE_MODE is BLKmode and if there is no integer mode for
14503         the number of bits being extracted.
14505 2018-06-04  Jakub Jelinek  <jakub@redhat.com>
14507         PR target/85832
14508         PR target/86036
14509         * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
14510         Use vptestnm rather than vptestm in (=Yc,v,C) variant.
14512 2018-06-04  Richard Biener  <rguenther@suse.de>
14514         * tree-cfgcleanup.c (cleanup_tree_cfg_1): Fold into...
14515         (cleanup_tree_cfg_noloop): ... single caller.  Do
14516         start_recording_case_labels later.
14518 2018-06-04  Sebastian Peryt  <sebastian.peryt@intel.com>
14520         * config/i386/cldemoteintrin.h: Change define from _X86INTRIN_H_INCLUDED
14521         to _IMMINTRIN_H_INCLUDED.
14522         * config/i386/pconfigintrin.h: Ditto.
14523         * config/i386/waitpkgintrin.h: Ditto.
14524         * config/i386/immintrin.h: Add includes for sgxintrin.h,
14525         pconfigintrin.h, waitpkgintrin.h and cldemoteintrin.h.
14526         * config/i386/x86intrin.h: Remove includes for mintrin.h, xmmintrin.h,
14527         emmintrin.h, pmmintrin.h, tmmintrin.h, smmintrin.h, wmmintrin.h,
14528         bmiintrin.h, bmi2intrin.h, lzcntintrin.h, sgxintrin.h, pconfigintrin.h,
14529         waitpkgintrin.h and cldemoteintrin.h.
14531 2018-06-04  Richard Biener  <rguenther@suse.de>
14533         PR tree-optimization/86038
14534         * tracer.c (find_best_successor): Check probability for
14535         being initialized, bail out if not.
14537 2018-06-04  Richard Earnshaw  <rearnsha@arm.com>
14539         PR target/86003
14540         * config/arm/arm-cpus.in (ALL_QUIRKS): Add xscale feature to the list
14541         of bits to ignore when comparing architectures.
14543 2018-06-04  Jakub Jelinek  <jakub@redhat.com>
14545         PR tree-optimization/69615
14546         * fold-const.c (merge_ranges): If range1 is - [x, x] and x is the
14547         maximum or minimum of the type, try to merge it also as if
14548         range1 is + [-, x - 1] or + [x + 1, -].
14550         PR c++/86025
14551         * tree.c (inchash::add_expr): Handle IDENTIFIER_NODE.
14553 2018-06-03  Eric Botcazou  <ebotcazou@adacore.com>
14555         PR tree-optimization/86034
14556         * gimple-ssa-store-merging.c (output_merged_store): Convert the RHS to
14557         the unsigned bitfield type in a bit insertion sequence if it does not
14558         have a larger precision than the bitfield size.
14559         (process_store): Also bypass widening conversions for BIT_INSERT_EXPR.
14561 2018-06-03  Kito Cheng  <kito.cheng@gmail.com>
14563         * config/nds32/nds32-peephole2.md: Add new patterns for code size.
14565 2018-06-03  Chung-Ju Wu  <jasonwucj@gmail.com>
14567         * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3J.
14568         * config/nds32/nds32.c (nds32_option_override): Consider ARCH_V3J.
14569         * config/nds32/nds32.h (TARGET_ISA_V3): Add ARCH_V3J checking.
14570         * config/nds32/nds32.opt (march): Add enum value Value(ARCH_V3J).
14572 2018-06-03  Chung-Ju Wu  <jasonwucj@gmail.com>
14574         * common/config/nds32/nds32-common.c (nds32_option_optimization_table):
14575         Disable -fdelete-null-pointer-checks for ELF toolchain.
14577 2018-06-02  Chung-Ju Wu  <jasonwucj@gmail.com>
14578             Kito Cheng  <kito.cheng@gmail.com>
14580         * config.gcc (nds32*): Use nds32-linux.opt and nds32-elf.opt.
14581         (nds32le-*-*, nds32be-*-*): Integrate checking process.
14582         (nds32*-*-*): Add glibc and uclibc conditions.
14583         * common/config/nds32/nds32-common.c (nds32_except_unwind_info): New.
14584         (TARGET_EXCEPT_UNWIND_INFO): Define.
14585         * config/nds32/elf.h: New file.
14586         * config/nds32/linux.h: New file.
14587         * config/nds32/nds32-elf.opt: New file.
14588         * config/nds32/nds32-linux.opt: New file.
14589         * config/nds32/nds32-fp-as-gp.c
14590         (pass_nds32_fp_as_gp::gate): Consider TARGET_LINUX_ABI.
14591         * config/nds32/nds32.c (nds32_conditional_register_usage): Consider
14592         TARGET_LINUX_ABI.
14593         (nds32_asm_file_end): Ditto.
14594         (nds32_print_operand): Ditto.
14595         (nds32_insert_attributes): Ditto.
14596         (nds32_init_libfuncs): New function.
14597         (TARGET_HAVE_TLS): Define.
14598         (TARGET_INIT_LIBFUNCS): Define.
14599         * config/nds32/nds32.h (TARGET_DEFAULT_RELAX): Apply different relax
14600         spec content.
14601         (TARGET_ELF): Apply different mcmodel setting.
14602         (LINK_SPEC, LIB_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): The content has
14603         been migrated into elf.h and linux.h files.
14604         * config/nds32/nds32.md (add_pc): Consider TARGET_LINUX_ABI.
14605         * config/nds32/nds32.opt (mvh): Consider TARGET_LINUX_ABI.
14606         (mcmodel): The content has been migrated into nds32-elf.opt and
14607         nds32-linux.opt files.
14608         * config/nds32/t-elf: New file.
14609         * config/nds32/t-linux: New file.
14611 2018-06-02  Chung-Ju Wu  <jasonwucj@gmail.com>
14612             Shiva Chen  <shiva0217@gmail.com>
14614         * config/nds32/constants.md (unspec_volatile_element): Add
14615         UNSPEC_VOLATILE_OMIT_FP_BEGIN and UNSPEC_VOLATILE_OMIT_FP_END.
14616         * config/nds32/nds32-fp-as-gp.c: New implementation of fp_as_gp
14617         optimization.
14618         * config/nds32/nds32-protos.h (nds32_naked_function_p): Declare.
14619         (make_pass_nds32_fp_as_gp): Declare.
14620         * config/nds32/nds32.c (nds32_register_passes): Add fp_as_gp as one
14621         optmization pass.
14622         (nds32_asm_function_end_prologue): Remove unused asm output.
14623         (nds32_asm_function_begin_epilogue): Remove unused asm output.
14624         (nds32_asm_file_start): Output necessary fp_as_gp information.
14625         (nds32_option_override): Adjust register usage.
14626         (nds32_expand_prologue): Consider fp_as_gp situation.
14627         (nds32_expand_prologue_v3push): Consider fp_as_gp situation.
14628         * config/nds32/nds32.md (prologue): Check fp_as_gp_p and naked_p.
14629         (epilogue): Ditto.
14630         (return): Ditto.
14631         (simple_return): Ditto.
14632         (omit_fp_begin): Output special directive for fp_as_gp.
14633         (omit_fp_end): Output special directive for fp_as_gp.
14634         * config/nds32/nds32.opt (mfp-as-gp, mno-fp-as-gp, mforce-fp-as-gp,
14635         mforbid-fp-as-gp): New options.
14637 2018-06-01  Mark Wielaard  <mark@klomp.org>
14639         * dwarf2out.c (dwarf2out_finish): Remove generation of
14640         DW_AT_loclists_base.
14642 2018-06-01  Eric Botcazou  <ebotcazou@adacore.com>
14644         * gimple-ssa-store-merging.c: Include gimple-fold.h.
14645         (struct store_immediate_info): Document BIT_INSERT_EXPR stores.
14646         (struct merged_store_group): Add bit_insertion field.
14647         (dump_char_array): Use standard hexadecimal format.
14648         (merged_store_group::merged_store_group): Set bit_insertion to false.
14649         (merged_store_group::apply_stores): Use optimal buffer size.  Deal
14650         with BIT_INSERT_EXPR stores.  Move up code updating the mask and
14651         also print the mask in the dump file.
14652         (pass_store_merging::gate): Minor tweak.
14653         (imm_store_chain_info::coalesce_immediate): Fix wrong association
14654         of stores with groups in dump.  Allow coalescing of BIT_INSERT_EXPR
14655         stores with INTEGER_CST stores.
14656         (count_multiple_uses) <BIT_INSERT_EXPR>: New case.
14657         (imm_store_chain_info::output_merged_store): Add try_bitpos variable
14658         and use it throughout.  Generate bit insertion sequences if need be.
14659         (pass_store_merging::process_store): Remove redundant condition.
14660         Record stores from a SSA name to a bit-field with BIT_INSERT_EXPR.
14662 2018-06-01  Segher Boessenkool  <segher@kernel.crashing.org>
14664         * config/rs6000/rs6000.c (rs6000_mangle_type): Change the mangling of
14665         the 128-bit floating point types.  Fix function comment.
14667 2018-06-01  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
14669         * config/aarch64/aarch64-simd.md
14670         (aarch64_simd_vec_unpack<su>_lo_<mode>): Use UXTL and SXTL assembler
14671         mnemonics.
14672         (aarch64_simd_vec_unpack<su>_hi_<mode>): Use UXTL2 and SXTL2 assembler
14673         mnemonics.
14675 2018-06-01  Richard Sandiford  <richard.sandiford@linaro.org>
14677         PR tree-optimization/85989
14678         * gimple-ssa-backprop.c (backprop::m_visited_phis): New member
14679         variable.
14680         (backprop::intersect_uses): Check it when deciding whether this
14681         is a backedge reference.
14682         (backprop::process_block): Add each phi to m_visited_phis
14683         after visiting it, then clear it at the end.
14685 2018-06-01  Richard Biener  <rguenther@suse.de>
14687         * tree-vectorizer.h (vect_dr_stmt): New function.
14688         (vect_get_load_cost): Adjust.
14689         (vect_get_store_cost): Likewise.
14690         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
14691         Use vect_dr_stmt instead of DR_SMTT.
14692         (vect_record_base_alignments): Likewise.
14693         (vect_calculate_target_alignment): Likewise.
14694         (vect_compute_data_ref_alignment): Likewise and make static.
14695         (vect_update_misalignment_for_peel): Likewise.
14696         (vect_verify_datarefs_alignment): Likewise.
14697         (vector_alignment_reachable_p): Likewise.
14698         (vect_get_data_access_cost): Likewise.  Pass down
14699         vinfo to vect_get_load_cost/vect_get_store_cost instead of DR.
14700         (vect_get_peeling_costs_all_drs): Likewise.
14701         (vect_peeling_hash_get_lowest_cost): Likewise.
14702         (vect_enhance_data_refs_alignment): Likewise.
14703         (vect_find_same_alignment_drs): Likewise.
14704         (vect_analyze_data_refs_alignment): Likewise.
14705         (vect_analyze_group_access_1): Likewise.
14706         (vect_analyze_group_access): Likewise.
14707         (vect_analyze_data_ref_access): Likewise.
14708         (vect_analyze_data_ref_accesses): Likewise.
14709         (vect_vfa_segment_size): Likewise.
14710         (vect_small_gap_p): Likewise.
14711         (vectorizable_with_step_bound_p): Likewise.
14712         (vect_prune_runtime_alias_test_list): Likewise.
14713         (vect_analyze_data_refs): Likewise.
14714         (vect_supportable_dr_alignment): Likewise.
14715         * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
14716         (vect_gen_prolog_loop_niters): Likewise.
14717         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
14718         * tree-vect-patterns.c (vect_recog_bool_pattern): Do not
14719         modify DR_STMT.
14720         (vect_recog_mask_conversion_pattern): Likewise.
14721         (vect_try_gather_scatter_pattern): Likewise.
14722         * tree-vect-stmts.c (vect_model_store_cost): Pass stmt_info
14723         to vect_get_store_cost.
14724         (vect_get_store_cost): Get stmt_info instead of DR.
14725         (vect_model_load_cost): Pass stmt_info to vect_get_load_cost.
14726         (vect_get_load_cost): Get stmt_info instead of DR.
14728 2018-06-01  Richard Biener  <rguenther@suse.de>
14730         PR middle-end/86017
14731         * gimple-fold.c (var_decl_component_p): Also allow offsetted
14732         vars wrapped in MEM_REFs.
14734 2018-06-01  Richard Sandiford  <richard.sandiford@linaro.org>
14736         * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
14737         Fix subreg tests so that we only return a choice between
14738         GENERAL_REGS and FP_REGS if the original classes included both.
14740 2018-06-01  Richard Biener  <rguenther@suse.de>
14742         PR ipa/85960
14743         * tree-ssa-structalias.c (get_function_part_constraint):
14744         Handle NULL fi->decl.
14745         (find_func_aliases_for_call): Properly handle indirect
14746         fi from direct call.
14747         (find_func_clobbers): Likewise.
14748         (ipa_pta_execute): Likewise.
14749         (create_variable_info_for): For functions that are ifunc_resolver
14750         resolve to a varinfo that contains the result of the resolver call.
14751         (associate_varinfo_to_alias): Do not treat ifunc resolvers as
14752         aliases.
14754 2018-05-31  Michael Collison  <michael.collison@arm.com>
14756         * config/aarch64/aarch64.md:
14757         (*fix_to_zero_extenddfdi2): New pattern.
14758         * gcc.target/aarch64/fix_extend1.c: New testcase.
14760 2018-05-31  Qing Zhao <qing.zhao@oracle.com>
14762         PR middle-end/78809
14763         PR middle-end/83026
14764         * builtins.c (expand_builtin): Add the handling of BUILT_IN_STRCMP_EQ
14765         and BUILT_IN_STRNCMP_EQ.
14766         * builtins.def: Add new builtins BUILT_IN_STRCMP_EQ and
14767         BUILT_IN_STRNCMP_EQ.
14768         * gimple-fold.c (gimple_fold_builtin_string_compare): Add the
14769         handling of BUILTIN_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
14770         (gimple_fold_builtin): Likewise.
14771         * tree-ssa-strlen.c (compute_string_length): New function.
14772         (determine_min_obsize): New function.
14773         (handle_builtin_string_cmp): New function to handle calls to
14774         string compare functions.
14775         (strlen_optimize_stmt): Add handling to builtin string compare
14776         calls.
14777         * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
14778         Add the handling of BUILT_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
14779         * tree.c (build_common_builtin_nodes): Add new defines of
14780         BUILT_IN_STRNCMP_EQ and BUILT_IN_STRCMP_EQ.
14782 2018-05-31  Jakub Jelinek  <jakub@redhat.com>
14784         PR target/85984
14785         * bb-reorder.c (pass_partition_blocks::gate): Return false for
14786         functions with naked attribute.
14788 2018-05-31  Uros Bizjak  <ubizjak@gmail.com>
14790         * config/i386/sse.md (avx_vec_concat<mode>):
14791         Substitute concat_tg_mode mode attribute with xtg_mode.
14792         (<mask_codefor>avx512dq_broadcast<mode><mask_name>_1): Ditto.
14793         (concat_tg_mode): Remove mode attribute.
14795 2018-05-31  Martin Sebor  <msebor@redhat.com>
14797         PR c/82063
14798         * calls.c (alloc_max_size): Correct a logic error/typo.
14799         Treat excessive arguments as infinite.  Warn for invalid arguments.
14800         * doc/invoke.texi (-Walloc-size-larger-than): Update.
14802 2018-05-31  H.J. Lu  <hongjiu.lu@intel.com>
14804         PR target/85829
14805         * config/i386/x86-tune.def: Re-enable partial_reg_dependency
14806         and movx for Haswell.
14808 2018-05-31  Chung-Lin Tang  <cltang@codesourcery.com>
14809             Cesar Philippidis  <cesar@codesourcery.com>
14811         PR middle-end/85879
14812         * gimplify.c (gimplify_adjust_omp_clauses): Add 'remove = true'
14813         when emitting error on private/firstprivate reductions.
14814         * omp-low.c (lower_omp_target): Avoid reference-type processing
14815         on pointers for firstprivate clause.
14817 2018-05-31  Sameera Deshpande <sameera.deshpande@linaro.org>
14819         * config/aarch64/aarch64-simd-builtins.def (ld1x3): New.
14820         (st1x2): Likewise.
14821         (st1x3): Likewise.
14822         * config/aarch64/aarch64-simd.md
14823         (aarch64_ld1x3<VALLDIF:mode>): New pattern.
14824         (aarch64_ld1_x3_<mode>): Likewise
14825         (aarch64_st1x2<VALLDIF:mode>): Likewise
14826         (aarch64_st1_x2_<mode>): Likewise
14827         (aarch64_st1x3<VALLDIF:mode>): Likewise
14828         (aarch64_st1_x3_<mode>): Likewise
14829         * config/aarch64/arm_neon.h (vld1_u8_x3): New function.
14830         (vld1_s8_x3): Likewise.
14831         (vld1_u16_x3): Likewise.
14832         (vld1_s16_x3): Likewise.
14833         (vld1_u32_x3): Likewise.
14834         (vld1_s32_x3): Likewise.
14835         (vld1_u64_x3): Likewise.
14836         (vld1_s64_x3): Likewise.
14837         (vld1_f16_x3): Likewise.
14838         (vld1_f32_x3): Likewise.
14839         (vld1_f64_x3): Likewise.
14840         (vld1_p8_x3): Likewise.
14841         (vld1_p16_x3): Likewise.
14842         (vld1_p64_x3): Likewise.
14843         (vld1q_u8_x3): Likewise.
14844         (vld1q_s8_x3): Likewise.
14845         (vld1q_u16_x3): Likewise.
14846         (vld1q_s16_x3): Likewise.
14847         (vld1q_u32_x3): Likewise.
14848         (vld1q_s32_x3): Likewise.
14849         (vld1q_u64_x3): Likewise.
14850         (vld1q_s64_x3): Likewise.
14851         (vld1q_f16_x3): Likewise.
14852         (vld1q_f32_x3): Likewise.
14853         (vld1q_f64_x3): Likewise.
14854         (vld1q_p8_x3): Likewise.
14855         (vld1q_p16_x3): Likewise.
14856         (vld1q_p64_x3): Likewise.
14857         (vst1_s64_x2): Likewise.
14858         (vst1_u64_x2): Likewise.
14859         (vst1_f64_x2): Likewise.
14860         (vst1_s8_x2): Likewise.
14861         (vst1_p8_x2): Likewise.
14862         (vst1_s16_x2): Likewise.
14863         (vst1_p16_x2): Likewise.
14864         (vst1_s32_x2): Likewise.
14865         (vst1_u8_x2): Likewise.
14866         (vst1_u16_x2): Likewise.
14867         (vst1_u32_x2): Likewise.
14868         (vst1_f16_x2): Likewise.
14869         (vst1_f32_x2): Likewise.
14870         (vst1_p64_x2): Likewise.
14871         (vst1q_s8_x2): Likewise.
14872         (vst1q_p8_x2): Likewise.
14873         (vst1q_s16_x2): Likewise.
14874         (vst1q_p16_x2): Likewise.
14875         (vst1q_s32_x2): Likewise.
14876         (vst1q_s64_x2): Likewise.
14877         (vst1q_u8_x2): Likewise.
14878         (vst1q_u16_x2): Likewise.
14879         (vst1q_u32_x2): Likewise.
14880         (vst1q_u64_x2): Likewise.
14881         (vst1q_f16_x2): Likewise.
14882         (vst1q_f32_x2): Likewise.
14883         (vst1q_f64_x2): Likewise.
14884         (vst1q_p64_x2): Likewise.
14885         (vst1_s64_x3): Likewise.
14886         (vst1_u64_x3): Likewise.
14887         (vst1_f64_x3): Likewise.
14888         (vst1_s8_x3): Likewise.
14889         (vst1_p8_x3): Likewise.
14890         (vst1_s16_x3): Likewise.
14891         (vst1_p16_x3): Likewise.
14892         (vst1_s32_x3): Likewise.
14893         (vst1_u8_x3): Likewise.
14894         (vst1_u16_x3): Likewise.
14895         (vst1_u32_x3): Likewise.
14896         (vst1_f16_x3): Likewise.
14897         (vst1_f32_x3): Likewise.
14898         (vst1_p64_x3): Likewise.
14899         (vst1q_s8_x3): Likewise.
14900         (vst1q_p8_x3): Likewise.
14901         (vst1q_s16_x3): Likewise.
14902         (vst1q_p16_x3): Likewise.
14903         (vst1q_s32_x3): Likewise.
14904         (vst1q_s64_x3): Likewise.
14905         (vst1q_u8_x3): Likewise.
14906         (vst1q_u16_x3): Likewise.
14907         (vst1q_u32_x3): Likewise.
14908         (vst1q_u64_x3): Likewise.
14909         (vst1q_f16_x3): Likewise.
14910         (vst1q_f32_x3): Likewise.
14911         (vst1q_f64_x3): Likewise.
14912         (vst1q_p64_x3): Likewise.
14914 2018-05-30  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
14916         * config/msp430/msp430.c (msp430_output_labelref): Prepend
14917         user_label_prefix to name.
14919         * tree-core.h: Update comment about the format of NAME string
14920         passed to handler in attribute_spec.
14922         * config/msp430/msp430.md: Remove erroneous subreg expression from
14923         zero_extendqisi2 insn pattern. Remove msp430x ISA restriction on
14924         zero_extend{q,h}isi2.
14926 2018-05-30  Borislav Petkov  <bp@suse.de>
14928         * doc/extend.texi: Document some architecture specific
14929         constraints and sort entries.
14931 2018-05-30  Martin Sebor  <msebor@redhat.com>
14933         PR middle-end/85369
14934         * builtins.c (expand_builtin_stpcpy_1): New function.
14935         (expand_builtin_stpcpy): Call it, and call maybe_warn_nonstring_arg
14936         only if the former succeeds.
14938 2018-05-31  Sameera Deshpande <sameera.deshpande@linaro.org>
14940         * config/aarch64/aarch64-cores.def (saphira) : Add support for ARMv8.4
14941         in saphira.
14943 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
14945         * doc/invoke.texi (-flinker-output): Document
14947 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
14949         * passes.c (ipa_write_summaries): Only modify statements if body
14950         is in memory.
14951         * cgraphunit.c (ipa_passes): Also produce intermeidate code when
14952         incrementally linking.
14953         (ipa_passes): Likewise.
14954         * lto-cgraph.c (lto_output_node): When incrementally linking do not
14955         pass down resolution info.
14956         * common.opt (flag_incremental_link): Update info.
14957         * gcc.c (plugin specs): Turn flinker-output=* to
14958         -plugin-opt=-linker-output-known
14959         * toplev.c (compile_file): Also cut compilation when doing incremental
14960         link.
14961         * flag-types. (enum lto_partition_model): Add
14962         LTO_LINKER_OUTPUT_NOLTOREL.
14963         (invoke.texi): Add -flinker-output docs.
14964         * ipa.c (symbol_table::remove_unreachable_nodes): Handle LTO incremental
14965         link same way as WPA; do not stream in dead initializers.
14967         * dwarf2out.c (dwarf2out_die_ref_for_decl,
14968         darf2out_register_external_decl): Support incremental link.
14970 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
14972         * lto-opts.c (lto_write_options): Skip OPT_dumpdir, OPT_fresolution_.
14974 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
14976         * lto-wrapper.c (debug_objcopy): Add rename parameter; pass
14977         it down to simple_object_copy_lto_debug_sections.
14978         (run_gcc): Determine incremental LTO link time and configure
14979         lto1 into non-wpa mode, disable renaming of debug sections.
14981 2018-05-30  Kelvin Nilsen  <kelvin@gcc.gnu.org>
14983         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
14984         descriptions of various incorrectly documented functions.
14986 2018-05-30  Andre Vieira  <andre.simoesdiasvieira@arm.com>
14988         Revert:
14989         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
14990         address check not strict.
14992 2018-05-30  Richard Biener  <rguenther@suse.de>
14994         PR tree-optimization/85964
14995         * tracer.c (better_p): Drop initialized count check, we only
14996         call the function with initialized counts now.
14997         (find_best_successor): Do find a best edge if one
14998         has uninitialized count.
14999         (find_best_predecessor): Likewise.  Do BB frequency check only
15000         if count is initialized.
15002 2017-05-30  Jackson Woodruff  <jackson.woodruff@arm.com>
15004         * config/aarch64/aarch64.c (aarch64_host_wide_int_compare): New.
15005         (aarch64_ldrstr_offset_compare): New.
15006         (aarch64_operands_adjust_ok_for_ldpstp): Update to consider all
15007         load/store orderings.
15008         (aarch64_gen_adjusted_ldpstp): Likewise.
15010 2018-05-30  Wilco Dijkstra  <wdijkstr@arm.com>
15012         * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
15013         Check for subset of GENERAL_REGS and FP_REGS.
15014         * config/aarch64/aarch64-simd.md (aarch64_get_lane): Increase cost of
15015         r=w alternative.
15017 2018-05-30  Richard Sandiford  <richard.sandiford@linaro.org>
15019         * alias.c (adjust_offset_for_component_ref): Use poly_int_tree_p
15020         and wi::to_poly_offset.  Add the current offset and then check
15021         whether the sum fits, rather than using an unchecked addition of
15022         a checked term.  Check for a shwi rather than a uhwi.
15023         * expr.c (get_bit_range): Use tree_to_poly_uint64.
15024         (store_constructor): Use poly_int_tree_p.
15025         (expand_expr_real_1): Likewise.
15026         * function.c (assign_temp): Likewise.
15027         * fold-const.c (const_binop): Use poly_int_tree_p and
15028         wi::to_poly_offset.
15029         (fold_indirect_ref_1): Likewise.  Use multiple_p to attempt an exact
15030         division.
15031         * ipa-icf-gimple.c (func_checker::compare_operand): Use
15032         to_poly_offset for MEM offsets.
15033         * ipa-icf.c (sem_variable::equals): Likewise.
15034         * stor-layout.c (compute_record_mode): Use poly_int_tree_p.
15035         * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use
15036         wi::to_poly_offset for BIT_FIELD_REF offsets.
15037         (vn_reference_maybe_forwprop_address): Use poly_int_tree_p and
15038         wi::to_poly_offset.
15039         * var-tracking.c (emit_note_insn_var_location): Use
15040         tree_to_poly_uint64.
15042 2018-05-29  Jim Wilson  <jimw@sifive.com>
15044         * config/riscv/riscv.c (riscv_interrupt_type): Fix comment typo.
15046 2018-05-29  Uros Bizjak  <ubizjak@gmail.com>
15048         PR target/85950
15049         * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
15050         Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
15051         sequence.
15052         (sse4_1_round<mode>2): Use nonimmediate_operand
15053         for operand 1 predicate.
15055 2018-05-29  Martin Sebor  <msebor@redhat.com>
15056             Richard Biener  <rguenther@suse.de>
15058         PR testsuite/85888
15059         * calls.c (get_size_range): Call determine_value_range instead
15060         of get_value_range..
15061         * tree-vrp.h (determine_value_range): Declared new function.
15062         * tree-vrp.c (determine_value_range_1, determine_value_range): New.
15064 2018-05-29  Richard Biener  <rguenther@suse.de>
15066         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Make
15067         sure to use non-pattern stmts for get_earlier_stmt arguments.
15068         * tree-vectorizer.h (get_earlier_stmt): Assert we do not get
15069         called on pattern stmts.
15070         (get_later_stmt): Likewise.
15072 2018-05-29  Martin Liska  <mliska@suse.cz>
15074         PR gcov-profile/85759
15075         * doc/gcov.texi: Document GCOV_ERROR_FILE and GCOV_EXIT_AT_ERROR
15076         env variables.
15078 2018-05-29  Jakub Jelinek  <jakub@redhat.com>
15080         * tree-cfg.c (verify_gimple_assign_unary): Add checking for
15081         VEC_UNPACK_*_EXPR.
15082         (verify_gimple_assign_binary): Check TYPE_VECTOR_SUBPARTS for
15083         VEC_PACK_*_EXPR.
15085         PR target/85918
15086         * tree.def (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
15087         VEC_PACK_FLOAT_EXPR): New tree codes.
15088         * tree-pretty-print.c (op_code_prio): Handle
15089         VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR.
15090         (dump_generic_node): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
15091         VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
15092         * tree-inline.c (estimate_operator_cost): Likewise.
15093         * gimple-pretty-print.c (dump_binary_rhs): Handle VEC_PACK_FLOAT_EXPR.
15094         * fold-const.c (const_binop): Likewise.
15095         (const_unop): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR and
15096         VEC_UNPACK_FIX_TRUNC_LO_EXPR.
15097         * tree-cfg.c (verify_gimple_assign_unary): Likewise.
15098         (verify_gimple_assign_binary): Handle VEC_PACK_FLOAT_EXPR.
15099         * cfgexpand.c (expand_debug_expr): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
15100         VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
15101         * expr.c (expand_expr_real_2): Likewise.
15102         * optabs.def (vec_packs_float_optab, vec_packu_float_optab,
15103         vec_unpack_sfix_trunc_hi_optab, vec_unpack_sfix_trunc_lo_optab,
15104         vec_unpack_ufix_trunc_hi_optab, vec_unpack_ufix_trunc_lo_optab): New
15105         optabs.
15106         * optabs.c (expand_widen_pattern_expr): For
15107         VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR use
15108         sign from result type rather than operand's type.
15109         (expand_binop_directly): For vec_packu_float_optab and
15110         vec_packs_float_optab allow result type to be different from operand's
15111         type.
15112         * optabs-tree.c (optab_for_tree_code): Handle
15113         VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
15114         VEC_PACK_FLOAT_EXPR.  Formatting fixes.
15115         * tree-vect-generic.c (expand_vector_operations_1):  Handle
15116         VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
15117         VEC_PACK_FLOAT_EXPR.
15118         * tree-vect-stmts.c (supportable_widening_operation): Handle
15119         FIX_TRUNC_EXPR.
15120         (supportable_narrowing_operation): Handle FLOAT_EXPR.
15121         * config/i386/i386.md (fixprefix, floatprefix): New code attributes.
15122         * config/i386/sse.md (*float<floatunssuffix>v2div2sf2): Rename to ...
15123         (float<floatunssuffix>v2div2sf2): ... this.  Formatting fix.
15124         (vpckfloat_concat_mode, vpckfloat_temp_mode, vpckfloat_op_mode): New
15125         mode attributes.
15126         (vec_pack<floatprefix>_float_<mode>): New expander.
15127         (vunpckfixt_mode, vunpckfixt_model, vunpckfixt_extract_mode): New mode
15128         attributes.
15129         (vec_unpack_<fixprefix>fix_trunc_lo_<mode>,
15130         vec_unpack_<fixprefix>fix_trunc_hi_<mode>): New expanders.
15131         * doc/md.texi (vec_packs_float_@var{m}, vec_packu_float_@var{m},
15132         vec_unpack_sfix_trunc_hi_@var{m}, vec_unpack_sfix_trunc_lo_@var{m},
15133         vec_unpack_ufix_trunc_hi_@var{m}, vec_unpack_ufix_trunc_lo_@var{m}):
15134         Document.
15135         * doc/generic.texi (VEC_UNPACK_FLOAT_HI_EXPR,
15136         VEC_UNPACK_FLOAT_LO_EXPR): Fix pasto in description.
15137         (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
15138         VEC_PACK_FLOAT_EXPR): Document.
15140 2018-05-29  Richard Biener  <rguenther@suse.de>
15142         * tree-vectorizer.h (struct vec_info): Add stmt_vec_infos
15143         member.
15144         (stmt_vec_info_vec): Make pointer.
15145         (init_stmt_vec_info_vec): Remove.
15146         (free_stmt_vec_info_vec): Likewise.
15147         (set_stmt_vec_info_vec): New function.
15148         (free_stmt_vec_infos): Likewise.
15149         (vinfo_for_stmt): Adjust for stmt_vec_info_vec indirection.
15150         (set_vinfo_for_stmt): Likewise.
15151         (get_earlier_stmt): Likewise.
15152         (get_later_stmt): Likewise.
15153         * tree-vectorizer.c (stmt_vec_info_vec): Make pointer.
15154         (vec_info::vec_info): Allocate stmt_vec_infos and set the global.
15155         (vec_info::~vec_info): Free stmt_vec_infos.
15156         (vectorize_loops): Set the global stmt_vec_info_vec to NULL.
15157         Remove old init_stmt_vec_info_vec/free_stmt_vec_info_vec calls.
15158         (pass_slp_vectorize::execute): Likewise.
15159         * tree-vect-stmts.c (init_stmt_vec_info_vec): Remove.
15160         (free_stmt_vec_info_vec): Likewise.
15161         (set_stmt_vec_info_vec): New function.
15162         (free_stmt_vec_infos): Likewise.
15163         * tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Set
15164         the global stmt_vec_info_vec.
15165         * tree-parloops.c (gather_scalar_reductions): Use
15166         set_stmt_vec_info_vec/free_stmt_vec_infos and maintain a local
15167         vector.
15169 2018-05-29  Richard Biener  <rguenther@suse.de>
15171         * dominance.c (iterate_fix_dominators): Push/pop TV_DOMINANCE.
15173 2018-05-29  Martin Liska  <mliska@suse.cz>
15174             David Malcolm  <dmalcolm@redhat.com>
15176         * vec.c (test_reverse): New.
15177         (vec_c_tests): Add new test.
15178         * vec.h (vl_ptr>::reverse): New function.
15180 2018-05-29  Gerald Pfeifer  <gerald@pfeifer.com>
15182         * config.gcc: Identify FreeBSD 3.x and 4.x as unsupported.
15184         * config/freebsd-spec.h (FBSD_LIB_SPEC): Only consider FreeBSD 5
15185         and later.
15187 2018-05-28  Bernd Edlinger  <bernd.edlinger@hotmail.de>
15189         * tree-dump.c (dump_node): Use splay_tree_delete_pointers.
15191 2018-05-28  Richard Biener  <rguenther@suse.de>
15193         PR tree-optimization/85933
15194         * tree-vect-data-refs.c (vect_record_base_alignments): Only
15195         look at stmts marked as vectorizable.
15197 2018-05-28  Richard Biener  <rguenther@suse.de>
15199         PR tree-optimization/85934
15200         * tree-vect-generic.c (expand_vector_operations_1): Hoist
15201         vector boolean check before scalar optimization.
15203 2018-05-28  Jakub Jelinek  <jakub@redhat.com>
15205         * doc/invoke.texi (ARM Options): Use @item instead of @itemx
15206         for armv5te.
15208 2018-05-28  Mark Wielaard  <mark@klomp.org>
15210         * dwarf2asm.c (dw2_asm_output_delta_uleb128): Add brackets around lab2
15211         if it is an expression containing a minus sign.
15213 2018-05-27  John David Anglin  <danglin@gcc.gnu.org>
15215         * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
15217 2018-05-27  Paul Koning  <ni1d@arrl.net>
15219         * config/pdp11/pdp11.md (truncsihi2): Remove.
15221 2018-05-27  Monk Chiang  <sh.chiang04@gmail.com>
15222             Chung-Ju Wu  <jasonwucj@gmail.com>
15224         * config/nds32/nds32-intrinsic.md (unaligned_storedi): Modify patterns
15225         implementation.
15226         (unaligned_store_dw): Ditto.
15227         * config/nds32/nds32-memory-manipulation.c
15228         (nds32_expand_movmemsi_loop_known_size): Refactoring implementation.
15229         (nds32_gen_dup_4_byte_to_word_value): Rename to ...
15230         (nds32_gen_dup_4_byte_to_word_value_aux): ... this.
15231         (emit_setmem_word_loop): Rename to ...
15232         (emit_setmem_doubleword_loop): ... this.
15233         (nds32_gen_dup_4_byte_to_word_value): New function.
15234         (nds32_gen_dup_8_byte_to_double_word_value): New function.
15235         (nds32_expand_setmem_loop): Refine implementation.
15236         (nds32_expand_setmem_loop_v3m): Ditto.
15237         * config/nds32/nds32-multiple.md (unaligned_store_update_base_dw): New
15238         pattern.
15240 2018-05-27  Chung-Ju Wu  <jasonwucj@gmail.com>
15242         * config/nds32/nds32.md (bswapsi2, bswaphi2): New patterns.
15244 2018-05-27  Chung-Ju Wu  <jasonwucj@gmail.com>
15246         * config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
15247         (nds32_init_machine_status): Initialize machine->attr_naked_p and
15248         machine->attr_no_prologue_p.
15249         (nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
15250         (nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
15251         (nds32_expand_epilogue): Consider attr_naked_p.
15252         (nds32_expand_epilogue_v3pop): Likewise.
15253         (nds32_can_use_return_insn): Likewise.
15254         * config/nds32/nds32.h (machine_function): Add attr_naked_p and
15255         attr_no_prologue_p fields.
15256         * config/nds32/nds32.opt (mret-in-naked-func): New option.
15258 2018-05-27  Jakub Jelinek  <jakub@redhat.com>
15260         PR target/85918
15261         * config/i386/i386.md (fixunssuffix, floatunssuffix): New code
15262         attributes.
15263         * config/i386/sse.md
15264         (<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>):
15265         Rename to ...
15266         (float<floatunssuffix><sseintvecmodelower><mode>2<mask_name><round_name>):
15267         ... this.
15268         (<floatsuffix>float<sselongvecmodelower><mode>2<mask_name><round_name>):
15269         Rename to ...
15270         (float<floatunssuffix><sselongvecmodelower><mode>2<mask_name><round_name>):
15271         ... this.
15272         (*<floatsuffix>floatv2div2sf2): Rename to ...
15273         (*float<floatunssuffix>v2div2sf2): ... this.
15274         (<floatsuffix>floatv2div2sf2_mask): Rename to ...
15275         (float<floatunssuffix>v2div2sf2_mask): ... this.
15276         (*<floatsuffix>floatv2div2sf2_mask_1): Rename to ...
15277         (*float<floatunssuffix>v2div2sf2_mask_1): ... this.
15278         (<fixsuffix>fix_truncv8dfv8si2<mask_name><round_saeonly_name>): Rename
15279         to ...
15280         (fix<fixunssuffix>_truncv8dfv8si2<mask_name><round_saeonly_name>):
15281         ... this.
15282         (<fixsuffix>fix_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
15283         Rename to ...
15284         (fix<fixunssuffix>_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
15285         ... this.
15286         (<fixsuffix>fix_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
15287         Rename to ...
15288         (fix<fixunssuffix>_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
15289         ... this.
15290         (<fixsuffix>fix_truncv2sfv2di2<mask_name>): Rename to ...
15291         (fix<fixunssuffix>_truncv2sfv2di2<mask_name>): ... this.
15292         (vec_pack_ufix_trunc_<mode>): Use gen_fixuns_truncv8dfv8si2 instead of
15293         gen_ufix_truncv8dfv8si2.
15294         * config/i386/i386-builtin.def (__builtin_ia32_cvttpd2uqq256_mask,
15295         __builtin_ia32_cvttpd2uqq128_mask, __builtin_ia32_cvttps2uqq256_mask,
15296         __builtin_ia32_cvttps2uqq128_mask, __builtin_ia32_cvtuqq2ps256_mask,
15297         __builtin_ia32_cvtuqq2ps128_mask, __builtin_ia32_cvtuqq2pd256_mask,
15298         __builtin_ia32_cvtuqq2pd128_mask, __builtin_ia32_cvttpd2udq512_mask,
15299         __builtin_ia32_cvtuqq2ps512_mask, __builtin_ia32_cvtuqq2pd512_mask,
15300         __builtin_ia32_cvttps2uqq512_mask, __builtin_ia32_cvttpd2uqq512_mask):
15301         Use fixuns instead ufix or floatuns instead ufloat in CODE_FOR_ names.
15303 2018-05-24  H.J. Lu  <hongjiu.lu@intel.com>
15305         PR target/85900
15306         PR target/85345
15307         * varasm.c (assemble_alias): Lookup ifunc attribute on error.
15309 2018-05-25  Jim Wilson  <jimw@sifive.com>
15311         * config/riscv/riscv-protos.h (riscv_epilogue_uses): New.
15312         * config/riscv/riscv.c (struct machine_function): Add
15313         interrupt_handler_p and attribute_checked_p fields.
15314         (riscv_attribute_table): Add interrupt.
15315         (riscv_interrupt_type_p): New.
15316         (riscv_save_reg_p): Save extra regs for interrupt handler.
15317         (riscv_use_save_libcall): Return false  for interrupt handler.
15318         (riscv_first_stack_step): Add forward declaration.
15319         (riscv_compute_frame_info): New local interrupt_save_t1.  Set it
15320         for interrupt handler with large frame.  Use it for saved reg list.
15321         (riscv_expand_prologue): Move flag_stack_usage_info support to
15322         eliminate duplication.
15323         (riscv_expand_epilogue): Generate mret for interrupt handler.
15324         (riscv_epilogue_uses): New.
15325         (riscv_can_use_return_insn): Return false for interrupt handler.
15326         (riscv_function_ok_for_sibcall): Likewise.
15327         (riscv_set_current_function): Add interrupt handler support.
15328         * config/riscv/riscv.h (EPILOGUE_USES): Call riscv_epilogue_uses.
15329         * config/riscv/riscv.md (UNSPECV_MRET): New.
15330         (GP_REGNUM): New.
15331         (riscv_frflags, riscv_fsflags): Use tab after opcode.
15332         (riscv_mret): New.
15333         * doc/extend.texi (RISC-V Function Attributes) <interrupt>: New.
15335 2018-05-25  Bill Schmidt  <wschmidt@linux.ibm.com>
15337         PR tree-optimization/85712
15338         * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
15339         this candidate has already been replaced in-situ by a copy.
15341 2018-05-25  Jason Merrill  <jason@redhat.com>
15343         PR c++/80485 - inline function non-zero address.
15344         * symtab.c (nonzero_address): Check DECL_COMDAT.
15346 2018-05-25  Uros Bizjak  <ubizjak@gmail.com>
15348         PR target/83628
15349         * config/alpha/alpha.md (ashlsi3): New insn pattern.
15350         (*ashlsi_se): Rename from *ashldi_se.  Define as sign
15351         extension of SImode operation.  Use const123_operand predicate.
15352         (*saddsi_1): Remove.
15353         (*saddl_se_1): Ditto.
15354         (*ssubsi_1): Ditto.
15355         (*ssubl_se_1): Ditto.
15356         * config/alpha/predicates.md (const123_operand): New predicate.
15357         * config/alpha/constraints.md (P): Use IN_RANGE.
15359 2018-05-25  Richard Biener  <rguenther@suse.de>
15361         * tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
15362         defaulted to true.
15363         (ref_maybe_used_by_stmt_p): Likewise.
15364         (stmt_may_clobber_ref_p): Likewise.
15365         (stmt_may_clobber_ref_p_1): Likewise.
15366         * tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
15367         and pass it along.
15368         (ref_maybe_used_by_stmt_p): Likewise.
15369         (stmt_may_clobber_ref_p): Likewise.
15370         (stmt_may_clobber_ref_p_1): Likewise.
15371         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
15372         the alias oracle to disambiguate DRs with stmts DR analysis
15373         couldn't handle.
15374         (vect_analyze_data_refs): Do not give up on not analyzable
15375         DRs for BB vectorization.  Remove code truncating the dataref
15376         vector.
15378 2018-05-25  Jakub Jelinek  <jakub@redhat.com>
15380         PR target/85832
15381         * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
15382         Add (=Yk,v,C) variant using vptestm insn.  Use TARGET_AVX512BW
15383         in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
15385 2018-05-25  Richard Biener  <rguenther@suse.de>
15387         * tree-vect-data-refs.c (vect_find_stmt_data_reference): New
15388         function, combining stmt data ref gathering and fatal analysis
15389         parts.
15390         (vect_analyze_data_refs): Remove now redudnant code and simplify.
15391         * tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
15392         vect_analyze_loop_2 and use vect_find_stmt_data_reference.
15393         * tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
15394         * tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
15396 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
15398         PR tree-optimization/85720
15399         * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
15400         SCC if all partitions are builtins.
15401         (version_loop_by_alias_check): New parameter.  Generate cancelable
15402         runtime alias check if all partitions are builtins.
15403         (distribute_loop): Update call to above function.
15405 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
15407         * tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
15408         (create_default_def, for_all_parms): Moved from tree-ssa-coalesce.c.
15409         (parm_default_def_partition_arg): Ditto.
15410         (set_parm_default_def_partition): Ditto.
15411         (get_parm_default_def_partitions): Ditto and make it static.
15412         (get_undefined_value_partitions): Ditto and make it static.
15413         (remove_ssa_form): Refactor call to init_var_map here.
15414         * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
15415         computation for loop region.
15416         (coalesce_partitions, compute_optimized_partition_bases): Ditto.
15417         (register_default_def): Delete.
15418         (for_all_parms, create_default_def): Move to tree-outof-ssa.c.
15419         (parm_default_def_partition_arg): Ditto.
15420         (set_parm_default_def_partition): Ditto.
15421         (get_parm_default_def_partitions): Ditto and make it static.
15422         (get_undefined_value_partitions): Ditto and make it static.
15423         (coalesce_with_default, coalesce_with_default): Update comment.
15424         (create_coalesce_list_for_region): New func factored out from
15425         create_outofssa_var_map.
15426         (populate_coalesce_list_for_outofssa): New func factored out from
15427         create_outofssa_var_map and coalesce_ssa_name.
15428         (create_outofssa_var_map): Delete.
15429         (coalesce_ssa_name): Refactor to support live range computation.
15430         * tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
15431         (get_parm_default_def_partitions): Delete.
15432         (get_undefined_value_partitions): Ditto.
15433         * tree-ssa-live.c (init_var_map, delete_var_map): Support live range
15434         computation for loop region.
15435         (new_tree_live_info, loe_visit_block): Ditto.
15436         (live_worklist, set_var_live_on_entry): Ditto.
15437         (calculate_live_on_exit, verify_live_on_entry): Ditto.
15438         * tree-ssa-live.h (struct _var_map): New fields.
15439         (init_var_map): Change decl.
15440         (region_contains_p): New.
15442 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
15444         * tree-ssa-live.h (live_merge_and_clear): Delete.
15446 2018-05-25  Richard Biener  <rguenther@suse.de>
15448         PR c++/85912
15449         * tree-dump.c (dequeue_and_dump): Remove access to removed
15450         operand 2 of a SWITCH_EXPR.
15452 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
15454         * doc/sourcebuild.texi (vect_double_cond_arith): Include
15455         multiplication and division.
15456         * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
15457         (cond_udiv@var{m}, cond_umod@var{m}): Document.
15458         * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
15459         (cond_udiv_optab, cond_umod_optab): New optabs.
15460         * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
15461         (IFN_COND_RDIV): New internal functions.
15462         * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
15463         TRUNC_MOD_EXPR and RDIV_EXPR.
15464         * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
15465         * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
15466         New unspecs.
15467         (SVE_INT_BINARY): Include mult.
15468         (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
15469         (optab, sve_int_op): Handle mult.
15470         (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
15471         UNSPEC_COND_DIV.
15472         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
15473         for SVE_INT_BINARY_SD.
15475 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
15477         * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
15478         (optab, sve_int_op): Handle div and udiv.
15479         * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
15480         for SVE_INT_BINARY_SD.
15481         (*<optab><mode>3): New insn for the same.
15483 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
15485         * tree-vect-patterns.c: Include predict.h.
15486         (vect_recog_divmod_pattern): Restrict check for division support
15487         to when optimizing for size.
15489 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
15491         * doc/sourcebuild.texi (vect_double_cond_arith: Document.
15492         * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
15493         (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
15494         (gimple_match_op::set_op): Likewise.
15495         (gimple_resimplify4): Declare.
15496         * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
15497         (expr::gen_transform): Likewise.
15498         (decision_tree::gen): Generate a simplification routine for 4 operands.
15499         * gimple-match-head.c (gimple_simplify): Add an overload for
15500         4 operands.  In the top-level function, handle up to 4 call
15501         arguments and call gimple_resimplify4.
15502         (gimple_resimplify4): New function.
15503         (build_call_internal): Pass a fourth operand.
15504         (maybe_push_to_seq): Likewise.
15505         * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
15506         Fold VEC_COND_EXPRs of an operation and a default value into
15507         an IFN_COND_* function if possible.
15508         * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
15509         New unspecs.
15510         (SVE_COND_FP_BINARY): Include them.
15511         (optab, sve_fp_op): Handle them.
15512         (SVE_INT_BINARY_REV): New code iterator.
15513         (SVE_COND_FP_BINARY_REV): New int iterator.
15514         (commutative): New int attribute.
15515         * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
15516         Declare.
15517         * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
15518         function.
15519         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
15520         (*cond_<optab><mode>): New patterns for reversed operands.
15522 2018-05-25  Richard Biener  <rguenther@suse.de>
15524         * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
15525         (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
15526         (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
15527         (STMT_VINFO_GROUPED_ACCESS): Adjust.
15528         * tree-vect-data-refs.c (everywhere): Adjust users.
15529         * tree-vect-loop.c (everywhere): Likewise.
15530         * tree-vect-slp.c (everywhere): Likewise.
15531         * tree-vect-stmts.c (everywhere): Likewise.
15532         * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
15534 2018-05-25  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
15536         * configure.ac (gcc_cv_as_section_has_e): Move to common section.
15537         Rename to...
15538         (gcc_cv_as_section_exclude): ... this.
15539         Try Solaris as #exclude syntax.
15540         * configure: Regenerate.
15541         * config.in: Regenerate.
15542         * config/i386/i386.c (i386_solaris_elf_named_section): Handle
15543         SECTION_EXCLUDE.
15544         * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
15545         [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
15547         * varasm.c (default_elf_asm_named_section): Don't check if
15548         HAVE_GAS_SECTION_EXCLUDE is defined.
15550 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
15552         * doc/md.texi: Update the documentation of the cond_* optabs
15553         to mention the new final operand.  Fix GET_MODE_NUNITS call.
15554         Describe the scalar case too.
15555         * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
15556         * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
15557         instead of 2.
15558         (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
15559         (get_conditional_internal_fn): Update comment.
15560         * tree-vect-loop.c (vectorizable_reduction): Pass the original
15561         accumulator value as a final argument to conditional functions.
15562         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
15563         a define_expand and add an "else" operand.  Assert for now that
15564         the else operand is equal to operand 2.  Use SVE_INT_BINARY and
15565         SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
15566         (*cond_<optab><mode>): New patterns.
15567         * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
15568         (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
15569         (UNSPEC_COND_EOR): Delete.
15570         (optab): Remove associated mappings.
15571         (SVE_INT_BINARY): New code iterator.
15572         (sve_int_op): Remove int attribute and add "minus" to the code
15573         attribute.
15574         (SVE_COND_INT_OP): Delete.
15575         (SVE_COND_FP_OP): Rename to...
15576         (SVE_COND_FP_BINARY): ...this.
15578 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
15580         * optabs.c (can_reuse_operands_p): New function.
15581         (maybe_legitimize_operands): Try to reuse the results for
15582         earlier operands.
15584 2018-05-24  Uros Bizjak  <ubizjak@gmail.com>
15586         * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
15587         Add {q} suffix to insn mnemonic.
15589 2018-05-23  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
15591         * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
15592         (msp430_warn_func_return): New.
15594 2018-05-24  Roger Sayle  <roger@nextmovesoftware.com>
15596         * fold-const.c (tree_nonzero_bits): New function.
15597         * fold-const.h (tree_nonzero_bits): Likewise.
15598         * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
15599         friends.  POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
15601 2018-05-24  H.J. Lu  <hongjiu.lu@intel.com>
15603         PR target/85900
15604         PR target/85345
15605         * varasm.c (assemble_alias): Check ifunc_resolver only on
15606         FUNCTION_DECL.
15608 2018-05-24  Uros Bizjak  <ubizjak@gmail.com>
15610         PR target/85903
15611         * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
15612         when memory input operand is handled.
15614 2018-05-24  Luis Machado  <luis.machado@linaro.org>
15616         * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
15617         global.
15618         (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
15620 2018-05-24  Richard Sandiford  <richard.sandiford@linaro.org>
15622         * match.pd: Delay FMA folds until after vectorization.
15624 2018-05-24  Andre Vieira  <andre.simoesdiasvieira@arm.com>
15626         PR target/83009
15627         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
15628         address check not strict.
15630 2018-05-24  Richard Sandiford  <richard.sandiford@linaro.org>
15632         * gimple-match.h (gimple_match_op): New class.
15633         (mprts_hook): Replace parameters with a gimple_match_op *.
15634         (maybe_build_generic_op): Likewise.
15635         (gimple_simplified_result_is_gimple_val): Replace parameters with
15636         a const gimple_match_op *.
15637         (gimple_simplify): Replace code_helper * and tree * parameters with
15638         a gimple_match_op * parameter.
15639         (gimple_resimplify1): Replace code_helper *, tree and tree *
15640         parameters with a gimple_match_op * parameter.
15641         (gimple_resimplify2): Likewise.
15642         (gimple_resimplify3): Likewise.
15643         (maybe_push_res_to_seq): Replace code_helper, tree and tree *
15644         parameters with a gimple_match_op * parameter.
15645         * gimple-match-head.c (gimple_simplify): Change prototypes of
15646         auto-generated functions to take a gimple_match_op * instead of
15647         separate code_helper * and tree * parameters.  Make the same
15648         change in the top-level overload and update calls to the
15649         gimple_resimplify routines.  Update calls to the auto-generated
15650         functions and to maybe_push_res_to_seq in the publicly-facing
15651         operation-specific gimple_simplify overloads.
15652         (gimple_match_op::MAX_NUM_OPS): Define.
15653         (gimple_resimplify1): Replace rcode and ops with a single res_op
15654         parameter.  Update call to gimple_simplify.
15655         (gimple_resimplify2): Likewise.
15656         (gimple_resimplify3): Likewise.
15657         (mprts_hook): Replace parameters with a gimple_match_op *.
15658         (maybe_build_generic_op): Likewise.
15659         (build_call_internal): Replace type, nargs and ops with
15660         a gimple_match_op *.
15661         (maybe_push_res_to_seq): Replace res_code, type and ops parameters
15662         with a single gimple_match_op *.  Update calls to mprts_hook,
15663         build_call_internal and gimple_simplified_result_is_gimple_val.
15664         Factor out code that is common to the tree_code and combined_fn cases.
15665         * genmatch.c (expr::gen_transform): Replace tem_code and
15666         tem_ops with a gimple_match_op called tem_op.  Update calls
15667         to the gimple_resimplify functions and maybe_push_res_to_seq.
15668         (dt_simplify::gen_1): Manipulate res_op instead of res_code and
15669         res_ops.  Update call to the gimple_resimplify functions.
15670         (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
15671         (decision_tree::gen): Make the functions take a gimple_match_op *
15672         called res_op instead of separate res_code and res_ops parameters.
15673         Update call accordingly.
15674         * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
15675         and ops with a single res_op parameter.  Update calls to
15676         maybe_build_generic_op and maybe_push_res_to_seq.
15677         (fold_stmt_1): Update calls to gimple_simplify and
15678         replace_stmt_with_simplification.
15679         (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
15680         and gimple_simplified_result_is_gimple_val.
15681         * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
15682         gimple_simplify.
15683         * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
15684         with a gimple_match_op *.
15685         (vn_nary_build_or_lookup): Likewise.  Update call to
15686         vn_nary_build_or_lookup_1.
15687         (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
15688         gimple_match_op *.  Update calls to the gimple_resimplify routines
15689         and to gimple_simplified_result_is_gimple_val.
15690         (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
15691         Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
15692         (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
15693         (visit_nary_op): Likewise.
15694         (visit_reference_op_load): Likewise.
15696 2018-05-23  Luis Machado  <luis.machado@linaro.org>
15698         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
15699         modifier for printing the step amount.
15701 2018-05-23  Jozef Lawrynowicz  <jozef.l@somniumtech.com>
15703         PR target/78849
15704         * tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
15705         types.
15707 2018-05-23  Segher Boessenkool  <segher@kernel.crashing.org>
15709         * doc/sourcebuild.texi (Endianness): New subsubsection.
15711 2018-05-23  Luis Machado  <luis.machado@linaro.org>
15713         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
15714         <prefetch_dynamic_strides>: New const bool field.
15715         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
15716         prefetch_dynamic_strides.
15717         (exynosm1_prefetch_tune): Likewise.
15718         (thunderxt88_prefetch_tune): Likewise.
15719         (thunderx_prefetch_tune): Likewise.
15720         (thunderx2t99_prefetch_tune): Likewise.
15721         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
15722         false.
15723         (aarch64_override_options_internal): Update to set
15724         PARAM_PREFETCH_DYNAMIC_STRIDES.
15725         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
15726         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
15727         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
15728         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
15729         prefetch-dynamic-strides setting.
15731 2018-05-23  Luis Machado  <luis.machado@linaro.org>
15733         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
15734         <minimum_stride>: New const int field.
15735         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
15736         minimum_stride field defaulting to -1.
15737         (exynosm1_prefetch_tune): Likewise.
15738         (thunderxt88_prefetch_tune): Likewise.
15739         (thunderx_prefetch_tune): Likewise.
15740         (thunderx2t99_prefetch_tune): Likewise.
15741         (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
15742         <default_opt_level>: Set to 3.
15743         (aarch64_override_options_internal): Update to set
15744         PARAM_PREFETCH_MINIMUM_STRIDE.
15745         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
15746         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
15747         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
15748         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
15749         stride is constant and is below the minimum stride threshold.
15751 2018-05-23  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
15753         * config/arm/arm-cpus.in (mode26): Delete.
15754         (armv4): Delete mode26 reference.
15755         * config/arm/arm.c (arm_configure_build_target): Delete use of
15756         isa_bit_mode26.
15758 2018-05-23  Uros Bizjak  <ubizjak@gmail.com>
15760         * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
15761         New insn pattern.
15762         (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
15763         Rewrite expander pattern.  Emit gen_floatunssi<mode>2_i387_with_xmm
15764         for non-SSE modes.
15765         (floatunsdisf2): Rewrite expander pattern.  Hanlde TARGET_AVX512F.
15766         (floatunsdidf2): Ditto.
15768 2018-05-23  Uros Bizjak  <ubizjak@gmail.com>
15770         * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
15771         (fixuns_trunc<mode>si2_avx512f): Ditto.
15772         (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
15773         (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
15774         Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
15776 2018-05-23  Alexander Monakov  <amonakov@ispras.ru>
15778         PR rtl-optimization/79985
15779         * df-scan.c (df_insn_refs_collect): Remove special case for
15780         global registers and asm statements.
15782 2018-05-23  Alexander Monakov  <amonakov@ispras.ru>
15784         * extend.texi (Global Register Variables): Rewrite the bullet list.
15785         Note that the register is available for allocation. Note that access
15786         via inline asm must use constraints. Add note about async-signal
15787         handlers. Remove paragraph about automagic register selection.
15789 2018-05-23  Richard Biener  <rguenther@suse.de>
15791         * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
15792         of fixed offset from memset VN.
15794 2018-05-23  Bill Schmidt  <wschmidt@linux.ibm.com>
15796         * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
15797         first_interp field.
15798         (alloc_cand_and_find_basis): Initialize first_interp field.
15799         (slsr_process_mul): Modify first_interp field.
15800         (slsr_process_add): Likewise.
15801         (slsr_process_cast): Modify first_interp field for each new
15802         interpretation.
15803         (slsr_process_copy): Likewise.
15804         (dump_candidate): Dump first_interp field.
15805         (replace_mult_candidate): Process all interpretations, not just
15806         subsequent ones.
15807         (replace_rhs_if_not_dup): Likewise.
15808         (replace_one_candidate): Likewise.
15810 2018-05-23  Wilco Dijkstra  <wdijkstr@arm.com>
15812         * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
15813         Add new boolean.
15814         (aarch64_needs_frame_chain): New function.
15815         (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
15817 2018-05-23  Sudakshina Das  <sudi.das@arm.com>
15819         PR target/84882
15820         * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
15821         Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
15822         * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
15823         * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
15824         as true for strict-align.
15825         (aarch64_can_inline_p): Perform checks even when callee has no
15826         attributes to check for strict alignment.
15827         * doc/extend.texi (AArch64 Function Attributes): Document
15828         no-strict-align.
15829         * doc/invoke.texi: (AArch64 Options): Likewise.
15831 2018-05-23  Richard Sandiford  <richard.sandiford@linaro.org>
15833         PR tree-optimization/85853
15834         * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
15835         the handling of the root of the node to...
15836         (vect_slp_analyze_node_operations_1): ...this new function,
15837         and run the whole thing with the child nodes' def types
15838         set according to their SLP node's def type.
15840 2018-05-23  Richard Biener  <rguenther@suse.de>
15842         PR middle-end/85874
15843         * tree-data-ref.c (create_runtime_alias_checks): Defer
15844         and ignore overflow warnings.
15846 2018-05-23  Yury Gribov  <tetra2005@gmail.com>
15848         PR tree-optimization/85822
15849         * tree-vrp.c (is_masked_range_test): Fix handling of negative
15850         constants.
15852 2018-05-23  Richard Biener  <rguenther@suse.de>
15854         * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
15855         memset constants via native_interpret_expr.
15857 2018-05-22  H.J. Lu  <hongjiu.lu@intel.com>
15859         PR target/85345
15860         * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
15861         attribute.
15862         (cgraph_node::create_alias): Likewise.
15863         (cgraph_node::get_availability): Check ifunc_resolver instead
15864         of looking up ifunc attribute.
15865         * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
15866         * varasm.c (do_assemble_alias): Likewise.
15867         (assemble_alias): Likewise.
15868         (default_binds_local_p_3): Likewise.
15869         * cgraph.h (cgraph_node): Add ifunc_resolver.
15870         (cgraph_node::only_called_directly_or_aliased_p): Return false
15871         for IFUNC resolver.
15872         * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
15873         attribute.
15874         * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
15875         is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
15876         (symtab_node::binds_to_current_def_p): Check ifunc_resolver
15877         instead of looking up ifunc attribute.
15879 2018-05-22  Luis Machado  <luis.machado@linaro.org>
15881         * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
15883 2018-05-22  Martin Sebor  <msebor@redhat.com>
15885         PR middle-end/85359
15886         * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
15887         only when expasion succeeds.
15888         (expand_builtin_strcmp): Same.
15889         (expand_builtin_strncmp): Same.
15891 2018-05-22  Martin Sebor  <msebor@redhat.com>
15893         * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
15895 2018-05-22  Jackson Woodruff  <jackson.woodruff@arm.com>
15896             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
15898         * config/aarch64/aarch64-ldpstp.md: Replace uses of
15899         aarch64_mem_pair_operand with memory_operand and delete operand swapping
15900         code.
15901         * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
15902         Add check for legitimate_address.
15903         (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
15904         (aarch64_swap_ldrstr_operands): New.
15905         * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
15906         Define prototype.
15908 2018-05-22  Jackson Woodruff  <jackson.woodruff@arm.com>
15909             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
15911         * config/aarch64/aarch64.md: New patterns to generate stp
15912         and ldp.
15913         (store_pair_sw, store_pair_dw): New patterns to generate stp for
15914         single words and double words.
15915         (load_pair_sw, load_pair_dw): Likewise.
15916         (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
15917         Delete.
15918         (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
15919         Delete.
15920         * config/aarch64/aarch64-ldpstp.md: Modify peephole
15921         for different mode ldpstp and add peephole for merged zero stores.
15922         Likewise for loads.
15923         * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
15924         Add size check.
15925         (aarch64_gen_store_pair): Rename calls to match new patterns.
15926         (aarch64_gen_load_pair): Rename calls to match new patterns.
15927         * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
15928         (load_pair<DREG:mode><DREG2:mode>): ... This.
15929         (store_pair<mode>): Rename to...
15930         (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
15931         * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
15932         New mode iterators.
15933         (V_INT_EQUIV): Handle SImode.
15934         * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
15935         New predicate.
15937 2018-05-22  Martin Sebor  <msebor@redhat.com>
15939         PR c/85623
15940         * calls.c (maybe_warn_nonstring_arg): Use string length to set
15941         or ajust the presumed bound on an operation to avoid unnecessary
15942         warnings.
15944 2018-05-22  Martin Sebor  <msebor@redhat.com>
15946         PR tree-optimization/85826
15947         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
15948         assuming that a DECL necesarily has a constant size.
15950 2018-05-22  Richard Sandiford  <richard.sandiford@linaro.org>
15952         PR middle-end/85862
15953         * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
15955 2018-05-22  Richard Biener  <rguenther@suse.de>
15957         PR tree-optimization/85834
15958         * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
15959         non-constant and non-zero memset arguments.
15961 2018-05-22  Martin Liska  <mliska@suse.cz>
15963         PR ipa/85607
15964         * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
15966 2018-05-22  Richard Biener  <rguenther@suse.de>
15968         PR tree-optimization/85863
15969         * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
15970         comparisons when vectype is specified.
15971         (vectorizable_condition): Do not specify vectype for
15972         vect_is_simple_cond when SLP vectorizing.
15974 2018-05-21  Michael Meissner  <meissner@linux.ibm.com>
15976         PR target/85657
15977         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
15978         define __ibm128 as long double.
15979         * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
15980         as a distinct type when IEEE 128-bit support is enabled.
15981         (init_float128_ieee): Fix up conversions between IFmode and IEEE
15982         128-bit types to use the correct functions.
15983         (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
15984         convert between 128-bit floating point types that have different
15985         modes but the same representation, instead of using gen_lowpart to
15986         makean alias.
15987         * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
15988         KFmode.
15989         (IFKF_reg): New attributes to give the register constraints for
15990         IFmode and KFmode.
15991         (extend<mode>tf2_internal): New insns to mark an explicit
15992         conversion between 128-bit floating point types that have a
15993         different mode but share the same representation.
15995 2018-05-21  Richard Sandiford  <richard.sandiford@linaro.org>
15997         PR tree-optimization/85814
15998         * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
15999         a null return from get_strinfo when unsharing the next
16000         strinfo in the chain.
16002 2018-05-21  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
16004         PR gcc/84923
16005         * varasm.c (weak_finish): Clean up weak_decls.
16007 2018-05-21  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
16009         * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
16010         UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
16011         UNSPEC_UADALP values.
16012         * config/aarch64/iterators.md (ABAL): New int iterator.
16013         (ABDL2): Likewise.
16014         (ADALP): Likewise.
16015         (sur): Add mappings for the above.
16016         * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
16017         New define_insn.
16018         (aarch64_<sur>abal<mode>_4): Likewise.
16019         (aarch64_<sur>adalp<mode>_3): Likewise.
16020         (<sur>sadv16qi): New define_expand.
16022 2018-05-21  Alexander Nesterovskiy  <alexander.nesterovskiy@intel.com>
16024         * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
16025         (*movdf_internal): Ditto.
16026         (*rcpsf2_sse): Ditto.
16027         (*rsqrtsf2_sse): Ditto.
16028         (*sqrt<mode>2_sse): Ditto.
16030 2018-05-21  Tamar Christina  <tamar.christina@arm.com>
16032         * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
16033         eor3q<mode>4.
16034         (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
16035         * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
16036         veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
16037         vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
16038         vbcaxq_s64): New.
16039         * config/aarch64/arm_neon.h: Likewise.
16040         * config/aarch64/iterators.md (VQ_I): New.
16042 2018-05-21  Alexey Brodkin <abrodkin@synopsys.com>
16044         * config.gcc: Add arc/t-multilib-linux to tmake_file for
16045         arc*-*-linux*.
16046         * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
16047         MULTILIB_DIRNAMES
16049 2018-05-20  Chung-Ju Wu  <jasonwucj@gmail.com>
16051         * config/nds32/constraints.md (S): New constraint.
16052         * config/nds32/nds32.md (call_internal): Use constraint S.
16053         (call_value_internal): Likewise.
16054         (sibcall_internal): Likewise.
16055         (sibcall_value_internal): Likewise.
16057 2018-05-20  Kito Cheng  <kito.cheng@gmail.com>
16058             Chung-Ju Wu  <jasonwucj@gmail.com>
16060         * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
16061         into consideration.
16063 2018-05-20  Kito Cheng  <kito.cheng@gmail.com>
16064             Chung-Ju Wu  <jasonwucj@gmail.com>
16066         * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
16067         (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
16068         (nds32_rtx_costs_impl): Simplify.
16069         (nds32_address_cost_impl): Simplify.
16070         (nds32_init_rtx_costs): New function.
16071         (nds32_rtx_costs_speed_prefer): Likewise.
16072         (nds32_rtx_costs_size_prefer): Likewise.
16073         (nds32_address_cost_speed_prefer): Likewise.
16074         (nds32_address_cost_speed_fwprop): Likewise.
16075         (nds32_address_cost_size_prefer): Likewise.
16076         * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
16077         * config/nds32/nds32.c (nds32_option_override): Use
16078         nds32_init_rtx_costs function.
16080 2018-05-20  Chung-Ju Wu  <jasonwucj@gmail.com>
16082         * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
16083         * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
16084         (TARGET_PIPELINE_N8): Likewise.
16085         (TARGET_PIPELINE_N10): Likewise.
16086         (TARGET_PIPELINE_N13): Likewise.
16087         (TARGET_PIPELINE_GRAYWOLF): Likewise.
16089 2018-05-19  Monk Chiang  <sh.chiang04@gmail.com>
16091         * config/nds32/nds32-fpu.md: Update copyright year.
16093 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
16095         * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
16097 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
16099         * config/nds32/nds32.c
16100         (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
16101         * config/nds32/nds32.opt (minline-asm-r15): New option.
16103 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
16105         * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
16106         MASK_HW_ABS.
16107         * config/nds32/nds32.md (abssi2): New pattern.
16109 2018-05-19  Uros Bizjak  <ubizjak@gmail.com>
16111         * config/i386/i386.md (rex64namesuffix): New mode attribute.
16112         * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
16113         Merge insn pattern from sse_cvtsi2ss<round_name> and
16114         sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
16115         (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
16116         from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
16117         using SWI48 mode iterator.
16118         (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
16119         sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
16120         (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
16121         pattern from sse_cvttss2si<round_saeonly_name>
16122         and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
16123         (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
16124         from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
16125         using SWI48 mode iterator.
16126         (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
16127         insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
16128         avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
16129         (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
16130         from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
16131         using SWI48 mode iterator.
16132         (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
16133         insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
16134         avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
16135         (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
16136         sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
16137         SWI48 mode iterator.
16138         (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
16139         sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
16140         (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
16141         pattern from sse_cvttsd2si<round_saeonly_name>
16142         and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
16144 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
16146         * config/nds32/nds32-md-auxiliary.c
16147         (nds32_valid_smw_lwm_base_p): Refine.
16148         (nds32_output_smw_single_word): Refine.
16149         (nds32_output_smw_double_word): New.
16150         * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
16152 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
16154         * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
16155         (nds32_output_stack_pop): Refine.
16156         (nds32_expand_unaligned_load): Refine.
16157         (nds32_expand_unaligned_store): Refine.
16159 2018-05-19  Kuan-Lin Chen <kuanlinchentw@gmail.com>
16160             Chung-Ju Wu  <jasonwucj@gmail.com>
16162         * config/nds32/constants.md: Add TP_REGNUM constant.
16163         (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
16164         UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
16165         UNSPEC_ADD32.
16166         * config/nds32/nds32-doubleword.md: Consider flag_pic.
16167         * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
16168         * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
16169         * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
16170         and PIC code generation.
16171         * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
16172         code generation.
16173         * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
16174         optimization.
16175         * config/nds32/nds32.md: Support TLS and PIC.
16176         * config/nds32/nds32.c: Support TLS and PIC.
16177         * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
16178         * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
16179         predicate.
16181 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
16183         * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
16184         mode with E_ prefix.
16186 2018-05-19  Kuan-Lin Chen <kuanlinchentw@gmail.com>
16187             Chung-Ju Wu  <jasonwucj@gmail.com>
16189         * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
16190         * config/nds32/nds32-md-auxiliary.c
16191         (symbolic_reference_mentioned_p): New.
16192         (nds32_legitimize_ict_address): New.
16193         (nds32_expand_ict_move): New.
16194         (nds32_indirect_call_referenced_p): New.
16195         (nds32_symbol_binds_local_p): Delete.
16196         (nds32_long_call_p): Modify.
16197         * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
16198         * config/nds32/nds32-protos.h
16199         (symbolic_reference_mentioned_p): Declare.
16200         (nds32_legitimize_ict_address): Declare.
16201         (nds32_expand_ict_move): Declare.
16202         (nds32_indirect_call_referenced_p): Declare.
16203         * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
16204         (nds32_relax_group): Use nds32_ict_const_p as condition.
16205         * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
16206         (nds32_asm_file_start): Output ict_model directive in asm code.
16207         (nds32_legitimate_address_p): Consider indirect call.
16208         (nds32_print_operand): Consider indirect call.
16209         (nds32_print_operand_address): Consider indirect call.
16210         (nds32_insert_attributes): Handle "indirect_call" attribute.
16211         (TARGET_LEGITIMATE_ADDRESS_P): Define.
16212         (TARGET_LEGITIMATE_CONSTANT_P): Define.
16213         (TARGET_CANNOT_FORCE_CONST_MEM): Define.
16214         (TARGET_DELEGITIMIZE_ADDRESS): Define.
16215         (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
16216         * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
16217         (TARGET_ICT_MODEL_SMALL): Define.
16218         (TARGET_ICT_MODEL_LARGE): Define.
16219         * config/nds32/nds32.md (movsi): Consider ict model.
16220         (call, call_value): Consider ict model.
16221         (sibcall, sibcall_value): Consider ict model.
16222         * config/nds32/nds32.opt (mict-model): New option.
16223         * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
16224         model.
16226 2018-05-18  Kito Cheng  <kito.cheng@gmail.com>
16227             Monk Chiang  <sh.chiang04@gmail.com>
16228             Jim Wilson <jimw@sifive.com>
16230         * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
16231         Add support to parse rv32e*.  Clear MASK_RVE for rv32i and rv64i.
16232         * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
16233         * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
16234         __riscv_32e when TARGET_RVE.  Handle ABI_ILP32E as soft-float ABI.
16235         * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
16236         * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
16237         compute save_libcall_adjustment properly.
16238         (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
16239         (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
16240         * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
16241         (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
16242         (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
16243         (ABI_SPEC): Handle mabi=ilp32e.
16244         * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
16245         (RVE): Add RVE mask.
16246         * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
16247         <-march>: Add rv32e as an example.
16249 2018-05-18  Marc Glisse  <marc.glisse@inria.fr>
16251         PR c++/82899
16252         * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
16253         (intra_create_variable_infos): Handle C++ constructors.
16255 2018-05-18  Martin Liska  <mliska@suse.cz>
16257         * passes.def: Remove a redundant pass.
16259 2018-05-18  Eric Botcazou  <ebotcazou@adacore.com>
16261         PR bootstrap/85838
16262         * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
16264 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
16266         * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
16267         (ARMv4): Update.
16268         (ARMv2, ARMv3, ARMv3m): Delete fgroups.
16269         (ARMv6m): Update.
16270         (armv2, armv2a, armv3, armv3m): Delete architectures.
16271         (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
16272         arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
16273         arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
16274         Delete cpus.
16275         * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
16276         (*mulsidi3adddi): Likewise.
16277         (mulsidi3): Likewise.
16278         (*mulsidi3_nov6): Likewise.
16279         (umulsidi3): Likewise.
16280         (umulsidi3_nov6): Likewise.
16281         (umaddsidi4): Likewise.
16282         (*umulsidi3adddi): Likewise.
16283         (smulsi3_highpart): Likewise.
16284         (*smulsi3_highpart_nov6): Likewise.
16285         (umulsi3_highpart): Likewise.
16286         (*umulsi3_highpart_nov6): Likewise.
16287         * config/arm/arm.h (arm_arch3m): Delete.
16288         * config/arm/arm.c (arm_arch3m): Delete.
16289         (arm_option_override_internal): Update armv3-related comment.
16290         (arm_configure_build_target): Delete use of isa_bit_mode32.
16291         (arm_option_reconfigure_globals): Delete set of arm_ach3m.
16292         (arm_rtx_costs_internal): Delete check of arm_arch3m.
16293         * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
16294         (mulsa3): Likewise.
16295         (mulusa3): Likewise.
16296         * config/arm/arm-protos.h (arm_arch3m): Delete.
16297         * config/arm/arm-tables.opt: Regenerate.
16298         * config/arm/arm-tune.md: Likewise.
16299         * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
16300         deleted architectures.
16302 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
16304         * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
16305         (armv5t, armv5te): New features.
16306         (ARMv5, ARMv5e): Delete fgroups.
16307         (ARMv5t, ARMv5te): Adjust for above changes.
16308         (ARMv6m): Likewise.
16309         (armv5, armv5e): Delete arches.
16310         * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
16311         arm_arch5.
16312         (*call_reg_arm): Likewise.
16313         (*call_value_reg_armv5): Likewise.
16314         (*call_value_reg_arm): Likewise.
16315         (*call_symbol): Likewise.
16316         (*call_value_symbol): Likewise.
16317         (*sibcall_insn): Likewise.
16318         (*sibcall_value_insn): Likewise.
16319         (clzsi2): Likewise.
16320         (prefetch): Likewise.
16321         (define_split and define_peephole2 dependent on arm_arch5):
16322         Likewise.
16323         * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
16324         arm_arch5e.
16325         (TARGET_ARM_QBIT): Likewise.
16326         (TARGET_DSP_MULTIPLY): Likewise.
16327         (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
16328         (arm_arch5, arm_arch5e): Delete.
16329         (arm_arch5t, arm_arch5te): Declare.
16330         * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
16331         (arm_arch5t): Declare.
16332         (arm_option_reconfigure_globals): Update for the above.
16333         (arm_options_perform_arch_sanity_checks): Update comment, replace
16334         use of arm_arch5 with arm_arch5t.
16335         (use_return_insn): Likewise.
16336         (arm_emit_call_insn): Likewise.
16337         (output_return_instruction): Likewise.
16338         (arm_final_prescan_insn): Likewise.
16339         (arm_coproc_builtin_available): Likewise.
16340         * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
16341         arm_arch5e with arm_arch5t and arm_arch5te.
16342         * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
16343         (arm_arch5t, arm_arch5te): Declare.
16344         * config/arm/arm-tables.opt: Regenerate.
16345         * config/arm/t-arm-elf: Remove references to armv5, armv5e.
16346         * config/arm/t-multilib: Likewise.
16347         * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
16348         instead of arm_arch5.
16349         (*call_reg_thumb1): Likewise.
16350         (*call_value_reg_thumb1_v5): Likewise.
16351         (*call_value_reg_thumb1): Likewise.
16352         * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
16353         unreachable path.
16354         * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
16356 2018-05-18  Martin Liska  <mliska@suse.cz>
16358         PR gcov-profile/84846
16359         * doc/gcov.texi: Document -t option of gcov tool.
16361 2018-05-18  Martin Liska  <mliska@suse.cz>
16363         PR gcov-profile/84846
16364         * gcov.c (print_usage): Add new -t option.
16365         (process_args): Handle the option.
16366         (generate_results): Use stdout as output when requested by
16367         the option.
16369 2018-05-18  Martin Liska  <mliska@suse.cz>
16371         PR gcov-profile/84846
16372         * coverage.c (coverage_init): Write PWD to .gcno file.
16373         * doc/gcov.texi: Document how working directory is printed.
16374         * gcov-dump.c (dump_gcov_file): Print PWD.
16375         * gcov.c (output_intermediate_file): Likewise.
16376         (read_graph_file): Read PWD string.
16377         (output_lines): Print PWD.
16379 2018-05-18  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
16381         PR middle-end/85817
16382         * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
16383         for retval and return false if all args to phi are zero.
16385 2018-05-18  Richard Biener  <rguenther@suse.de>
16387         * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
16388         method.
16389         (evrp_dom_walker::before_dom_children): Call it.
16391 2018-05-18  Richard Biener  <rguenther@suse.de>
16393         * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
16394         results when processing array refs with variable index.
16396 2018-05-18  Toon Moene  <toon@moene.org>
16398         * doc/invoke.texi: Move -floop-unroll-and-jam documentation
16399         directly after that of -floop-interchange. Indicate that both
16400         options are enabled by default when specifying -O3.
16402 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
16404         * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
16405         iterator.  Delete separate integer-mode vec_set<mode> expander.
16406         (aarch64_simd_vec_setv2di): Delete.
16407         (vec_setv2di): Delete.
16408         (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
16409         Use VALL_F16 mode iterator.  Add LD1 alternative and use vwcore for
16410         the "w, r" alternative.
16412 2018-05-18  Martin Liska  <mliska@suse.cz>
16414         * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
16415         * tree-pass.h (make_pass_lower_switch_O0): New function.
16416         * tree-switch-conversion.c (node_has_low_bound): Remove.
16417         (node_has_high_bound): Likewise.
16418         (node_is_bounded): Likewise.
16419         (class pass_lower_switch): Make it a template type and create
16420         two instances.
16421         (pass_lower_switch::execute): Add template argument.
16422         (make_pass_lower_switch): New function.
16423         (make_pass_lower_switch_O0): New function.
16424         (do_jump_if_equal): Remove.
16425         (emit_case_nodes): Simplify to just handle all 3 cases and leave
16426         all the hard work to tree optimization passes.
16428 2018-05-18  Martin Liska  <mliska@suse.cz>
16430         * dbgcnt.c (limit_low): Renamed from limit.
16431         (limit_high): New variable.
16432         (dbg_cnt_is_enabled): Check for upper limit.
16433         (dbg_cnt): Adjust dumping.
16434         (dbg_cnt_set_limit_by_index): Add new argument for high
16435         value.
16436         (dbg_cnt_set_limit_by_name): Likewise.
16437         (dbg_cnt_process_single_pair): Parse new format.
16438         (dbg_cnt_process_opt): Use strtok.
16439         (dbg_cnt_list_all_counters): Remove 'value' and add
16440         'limit_high'.
16441         * doc/invoke.texi: Document changes.
16443 2018-05-18  Richard Sandiford  <richard.sandiford@linaro.org>
16445         * doc/sourcebuild.texi (scalar_all_fma): Document.
16446         * tree.def (FMA_EXPR): Delete.
16447         * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
16448         * internal-fn.c (ternary_direct): New macro.
16449         (expand_ternary_optab_fn): Likewise.
16450         (direct_ternary_optab_supported_p): Likewise.
16451         * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
16452         * builtins.c (fold_builtin_fma): Delete.
16453         (fold_builtin_3): Don't call it.
16454         * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
16455         * expr.c (expand_expr_real_2): Likewise.
16456         * fold-const.c (operand_equal_p): Likewise.
16457         (fold_ternary_loc): Likewise.
16458         * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
16459         * gimple.c (DEFTREECODE): Likewise.
16460         * gimplify.c (gimplify_expr): Likewise.
16461         * optabs-tree.c (optab_for_tree_code): Likewise.
16462         * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
16463         * tree-eh.c (operation_could_trap_p): Likewise.
16464         (stmt_could_throw_1_p): Likewise.
16465         * tree-inline.c (estimate_operator_cost): Likewise.
16466         * tree-pretty-print.c (dump_generic_node): Likewise.
16467         (op_code_prio): Likewise.
16468         * tree-ssa-loop-im.c (stmt_cost): Likewise.
16469         * tree-ssa-operands.c (get_expr_operands): Likewise.
16470         * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
16471         * fold-const-call.h (fold_fma): Delete.
16472         * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
16473         CFN_FNMA and CFN_FNMS.
16474         (fold_fma): Delete.
16475         * genmatch.c (combined_fn): New enum.
16476         (commutative_ternary_tree_code): Remove FMA_EXPR handling.
16477         (commutative_op): New function.
16478         (commutate): Use it.  Handle more than 2 operands.
16479         (dt_operand::gen_gimple_expr): Use commutative_op.
16480         (parser::parse_expr): Allow :c to be used with non-binary
16481         operators if the commutative operand is known.
16482         * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
16483         CFN_FMS, CFN_FNMA and CFN_FNMS.
16484         (backprop::process_assign_use): Remove FMA_EXPR handling.
16485         * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
16486         (gen_hsa_fma): New function.
16487         (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
16488         IFN_FNMA and IFN_FNMS.
16489         * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
16490         * gimple-fold.h (follow_all_ssa_edges): Declare.
16491         * gimple-fold.c (follow_all_ssa_edges): New function.
16492         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
16493         gimple_build interface and use follow_all_ssa_edges to fold the result.
16494         (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
16495         instead of checking for optabs directly.
16496         * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
16497         rather than FMA_EXPRs.
16498         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
16499         call to IFN_FMA instead of an FMA_EXPR.
16501 2018-05-17  Jim Wilson  <jimw@sifive.com>
16503         * expr.c (do_tablejump): When converting index to Pmode, if we have a
16504         sign extended promoted subreg, and the range does not have the sign bit
16505         set, then do a sign extend.
16507         * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
16508         test, check for sign extended subreg and/or constant operands, and
16509         do a sign extend in that case.
16511 2018-05-17  Steve Ellcey  <sellcey@cavium.com>
16513         * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
16514         (thunderx2t99_multiple): Delete psuedo-units from used cpus.
16515         Add untyped.
16516         (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
16517         Change logics_shift_reg to logics_shift_imm.
16518         (thunderx2t99_fp_loadpair_basic): Delete.
16519         (thunderx2t99_fp_storepair_basic): Delete.
16520         (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
16521         (thunderx2t99_asimd_polynomial): Delete.
16522         (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
16523         and neon_fp_mul_d_scalar_q.
16524         (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
16525         (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
16526         (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
16527         (thunderx2t99_asimd_lut): Add missing tbl types.
16528         (thunderx2t99_asimd_ext): Delete.
16529         (thunderx2t99_asimd_load1_1_mult): Delete.
16530         (thunderx2t99_asimd_load1_2_mult): Delete.
16531         (thunderx2t99_asimd_load1_ldp): New.
16532         (thunderx2t99_asimd_load1): New.
16533         (thunderx2t99_asimd_load2): Add missing *load2* types.
16534         (thunderx2t99_asimd_load3): New.
16535         (thunderx2t99_asimd_load4): New.
16536         (thunderx2t99_asimd_store1_1_mult): Delete.
16537         (thunderx2t99_asimd_store1_2_mult): Delete.
16538         (thunderx2t99_asimd_store2_mult): Delete.
16539         (thunderx2t99_asimd_store2_onelane): Delete.
16540         (thunderx2t99_asimd_store_stp): New.
16541         (thunderx2t99_asimd_store1): New.
16542         (thunderx2t99_asimd_store2): New.
16543         (thunderx2t99_asimd_store3): New.
16544         (thunderx2t99_asimd_store4): New.
16546 2018-05-17  Jerome Lambourg  <lambourg@adacore.com>
16548         * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
16549         #include <stdint.h>.  Replace intptr_t with __INTPTR_TYPE__.
16551 2018-05-17  Pat Haugen  <pthaugen@us.ibm.com>
16552             Segher Boessenkool  <segher@kernel.crashing.org>
16554         PR target/85698
16555         * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
16556         operand.
16558 2018-05-17  Richard Biener  <rguenther@suse.de>
16560         * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
16561         for pruning loop and prune defs feeding only already visited PHIs.
16563 2018-05-17  Richard Biener  <rguenther@suse.de>
16565         * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
16567 2018-05-17  Bin Cheng  <bin.cheng@arm.com>
16568             Richard Biener  <rguenther@suse.de>
16570         PR tree-optimization/85793
16571         * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
16572         for VMAT_ELEMENTWISE.
16574 2018-05-17  Richard Sandiford  <richard.sandiford@linaro.org>
16576         * internal-fn.h (lookup_internal_fn): Declare
16577         * internal-fn.c (lookup_internal_fn): New function.
16578         * gimple.c (gimple_build_call_from_tree): Handle calls to
16579         internal functions.
16580         * gimple-pretty-print.c (dump_gimple_call): Print "." before
16581         internal function names.
16582         * tree-pretty-print.c (dump_generic_node): Likewise.
16583         * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
16585 2018-05-17  Richard Sandiford  <richard.sandiford@linaro.org>
16587         * gimple-fold.h (gimple_build): Make the function forms take
16588         combined_fn rather than built_in_function.
16589         (gimple_simplify): Likewise.
16590         * gimple-match-head.c (gimple_simplify): Likewise.
16591         * gimple-fold.c (gimple_build): Likewise.
16592         * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
16593         rather than gimple_build_call_internal.
16594         (get_initial_defs_for_reduction): Likewise.
16595         (vect_create_epilog_for_reduction): Likewise.
16596         (vectorizable_live_operation): Likewise.
16598 2018-05-17  Martin Liska  <mliska@suse.cz>
16600         * gimple-ssa-sprintf.c (format_directive): Do not use
16601         space in between 'G_' and '('.
16603 2018-05-17  Jakub Jelinek  <jakub@redhat.com>
16605         PR target/85323
16606         * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
16607         even if the mask is not all ones.
16609         PR target/85323
16610         * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
16611         vector.
16612         (ix86_gimple_fold_builtin): Likewise.
16614         PR target/85323
16615         * config/i386/i386.c: Include tree-vector-builder.h.
16616         (ix86_vector_shift_count): New function.
16617         (ix86_fold_builtin): Fold shift builtins by scalar count.
16618         (ix86_gimple_fold_builtin): Likewise.
16620         * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
16621         _mm512_setzero): New intrinsics.
16623 2018-05-17  James Greenhalgh  <james.greenhalgh@arm.com>
16624             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
16626         * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
16627         code generation for cases where splatting a value is not useful.
16628         * simplify-rtx.c (simplify_ternary_operation): Simplify
16629         vec_merge across a vec_duplicate and a paradoxical subreg forming
16630         a vector mode to a vec_concat.
16632 2018-05-17  Olga Makhotina  <olga.makhotina@intel.com>
16634         * config.gcc: Support "goldmont-plus".
16635         * config/i386/driver-i386.c (host_detect_local_cpu): Detect
16636         "goldmont-plus".
16637         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
16638         PROCESSOR_GOLDMONT_PLUS.
16639         * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
16640         (processor_target_table): Add "goldmont-plus".
16641         (PTA_GOLDMONT_PLUS): Define.
16642         (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
16643         (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
16644         (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
16645         (fold_builtin_cpu): Add "goldmont-plus".
16646         (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
16647         (ix86_option_override_internal): Add "goldmont-plus".
16648         * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
16649         (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
16650         * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
16651         * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
16653 2018-05-17  Richard Biener  <rguenther@suse.de>
16655         PR tree-optimization/85757
16656         * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
16657         remove defs that only feed that PHI from further processing.
16659 2018-05-16  Jim Wilson  <jimw@sifive.com>
16661         * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
16662         asterisk to name.
16663         (<optab>di3_mask, <optab>di3_mask_1): Likewise.
16665 2018-05-16  Mark Wielaard  <mark@klomp.org>
16667         * dwarf2out.c (count_index_strings): New function.
16668         (output_indirect_strings): Call count_index_strings and generate
16669         header for dwarf_version >= 5.
16671 2018-05-16  Mark Wielaard  <mark@klomp.org>
16673         * dwarf2out.c (dwarf_FORM): New function.
16674         (set_indirect_string): Use dwarf_FORM.
16675         (reset_indirect_string): Likewise.
16676         (size_of_die): Likewise.
16677         (value_format): Likewise.
16678         (output_die): Likewise.
16679         (add_skeleton_AT_string): Likewise.
16680         (output_macinfo_op): Likewise.
16681         (index_string): Likewise.
16682         (output_index_string_offset): Likewise.
16683         (output_index_string): Likewise.
16684         (count_index_strings): Likewise.
16686 2018-05-16  Carl Love  <cel@us.ibm.com>
16688         * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
16689         dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
16691 2018-05-16  Martin Jambor  <mjambor@suse.cz>
16693         * ipa-prop.c (ipa_free_all_edge_args): Remove.
16694         * ipa-prop.h (ipa_free_all_edge_args): Likewise.
16696 2018-05-16  Wilco Dijkstra  <wdijkstr@arm.com>
16698         * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
16699         (fnma<mode>4): Likewise.
16700         (fms<mode>4): Likewise.
16701         (fnms<mode>4): Likewise.
16702         (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
16703         (aarch64_fnma<mode>4): Likewise.
16704         (aarch64_fms<mode>4): Likewise.
16705         (aarch64_fnms<mode>4): Likewise.
16706         (aarch64_fnmadd<mode>4): Likewise.
16708 2018-05-16  Jason Merrill  <jason@redhat.com>
16710         * tree.c (warn_deprecated_use): Return bool.  Simplify logic.
16712 2018-05-16  Richard Biener  <rguenther@suse.de>
16714         * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
16715         (dump_stmt_cost): Declare.
16716         (add_stmt_cost): Dump cost we add.
16717         (add_stmt_costs): New function.
16718         (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
16719         No longer exported.
16720         (vect_analyze_stmt): Adjust prototype.
16721         (vectorizable_condition): Likewise.
16722         (vectorizable_live_operation): Likewise.
16723         (vectorizable_reduction): Likewise.
16724         (vectorizable_induction): Likewise.
16725         * tree-vect-loop.c (vect_analyze_loop_operations): Create local
16726         cost vector to pass to vectorizable_ and record afterwards.
16727         (vect_model_reduction_cost): Take cost vector argument and adjust.
16728         (vect_model_induction_cost): Likewise.
16729         (vectorizable_reduction): Likewise.
16730         (vectorizable_induction): Likewise.
16731         (vectorizable_live_operation): Likewise.
16732         * tree-vect-slp.c (vect_create_new_slp_node): Initialize
16733         SLP_TREE_NUMBER_OF_VEC_STMTS.
16734         (vect_analyze_slp_cost_1): Remove.
16735         (vect_analyze_slp_cost): Likewise.
16736         (vect_slp_analyze_node_operations): Take visited args and
16737         a target cost vector.  Avoid processing already visited stmt sets.
16738         (vect_slp_analyze_operations): Use a local cost vector to gather
16739         costs and register those of non-discarded instances.
16740         (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
16741         (vect_schedule_slp_instance): Remove copying of
16742         SLP_TREE_NUMBER_OF_VEC_STMTS.  Instead assert that it is not
16743         zero.
16744         * tree-vect-stmts.c (record_stmt_cost): Remove path directly
16745         adding cost.  Record cost entry location.
16746         (vect_prologue_cost_for_slp_op): Function to compute cost of
16747         a constant or invariant generated for SLP vect in the prologue,
16748         split out from vect_analyze_slp_cost_1.
16749         (vect_model_simple_cost): Make static.  Adjust for SLP costing.
16750         (vect_model_promotion_demotion_cost): Likewise.
16751         (vect_model_store_cost): Likewise, make static.
16752         (vect_model_load_cost): Likewise.
16753         (vectorizable_bswap): Add cost vector arg and adjust.
16754         (vectorizable_call): Likewise.
16755         (vectorizable_simd_clone_call): Likewise.
16756         (vectorizable_conversion): Likewise.
16757         (vectorizable_assignment): Likewise.
16758         (vectorizable_shift): Likewise.
16759         (vectorizable_operation): Likewise.
16760         (vectorizable_store): Likewise.
16761         (vectorizable_load): Likewise.
16762         (vectorizable_condition): Likewise.
16763         (vectorizable_comparison): Likewise.
16764         (can_vectorize_live_stmts): Likewise.
16765         (vect_analyze_stmt): Likewise.
16766         (vect_transform_stmt): Adjust calls to vectorizable_*.
16767         * tree-vectorizer.c: Include gimple-pretty-print.h.
16768         (dump_stmt_cost): New function.
16770 2018-05-16  Richard Biener  <rguenther@suse.de>
16772         * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
16773         * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
16774         * tree-ssa-dse.c: Include tree-ssa-loop.h.
16775         (check_name): New callback.
16776         (dse_classify_store): Track cycles via a visited bitmap of PHI
16777         defs and simplify handling of in-loop and across loop dead stores
16778         and properly fail for loop-variant refs.  Handle byte-tracking with
16779         multiple defs.  Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
16780         limiting the walk.
16782 2018-05-16  Richard Sandiford  <richard.sandiford@linaro.org>
16784         * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
16785         (vect_get_mask_type_for_stmt): Likewise.
16786         * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
16787         split out from...
16788         (vect_build_slp_tree_1): ...here.  Use vect_get_vector_types_for_stmt
16789         to determine the statement's vector type and the vector type that
16790         should be used for calculating nunits.  Deal with cases in which
16791         the type has to be deferred.
16792         (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
16793         and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
16794         * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
16795         (vect_determine_vf_for_stmt): New functions, split out from...
16796         (vect_determine_vectorization_factor): ...here.
16797         * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
16798         (vect_get_mask_type_for_stmt): New functions, split out from
16799         vect_determine_vectorization_factor.
16801 2018-05-16  Richard Biener  <rguenther@suse.de>
16803         * tree-cfg.c (verify_gimple_assign_ternary): Properly
16804         verify the [VEC_]COND_EXPR embedded comparison.
16806 2018-05-15  Martin Sebor  <msebor@redhat.com>
16808         PR tree-optimization/85753
16809         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
16810         RECORD_TYPE in addition to ARRAY_TYPE.
16812 2018-05-15  Martin Sebor  <msebor@redhat.com>
16814         PR middle-end/85643
16815         * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
16817 2018-05-15  Richard Biener  <rguenther@suse.de>
16819         * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
16820         add by_clobber_p one.  Change algorithm to collect all defs
16821         representing uses we need to walk and try reducing them to
16822         a single one before failing.
16823         (dse_dom_walker::dse_optimize_stmt): Adjust.
16825 2018-05-13  Mark Wielaard  <mark@klomp.org>
16827         * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
16828         (size_of_loc_descr): Likewise.
16829         (output_loc_operands): Likewise.
16830         (output_loc_operands_raw): Likewise.
16831         (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
16832         (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
16833         (hash_loc_operands): Likewise.
16834         (compare_loc_operands): Likewise.
16836 2018-05-14  Mark Wielaard  <mark@klomp.org>
16838         * dwarf2out.c (count_index_addrs): New function.
16839         (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
16841 2018-05-15  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
16843         PR tree-optimization/83648
16844         * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
16845         return value as malloc candidate.
16847 2018-05-15  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
16849         PR ipa/85734
16850         * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite
16851         param as true in call to suggest_attribute.
16853 2018-05-14  Segher Boessenkool  <segher@kernel.crashing.org>
16855         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
16856         -mreadonly-in-sdata.
16858 2018-05-14  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
16860         * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
16861         New pattern.
16862         (aarch64_crypto_aesd_fused): Likewise.
16864 2018-05-14  Wilco Dijkstra  <wdijkstr@arm.com>
16866         * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
16867         (movsi_aarch64): Likewise.
16868         (load_pairsi): Likewise.
16869         (load_pairdi): Likewise.
16870         (store_pairsi): Likewise.
16871         (store_pairdi): Likewise.
16872         (load_pairsf): Likewise.
16873         (load_pairdf): Likewise.
16874         (store_pairsf): Likewise.
16875         (store_pairdf): Likewise.
16876         (zero_extend): Likewise.
16877         (trunc): Swap alternatives.
16878         (fcvt_target): Add '?' to prefer w over r.
16880 2018-05-14  Jakub Jelinek  <jakub@redhat.com>
16882         PR target/85756
16883         * config/i386/i386.md: Disallow non-commutative arithmetics in
16884         last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
16885         optimization.  Use COMMUTATIVE_ARITH_P test rather than != MINUS
16886         in the peephole2 before it.
16888 2018-05-14  Sebastian Peryt  <sebastian.peryt@intel.com>
16890         * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
16891         OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
16892         (ix86_handle_option): Handle -mcldemote.
16893         * config.gcc: New header.
16894         * config/i386/cldemoteintrin.h: New file.
16895         * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
16896         * config/i386/driver-i386.c (host_detect_local_cpu): Detect
16897         -mcldemote.
16898         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
16899         OPTION_MASK_ISA_CLDEMOTE.
16900         * config/i386/i386.c (ix86_target_string): Add -mcldemote.
16901         (ix86_valid_target_attribute_inner_p): Ditto.
16902         (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
16903         (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
16904         (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
16905         * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
16906         * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
16907         (cldemote): New.
16908         * config/i386/i386.opt: Add -mcldemote.
16909         * config/i386/x86intrin.h: New header.
16910         * doc/invoke.texi: Add -mcldemote.
16912 2018-05-14  Richard Biener  <rguenther@suse.de>
16914         * doc/match-and-simplify.texi: Adjust :s documentation.
16916 2018-05-14  Alexander Monakov  <amonakov@ispras.ru>
16918         * sort.cc (REORDER_23): Pass the type for the temporaries instead of
16919         intended memcpy size.
16920         (REORDER_45): Likewise.
16922 2018-05-13  Alexander Monakov  <amonakov@ispras.ru>
16924         * sort.cc: New file.
16925         * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
16926         * vec.c (qsort_chk): Use gcc_qsort.
16927         * Makefile.in (OBJS-libcommon): Add sort.o.
16928         (build/sort.o): New target.  Use it...
16929         (BUILD_RTL): ... here, and...
16930         (build/gencfn-macros): ... here, and...
16931         (build/genmatch): ... here.
16933 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
16934             Chung-Ju Wu  <jasonwucj@gmail.com>
16936         * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
16937         * config/nds32/nds32-graywolf.md: New file.
16938         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
16939         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
16940         pipeline.
16941         * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
16942         * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
16943         * config/nds32/nds32.md (pipeline_model): Add graywolf.
16944         * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
16945         * config/nds32/pipelines.md: Include n15 settings.
16947 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
16948             Chung-Ju Wu  <jasonwucj@gmail.com>
16950         * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
16951         * config/nds32/nds32-n13.md: New file.
16952         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
16953         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
16954         pipeline.
16955         * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
16956         * config/nds32/nds32.md (pipeline_model): Add n13.
16957         * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
16958         * config/nds32/pipelines.md: Include n13 settings.
16960 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
16961             Chung-Ju Wu  <jasonwucj@gmail.com>
16963         * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
16964         * config/nds32/nds32-n10.md: New file.
16965         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
16966         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
16967         pipeline.
16968         * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
16969         * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
16970         * config/nds32/nds32.md (pipeline_model): Add n10.
16971         * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
16972         * config/nds32/pipelines.md: Include n10 settings.
16974 2018-05-13  Monk Chiang  <sh.chiang04@gmail.com>
16975             Kito Cheng  <kito.cheng@gmail.com>
16976             Chung-Ju Wu  <jasonwucj@gmail.com>
16978         * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
16979         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
16980         Add enum values for DSP extension instructions.
16981         * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
16982         New constraints.
16983         * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
16984         sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
16985         New code iterators.
16986         (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
16987         * config/nds32/nds32-dspext.md: New file for DSP implementation.
16988         * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
16989         * config/nds32/nds32-intrinsic.md: Likewise.
16990         * config/nds32/nds32_intrinsic.h: Likewise.
16991         * config/nds32/nds32-md-auxiliary.c: Likewise.
16992         * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
16993         * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
16994         (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
16995         (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
16996         * config/nds32/nds32-protos.h: New declarations for DSP extension.
16997         * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
16998         TYPE_DMAC in switch statement.
16999         * config/nds32/nds32.c: New checking and implementation for DSP
17000         extension instructions.
17001         * config/nds32/nds32.h: Likewise.
17002         * config/nds32/nds32.md: Likewise.
17003         * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
17004         * config/nds32/predicates.md: Implement new predicates for DSP
17005         extension.
17007 2018-05-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
17009         * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
17010         Reformat alternatives and attributes so it is easier to identify
17011         which constraints/attributes go with which instruction.
17012         (mov<mode>_hardfloat32, FMOVE64): Likewise.
17013         (mov<mode>_softfloat32, FMOVE64): Likewise.
17014         (mov<mode>_hardfloat64, FMOVE64): Likewise.
17015         (mov<mode>_softfloat64, FMOVE64): Likewise.
17017 2018-05-11  Kelvin Nilsen  <kelvin@gcc.gnu.org>
17019         * doc/extend.texi (PowerPC Built-in Functions): Rename this
17020         subsection.
17021         (Basic PowerPC Built-in Functions): The new name of the
17022         subsection previously known as "PowerPC Built-in Functions".
17023         (Basic PowerPC Built-in Functions Available on all Configurations):
17024         New subsubsection.
17025         (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
17026         (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
17027         (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
17028         (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
17030 2018-05-11  Martin Jambor  <mjambor@suse.cz>
17032         PR ipa/85655
17033         * ipa-cp.c (intersect_with_plats): Check that the lattice contains
17034         single const.
17036 2018-05-11  Richard Earnshaw  <rearnsha@arm.com>
17038         PR target/85733
17039         * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
17041 2018-05-11  Sebastian Peryt  <sebastian.peryt@intel.com>
17043         * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
17044         OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
17045         (ix86_handle_option): Handle -mwaitpkg.
17046         * config.gcc: New header.
17047         * config/i386/cpuid.h (bit_WAITPKG): New bit.
17048         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
17049         * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
17050         function type.
17051         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
17052         OPTION_MASK_ISA_WAITPKG.
17053         * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
17054         (ix86_option_override_internal): Add PTA_WAITPKG.
17055         (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
17056         (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
17057         IX86_BUILTIN_TPAUSE.
17058         (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
17059         __builtin_ia32_umwait and __builtin_ia32_tpause.
17060         (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
17061         IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
17062         * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
17063         * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
17064         UNSPECV_TPAUSE): New.
17065         (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
17066         * config/i386/i386.opt: Add -mwaitpkg.
17067         * config/i386/waitpkgintrin.h: New file.
17068         * config/i386/x86intrin.h: New header.
17069         * doc/invoke.texi: Add -mwaitpkg.
17071 2018-05-11  Richard Earnshaw  <rearnsha@arm.com>
17073         PR target/85606
17074         * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
17075         equivalent.
17076         (cortex-m0): Use armv6s-m isa.
17077         (cortex-m0plus): Likewise.
17078         (cortex-m1): Likewise.
17079         (cortex-m0.small-multiply): Likewise.
17080         (cortex-m0plus.small-multiply): Likewise.
17081         (cortex-m1.small-multiply): Likewise.
17083 2018-05-11  Allan Sandfeld Jensen  <allan.jensen@qt.io>
17084             Jakub Jelinek  <jakub@redhat.com>
17086         PR tree-optimization/85692
17087         * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
17088         source permute as well.
17090 2018-05-11  Martin Liska  <mliska@suse.cz>
17092         PR sanitizer/85556
17093         * doc/extend.texi: Document LLVM style format for no_sanitize
17094         attribute.
17096 2018-05-10  Michael Meissner  <meissner@linux.vnet.ibm.com>
17098         * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
17099         mode_supports_vsx_dform_quad to mode_supports_dq_form.
17100         (mode_supports_vsx_dform_quad): Likewise.
17101         (mode_supports_vmx_dform): Move these functions to be next to the
17102         other mode_supports functions.
17103         (mode_supports_dq_form): Likewise.
17104         (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
17105         mode_supports_dq_form.
17106         (reg_offset_addressing_ok_p): Likewise.
17107         (offsettable_ok_by_alignment): Likewise.
17108         (rs6000_legitimate_offset_address_p): Likewise.
17109         (legitimate_lo_sum_address_p): Likewise.
17110         (rs6000_legitimize_address): Likewise.
17111         (rs6000_legitimize_reload_address): Likewise.
17112         (rs6000_secondary_reload_inner): Likewise.
17113         (rs6000_preferred_reload_class): Likewise.
17114         (rs6000_output_move_128bit): Likewise.
17116 2018-05-10  Uros Bizjak  <ubizjak@gmail.com>
17118         * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
17119         Generate SImode target register for null target.
17120         <case IX86_BUILTIN_XGETBV>: Ditto.
17121         <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
17122         * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
17124 2018-05-10  Carl Love  <cel@us.ibm.com>
17126         * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
17127         dcbtt and dcbtstt if operands[2] is 0.
17129 2018-05-10  Uros Bizjak  <ubizjak@gmail.com>
17131         PR target/85693
17132         * config/i386/sse.md (usadv64qi): New expander.
17134 2018-05-10  Segher Boessenkool  <segher@kernel.crashing.org>
17136         * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
17137         altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
17138         -maltivec=be support.
17139         (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
17140         vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
17141         vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
17142         vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
17143         vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
17144         vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
17145         altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
17146         altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
17147         altivec_vsumsws): Adjust.
17148         (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
17149         *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
17150         altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
17151         support.
17152         (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
17153         altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
17154         altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
17155         (altivec_lve<VI_char>x): Delete expand.
17156         (*altivec_lve<VI_char>x_internal): Rename to...
17157         (altivec_lve<VI_char>x): ... this.
17158         (altivec_lvxl_<mode>): Delete expand.
17159         (*altivec_lvxl_<mode>_internal): Rename to ...
17160         (altivec_lvxl_<mode>): ... this.
17161         (altivec_stvxl_<mode>): Delete expand.
17162         (*altivec_stvxl_<mode>_internal): Rename to ...
17163         (altivec_stvxl_<mode>): ... this.
17164         (altivec_stve<VI_char>x): Delete expand.
17165         (*altivec_stve<VI_char>x_internal): Rename to ...
17166         (altivec_stve<VI_char>x): ... this.
17167         (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
17168         doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
17169         reduc_plus_scal_<mode>): Adjust.
17170         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
17171         comment.
17172         (rs6000_cpu_cpp_builtins): Adjust.
17173         (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
17174         * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
17175         altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
17176         * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
17177         -maltivec=be support.
17178         (rs6000_split_vec_extract_var): Adjust.
17179         (rs6000_split_v4si_init): Adjust.
17180         (swap_selector_for_mode): Delete.
17181         (altivec_expand_lvx_be, altivec_expand_stvx_be,
17182         altivec_expand_stvex_be): Delete.
17183         (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
17184         -maltivec=be support.
17185         (rs6000_gimple_fold_builtin): Ditto.
17186         (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
17187         Adjust.
17188         * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
17189         (TARGET_DIRECT_MOVE_64BIT): Adjust.
17190         * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
17191         * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
17192         * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
17193         unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
17194         vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
17195         *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
17196         *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
17197         *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
17198         anonymous split): Adjust.
17199         (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
17200         (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
17202 2018-05-10  Eric Botcazou  <ebotcazou@adacore.com>
17204         * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
17205         when --with-gxx-include-dir is also specified.
17206         * configure: Regenerate.
17208 2018-05-09  Jim Wilson  <jimw@sifive.com>
17210         PR target/84797
17211         * config.gcc (riscv*-*-*): Handle --with-multilib-list.
17212         * config/riscv/t-withmultilib: New.
17213         * config/riscv/withmultilib.h: New.
17214         * doc/install.texi: Document RISC-V --with-multilib-list support.
17216 2018-05-09  Richard Biener  <rguenther@suse.de>
17218         * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
17219         vector.
17220         (vect_bb_vectorization_profitable_p): Adjust.  Compute
17221         actual scalar cost using the cost vector and the add_stmt_cost
17222         machinery.
17224 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
17226         PR rtl-optimization/85645
17227         * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
17228         in the REG_CFA_REGISTER note for LR, don't leave it empty.
17230 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
17232         PR rtl-optimization/85645
17233         * shrink-wrap.c (spread_components): Return a boolean saying if
17234         anything was changed.
17235         (try_shrink_wrapping_separate): Iterate spread_components until
17236         nothing changes anymore.
17238 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
17240         PR rtl-optimization/85645
17241         * regrename.c (build_def_use): Also kill the chains that include the
17242         destination of a REG_CFA_REGISTER note.
17244 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
17246         PR rtl-optimization/85645
17247         *  regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
17248         insn that has a REG_CFA_REGISTER note.
17250 2018-05-09  Richard Sandiford  <richard.sandiford@linaro.org>
17252         * cfgexpand.c (expand_clobber): New function.
17253         (expand_gimple_stmt_1): Use it.
17254         * tree-vect-stmts.c (vect_clobber_variable): New function,
17255         split out from...
17256         (vectorizable_simd_clone_call): ...here.
17257         (vectorizable_store): Emit a clobber either side of an
17258         IFN_STORE_LANES sequence.
17259         (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
17261 2018-05-09  Tom de Vries  <tom@codesourcery.com>
17263         PR target/85626
17264         * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
17265         (define_insn "trap_if_false"): Add exit after trap.
17267 2018-05-09  Eric Botcazou  <ebotcazou@adacore.com>
17269         PR rtl-optimization/85638
17270         * bb-reorder.c: Include common/common-target.h.
17271         (create_forwarder_block): New function extracted from...
17272         (fix_up_crossing_landing_pad): ...here.  Rename into...
17273         (dw2_fix_up_crossing_landing_pad): ...this.
17274         (sjlj_fix_up_crossing_landing_pad): New function.
17275         (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
17276         call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
17277         from both partitions and exit the loop after one iteration.
17279 2018-05-08  Kelvin Nilsen  <kelvin@gcc.gnu.org>
17281         Revert:
17282         * doc/extend.texi (PowerPC Built-in Functions): Rename this
17283         subsection.
17284         (Basic PowerPC Built-in Functions): The new name of the
17285         subsection previously known as "PowerPC Built-in Functions".
17286         (Basic PowerPC Built-in Functions Available on all Configurations):
17287         New subsubsection.
17288         (Basic PowerPC Built-in Functions Available on ISA 2.05): New
17289         subsubsection.
17290         (Basic PowerPC Built-in Functions Available on ISA 2.06): New
17291         subsubsection.
17292         (Basic PowerPC Built-in Functions Available on ISA 2.07): New
17293         subsubsection.
17294         (Basic PowerPC Built-in Functions Available on ISA 3.0): New
17295         subsubsection.
17297 2018-05-08  Jim Wilson  <jimw@sifive.com>
17299         * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
17300         (LD_EMUL_SUFFIX): New.
17301         (LINK_SPEC): Use it.
17303 2018-05-08  Kelvin Nilsen  <kelvin@gcc.gnu.org>
17305         * doc/extend.texi (PowerPC Built-in Functions): Rename this
17306         subsection.
17307         (Basic PowerPC Built-in Functions): The new name of the
17308         subsection previously known as "PowerPC Built-in Functions".
17309         (Basic PowerPC Built-in Functions Available on all Configurations):
17310         New subsubsection.
17311         (Basic PowerPC Built-in Functions Available on ISA 2.05): New
17312         subsubsection.
17313         (Basic PowerPC Built-in Functions Available on ISA 2.06): New
17314         subsubsection.
17315         (Basic PowerPC Built-in Functions Available on ISA 2.07): New
17316         subsubsection.
17317         (Basic PowerPC Built-in Functions Available on ISA 3.0): New
17318         subsubsection.
17320 2018-05-08  Jakub Jelinek  <jakub@redhat.com>
17322         PR target/85683
17323         * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
17324         after cmpelim optimization.
17326 2018-05-08  Olga Makhotina  <olga.makhotina@intel.com>
17328         * config.gcc: Support "goldmont".
17329         * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
17330         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
17331         PROCESSOR_GOLDMONT.
17332         * config/i386/i386.c (m_GOLDMONT): Define.
17333         (processor_target_table): Add "goldmont".
17334         (PTA_GOLDMONT): Define.
17335         (ix86_lea_outperforms): Add TARGET_GOLDMONT.
17336         (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
17337         (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
17338         (fold_builtin_cpu): Add "goldmont".
17339         (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
17340         (ix86_option_override_internal): Add "goldmont".
17341         * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
17342         (processor_type): Add PROCESSOR_GOLDMONT.
17343         * config/i386/i386.md: Add CPU "glm".
17344         * config/i386/glm.md: New file.
17345         * config/i386/x86-tune.def: Add m_GOLDMONT.
17346         * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
17348 2018-05-08  Jakub Jelinek  <jakub@redhat.com>
17350         PR target/85572
17351         * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
17352         E_V4DImode.
17353         * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
17354         VI1248_AVX512VL_AVX512BW.  Handle V2DImode and V4DImode if not
17355         TARGET_AVX512VL using ix86_expand_sse2_abs.  Formatting fixes.
17357         PR target/85317
17358         * config/i386/i386.c (ix86_fold_builtin): Handle
17359         IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
17361         PR target/85480
17362         * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
17363         (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
17365 2018-05-08  Richard Earnshaw  <rearnsha@arm.com>
17367         PR target/85658
17368         * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
17369         (check_arch): Likewise.
17370         (check_fpu): Return the result rather than printing it.
17371         (end arch): Fix operator precedence.
17372         (end cpu): Likewise.
17373         (END): Print the result from check_fpu.
17375 2018-05-08  Richard Sandiford  <richard.sandiford@linaro.org>
17376             Alan Hayward  <alan.hayward@arm.com>
17377             David Sherwood  <david.sherwood@arm.com>
17379         * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
17380         (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
17381         (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
17382         (*fcmuo<mode>_and): New patterns.
17384 2018-05-08  Richard Sandiford  <richard.sandiford@linaro.org>
17386         * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
17387         (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
17388         (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
17389         (cmp_op, sve_imm_con): New code attributes.
17390         (SVE_COND_INT_CMP, imm_con): Delete.
17391         (cmp_op): Remove above unspecs from int attribute.
17392         * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
17393         to...
17394         (*cmp<cmp_op><mode>): ...this.  Use UNSPEC_MERGE_PTRUE instead of
17395         comparison-specific unspecs.
17396         (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
17397         (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
17398         (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
17399         (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
17400         (*vec_fcm<cmp_op><mode>): Rename to...
17401         (*fcm<cmp_op><mode>): ...this and adjust likewise.
17402         (*vec_fcmuo<mode>): Rename to...
17403         (*fcmuo<mode>): ...this and adjust likewise.
17404         (*pred_fcm<cmp_op><mode>): New pattern.
17405         * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
17406         (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
17407         functions.
17408         (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
17409         and UNORDERED.
17410         (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
17411         (aarch64_emit_sve_predicated_cond): New function.
17412         (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
17413         (aarch64_emit_unspec_cond_or): Replace with...
17414         (aarch64_emit_sve_or_conds): ...this new function.  Use
17415         aarch64_emit_sve_ptrue_op for the individual comparisons and
17416         aarch64_emit_binop to OR them together.
17417         (aarch64_emit_inverted_unspec_cond): Replace with...
17418         (aarch64_emit_sve_inverted_cond): ...this new function.  Use
17419         aarch64_emit_sve_ptrue_op for the comparison and
17420         aarch64_emit_unop to invert the result.
17421         (aarch64_expand_sve_vec_cmp_float): Update after the above
17422         changes.  Use aarch64_emit_sve_ptrue_op for native comparisons.
17424 2018-05-07  Nathan Sidwell  <nathan@acm.org>
17426         * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
17427         * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
17428         (Backwards Compatibility): Likewise.
17430 2018-05-07  Luis Machado  <luis.machado@linaro.org>
17432         PR bootstrap/85681
17433         Revert:
17434         2018-05-07  Luis Machado  <luis.machado@linaro.org>
17436         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
17437         <prefetch_dynamic_strides>: New const bool field.
17438         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
17439         prefetch_dynamic_strides.
17440         (exynosm1_prefetch_tune): Likewise.
17441         (thunderxt88_prefetch_tune): Likewise.
17442         (thunderx_prefetch_tune): Likewise.
17443         (thunderx2t99_prefetch_tune): Likewise.
17444         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
17445         to false.
17446         (aarch64_override_options_internal): Update to set
17447         PARAM_PREFETCH_DYNAMIC_STRIDES.
17448         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
17449         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
17450         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
17451         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
17452         prefetch-dynamic-strides setting.
17454         2018-05-07  Luis Machado  <luis.machado@linaro.org>
17456         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
17457         <minimum_stride>: New const int field.
17458         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
17459         minimum_stride field.
17460         (exynosm1_prefetch_tune): Likewise.
17461         (thunderxt88_prefetch_tune): Likewise.
17462         (thunderx_prefetch_tune): Likewise.
17463         (thunderx2t99_prefetch_tune): Likewise.
17464         (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
17465         (aarch64_override_options_internal): Update to set
17466         PARAM_PREFETCH_MINIMUM_STRIDE.
17467         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
17468         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
17469         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
17470         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
17471         stride is constant and is below the minimum stride threshold.
17473 2018-05-07  Luis Machado  <luis.machado@linaro.org>
17475         * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
17476         to 512.
17478 2018-05-07  Luis Machado  <luis.machado@linaro.org>
17480         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
17481         <prefetch_dynamic_strides>: New const bool field.
17482         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
17483         prefetch_dynamic_strides.
17484         (exynosm1_prefetch_tune): Likewise.
17485         (thunderxt88_prefetch_tune): Likewise.
17486         (thunderx_prefetch_tune): Likewise.
17487         (thunderx2t99_prefetch_tune): Likewise.
17488         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
17489         to false.
17490         (aarch64_override_options_internal): Update to set
17491         PARAM_PREFETCH_DYNAMIC_STRIDES.
17492         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
17493         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
17494         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
17495         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
17496         prefetch-dynamic-strides setting.
17498 2018-05-07  Luis Machado  <luis.machado@linaro.org>
17500         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
17501         <minimum_stride>: New const int field.
17502         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
17503         minimum_stride field.
17504         (exynosm1_prefetch_tune): Likewise.
17505         (thunderxt88_prefetch_tune): Likewise.
17506         (thunderx_prefetch_tune): Likewise.
17507         (thunderx2t99_prefetch_tune): Likewise.
17508         (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
17509         (aarch64_override_options_internal): Update to set
17510         PARAM_PREFETCH_MINIMUM_STRIDE.
17511         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
17512         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
17513         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
17514         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
17515         stride is constant and is below the minimum stride threshold.
17517 2018-05-06  Jakub Jelinek  <jakub@redhat.com>
17519         PR c++/85659
17520         * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
17521         the type is addressable.  Don't force op into register if it has
17522         BLKmode.
17524 2018-05-05  Roland McGrath  <mcgrathr@google.com>
17526         PR other/77609
17527         * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
17528         any section for which we don't know a specific type it should have,
17529         regardless of name.  Previously this was done only for the exact
17530         names ".init_array", ".fini_array", and ".preinit_array".
17531         (default_elf_asm_named_section): Add comment about
17532         relationship with default_section_type_flags and SECTION_NOTYPE.
17533         (get_section): Don't consider it a type conflict if one side has
17534         SECTION_NOTYPE and the other doesn't, as long as neither has the
17535         SECTION_BSS et al used in the default_section_type_flags logic.
17537 2018-05-05  Tom de Vries  <tom@codesourcery.com>
17539         PR target/85653
17540         * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
17541         (workaround_barsyncs): New function.
17542         (nvptx_reorg): Use workaround_barsyncs.
17543         * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
17544         (define_expand "nvptx_membar_cta"): New define_expand.
17545         (define_insn "*nvptx_membar_cta"): New insn.
17547 2018-05-04  Pekka Jääskeläinen  <pekka.jaaskelainen@parmance.com>
17549         * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
17550         To improve optimization opportunities.
17551         * builtin-types.def: The new needed builtin types for the above.
17553 2018-05-04  Richard Biener  <rguenther@suse.de>
17555         * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
17556         * gimple-ssa-store-merging.c
17557         (imm_store_chain_info::output_merged_store): Remove redundant create,
17558         release split_store vector contents on failure.
17559         * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
17560         scalar stmt vector on cache hit.
17562 2018-05-04  Segher Boessenkool  <segher@kernel.crashing.org>
17564         * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
17565         Xilinx FP support.
17566         * config.gcc (powerpc-xilinx-eabi*): Remove.
17567         * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
17568         support.
17569         (fusion_addis_mem_combo_load): Ditto.
17570         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
17571         FP support.
17572         (rs6000_cpu_cpp_builtins): Ditto.
17573         * config/rs6000/rs6000-linux.c
17574         (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
17575         * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
17576         * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
17577         support.
17578         (rs6000_setup_reg_addr_masks): Ditto.
17579         (rs6000_init_hard_regno_mode_ok): Ditto.
17580         (rs6000_option_override_internal): Ditto.
17581         (legitimate_lo_sum_address_p): Ditto.
17582         (rs6000_legitimize_address): Ditto.
17583         (rs6000_legitimize_reload_address): Ditto.
17584         (rs6000_legitimate_address_p): Ditto.
17585         (abi_v4_pass_in_fpr): Ditto.
17586         (setup_incoming_varargs): Ditto.
17587         (rs6000_gimplify_va_arg): Ditto.
17588         (rs6000_split_multireg_move): Ditto.
17589         (rs6000_savres_strategy): Ditto.
17590         (rs6000_emit_prologue_components): Ditto.
17591         (rs6000_emit_epilogue_components): Ditto.
17592         (rs6000_emit_prologue): Ditto.
17593         (rs6000_emit_epilogue): Ditto.
17594         (rs6000_elf_file_end): Ditto.
17595         (rs6000_function_value): Ditto.
17596         (rs6000_libcall_value): Ditto.
17597         * config/rs6000/rs6000.h: Ditto.
17598         (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
17599         (TARGET_MINMAX): ... this.  New.
17600         (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
17601         * config/rs6000/rs6000.md: Remove Xilinx FP support.
17602         (*movsi_internal1_single): Delete.
17603         * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
17604         mfpu=, mxilinx-fpu): Delete.
17605         * config/rs6000/singlefp.h: Delete.
17606         * config/rs6000/sysv4.h: Remove Xilinx FP support.
17607         * config/rs6000/t-rs6000: Ditto.
17608         * config/rs6000/t-xilinx: Delete.
17609         * config/rs6000/titan.md: Adjust for fp_type removal.
17610         * config/rs6000/vsx.md: Remove Xilinx FP support.
17611         (VStype_simple): Delete.
17612         (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
17613         * config/rs6000/xfpu.h: Delete.
17614         * config/rs6000/xfpu.md: Delete.
17615         * config/rs6000/xilinx.h: Delete.
17616         * config/rs6000/xilinx.opt: Delete.
17617         * doc/invoke.texi (RS/6000 and PowerPC Options): Remove
17618         -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
17620 2018-05-04  Tom de Vries  <tom@codesourcery.com>
17622         PR libgomp/85639
17623         * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
17624         if ignore == 0.
17626 2018-05-04  Richard Biener  <rguenther@suse.de>
17628         PR middle-end/85627
17629         * tree-complex.c (update_complex_assignment): We are always in SSA form.
17630         (expand_complex_div_wide): Likewise.
17631         (expand_complex_operations_1): Likewise.
17632         (expand_complex_libcall): Preserve EH info of the original stmt.
17633         (tree_lower_complex): Handle removed blocks.
17634         * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
17635         on complex multiplication and division libcall builtins.
17637 2018-05-04  Richard Biener  <rguenther@suse.de>
17639         PR middle-end/85574
17640         * fold-const.c (negate_expr_p): Restrict negation of operand
17641         zero of a division to when we know that can happen without
17642         overflow.
17643         (fold_negate_expr_1): Likewise.
17645 2018-05-04  Jakub Jelinek  <jakub@redhat.com>
17647         PR libstdc++/85466
17648         * real.h (real_nextafter): Declare.
17649         * real.c (real_nextafter): New function.
17650         * fold-const-call.c (fold_const_nextafter): New function.
17651         (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
17652         CASE_CFN_NEXTTOWARD.
17653         (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
17654         even when arg1_mode is different from arg0_mode.
17656 2018-05-03  Nathan Sidwell  <nathan@acm.org>
17658         * doc/extend.texi (Deprecated Features): Remove
17659         -ffriend-injection.
17660         (Backwards Compatibility): Likewise.
17661         * doc/invoke.texi (C++ Language Options): Likewise.
17662         (C++ Dialect Options): Likewise.
17664 2018-05-03  Jakub Jelinek  <jakub@redhat.com>
17666         PR target/85530
17667         * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
17668         _mm512_mask_mullox_epi64): New intrinsics.
17670 2018-05-03  Tom de Vries  <tom@codesourcery.com>
17672         PR testsuite/85106
17673         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
17674         dump files): Add offload-tree.
17676 2018-05-03  Richard Biener  <rguenther@suse.de>
17678         PR tree-optimization/85615
17679         * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
17680         to loops not nested in BBs loop father to avoid creating multi-entry
17681         loops.
17683 2018-05-03  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
17685         PR tree-optimization/70291
17686         * tree-complex.c (expand_complex_libcall): Add type, inplace_p
17687         arguments.  Change return type to tree.  Emit libcall as a new
17688         statement rather than replacing existing one when inplace_p is true.
17689         (expand_complex_multiplication_components): New function.
17690         (expand_complex_multiplication): Expand floating-point complex
17691         multiplication using the above.
17692         (expand_complex_division): Rename inner_type parameter to type.
17693         Update expand_complex_libcall call-site.
17694         (expand_complex_operations_1): Update expand_complex_multiplication
17695         and expand_complex_division call-sites.
17697 2018-05-02  Jakub Jelinek  <jakub@redhat.com>
17699         PR target/85582
17700         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
17701         *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
17702         *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
17703         the highest significant bit of the shift count mask is clear.  In
17704         check whether and[sq]i3 is needed verify that all significant bits
17705         of the shift count other than the highest are set.
17707 2018-05-02  Tom de Vries  <tom@codesourcery.com>
17709         PR libgomp/82428
17710         * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
17711         * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
17712         (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
17713         * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
17714         (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
17715         * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
17716         __builtin_goacc_parlevel_size.
17718 2018-05-02  Richard Biener  <rguenther@suse.de>
17720         PR tree-optimization/85597
17721         * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
17722         do not use split vect_get_vec_defs call but call vect_get_slp_defs
17723         directly.
17725 2018-05-02  Tom de Vries  <tom@codesourcery.com>
17727         PR testsuite/85106
17728         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
17729         dump files): Add ltrans-tree.
17731 2018-05-02  Tom de Vries  <tom@codesourcery.com>
17733         PR testsuite/85106
17734         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
17735         dump files): Add wpa-ipa.
17737 2018-05-02  Segher Boessenkool  <segher@kernel.crashing.org>
17739         * config.gcc (powerpc*-*-*): Remove paired.h.  Unsupport the
17740         powerpc*-*-linux*paired* target.
17741         * config/rs6000/750cl.h: Delete.
17742         * config/rs6000/paired.h: Delete.
17743         * config/rs6000/paired.md: Delete.
17744         * config/rs6000/predicates.md (easy_vector_constant): Remove paired
17745         float support.
17746         * config/rs6000/rs6000-builtin.def: Remove paired float support.
17747         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
17748         comment.  Remove paired float support.
17749         * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
17750         * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
17751         VECTOR_PAIRED.
17752         * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
17753         paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
17754         declarations.
17755         * config/rs6000/rs6000.c: Remove paired float support.
17756         (paired_expand_vector_init, paired_expand_vector_move,
17757         paired_emit_vector_compare, paired_emit_vector_cond_expr,
17758         (paired_expand_lv_builtin, paired_expand_stv_builtin,
17759         paired_expand_builtin, paired_expand_predicate_builtin,
17760         paired_init_builtins): Delete.
17761         * config/rs6000/rs6000.h: Remove paired float support.
17762         * config/rs6000/rs6000.md: Remove paired float support.
17763         (move_from_CR_ov_bit): Delete.
17764         * config/rs6000/rs6000.opt (mpaired): Delete.
17765         * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
17766         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
17768 2018-05-02  Richard Biener  <rguenther@suse.de>
17770         PR middle-end/85567
17771         * gimplify.c (gimplify_save_expr): When in SSA form allow
17772         SAVE_EXPRs to compute to SSA vars.
17774 2018-05-02  Jakub Jelinek  <jakub@redhat.com>
17776         PR target/85582
17777         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
17778         *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
17779         *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
17780         clobber operands[2], instead use a new pseudo.  Formatting fixes.
17782 2018-05-02  Richard Sandiford  <richard.sandiford@linaro.org>
17784         PR tree-optimization/85586
17785         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
17786         exit early for statements in the same group if the accesses are
17787         not strided.
17789 2018-05-02  Tom de Vries  <tom@codesourcery.com>
17791         PR lto/85451
17792         * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
17793         error message.
17795 2018-05-01  Marc Glisse  <marc.glisse@inria.fr>
17797         PR tree-optimization/85143
17798         * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
17800 2018-05-01  Tom de Vries  <tom@codesourcery.com>
17802         PR lto/85451
17803         * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
17804         not found" error message.
17806 2018-05-01  Tom de Vries  <tom@codesourcery.com>
17808         PR other/83786
17809         * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
17810         * vec.c (test_ordered_remove_if): New function.
17811         (vec_c_tests): Call test_ordered_remove_if.
17812         * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
17813         * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
17814         * tree-vect-patterns.c (vect_pattern_recog_1): Use
17815         VEC_ORDERED_REMOVE_IF.
17817 2018-05-01  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
17819         PR tree-optimization/82665
17820         * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
17821         pointer subtraction where arguments come from a memchr call.
17823 2018-05-01  Jakub Jelinek  <jakub@redhat.com>
17825         * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
17826         --push-state --as-needed and --pop-state instead of --as-needed and
17827         --no-as-needed if ld supports it.
17828         * configure: Regenerated.
17830         PR web/85578
17831         * doc/install.texi2html: Replace _002d with - and _002a with * in
17832         generated html files using sed.
17834 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
17836         PR c++/85523
17837         * gcc-rich-location.c (blank_line_before_p): New function.
17838         (use_new_line): New function.
17839         (gcc_rich_location::add_fixit_insert_formatted): New function.
17840         * gcc-rich-location.h
17841         (gcc_rich_location::add_fixit_insert_formatted): New function.
17843 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
17845         * selftest.c (assert_streq): Rename "expected" and "actual" to
17846         "val1" and "val2".  Extend NULL-handling to cover both inputs
17847         symmetrically, while still requiring both to be non-NULL for a pass.
17848         * selftest.h (assert_streq): Rename "expected" and "actual" to
17849         "val1" and "val2".
17850         (ASSERT_EQ): Likewise.
17851         (ASSERT_EQ_AT): Likewise.
17852         (ASSERT_KNOWN_EQ): Likewise.
17853         (ASSERT_KNOWN_EQ_AT): Likewise.
17854         (ASSERT_NE): Likewise.
17855         (ASSERT_MAYBE_NE): Likewise.
17856         (ASSERT_MAYBE_NE_AT): Likewise.
17857         (ASSERT_STREQ): Likewise.  Clarify that both must be non-NULL for
17858         the assertion to pass.
17859         (ASSERT_STREQ_AT): Likewise.
17861 2018-04-30  Jonathan Wakely  <jwakely@redhat.com>
17863         * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
17864         interaction with -pie.
17866 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
17868         * selftest.h: Fix alphabetization of per-source-file selftest
17869         declarations.
17871 2018-04-30  Jason Merrill  <jason@redhat.com>
17873         PR c++/61982 - dead stores to destroyed objects.
17874         * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
17875         of clobber.
17877 2018-04-30  Jason Merrill  <jason@redhat.com>
17879         * tree.c (build_clobber): New.
17880         * tree.h: Declare it.
17881         * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
17883 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
17885         * diagnostic-show-locus.c (layout::layout): Update for
17886         location_get_source_line returning a char_span.
17887         (struct char_span): Move to input.h.
17888         (struct correction): Update for fields in char_span becoming
17889         private.
17890         (struct source_line): Update for location_get_source_line
17891         returning a char_span.
17892         (layout::print_line): Likewise.
17893         * edit-context.c (edited_file::print_content): Likewise.
17894         (edited_file::print_diff_hunk): Likewise.
17895         (edited_file::print_run_of_changed_lines): Likewise.
17896         (edited_file::get_num_lines): Likewise.
17897         (edited_line::edited_line): Likewise.
17898         * final.c (asm_show_source): Likewise.
17899         * input.c (location_get_source_line): Convert return type
17900         from const char * to char_span, losing the final "line_len"
17901         param.
17902         (dump_location_info): Update for the above.
17903         (get_substring_ranges_for_loc): Likewise.  Use a char_span
17904         when handling the literal within the line.
17905         (test_reading_source_line): Update for location_get_source_line
17906         returning a char_span.
17907         * input.h (class char_span): Move here from
17908         diagnostic-show-locus.c, converting from a struct to a class.
17909         Make data members private.
17910         (char_span::operator bool): New.
17911         (char_span::length): New.
17912         (char_span::get_buffer): New.
17913         (char_span::operator[]): New.
17914         (char_span::subspan): Make const.
17915         (char_span::xstrdup): New.
17916         (location_get_source_line): Convert return type from const char *
17917         to char_span, losing the final "line_size" param.
17919 2018-04-30  Jan Hubicka  <jh@suse.cz>
17921         * lto-wrapper.c (ltrans_priorities): New static var.
17922         (cmp_priority): New.
17923         (run_gcc): Read priorities and if doing parallel build order
17924         the Makefile by them.
17926 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
17928         * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
17930 2018-04-30  Richard Biener  <rguenther@suse.de>
17932         * tree-cfg.c (verify_address): Remove base argument, add
17933         flag whether to check TREE_ADDRESSABLE and do that.
17934         (verify_expr): Remove.
17935         (verify_types_in_gimple_reference): Add pieces from verify_expr.
17936         (verify_gimple_assign_single): Likewise.
17937         (verify_gimple_switch): Likewise.
17938         (verify_expr_location_1): Dereference tp once.  Add (disabled)
17939         piece from verify_expr.
17940         (verify_gimple_in_cfg): Do not call verify_expr on all ops.
17942 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
17944         * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
17946 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
17948         * config/arc/arc-protos.h (prepare_extend_operands): Remove.
17949         (small_data_pattern): Likewise.
17950         (arc_rewrite_small_data): Likewise.
17951         * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
17952         (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
17953         (get_symbol_alignment): New function.
17954         (legitimate_small_data_address_p): Likewise.
17955         (legitimate_scaled_address): Update, call
17956         legitimate_small_data_address_p.
17957         (output_sdata): New static variable.
17958         (arc_print_operand): Update how we handle small data operands.
17959         (arc_print_operand_address): Likewise.
17960         (arc_legitimate_address_p): Update, use
17961         legitimate_small_data_address_p.
17962         (arc_rewrite_small_data_p): Remove.
17963         (arc_rewrite_small_data_1): Likewise.
17964         (arc_rewrite_small_data): Likewise.
17965         (small_data_pattern): Likewise.
17966         (compact_sda_memory_operand): Update to use
17967         legitimate_small_data_address_p and get_symbol_alignment.
17968         (prepare_move_operands): Don't rewite sdata pattern.
17969         (prepare_extend_operands): Remove.
17970         * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
17971         pattern.
17972         (zero_extendqisi2): Likewise.
17973         (zero_extendhisi2): Likewise.
17974         (extendqihi2): Likewise.
17975         (extendqisi2): Likewise.
17976         (extendhisi2): Likewise.
17977         (addsi3): Likewise.
17978         (subsi3): Likewise.
17979         (andsi3): Likewise.
17980         * config/arc/constraints.md (Usd): Change it to memory constraint.
17982 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
17984         * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
17985         as source of std instructions.
17986         * config/arc/arc.md (movsi_insn): Update pattern predicate to
17987         allow 6-bit constants as source for store instructions.
17988         (movdi_insn): Update instruction pattern to allow 6-bit constants
17989         as source for store instructions.
17991 2018-04-30  Jonathan Wakely  <jwakely@redhat.com>
17993         * doc/invoke.texi (-fdebug-types-section): Fix grammar.
17995 2018-04-30  Nathan Sidwell  <nathan@acm.org>
17996             Sandra Loosemore <sandra@codesourcery.com>
17998         * dumpfile.c (dump_open): Allow '-' for stdout.
17999         * doc/invoke.texi (Developer Options): Document dump filename
18000         determination early.  Document stdin/stdout selection.
18002 2018-04-30  Andrew Sadek  <andrew.sadek.se@gmail.com>
18004         Microblaze Target: PIC data text relative
18006         * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
18007         * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
18008         Add declaration.
18009         * config/microblaze/microblaze.h (microblaze_constant_address_p):
18010         CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
18011         * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
18012         New addressing mode for data-text relative position indepenedent code.
18013         (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
18014         'ADDRESS_SYMBOLIC_TXT_REL'.
18015         (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
18016         (microblaze_legitimate_pic_operand): Exclude function calls from
18017         pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
18018         (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
18019         addresses cases.
18020         (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
18021         (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
18022         (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
18023         for 'address + offset'.
18024         (microblaze_expand_prologue): Add new function prologue call for
18025         'r20' assignation.
18026         (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
18027         'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
18028         table in case of TARGET_PIC_DATA_TEXT_REL.
18029         (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
18030         * config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
18031         Add new macros 'UNSPEC_TEXT',
18032         'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
18033         + exclude function calls from 'UNSPEC_PLT' in case of data text
18034         relative mode.
18035         * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
18036         new target hook for generating address diff vector tables in case of
18037         flag_pic.
18038         * doc/tm.texi : Regenerate.
18039         * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
18040         'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
18041         of addr diff vector generation.
18042         * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
18043         target hook definition.
18044         * targhooks.h, targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
18045         Add default function for generate_pic_addr_diff_vec -> flag_pic.
18046         * doc/invoke.texi (Add new pic option): Add new microblaze pic
18047         option for data text relative.
18049 2018-04-30  Richard Biener  <rguenther@suse.de>
18051         * tree-chrec.h (evolution_function_is_constant_p): Remove
18052         redundant check.
18053         * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
18055 2018-04-30  Richard Biener  <rguenther@suse.de>
18057         PR bootstrap/85571
18058         * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
18060 2018-04-30  Richard Biener  <rguenther@suse.de>
18062         PR tree-optimization/28364
18063         PR tree-optimization/85275
18064         * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
18065         copying first exit test.
18067 2018-04-28  Mark Wielaard  <mark@klomp.org>
18069         * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
18070         dwarf_version >= 5.
18071         (dwarf_AT): Handle DW_AT_addr_base.
18072         (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
18074 2018-04-28  Uros Bizjak  <ubizjak@gmail.com>
18076         PR target/84431
18077         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
18078         (*ashl<dwi>3_doubleword_mask_1): Ditto.
18079         (*<shift_insn><dwi>3_doubleword_mask): Ditto.
18080         (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
18082 2018-04-28  Richard Biener  <rguenther@suse.de>
18084         * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
18085         (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
18086         to reflect use.  Only add interesting stmts.
18088 2018-04-27  Martin Jambor  <mjambor@suse.cz>
18090         PR ipa/85549
18091         * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
18092         the jump function allows for passing through aggregate values.
18094 2018-04-27  David Malcolm  <dmalcolm@redhat.com>
18096         * input.h (in_system_header_at): Convert from macro to inline
18097         function.
18098         (from_macro_expansion_at): Likewise.
18099         (from_macro_definition_at): Likewise.
18101 2018-04-27  Jeff Law  <law@redhat.com>
18103         * config.gcc: Mark tile* targets as deprecated/obsolete.
18105 2018-04-27  Richard Biener  <rguenther@suse.de>
18107         * config/aarch64/aarch64.c: Simplify ap.__stack advance and
18108         fix for ILP32.
18110 2018-04-27  Richard Biener  <rguenther@suse.de>
18112         * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
18114 2018-04-27  Uros Bizjak  <ubizjak@gmail.com>
18116         * config/i386/i386.md (*movti_internal): Substitute Ye constraint
18117         with Yd constraint. Set "preferred_for_speed" attribute from
18118         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
18119         with Yd constraint.
18120         (*movdi_internal): Ditto.
18121         (movti_interunit splitters): Remove
18122         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
18123         (movdi_interunit splitters): Ditto.
18124         * config/i386/constraints.md (Ye): Remove.
18125         (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
18127 2018-04-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
18129         PR target/85512
18130         * config/aarch64/constraints.md (Usg): Limit to 31.
18131         (Usj): Limit to 63.
18133 2018-04-27  Jakub Jelinek  <jakub@redhat.com>
18135         PR tree-optimization/85529
18136         * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
18137         argument.  Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
18138         rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
18139         zero extension or masking of the MSB bit.
18140         (optimize_range_tests): Add FIRST_BB argument, pass it through
18141         to optimize_range_tests_var_bound.
18142         (maybe_optimize_range_tests, reassociate_bb): Adjust
18143         optimize_range_tests callers.
18145 2018-04-26  Richard Biener  <rguenther@suse.de>
18146             Jakub Jelinek  <jakub@redhat.com>
18148         * cgraph.h (symbol_table): Just declare debug method here.
18149         * symtab.c (symbol_table::debug): Define.
18151 2018-04-26  Eric Botcazou  <ebotcazou@adacore.com>
18153         * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
18155 2018-04-26  Uros Bizjak  <ubizjak@gmail.com>
18157         * config/i386/i386.md ("isa" attribute): Add x64_sse2.
18158         ("enabled" attribute): Handle x64_sse2 "isa" attribute.
18159         (*movdi_internal): Substitute Yi and Yj constraint with x
18160         and Ym and Yn constraint with y constraint.  Update "isa"
18161         attribute and set "preferred_for_speed" attribute from
18162         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
18163         (*movsi_internal): Ditto.
18164         (*movdf_internal): Ditto.
18165         (*movsf_internal): Ditto.
18166         (*zero_extendsidi2): Ditto.
18167         * config/i386/sse.md (vec_set<mode>_0): Ditto.
18168         (sse2_loadld): Ditto.
18169         (*vec_extract<ssevecmodelower>_0): Ditto.
18170         (*vec_extractv4si_0_zext_sse4): Ditto.
18171         (vec_concatv2di): Ditto.
18172         (*vec_dup<mode>): Ditto.
18173         * config/i386/mmx.md (*mov<mode>_internal): Ditto.
18174         * config/i386/constraints.md (Yi): Remove.
18175         (Yj): Remove.
18176         (Ym): Remove.
18177         (Yn): Remove.
18179 2018-04-26  Nathan Sidwell  <nathan@acm.org>
18181         * dumpfile.c (dump_open): New.
18182         (dump_open_alternate_stream, dump_start, dump_begin): Call it.
18183         (dump_finish): Detect stdio/stderr by value not name.
18185 2018-04-26  Jonathan Wakely  <jwakely@redhat.com>
18187         * doc/invoke.texi (-Wreturn-type): Document default status for C++.
18189 2018-04-26  Tom de Vries  <tom@codesourcery.com>
18191         PR target/84952
18192         * config/nvptx/nvptx.c (verify_neutering_jumps)
18193         (verify_neutering_labels): New function
18194         (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
18196 2018-04-26  Tom de Vries  <tom@codesourcery.com>
18198         PR target/84025
18199         * config/nvptx/nvptx.c (needs_neutering_p): New function.
18200         (nvptx_single): Use needs_neutering_p to skip over insns that do not
18201         need neutering.
18203 2018-04-26  Richard Biener <rguenther@suse.de>
18204             Tom de Vries  <tom@codesourcery.com>
18206         PR lto/85422
18207         * lto-streamer-out.c (output_function): Fixup loops if required to match
18208         discovery done in the reader.
18210 2018-04-26  Richard Biener  <rguenther@suse.de>
18212         PR tree-optimization/85116
18213         * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
18214         have a loop exit from the single latch predecessor.  Remove
18215         case of header with just condition.
18216         (ch_base::copy_headers): Exclude infinite loops from any
18217         processing.
18218         (pass_ch::execute): Record exits.
18220 2018-04-26  Richard Biener  <rguenther@suse.de>
18222         * tree-vect-data-refs.c (vect_get_data_access_cost): Get
18223         prologue cost vector and pass it to vect_get_load_cost.
18224         (vect_get_peeling_costs_all_drs): Likewise.
18225         (vect_peeling_hash_get_lowest_cost): Likewise.
18226         (vect_enhance_data_refs_alignment): Likewise.
18228 2018-04-26  Richard Biener  <rguenther@suse.de>
18230         PR middle-end/85450
18231         * tree-cfg.c (verify_gimple_assign_unary): Restore proper
18232         checking of integer<->pointer conversions.
18233         * omp-expand.c (expand_omp_for_static_nochunk): Avoid
18234         sign-/zero-extending pointer types.
18235         (expand_omp_for_static_chunk): Likewise.
18237 2018-03-22  Hans-Peter Nilsson  <hp@axis.com>
18238             Jean Lee  <xiaoyur347@gmail.com>
18240         * config/mips/mips.c (mips_asan_shadow_offset): New function.
18241         (TARGET_ASAN_SHADOW_OFFSET): Define.
18242         * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
18243         true for -fsanitize=address.
18245 2018-04-25  Mark Wielaard  <mark@klomp.org>
18247         * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
18248         shorter ones.
18250 2018-04-25  Jakub Jelinek  <jakub@redhat.com>
18252         * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
18253         than "alu", remove explicit "memory" and "imm_disp" attributes.
18254         (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
18256         PR middle-end/85414
18257         * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
18258         case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
18259         gen_lowpart_no_emit.
18261 2018-04-25  Sebastian Peryt  <sebastian.peryt@intel.com>
18263         PR target/85473
18264         * config/i386/i386.c (ix86_expand_builtin): Change memory
18265         operand to XI, extend p0 to Pmode.
18266         * config/i386/i386.md: Change unspec volatile and operand
18267         1 mode to XI, change operand 0 mode to P.
18269 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
18271         * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
18272         GET_MODE_MASK before any checking.
18273         (nds32_can_use_bset_p): Likewise.
18274         (nds32_can_use_btgl_p): Likewise.
18276 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
18278         * config/nds32/nds32-doubleword.md: New define_split pattern for
18279         illegal register number.
18281 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
18283         * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
18285 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
18287         * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
18289 2018-04-25  Richard Biener  <rguenther@suse.de>
18291         * lto-streamer.h (LTO_major_version): Bump to 8.
18293 2018-04-25  Jakub Jelinek  <jakub@redhat.com>
18295         * BASE-VER: Set to 9.0.0.
18297 2018-04-24  Segher Boessenkool  <segher@kernel.crashing.org>
18299         * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
18300         in __abskf2 and __powikf2.
18302 2018-04-24  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
18304         PR target/85512
18305         * config/aarch64/constraints.md (Usg, Usj): New constraints.
18306         * config/aarch64/iterators.md (cmode_simd): New mode attribute.
18307         * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
18308         Use the above on operand 2.  Reindent.
18309         (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
18311 2018-04-24  H.J. Lu  <hongjiu.lu@intel.com>
18313         PR target/85485
18314         * common/config/i386/i386-common.c (ix86_handle_option): Don't
18315         handle OPT_mcet.
18316         * config/i386/i386.opt (mcet): Removed.
18317         * doc/install.texi: Remove -mcet documentation.
18318         * doc/invoke.texi: Likewise.
18320 2018-04-24  H.J. Lu  <hongjiu.lu@intel.com>
18322         PR target/85485
18323         * doc/install.texi: Remove -mcet from bootstrap-cet.
18325 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
18327         PR target/85511
18328         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
18329         __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
18330         if TARGET_64BIT.
18332         PR target/85503
18333         * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
18334         const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
18335         containing a CONST_VECTOR.
18337 2018-04-24  Cesar Philippidis  <cesar@codesourcery.com>
18339         * doc/install.texi: Update newlib dependency for nvptx.
18341 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
18343         PR target/85508
18344         * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
18345         instead of INTVAL when shifting x left.
18347 2018-04-24  Andreas Krebbel  <krebbel@linux.ibm.com>
18349         PR tree-optimization/85478
18350         * tree-vect-loop.c (vect_analyze_loop_2): Do not call
18351         vect_grouped_store_supported for single element vectors.
18353 2018-04-24  Richard Biener  <rguenther@suse.de>
18355         PR target/85491
18356         * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
18357         load cost increase to the case of non-constant step.
18359 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
18361         PR target/84828
18362         * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
18363         destination if any_malformed_asm.
18365 2018-04-23  Eric Botcazou  <ebotcazou@adacore.com>
18367         PR middle-end/85496
18368         * expr.c (store_field): In the bitfield case, if the value comes from
18369         a function call and is returned in registers by means of a PARALLEL,
18370         do not change the mode of the temporary unless BLKmode and VOIDmode.
18372 2018-04-23  Andrey Belevantsev  <abel@ispras.ru>
18374         PR rtl-optimization/85423
18375         * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
18376         dependencies to debug insns when the previous insn is non-debug.
18378 2018-04-23  Claudiu Zissulescu  <claziss@synopsys.com>
18380         * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
18381         enums into a single definition.
18382         (fls): Fix predicates and printing.
18383         (seti): Likewise.
18385 2018-04-23  Claudiu Zissulescu  <claziss@synopsys.com>
18387         * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
18388         * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
18389         and short u6 immediate.
18390         (check_if_valid_sleep_operand): Remove.
18391         * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
18393 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
18395         * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
18396         flag_always_save_lp condition.
18397         * config/nds32/nds32.opt (malways-save-lp): New option.
18399 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
18401         * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
18402         * config/nds32/nds32.c (nds32_use_load_post_increment): New.
18403         * config/nds32/nds32.h
18404         (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
18405         (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
18407 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
18409         * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
18410         * config/nds32/nds32.c (nds32_ls_333_p): Remove.
18412 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
18413             Chung-Ju Wu  <jasonwucj@gmail.com>
18415         * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
18416         Declare.
18417         * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
18418         * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
18420 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
18422         * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
18424 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
18426         * config/nds32/nds32-protos.h (nds32_data_alignment,
18427         nds32_local_alignment): Declare.
18428         * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
18429         nds32_local_alignment): New functions.
18430         (TARGET_CONSTANT_ALIGNMENT): Define.
18431         * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
18433 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
18435         * config/nds32/nds32.c
18436         (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
18437         (TARGET_MODES_TIEABLE_P): Likewise.
18439 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
18441         * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
18442         level Ofast and Og.
18444 2018-04-22  Monk Chiang  <sh.chiang04@gmail.com>
18445             Chung-Ju Wu  <jasonwucj@gmail.com>
18447         * config/nds32/constants.md (unspec_volatile_element): Add enum values
18448         for unaligned access.
18449         * config/nds32/nds32-intrinsic.c: Implementation of expanding
18450         unaligned access.
18451         * config/nds32/nds32-intrinsic.md: Likewise.
18452         * config/nds32/nds32_intrinsic.h: Likewise.
18453         * config/nds32/nds32.h (nds32_builtins): Likewise.
18454         * config/nds32/nds32.opt (munaligned-access): New option.
18455         * config/nds32/nds32.c (nds32_asm_file_start): Display
18456         flag_unaligned_access status.
18458 2018-04-20  Kito Cheng  <kito.cheng@gmail.com>
18460         * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
18461         -mno-relax is present.
18462         * config/riscv/linux.h (LINK_SPEC): Ditto.
18464 2018-04-20  Martin Sebor  <msebor@redhat.com>
18466         PR c/85365
18467         * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
18468         for null pointers.
18469         (gimple_fold_builtin_stxcpy_chk): Same.
18470         * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
18472 2018-04-20  Michael Meissner  <meissner@linux.ibm.com>
18474         PR target/85456
18475         * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
18476         __powikf2 when long double is IEEE 128-bit.
18478 2018-04-20  Kito Cheng  <kito.cheng@gmail.com>
18480         * config/riscv/riscv.c (riscv_first_stack_step): Round up min
18481         step to make sure stack always aligned.
18483 2018-04-20  Carl Love  <cel@us.ibm.com>
18485         PR target/83402
18486         * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
18487         size check for arg0.
18489 2018-04-20  Nathan Sidwell  <nathan@codesourcery.com>
18490             Tom de Vries  <tom@codesourcery.com>
18492         PR target/85445
18493         * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
18494         Emit insns for calls too.
18495         (nvptx_find_par): Always look for worker-level predecessor insn.
18496         (nvptx_propagate): Add is_call parm, return bool.  Copy frame for
18497         calls.
18498         (nvptx_vpropagate, nvptx_wpropagate): Adjust.
18499         (nvptx_process_pars): Propagate frames for calls.
18501 2018-04-20  H.J. Lu  <hongjiu.lu@intel.com>
18503         PR target/85469
18504         * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
18505         Removed.
18506         (OPTION_MASK_ISA_IBT_UNSET): Likewise.
18507         (ix86_handle_option): Don't handle OPT_mibt.
18508         * config/i386/cet.h: Check __CET__ instead of __IBT__ and
18509         __SHSTK__.
18510         * config/i386/driver-i386.c (host_detect_local_cpu): Remove
18511         has_ibt and ibt.
18512         * config/i386/i386-c.c (ix86_target_macros_internal): Don't
18513         check OPTION_MASK_ISA_IBT nor flag_cf_protection.
18514         (ix86_target_macros): Define __CET__ with flag_cf_protection
18515         for -fcf-protection.
18516         * config/i386/i386.c (isa2_opts): Remove -mibt.
18517         * config/i386/i386.h (TARGET_IBT): Removed.
18518         (TARGET_IBT_P): Likewise.
18519         (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
18520         * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
18521         * config/i386/i386.opt (mcet): Update help message.
18522         (mshstk): Likewise.
18523         (mibt): Removed.
18524         * doc/invoke.texi: Remove -mibt.  Document __CET__.  Document
18525         -mcet as an alias for -mshstk.
18527 2018-04-20  Richard Biener <rguenther@suse.de>
18529         PR middle-end/85475
18530         * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
18531         complexity by forcing a single use of the multiply operand.
18533 2018-04-20  Martin Jambor  <mjambor@suse.cz>
18535         ipa/85449
18536         * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
18537         recursion dependency to only apply to non-clones.
18539 2018-04-20  Martin Jambor  <mjambor@suse.cz>
18541         ipa/85447
18542         * ipa-cp.c (create_specialized_node): Check that clones of
18543         self-recursive edges exist during IPA-CP.
18545 2018-04-19  Toon Moene  <toon@moene.org>
18547         * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
18548         by -O3.
18550 2018-04-19  Jakub Jelinek  <jakub@redhat.com>
18552         PR tree-optimization/85467
18553         * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
18554         VECTOR_TYPE_P macro.  If type is vector type, VIEW_CONVERT_EXPR the
18555         VECTOR_CST element to type.
18557 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
18559         PR target/85397
18560         * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
18561         * config/i386/i386.md (builtin_setjmp_setup): Removed.
18562         (builtin_longjmp): Likewise.
18563         (save_stack_nonlocal): New pattern.
18564         (restore_stack_nonlocal): Likewise.
18566 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
18568         PR target/85404
18569         * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
18570         Replace ASM_OUTPUT_LABEL with fprintf.
18572 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
18574         PR target/85417
18575         * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
18576         Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
18577         * config/i386/i386-c.c (ix86_target_macros_internal): Also
18578         define __IBT__ and __SHSTK__ for -fcf-protection.
18579         * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
18580         TARGET_IBT.
18581         (ix86_trampoline_init): Likewise.
18582         (x86_output_mi_thunk): Likewise.
18583         (ix86_notrack_prefixed_insn_p): Likewise.
18584         (ix86_option_override_internal): Don't disallow -fcf-protection.
18585         * config/i386/i386.md (rdssp<mode>): Also enable for
18586         -fcf-protection.
18587         (incssp<mode>): Likewise.
18588         (nop_endbr): Likewise.
18589         * config/i386/i386.opt (mcet): Change help message to built-in
18590         functions only.
18591         (mibt): Likewise.
18592         (mshstk): Likewise.
18593         * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
18594         on -fcf-protection.  Change -mcet, -mibt and -mshstk to only
18595         enable CET built-in functions.
18597 2018-04-19  Sebastian Peryt  <sebastian.peryt@intel.com>
18599         * common/config/i386/i386-common.c
18600         (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
18601         OPTION_MASK_ISA_MOVDIRI_UNSET,
18602         OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
18603         (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
18604         * config.gcc (movdirintrin.h): New header.
18605         * config/i386/cpuid.h (bit_MOVDIRI,
18606         bit_MOVDIR64B): New bits.
18607         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
18608         and -mmvodir64b.
18609         * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
18610         (VOID, PVOID, PCVOID)): New function types.
18611         * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
18612         __builtin_ia32_directstoreu_u64,
18613         __builtin_ia32_movdir64b): New builtins.
18614         * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
18615         * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
18616         and -mmovdiri.
18617         (ix86_valid_target_attribute_inner_p): Ditto.
18618         (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
18619         and VOID_FTYPE_PUNSIGNED_UNSIGNED.
18620         (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
18621         * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
18622         TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
18623         * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
18624         (movdiri<mode>, movdir64b_<mode>): New.
18625         * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
18626         * config/i386/immintrin.h: Include movdirintrin.h.
18627         * config/i386/movdirintrin.h: New file.
18628         * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
18630 2018-04-19  Richard Biener  <rguenther@suse.de>
18632         PR middle-end/85455
18633         * cfg.c (clear_bb_flags): When loop state says we have
18634         marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
18636 2018-04-19  Richard Biener  <rguenther@suse.de>
18638         PR tree-optimization/84737
18639         * tree-vect-data-refs.c (vect_copy_ref_info): New function
18640         copying restrict info.
18641         (vect_setup_realignment): Use it.
18642         * tree-vectorizer.h (vect_copy_ref_info): Declare.
18643         * tree-vect-stmts.c (vectorizable_store): Copy ref info from
18644         the first DR to all generated stores.
18645         (vectorizable_load): Likewise for loads.
18647 2018-04-19  Jakub Jelinek  <jakub@redhat.com>
18649         PR tree-optimization/85446
18650         * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
18651         the integral and pointer types to have the same precision.
18653         * doc/install.texi: Document --disable-cet being the default and
18654         --enable-cet=auto.
18656 2018-04-18  Martin Liska  <mliska@suse.cz>
18658         * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
18659         style.
18661 2018-04-18  Martin Liska  <mliska@suse.cz>
18663         Revert
18664         2018-03-02  Eric Botcazou  <ebotcazou@adacore.com>
18666         PR ipa/83983
18667         * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
18668         arguments if they are comparable.
18670 2018-04-18  Martin Liska  <mliska@suse.cz>
18672         Revert
18673         2018-03-13  Eric Botcazou  <ebotcazou@adacore.com>
18675         PR lto/84805
18676         * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
18677         incomplete types.
18679 2018-04-18  H.J. Lu  <hongjiu.lu@intel.com>
18681         PR target/85388
18682         * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
18683         ENDBR after calling __morestack.
18685 2018-04-18  David Malcolm  <dmalcolm@redhat.com>
18687         PR jit/85384
18688         * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
18689         by using gcc_base_ver to generate a gcc_driver_version, and use
18690         it when generating GCC_DRIVER_NAME.
18691         * configure: Regenerate.
18693 2018-04-18  Jakub Jelinek  <jakub@redhat.com>
18695         PR target/81084
18696         * config.gcc: Obsolete powerpc*-*-*spe*.
18698 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
18700         PR debug/84637
18701         * dbxout.c (dbxout_int): Perform negation in unsigned int type.
18702         (stabstr_D): Change type of unum from unsigned int to
18703         unsigned HOST_WIDE_INT.  Perform negation in unsigned HOST_WIDE_INT
18704         type.
18706 2018-04-17  Jim Wilson  <jimw@sifive.com>
18708         PR 84856
18709         * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
18710         RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
18711         Set arg_pointer_offset after using pretend_args_size.
18713 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
18715         PR rtl-optimization/85431
18716         * dse.c (record_store): Ignore zero width stores.
18718         PR sanitizer/85230
18719         * asan.c (handle_builtin_stack_restore): Adjust comment.  Emit
18720         __asan_allocas_unpoison call and last_alloca_addr = new_sp before
18721         __builtin_stack_restore rather than after it.
18722         * builtins.c (expand_asan_emit_allocas_unpoison): Pass
18723         arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
18724         argument instead of virtual_dynamic_stack_rtx.
18726 2018-04-17  Kelvin Nilsen  <kelvin@gcc.gnu.org>
18728         * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
18729         New prototype.
18730         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
18731         Add note to error message to explain internal mapping of overloaded
18732         built-in function name to non-overloaded built-in function name.
18733         * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
18734         function.
18736 2018-04-17  Michael Meissner  <meissner@linux.vnet.ibm.com>
18738         PR target/85424
18739         * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
18740         where the inputs overlap with the output.
18742 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
18744         * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
18745         (=v, v) alternative and explicit "memory" attribute.
18746         (vec_extract_lo_<mode><mask_name>): Likewise.  Also add
18747         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
18748         attributes.
18749         (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
18750         "sselog1" type instead of "sselog".
18751         (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
18752         "sselog".  Remove explicit "memory" attribute.
18753         (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
18754         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
18755         attributes.
18756         (vec_extract_hi_v32hi): Merge all alternatives into one, use
18757         "sselog1" type instead of "sselog".  Remove explicit "memory"
18758         attribute.
18759         (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
18760         use "sselog1" type instead of "sselog".  Remove explicit "memory"
18761         attribute.
18762         (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
18763         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
18764         attributes.
18765         (vec_extract_hi_v64qi): Merge all alternatives into one, use
18766         "sselog1" type instead of "sselog".  Remove explicit "memory"
18767         attribute.
18768         (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
18769         use "sselog1" type instead of "sselog".  Remove explicit "memory"
18770         attribute.
18772         PR target/85430
18773         * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
18775         PR middle-end/85414
18776         * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
18777         on a SUBREG.
18779 2018-04-17  Martin Jambor  <mjambor@suse.cz>
18781         PR ipa/85421
18782         * ipa-cp.c (create_specialized_node): Call
18783         expand_all_artificial_thunks if necessary.
18785 2018-04-17  Martin Liska  <mliska@suse.cz>
18787         PR lto/85405
18788         * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
18789         in message, remote space in between '_G' and '('.
18791 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
18793         PR target/85281
18794         * config/i386/sse.md (reduces<mode><mask_scalar_name>,
18795         avx512f_vmcmp<mode>3<round_saeonly_name>,
18796         avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
18797         avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
18798         avx512f_rndscale<mode><round_saeonly_name>,
18799         avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
18800         avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
18801         Use %<iptr>2 instead of %2 for -masm=intel.
18802         (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
18803         avx512f_vcvttss2usi<round_saeonly_name>,
18804         avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
18805         -masm=intel.
18806         (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
18807         avx512f_vcvttsd2usi<round_saeonly_name>,
18808         avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
18809         Use %q1 instead of %1 for -masm=intel.
18810         (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
18811         avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
18812         of %3 for -masm=intel.
18813         (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
18814         -masm=intel.
18815         (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
18816         -masm=intel.
18817         (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
18818         -masm=intel.
18819         (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
18820         %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
18821         %g1.
18822         (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
18823         -masm=intel.
18824         (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
18825         %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
18826         %g1 and one with %0 and %1.
18827         (avx512er_vmrcp28<mode><round_saeonly_name>,
18828         avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
18829         %1 for -masm=intel.
18830         (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
18831         avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
18832         avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
18833         of %0 and %{%4%} for -masm=intel.
18834         (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
18835         avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
18836         avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
18837         order of %0 and %{%5%}%{z%} for -masm=intel.
18839 2018-04-17  Jan Hubicka  <jh@suse.cz>
18841         PR lto/85405
18842         * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
18844 2018-04-17  Martin Liska  <mliska@suse.cz>
18846         PR ipa/85329
18847         * multiple_target.c (create_dispatcher_calls): Set apostrophes
18848         for target_clone error message.  Make default implementation
18849         clone to be a local declaration.
18850         (separate_attrs): Add new argument and check for an empty
18851         string.
18852         (expand_target_clones): Handle it.
18853         (ipa_target_clone): Make redirection just for target_clones
18854         functions.
18856 2018-04-16  Cesar Philippidis  <cesar@codesourcery.com>
18857             Tom de Vries  <tom@codesourcery.com>
18859         PR middle-end/84955
18860         * omp-expand.c (expand_oacc_for): Add dummy false branch for
18861         tiled basic blocks without omp continue statements.
18863 2018-04-16  Aaron Sawdey  <acsawdey@linux.ibm.com>
18865         PR target/83660
18866         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
18867         vec_extract expression as having side effects to make sure it gets
18868         a cleanup point.
18870 2018-04-16  H.J. Lu  <hongjiu.lu@intel.com>
18872         PR target/85403
18873         * config/i386/i386.c (get_builtin_code_for_version): Check
18874         error_mark_node.
18876 2018-04-16  Olga Makhotina  <olga.makhotina@intel.com>
18878         PR target/84331
18879         * config.gcc: Support "skylake".
18880         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
18881         PROCESSOR_SKYLAKE.
18882         * config/i386/i386.c (m_SKYLAKE): Define.
18883         (processor_target_table): Add "skylake".
18884         (ix86_option_override_internal): Add "skylake".
18885         (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
18886         PROCESSOR_CANNONLAKE.
18887         (get_builtin_code_for_version): Fix priority for
18888         PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
18889         PROCESSOR_SKYLAKE-AVX512.
18890         * config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
18891         (processor_type): Add PROCESSOR_SKYLAKE.
18893 2018-04-16  Paolo Carlini  <paolo.carlini@oracle.com>
18894             Jason Merrill  <jason@redhat.com>
18896         PR c++/85112
18897         * convert.c (convert_to_integer_1): Use direct recursion for
18898         enumeral types and types with a precision less than the number
18899         of bits in their mode.
18901 2018-04-16  Julia Koval  <julia.koval@intel.com>
18903         PR target/84413
18904         * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
18905         X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
18907 2018-04-14  Segher Boessenkool  <segher@kernel.crashing.org>
18909         PR target/85293
18910         * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
18911         * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
18912         and -mno-direct-move.
18914 2018-04-13  Paul A. Clarke  <pc@us.ibm.com>
18916         PR target/83402
18917         * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
18918         Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
18919         Ensure negative shifts result in {0}.
18921 2018-04-13  Vladimir Makarov  <vmakarov@redhat.com>
18923         PR rtl-optimization/79916
18924         * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
18925         regs (if any) to define how to gnerate SD moves when LRA is in
18926         progress.
18928 2018-04-13  Jakub Jelinek  <jakub@redhat.com>
18930         PR rtl-optimization/85393
18931         * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
18932         * except.c (expand_dw2_landing_pad_for_region): Make static.
18933         * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
18934         a label and unconditional jump to old_bb, rather than
18935         expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
18936         basic block.
18938         PR rtl-optimization/85376
18939         * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
18940         zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
18941         instead of a specific value.
18943 2018-04-13  Jan Hubicka  <hubicka@ucw.cz>
18944             Bin Cheng  <bin.cheng@arm.com>
18946         PR tree-optimization/82965
18947         PR tree-optimization/83991
18948         * cfgloopanal.c (expected_loop_iterations_unbounded): Add
18949         by_profile_only parameter.
18950         * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
18951         information if the loop was predicted to iterate too many times.
18952         * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
18954 2018-04-13  Jan Hubicka  <hubicka@ucw.cz>
18956         PR lto/71991
18957         * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
18958         always inline.
18960 2018-04-13  Martin Liska  <mliska@suse.cz>
18961             Jakub Jelinek  <jakub@redhat.com>
18963         PR middle-end/81657
18964         * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
18965         * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
18966         * builtins.c (expand_builtin_memory_copy_args): Use
18967         BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
18968         handle dest_addr == pc_rtx.
18970 2018-04-12  Segher Boessenkool  <segher@kernel.crashing.org>
18972         PR target/85291
18973         * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
18974         asked to not generate direct moves.
18975         (fix_trunc<mode>si2_stfiwx): Similar.
18976         (fix_trunc<mode>si2_internal): Similar.
18978 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
18980         PR debug/83157
18981         * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
18982         * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
18983         lookup if dest in some wider mode is known to be const0_rtx and
18984         if so, record permanent equivalence for it to be ZERO_EXTEND of
18985         the narrower mode destination.
18987 2018-04-12  Cesar Philippidis  <cesar@codesourcery.com>
18989         * lto-streamer-out.c (output_function): Revert 259346.
18990         * omp-expand.c (expand_oacc_for): Likewise.
18992 2018-04-12  Alexander Monakov  <amonakov@ispras.ru>
18994         PR rtl-optimization/85354
18995         * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
18996         * sel-sched.c (sel_global_init): ... here.
18998 2018-04-12  Eric Botcazou  <ebotcazou@adacore.com>
19000         PR target/85238
19001         * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
19002         * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
19003         mode for PE-COFF targets.
19004         * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
19005         (i386_pe_asm_lto_end): Likewise.
19006         * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
19007         (TARGET_ASM_LTO_END): Likewise.
19008         * config/i386/winnt.c (saved_debug_info_level): New static variable.
19009         (i386_pe_asm_lto_start): New function.
19010         (i386_pe_asm_lto_end): Likewise.
19012 2018-04-12  Cesar Philippidis  <cesar@codesourcery.com>
19013             Richard Biener  <rguenther@suse.de>
19015         PR middle-end/84955
19016         * lto-streamer-out.c (output_function): Fix CFG loop state before
19017         streaming out.
19018         * omp-expand.c (expand_oacc_for): Handle calls to internal
19019         functions like regular functions.
19021 2018-04-12  Richard Biener  <rguenther@suse.de>
19023         PR lto/85371
19024         * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
19025         for the early LTO debug to properly generate references to it
19026         during DIE emission.  Do not re-use that for the skeleton for
19027         split-dwarf.
19028         (dwarf2out_early_finish): Likewise.
19030 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
19032         PR target/85328
19033         * config/i386/sse.md
19034         (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
19035         <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
19036         vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
19037         vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
19038         and output is a reg, avoid creating invalid lowpart subreg, but
19039         instead split into a 512-bit move.  Don't split if not AVX512VL,
19040         input is xmm16+ reg and output is a mem.
19041         (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
19042         vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
19043         xmm16+ reg and output is a mem.
19045 2018-04-12  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
19047         * config/s390/s390.c (s390_output_indirect_thunk_function): Check
19048         also for flag_dwarf2_cfi_asm.
19050 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
19052         PR rtl-optimization/85342
19053         * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
19054         a bool scalar var inside of the loop instead.  Don't try to update
19055         recog_data.operand after failed apply_change_group.
19057 2018-04-12  Tom de Vries  <tom@codesourcery.com>
19059         PR target/85296
19060         * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
19061         (nvptx_assemble_decl_begin): Add undefined param.  Declare undefined
19062         array with flexible array member as array without given dimension.
19063         (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
19064         argument for undefined param to true.
19066 2018-04-11  Aaron Sawdey  <acsawdey@linux.ibm.com>
19068         PR target/85321
19069         * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
19070         -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
19071         from PowerPC section.
19072         * config/rs6000/sysv4.opt (mcall-): Improve help text.
19073         * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
19074         help text that is too long.
19075         * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
19076         help text that is too long.
19077         * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
19078         help text that is too long.
19080 2018-04-11  Uros Bizjak  <ubizjak@gmail.com>
19082         * config/alpha/alpha.md (stack_probe_internal): Rename
19083         from "probe_stack".  Update all callers.
19085 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
19087         PR rtl-optimization/84566
19088         * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
19089         sched_macro_fuse_insns.
19091 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
19093         PR target/84301
19094         * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
19095         (compute_block_dependences): ... from here.
19097 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
19099         PR tree-optimization/85331
19100         * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
19101         from int to HOST_WIDE_INT.
19103 2018-04-11  Martin Jambor  <mjambor@suse.cz>
19105         PR ipa/84149
19106         * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
19107         (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
19108         not the same as the source val.
19109         (cgraph_edge_brings_value_p): New parameter.
19110         (gather_edges_for_value): Pass destination value to
19111         cgraph_edge_brings_value_p.
19112         (perhaps_add_new_callers): Likewise.
19113         (get_info_about_necessary_edges): Likewise and exclude values brought
19114         only by self-recursive edges.
19115         (create_specialized_node): Redirect only clones of self-calling edges.
19116         (+self_recursive_pass_through_p): New function.
19117         (find_more_scalar_values_for_callers_subset): Use it.
19118         (find_aggregate_values_for_callers_subset): Likewise.
19119         (known_aggs_to_agg_replacement_list): Removed.
19120         (decide_whether_version_node): Re-calculate known constants for all
19121         remaining context clones.
19123 2018-04-11  Richard Biener  <rguenther@suse.de>
19125         PR lto/85339
19126         * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
19127         from early DWARF output.
19128         (dwarf2out_early_finish): Output line info unconditionally into
19129         early DWARF and add reference to it.
19131 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
19133         PR target/85281
19134         * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
19135         (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
19136         other than V2DFmode using iptr mode attribute.
19137         (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
19139 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
19141         PR rtl-optimization/84659
19142         * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
19144 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
19146         PR debug/85302
19147         * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
19148         SIZEP is NULL.
19149         (output_loc_list): Pass address of a dummy size variable even in the
19150         locview handling loop.
19151         (index_location_lists): Add comment on why skip_loc_list_entry can't
19152         call size_of_locs.
19154 2018-04-11  Thomas Preud'homme  <thomas.preudhomme@arm.com>
19156         PR target/85261
19157         * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
19158         into register.
19160 2018-04-10  Aaron Sawdey  <acsawdey@linux.ibm.com>
19162         PR target/85321
19163         * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
19164         -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
19165         and -mstring-compare-inline-limit.
19167 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
19169         PR target/85287
19170         * config/rs6000/rs6000.md (allocate_stack): Put the residual size
19171         for stack clash protection in a register whenever we need it to be in
19172         a register.
19174 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
19176         * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
19177         Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
19179 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
19181         PR target/85321
19182         * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
19183         the help text.
19184         (mlong-double-): Ditto.
19185         * config/rs6000/sysv4.opt (msdata=): Ditto.
19186         (mtls-size=): Ditto.
19188 2018-04-10  Kelvin Nilsen  <kelvin@gcc.gnu.org>
19190         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
19191         erroneous entries for
19192         "vector int vec_ldl (int, long int *)", and
19193         "vector unsigned int vec_ldl (int, unsigned long int *)".
19194         Add comments and entries for
19195         "vector bool char vec_ldl (int, bool char *)",
19196         "vector bool short vec_ldl (int, bool short *)",
19197         "vector bool int vec_ldl (int, bool int *)",
19198         "vector bool long long vec_ldl (int, bool long long *)",
19199         "vector pixel vec_ldl (int, pixel *)",
19200         "vector long long vec_ldl (int, long long *)",
19201         "vector unsigned long long vec_ldl (int, unsigned long long *)".
19202         * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
19203         type tree bool_long_long_type_node and correct definition of
19204         bool_V2DI_type_node to make reference to this new type tree.
19205         (rs6000_mangle_type): Replace erroneous reference to
19206         bool_long_type_node with bool_long_long_type_node.
19207         * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
19208         comments to emphasize sign distinctions for char and int types and
19209         replace RS6000_BTI_bool_long constant with
19210         RS6000_BTI_bool_long_long constant.  Also add comment to restrict
19211         use of RS6000_BTI_pixel.
19212         (bool_long_type_node): Remove this macro definition.
19213         (bool_long_long_type_node): New macro definition
19215 2018-04-10  Jakub Jelinek  <jakub@redhat.com>
19217         PR rtl-optimization/85300
19218         * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
19219         into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
19220         simplify_unary_operation fails.
19222 2018-04-10  Martin Liska  <mliska@suse.cz>
19224         * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
19225         cgraph_edge and ipa_ref.
19227 2018-04-10  Jakub Jelinek  <jakub@redhat.com>
19229         PR target/85177
19230         PR target/85255
19231         * config/i386/sse.md
19232         (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
19233         computation of the VEC_MERGE selector from mask.
19234         (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
19235         Fix decoding of the VEC_MERGE selector into mask.
19237 2018-04-10  Richard Sandiford  <richard.sandiford@linaro.org>
19239         PR tree-optimization/85286
19240         * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
19242 2018-04-10  Richard Sandiford  <richard.sandiford@linaro.org>
19244         * final.c (final_1): Set insn_last_address as well as
19245         insn_current_address.
19247 2018-04-10  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
19249         PR target/85173
19250         * explow.c (emit_stack_probe): Call validize_mem on memory location
19251         before passing it to gen_probe_stack.  Create address operand and
19252         legitimize it for the probe_stack_address case.
19254 2018-04-09  Jan Hubicka  <jh@suse.cz>
19256         PR lto/85078
19257         * ipa-devirt.c (rebuild_type_inheritance-hash): New.
19258         * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
19259         * tree.c (free_lang_data_in_type): Fix handling of binfos;
19260         walk basetypes.
19261         (free_lang_data): Rebuild type inheritance graph.
19263 2018-04-09  Martin Sebor  <msebor@redhat.com>
19265         * invoke.texi (-finline-small-functions): Mention other optimization
19266         options.
19267         (-findirect-inlining, -fpartial-inlining): Same.
19268         (-finline-functions-called-once): Same.
19269         (-freorder-blocks-and-partition): Same.
19271 2018-04-09  Jan Hubicka  <jh@suse.cz>
19273         PR rtl/84058
19274         * cfgcleanup.c (try_forward_edges): Do not give up on crossing
19275         jumps; choose last target that matches the criteria (i.e.
19276         no partition changes for non-crossing jumps).
19277         * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
19278         support for redirecting crossing jumps to non-crossing.
19280 2018-04-09  Alexey Brodkin  <abrodkin@synopsys.com>
19282         * config/arc/arc.c (arc_expand_prologue): Set stack usage info
19283         also for naked functions.
19285 2018-04-09  Claudiu Zissulescu  <claziss@synopsys.com>
19287         * config/arc/arc.md (add_shift): New pattern.
19288         (add_shift2): Likewise.
19289         (sub_shift): Likewise.
19290         (sub_shift_cmp0_noout): Likewise.
19291         (compare_si_ashiftsi): Likewise.
19292         (xbfu_cmp0_noout): New combine pattern.
19293         (xbfu_cmp0"): Likewise.
19294         (movsi_set_cc_insn): Place the predicable variant first.
19295         (commutative_binary_cmp0_noout): Remove clobber.
19296         (commutative_binary_cmp0): New pattern.
19297         (noncommutative_binary_cmp0): Likewise.
19298         (noncommutative_binary_cmp0_noout): Likewise.
19299         (noncommutative_binary_comparison_result_used): Removed.
19300         (rsub_cmp0): New pattern.
19301         (rsub_cmp0_noout): Likewise.
19302         (extzvsi): Changed, keep only meaningful variants.
19303         (SQH, SEZ): New iterators.
19304         (SQH_postfix): New mode attribute.
19305         (SEZ_prefix): New code attribute.
19306         (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
19307         (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
19308         * config/arc/predicates.md (cc_set_register): Use CC_REG instead
19309         of numerical value.
19310         (noncommutative_operator): Check the availability of barrel
19311         shifter option.
19313 2018-04-09  Richard Biener  <rguenther@suse.de>
19315         PR tree-optimization/85284
19316         * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
19317         Only use the niter constraining form of simple_iv when the exit
19318         is always executed.
19320 2018-04-09  Tom de Vries  <tom@codesourcery.com>
19322         PR target/84041
19323         * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
19324         (define_expand "*memory_barrier"): New define_expand.
19325         (define_insn "memory_barrier"): New insn.
19327 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
19329         PR rtl-optimization/80463
19330         PR rtl-optimization/83972
19331         PR rtl-optimization/83480
19333         * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
19334         correct producer for the insn.
19335         (tidy_control_flow): Fixup seqnos in case of debug insns.
19337 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
19339         PR rtl-optimization/83913
19341         * sel-sched-ir.c (merge_expr_data): Choose the middle between two
19342         different sched-times when merging exprs.
19344 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
19346         PR rtl-optimization/83962
19348         * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
19349         tidy_fallthru_edge and tidy_control_flow.
19351 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
19353         PR rtl-optimization/83530
19355         * sel-sched.c (force_next_insn): New global variable.
19356         (remove_insn_for_debug): When force_next_insn is true, also leave only
19357         next insn in the ready list.
19358         (sel_sched_region): When the region wasn't scheduled, make another pass
19359         over it with force_next_insn set to 1.
19361 2018-04-08  Monk Chiang  <sh.chiang04@gmail.com>
19363         * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
19364         into tm_file.
19365         * config/nds32/constants.md (unspec_volatile_element): Add enum values
19366         for interrupt control.
19367         * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
19368         functions for interrupt control.
19369         * config/nds32/nds32-intrinsic.md: Likewise.
19370         * config/nds32/nds32_intrinsic.h: Likewise.
19371         * config/nds32/nds32.h (nds32_builtins): Likewise.
19373 2018-04-08  Chung-Ju Wu  <jasonwucj@gmail.com>
19375         * config/nds32/nds32.c (nds32_init_machine_status,
19376         nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
19377         strict_aligned_p field.
19378         (nds32_expand_to_rtl_hook): New function.
19379         (TARGET_EXPAND_TO_RTL_HOOK): Define.
19380         * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
19382 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
19383             Chung-Ju Wu  <jasonwucj@gmail.com>
19385         * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
19386         * config/nds32/nds32-n7.md: New file.
19387         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
19388         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
19389         pipeline.
19390         * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
19391         * config/nds32/nds32.md (pipeline_model): Add n7.
19392         * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
19393         * config/nds32/pipelines.md: Include n7 settings.
19395 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
19396             Chung-Ju Wu  <jasonwucj@gmail.com>
19398         * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
19399         * config/nds32/nds32-e8.md: New file.
19400         * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
19401         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
19402         pipeline.
19403         * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
19404         * config/nds32/nds32.md (pipeline_model): Add e8.
19405         * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
19406         * config/nds32/pipelines.md: Include e8 settings.
19408 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
19409             Chung-Ju Wu  <jasonwucj@gmail.com>
19411         * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
19412         * config/nds32/nds32-n8.md: New file.
19413         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
19414         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
19415         pipeline.
19416         * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
19417         * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
19418         * config/nds32/nds32.md (pipeline_model): Add n8.
19419         * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
19420         * config/nds32/pipelines.md: Include n8 settings.
19422 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
19423             Chung-Ju Wu  <jasonwucj@gmail.com>
19425         * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
19426         * config/nds32/nds32-n9-2r1w.md: New file.
19427         * config/nds32/nds32-n9-3r2w.md: New file.
19428         * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
19429         nds32_register_ports): New or modify for cpu n9.
19430         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
19431         pipeline.
19432         * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
19433         * config/nds32/nds32-utils.c: New file.
19434         * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
19435         TARGET_MUL_SLOW): Define.
19436         * config/nds32/nds32.md (pipeline_model): New attribute.
19437         * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
19438         New options that support cpu n9.
19439         * config/nds32/pipelines.md: Include n9 settings.
19440         * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
19442 2018-04-08  Chung-Ju Wu  <jasonwucj@gmail.com>
19444         * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
19445         information if necessary.
19446         (output_cond_branch_compare_zero): Likewise.
19447         * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
19448         (nds32_target_alignment): Refine for alignment.
19449         * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
19450         (FUNCTION_BOUNDARY): Modify.
19451         * config/nds32/nds32.md (call_internal, call_value_internal): Consider
19452         align case.
19453         * config/nds32/nds32.opt (malways-align, malign-functions): New.
19455 2018-04-08  Monk Chiang  <sh.chiang04@gmail.com>
19457         * config/nds32/constants.md (unspec_volatile_element): Add values for
19458         TLB operation and data prefetch.
19459         * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
19460         functions for TLB operation and data prefetch.
19461         * config/nds32/nds32-intrinsic.md: Likewise.
19462         * config/nds32/nds32_intrinsic.h: Likewise.
19463         * config/nds32/nds32.c (nds32_dpref_names): Likewise.
19464         (nds32_print_operand): Likewise.
19465         * config/nds32/nds32.h (nds32_builtins): Likewise.
19467 2018-04-07  Thomas Koenig  <tkoenig@gcc.gnu.org>
19468         Andrew Pinski <pinsika@gcc.gnu.org>
19470         PR middle-end/82976
19471         * match.pd: Use constant_boolean_node of correct type instead of
19472         boolean_true_node or boolean_false_node for simplifying
19473         pointer comparisons to zero.
19475 2018-04-07  Jakub Jelinek  <jakub@redhat.com>
19477         PR tree-optimization/80021
19478         * tree.c (verify_type_variant): Make error call in verify_variant_match
19479         translatable and remove final full stop.
19481 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
19483         * config/nds32/constants.md (unspec_volatile_element): Add
19484         UNSPEC_VOLATILE_EH_RETURN.
19485         * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
19486         nds32_output_stack_pop): Support dwarf exception handling process.
19487         * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
19488         * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
19489         exception handling process.
19490         (nds32_compute_stack_frame): Likewise.
19491         (nds32_return_addr_rtx): Likewise.
19492         (nds32_initial_elimination_offset): Likewise.
19493         (nds32_expand_prologue): Likewise.
19494         (nds32_expand_epilogue): Likewise.
19495         (nds32_dynamic_chain_address): New function.
19496         * config/nds32/nds32.h (machine_function): Add fields for dwarf
19497         exception handling.
19498         (DYNAMIC_CHAIN_ADDRESS): Define.
19499         (EH_RETURN_DATA_REGNO): Define.
19500         (EH_RETURN_STACKADJ_RTX): Define.
19501         * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
19502         patterns for dwarf exception handling.
19504 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
19506         * config/nds32/nds32.h: Clean up obsolete macros.
19508 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
19510         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
19511         Add enum values for particular instructions.
19512         * config/nds32/nds32-intrinsic.c: Implementation of expanding
19513         particular intrinsic functions.
19514         * config/nds32/nds32-intrinsic.md: Likewise.
19515         * config/nds32/nds32_intrinsic.h: Likewise.
19516         * config/nds32/nds32.h (nds32_builtins): Likewise.
19517         * config/nds32/nds32.md (type): Add pbsad and pbsada.
19518         (btst, ave): New patterns for particular instructions.
19520 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
19522         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
19523         Add enum values for atomic load/store and memory sync.
19524         * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
19525         and memory sync.
19526         * config/nds32/nds32-intrinsic.md: Likewise.
19527         * config/nds32/nds32_intrinsic.h: Likewise.
19528         * config/nds32/nds32.h (nds32_builtins): Likewise.
19530 2018-04-07  Jakub Jelinek  <jakub@redhat.com>
19532         PR tree-optimization/85257
19533         * fold-const.c (native_encode_vector): If not all elts could fit
19534         and off is -1, return 0 rather than offset.
19535         * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
19536         (offseti - offset2) / BITS_PER_UNIT as 4th argument to
19537         native_encode_expr.  Verify len * BITS_PER_UNIT >= maxsizei.  Don't
19538         adjust buffer in native_interpret_expr call.
19540 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
19542         * config/nds32/constants.md (unspec_volatile_element): Add cache
19543         control enum values.
19544         * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
19545         * config/nds32/nds32-intrinsic.md: Add cache control patterns.
19546         * config/nds32/nds32.c (nds32_cctl_names): New.
19547         (nds32_print_operand): Handle cache control register names.
19548         * config/nds32/nds32.h (nds32_builtins): New enum values.
19549         * config/nds32/nds32_intrinsic.h: Add cache control enum types and
19550         macros.
19551         * config/nds32/nds32.md (type): Add mmu.
19552         * config/nds32/pipelines.md (simple_insn): Add mmu.
19554 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
19556         * config/nds32/nds32.md (type): Remove call.
19557         * config/nds32/pipelines.md (simple_insn): Likewise.
19559 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
19561         * config/nds32/constants.md (unspec_volatile_element): Add
19562         UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
19563         UNSPEC_VOLATILE_FMFCFG.
19564         * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
19565         description for fmfcfg and fmfcsr.
19566         (bdesc_1arg): Add fmtcsr.
19567         (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
19568         (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
19569         * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
19570         unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
19571         unspec_fmfcfg): New patterns.
19572         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
19573         NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
19574         NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
19575         * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
19576         __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
19577         __nds32__fmfcfg): Define.
19579 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
19581         * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
19582         intrinsic register names.
19583         * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
19584         intrinsic register enum values and macros.
19586 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
19588         * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
19589         for load/store addressing form.
19590         (nds32_print_operand_address): Likewise.
19592 2018-04-06  Eric Botcazou  <ebotcazou@adacore.com>
19594         PR target/85196
19595         * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
19596         based on LABEL_REF.  Remove useless assertion.
19597         (pic_address_needs_scratch): Fix formatting.
19598         (sparc_legitimize_pic_address): Minor tweaks.
19599         (sparc_delegitimize_address): Adjust assertion accordingly.
19600         * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
19601         into symbolic_operand.
19602         (movsi_high_pic_label_ref): Likewise.
19603         (movsi_lo_sum_pic_label_ref): Likewise.
19604         (movdi_pic_label_ref): Likewise.
19605         (movdi_high_pic_label_ref): Likewise.
19606         (movdi_lo_sum_pic_label_ref): Likewise.
19608 2018-04-06  Amaan Cheval  <amaan.cheval@gmail.com>
19610         * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
19611         custom LIB_SPEC setup.
19613 2018-04-06  Ruslan Bukin  <br@bsdpad.com>
19614             Kito Cheng  <kito.cheng@gmail.com>
19616         * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
19617         * config/riscv/freebsd.h: New.
19619 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
19621         * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
19622         * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
19623         file.
19625 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
19626             Kito Cheng  <kito.cheng@gmail.com>
19628         * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
19629         nds32_output_call, nds32_symbol_binds_local_p): New functions.
19630         * config/nds32/nds32-protos.h (nds32_output_call,
19631         nds32_output_return): Declare.
19632         * config/nds32/nds32.md: Refine all the call and return patterns.
19634 2018-04-06  Jakub Jelinek  <jakub@redhat.com>
19636         PR debug/85252
19637         * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
19638         build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
19640         PR rtl-optimization/84872
19641         * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
19642         nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
19643         EDGE_CROSSING edge.
19645 2018-04-06  Tamar Christina  <tamar.christina@arm.com>
19647         * expr.c (copy_blkmode_to_reg): Revert 254862.
19648         * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
19650 2018-04-06  Richard Biener  <rguenther@suse.de>
19652         PR middle-end/85244
19653         * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
19654         after seeing a component reference with an adjacent field.  Treat
19655         refs to arrays at struct end of external decls similar to
19656         refs to unconstrained commons.
19658 2018-04-06  Jakub Jelinek  <jakub@redhat.com>
19660         PR sanitizer/85213
19661         * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
19662         look through SAVE_EXPRs with non-side-effects argument.  Adjust
19663         recursive calls.
19664         (fold_comparison): Adjust twoval_comparison_p caller, don't handle
19665         save_p here.
19667 2018-04-06  Richard Biener  <rguenther@suse.de>
19669         PR middle-end/85180
19670         * alias.c (find_base_term): New wrapper around find_base_term
19671         unwinding CSELIB_VAL_PTR changes.
19672         (find_base_term): Do not restore CSELIB_VAL_PTR during the
19673         recursion.
19675 2018-04-06  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
19677         * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
19678         instructions.
19679         * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
19680         constant definitions.
19681         ("nop"): lr 0,0 -> nopr r0
19682         ("nop_lr0", "nop_lr1"): New insn definitions.
19684 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
19686         * config/nds32/nds32.md (*stack_push, *stack_pop): Use
19687         NDS32_V3PUSH_AVAILABLE_P macro.
19689 2018-04-06  Monk Chiang  <sh.chiang04@gmail.com>
19690             Chung-Ju Wu  <jasonwucj@gmail.com>
19692         * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
19693         (nds32*-*-*): Add float and fpu_config into supported_defaults.
19694         * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
19695         Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
19696         * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
19697         UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
19698         * config/nds32/constraints.md: New constraints and checking for hard
19699         float configuration.
19700         * config/nds32/iterators.md: New mode iterator and attribute for hard
19701         float configuration.
19702         * config/nds32/nds32-doubleword.md: Use hard float alternatives and
19703         patterns.
19704         * config/nds32/nds32-fpu.md: New file.
19705         * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
19706         deal with hard float code generation.
19707         * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
19708         ARCH_V3S.
19709         (abi_type, float_reg_number): New enum type.
19710         * config/nds32/nds32-predicates.c: New predicates for hard float.
19711         * config/nds32/nds32-protos.h: Declare functions for hard float.
19712         * config/nds32/nds32.c: Implementation for hard float configuration.
19713         * config/nds32/nds32.h: Definitions for hard float configuration.
19714         * config/nds32/nds32.md: Include hard float machine description and
19715         modify patterns for hard float configuration.
19716         * config/nds32/nds32.opt: New options for hard float configuration.
19717         * config/nds32/predicates.md: New predicates for hard float
19718         configuration.
19720 2018-04-06  Kuan-Lin Chen  <kuanlinchentw@gmail.com>
19722         * common/config/nds32/nds32-common.c
19723         (nds32_option_optimization_table): Enable -mreleax-hint by default.
19725 2018-04-05  Jakub Jelinek  <jakub@redhat.com>
19727         PR middle-end/85195
19728         * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
19729         CONSTRUCTOR_ELT (ctor, ...)->value.
19731 2018-04-05  Uros Bizjak  <ubizjak@gmail.com>
19733         PR target/85193
19734         * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
19736 2018-04-05  Tom de Vries  <tom@codesourcery.com>
19738         PR target/85204
19739         * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
19740         cond jump.
19742 2018-04-05  Shiva Chen  <shiva0217@gmail.com>
19743             Kito Cheng  <kito.cheng@gmail.com>
19745         * config/nds32/constraints.md (U33): Fine-tune checking condition.
19746         * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
19747         * config/nds32/nds32.h (nds32_16bit_address_type): Add
19748         ADDRESS_POST_MODIFY_LO_REG_IMM3U.
19750 2018-04-05  Shiva Chen  <shiva0217@gmail.com>
19751             Kito Cheng  <kito.cheng@gmail.com>
19753         * config/nds32/constraints.md (Ufe): New memory constraint.
19754         * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
19755         nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
19756         * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
19757         operands.
19758         * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
19759         * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
19761 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
19763         * config/nds32/nds32.md: Use optimize_size in the condition for
19764         alu-shift instructions.
19766 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
19768         * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
19770 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
19772         * config/nds32/nds32.md (negsi2): Refine pattern.
19774 2018-04-05  Kito Cheng  <kito.cheng@gmail.com>
19775             Chung-Ju Wu  <jasonwucj@gmail.com>
19777         * config/nds32/iterators.md (shift_rotate): New code iterator.
19778         (shift): New code attribute.
19779         * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
19780         * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
19781         * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
19782         * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
19783         bit-wise operations.
19784         (andsi3, *andsi3): Ditto.
19785         (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
19786         (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
19787         (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
19788         * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
19789         nds32_ior_operand, nds32_xor_operand): New predicates.
19791 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
19793         * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
19794         (addsi3, subsi3): ... this.
19796 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
19798         * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
19800 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
19802         * config/nds32/nds32.md: Adjust indention.
19804 2018-04-05  Kito Cheng  <kito.cheng@gmail.com>
19806         * config/nds32/nds32.md (feature): New attribute.
19808 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
19810         * config/nds32/nds32.md (subtype): New attribute.
19812 2018-04-04  Thomas Preud'homme  <thomas.preudhomme@arm.com>
19814         PR target/85203
19815         * config/arm/arm-builtins.c (arm_expand_builtin): Change
19816         expansion to perform a bitwise AND of the argument followed by a
19817         boolean negation of the result.
19819 2018-04-04  Peter Bergner  <bergner@vnet.ibm.com>
19821         PR rtl-optimization/84878
19822         * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
19823         the basic block.  Assert the use reference is not artificial and that
19824         it has an associated insn.
19826 2018-04-04  Michael Matz  <matz@suse.de>
19828         * builtins.c (compute_objsize): Pass correct operand
19829         to array_at_struct_end_p.
19831 2018-04-04  Richard Biener  <rguenther@suse.de>
19833         PR lto/85176
19834         * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
19835         from contexts for DINFO_LEVEL_TERSE and below.
19837 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
19839         * config/nds32/nds32-doubleword.md (move_<mode>): Require
19840         resiter_operand condition.
19841         * config/nds32/nds32.md (*move<mode>): Ditto.
19843 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
19844             Monk Chiang  <sh.chiang04@gmail.com>
19846         * config/nds32/nds32.md (movmisalign<mode>): New pattern.
19848 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
19850         * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
19852 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
19853             Kito Cheng  <kito.cheng@gmail.com>
19855         * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
19856         nds32_cond_code_str, output_cond_branch,
19857         output_cond_branch_compare_zero, nds32_expand_cbranch,
19858         nds32_expand_cstore, nds32_expand_movcc,
19859         nds32_output_cbranchsi4_equality_zero,
19860         nds32_output_cbranchsi4_equality_reg,
19861         nds32_output_cbranchsi4_equality_reg_or_const_int,
19862         nds32_output_cbranchsi4_greater_less_zero: New functions.
19863         * config/nds32/nds32-protos.h (nds32_expand_cbranch,
19864         nds32_expand_cstore, nds32_expand_movcc,
19865         nds32_output_cbranchsi4_equality_zero,
19866         nds32_output_cbranchsi4_equality_reg,
19867         nds32_output_cbranchsi4_equality_reg_or_const_int,
19868         nds32_output_cbranchsi4_greater_less_zero): Declare.
19869         * config/nds32/predicates.md (nds32_movecc_comparison_operator,
19870         nds32_rimm11s_operand): New predicates.
19871         * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
19872         * config/nds32/nds32.md: Rewrite all the branch and conditional move
19873         patterns.
19875 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
19877         * config/nds32/nds32-doubleword.md: Refine all the instruction type.
19878         * config/nds32/nds32.md: Ditto.
19879         * config/nds32/pipelines.md: Ditto.
19881 2018-04-04  Richard Biener  <rguenther@suse.de>
19883         PR tree-optimization/85168
19884         * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
19885         propagating abnormals.
19887 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
19889         * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
19891 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
19892             Kito Cheng  <kito.cheng@gmail.com>
19894         * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
19895         * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
19896         * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
19897         (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
19898         * config/nds32/nds32.md (sibcall_internal): New.
19899         (sibcall_register): Remove.
19900         (sibcall_immediate): Remove.
19901         (sibcall_value_internal): New.
19902         (sibcall_value_register): Remove.
19903         (sibcall_value_immediate): Remove.
19904         * config/nds32/predicates.md (nds32_general_register_operand): New.
19905         (nds32_call_address_operand): New.
19907 2018-04-03  Jakub Jelinek  <jakub@redhat.com>
19909         PR rtl-optimization/85167
19910         * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
19911         bb_defs if *split_p, instead preinitialize it to NULL.
19913         PR tree-optimization/85156
19914         * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
19915         evaluating the argument multiple times.
19917 2018-04-03  Bill Schmidt  <wschmidt@linux.ibm.com>
19919         * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
19920         than vector.
19921         (_mm_cvtpd_ps): Likewise.
19922         (_mm_cvttpd_epi32): Likewise.
19923         * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
19924         * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
19925         vector, pixel, and bool following altivec.h include.
19927 2018-04-03  Martin Sebor  <msebor@redhat.com>
19929         * doc/extend.texi (Common Function Attributes): Clarify.
19930         (const attribute): Likewise.
19931         (pure attribute): Likewise.
19933 2018-04-03  Jakub Jelinek  <jakub@redhat.com>
19935         PR target/85169
19936         * config/i386/i386.c (ix86_expand_vector_set): Use
19937         HOST_WIDE_INT_1U << elt instead of 1 << elt.  Formatting fix.
19939 2018-04-03  Uros Bizjak  <ubizjak@gmail.com>
19941         * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
19942         instructions when changing rounding bits to preserve precision bits
19943         in the x87 control word.
19945 2018-04-03  Martin Liska  <mliska@suse.cz>
19947         PR tree-optimization/82491
19948         * rtl.h (strip_offset_and_add): Replace += suboffset with
19949         poly_uint64 () + suboffset.
19951 2018-03-29  Martin Liska  <mliska@suse.cz>
19952             Martin Jambor  <mjambor@suse.cz>
19954         PR ipa/84947
19955         * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
19956         param_type is not an integral or pointer type.
19958 2018-04-03  Richard Biener  <rguenther@suse.de>
19960         * sese.h (recompute_all_dominators): Remove.
19962 2018-04-02  Martin Sebor  <msebor@redhat.com>
19964         * doc/invoke.texi (-Wrestrict): Fix typos.
19966 2018-04-02  Jim Wilson  <jimw@sifive.com>
19968         * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
19969         * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
19970         (<optab>di3, <optab>si3_extend): Likewise.
19971         (<optab>si3_mask, <optab>si3_mask_1): New.
19972         (<optab>di3_mask, <optab>di3_mask_1): New.
19973         (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
19974         (lshrsi3_zero_extend_1): Use VOIDmode shift count.
19975         * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
19977 2018-04-02  Gerald Pfeifer  <gerald@pfeifer.com>
19979         * doc/cpp.texi (Variadic Macros): Fix line continuation in an
19980         example.
19982 2018-04-02  Chung-Ju Wu  <jasonwucj@gmail.com>
19984         * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
19985         (nds32_canonicalize_comparison): New function.
19987 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
19988             Kito Cheng  <kito.cheng@gmail.com>
19989             Kuan-Lin Chen  <kuanlinchentw@gmail.com>
19991         * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
19992         * config/nds32/constants.md (unspec_volatile_element): Add
19993         UNSPEC_VOLATILE_RELAX_GROUP.
19994         * config/nds32/nds32-relax-opt.c: New file.
19995         * config/nds32/nds32-predicates.c
19996         (nds32_symbol_load_store_p): New function.
19997         * config/nds32/nds32-protos.h
19998         (nds32_symbol_load_store_p): Declare function.
19999         (make_pass_nds32_relax_opt): Declare new rtl pass function.
20000         * config/nds32/nds32.c
20001         (nds32_register_pass): New function to register pass.
20002         (nds32_register_passes): New function to register passes.
20003         * config/nds32/nds32.md (relax_group): New pattern.
20004         * config/nds32/nds32.opt (mrelax-hint): New option.
20005         * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
20007 2018-04-01  Kito Cheng  <kito.cheng@gmail.com>
20009         * config/nds32/t-nds32: Modify files dependency.
20011 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
20013         * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
20014         (PROFILE_HOOK): Define its implementation.
20016 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
20018         * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
20019         type and 32-bit size.
20021 2018-04-01  Jakub Jelinek  <jakub@redhat.com>
20023         PR middle-end/85090
20024         * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
20025         (V_128_256): New mode iterator.
20026         (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
20027         (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
20028         (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
20029         of V.
20030         * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
20031         V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
20033 2018-03-31  Segher Boessenkool  <segher@kernel.crashing.org>
20035         PR target/83315
20036         * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
20037         NaN inputs correctly.
20039 2018-03-30  Peter Bergner  <bergner@vnet.ibm.com>
20041         PR target/80546
20042         * config/rs6000/vsx.md (??r): New mode attribute.
20043         (*vsx_mov<mode>_64bit): Use it.
20044         (*vsx_mov<mode>_32bit): Likewise.
20046 2018-03-30  Martin Sebor  <msebor@redhat.com>
20048         PR tree-optimization/84818
20049         * builtins.c (check_access): Use warning_n.
20051 2018-03-30  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
20053         PR target/83822
20054         * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
20055         condition.
20056         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
20057         condition.
20059 2018-03-30  Julia Koval  <julia.koval@intel.com>
20061         PR target/84413
20062         * x86-tune.def (movx, partial_reg_dependency): Enable for
20063         m_SKYLAKE_AVX512.
20065 2018-03-29  Vladimir Makarov  <vmakarov@redhat.com>
20067         PR inline-asm/84985
20068         * lra-constraints.c (process_alt_operands): Move setting
20069         this_alternative_matches below.
20071 2018-03-29  Martin Liska  <mliska@suse.cz>
20073         PR lto/84995.
20074         * doc/invoke.texi: Document how LTO works with debug info.
20075         Describe auto-load support of binutils.  Mention 'x86-64'
20076         as valid option value of -march option.
20078 2018-03-29  Jakub Jelinek  <jakub@redhat.com>
20080         * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
20082         PR c/85094
20083         * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
20084         For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
20085         OEP_NO_HASH_CHECK for recursive call, to avoid exponential
20086         checking.
20088 2018-03-28  Peter Bergner  <bergner@vnet.ibm.com>
20090         PR target/84912
20091         * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
20092         (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
20093         * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
20094         for RS6000_BTM_POWERPC64.
20095         (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
20096         (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
20097         * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
20098         definition.
20099         (DIVDE): Use it.
20100         (DIVDEU): Likewise.
20102 2018-03-28  Carl Love  <cel@us.ibm.com>
20104         Revert
20105         2017-09-27  Carl Love  <cel@us.ibm.com>
20107         * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
20108         (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
20109         * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
20110         fctiw instruction.
20112 2018-03-28  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
20114         * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
20115         instead of __vector bool.
20116         (_mm_max_pu8): Likewise.
20117         (_mm_min_pi16): Likewise.
20119 2018-03-28  Peter Bergner  <bergner@vnet.ibm.com>
20121         PR target/84912
20122         * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
20123         (DIVWEUO): Likewise.
20124         (DIVDEO): Likewise.
20125         (DIVDEUO): Likewise.
20126         * config/rs6000/rs6000.c (builtin_function_type): Remove support for
20127         DIVWEUO and DIVDEUO.
20128         * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
20129         (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
20130         (div_extend): Likewise.
20131         * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
20132         builtin function.
20133         (__builtin_divweuo): Likewise.
20134         (__builtin_divdeo): Likewise.
20135         (__builtin_divdeuo): Likewise.
20137 2018-03-28  Jakub Jelinek  <jakub@redhat.com>
20139         PR target/85095
20140         * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
20141         *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
20143         PR tree-optimization/82004
20144         * gimple-match-head.c (optimize_pow_to_exp): New function.
20145         * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
20146         Don't fold to exp if optimize_pow_to_exp is false.
20148 2018-03-28  Martin Liska  <mliska@suse.cz>
20150         PR other/84819
20151         * calls.c (initialize_argument_information): Fix trailing space.
20152         * common.opt: Fix typo and provide better explanation for
20153         -fsanitize-coverage option.
20154         * config/i386/i386.opt: Fix typo.
20156 2018-03-28  Jakub Jelinek  <jakub@redhat.com>
20157             Martin Liska  <mliska@suse.cz>
20159         PR sanitizer/85081
20160         * gimplify.c (asan_poison_variable): Don't do the check for
20161         gimplify_omp_ctxp here.
20162         (gimplify_decl_expr): Do it here.
20163         (gimplify_target_expr): Likewise.
20165 2018-03-28  Martin Liska  <mliska@suse.cz>
20167         PR target/84988
20168         * config/i386/i386.c (ix86_function_arg_advance): Do not call
20169         chkp_type_bounds_count if MPX is not enabled.
20171 2018-03-27  Chung-Ju Wu  <jasonwucj@gmail.com>
20173         * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
20175 2018-03-27  Michael Meissner  <meissner@linux.vnet.ibm.com>
20177         PR target/84914
20178         * config/rs6000/rs6000.c (create_complex_muldiv): New helper
20179         function to create the function decl for complex long double
20180         multiply and divide for -mabi=ieeelongdouble.
20181         (init_float128_ieee): Call it.
20183 2018-03-27  H.J. Lu  <hongjiu.lu@intel.com>
20185         PR target/85044
20186         * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
20187         -fcf-protection=branch -mibt.
20188         * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
20190 2018-03-27  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
20192         PR target/81863
20193         * config/arm/arm.c (arm_valid_symbolic_address): Handle
20194         arm_word_relocations.
20196 2018-03-27  Cesar Philippidis  <cesar@codesourcery.com>
20198         PR target/85056
20199         * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
20200         extern array declarations.
20202 2018-03-27  Richard Biener  <rguenther@suse.de>
20204         PR middle-end/84067
20205         * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
20206         explicit single_use checks.
20208 2018-03-27  Richard Biener  <rguenther@suse.de>
20210         PR tree-optimization/85082
20211         * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
20212         Valueize the VUSE.
20214 2018-03-27  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
20216         * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
20217         * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
20218         Turn on fasynchronous-unwind-tables and funwind-tables.
20220 2018-03-26  Uros Bizjak  <ubizjak@gmail.com>
20222         PR target/85073
20223         * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
20224         (*bmi_blsr_<mode>_ccz): Ditto.
20226 2018-03-26  Tom de Vries  <tom@codesourcery.com>
20228         PR tree-optimization/85063
20229         * omp-general.c (offloading_function_p): New function.  Factor out
20230         of ...
20231         * omp-offload.c (pass_omp_target_link::gate): ... here.
20232         * omp-general.h (offloading_function_p): Declare.
20233         * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
20234         with attribute omp declare target for offloading functions.
20236 2018-03-24  Richard Sandiford  <richard.sandiford@linaro.org>
20238         PR tree-optimization/84005
20239         * tree-data-ref.h (get_base_for_alignment): Declare.
20240         * tree-data-ref.c (get_base_for_alignment_1): New function.
20241         (get_base_for_alignment): Likewise.
20242         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
20243         get_base_for_alignment to find a suitable base object, instead
20244         of always using drb->base_address.
20246 2018-03-23  Jakub Jelinek  <jakub@redhat.com>
20248         PR inline-asm/85022
20249         * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
20250         known size by default.
20252 2018-03-23  Vladimir Makarov  <vmakarov@redhat.com>
20254         PR inline-asm/85030
20255         * lra-constraints.c (process_alt_operands): Don't match BLKmode
20256         and non BLKmode operands.
20258 2018-03-23  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
20260         PR target/85026
20261         * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
20262         Clean up attributes.
20264 2018-03-23  Richard Biener  <rguenther@suse.de>
20266         PR debug/85020
20267         * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
20268         we are going to emit early debug for LTO.
20270 2018-03-23  Jakub Jelinek  <jakub@redhat.com>
20272         PR inline-asm/85034
20273         * function.c (match_asm_constraints_1): Don't optimize if input
20274         doesn't satisfy general_operand predicate for output's mode.
20276         PR inline-asm/85022
20277         * alias.c (write_dependence_p): Don't require for x_canonicalized
20278         non-VOIDmode if x has VOIDmode.
20280         PR sanitizer/85029
20281         * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
20282         just don't try to optimize it rather than assert it never happens.
20284 2018-03-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
20286         * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
20287         macro expansions for definition of ST_INTERNAL_<mode> and
20288         LD_INTERNAL_<mode> builtins.
20289         * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
20290         Remove prototype.
20291         * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
20292         function.
20293         (altivec_expand_st_builtin): Likewise.
20294         (altivec_expand_builtin): Remove calls to deleted functions.
20295         (rs6000_address_for_altivec): Delete this function.
20296         * config/rs6000/vector.md: Remove expands for
20297         vector_altivec_load_<mode> and vector_altivec_store_<mode>.
20299 2018-03-22  Sudakshina Das  <sudi.das@arm.com>
20301         PR target/84826
20302         * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
20303         * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
20304         re-computing once computed.
20305         (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
20306         (arm_init_machine_status): Initialize
20307         machine->static_chain_stack_bytes.
20309 2018-03-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
20311         PR target/84760
20312         * doc/extend.texi: Add four new prototypes for vec_ld.
20313         * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
20314         definitions for more logical presentation.
20315         * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
20316         entries for V1TI variants of __builtin_altivec_ld builtin.
20317         * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
20318         handling of V1TI variant of LVX icode pattern.
20319         (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
20320         (rs6000_gimple_fold_builtin): Likewise.
20321         (altivec_init_builtins): Add code to define
20322         __builtin_altivec_lvx_v1ti function.
20324 2018-03-22  Jakub Jelinek  <jakub@redhat.com>
20326         PR inline-asm/84941
20327         * function.c (match_asm_constraints_1): Don't do the optimization
20328         if input isn't a REG, SUBREG, MEM or constant.
20330 2018-03-22  Tom de Vries  <tom@codesourcery.com>
20332         PR tree-optimization/84956
20333         * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
20334         bb_has_abnormal_pred.
20336 2018-03-22  Jakub Jelinek  <jakub@redhat.com>
20338         PR sanitizer/85018
20339         * dwarf2asm.c (dw2_output_indirect_constant_1): Set
20340         DECL_INITIAL (decl) to decl at the end.
20341         * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
20342         adjust the comment.
20344 2018-03-21  Joseph Myers  <joseph@codesourcery.com>
20346         * doc/extend.texi (__builtin_tgmath): Document when complex
20347         integer types are treated as _Complex _Float64.
20349 2018-03-21  Tom de Vries  <tom@codesourcery.com>
20351         * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
20353 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
20355         PR tree-optimization/84960
20356         * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
20357         if it is ENTRY block, move them into single succ of ENTRY in that case.
20359 2018-03-21  Richard Sandiford  <richard.sandiford@linaro.org>
20361         PR tree-optimization/84811
20362         * poly-int.h (poly_span_traits): Remove the T3 parameter and
20363         promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
20364         (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
20365         (known_subrange_p): Update accordingly.  Cast each value involved
20366         in the size comparison, rather than casting the result of the
20367         subtraction.
20369 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
20371         PR tree-optimization/84982
20372         * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
20373         by flipping the least significant bit rather than all bits from
20374         bitpos to bitpos + bitsize - 1.
20376 2018-03-21  Nathan Sidwell  <nathan@acm.org>
20378         * doc/extend.texi (Deprecated Features): Remove mention of
20379         long-deleted deprecations.
20381 2018-03-21  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
20383         PR jit/84288
20384         * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
20385         * configure: Regenerate.
20387 2018-03-21  Tom de Vries  <tom@codesourcery.com>
20389         PR tree-optimization/83126
20390         * tree-parloops.c (num_phis): New function.
20391         (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
20393 2018-03-21  Nathan Sidwell  <nathan@acm.org>
20395         * doc/extend.texi (Deprecated Features): Update deprecated flags,
20396         mention anon-struct/union members and trailing attributes.
20398 2018-03-21  Bin Cheng  <bin.cheng@arm.com>
20400         PR tree-optimization/84969
20401         * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
20402         builtin memset partitions if they set different rhs values.
20404 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
20406         PR rtl-optimization/84989
20407         * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
20408         VEC_DUPLICATE with scalar result mode.
20410 2018-03-21  Martin Liska  <mliska@suse.cz>
20412         PR ipa/84963
20413         * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
20414         not intended return statement.
20416 2018-03-21  Martin Liska  <mliska@suse.cz>
20418         PR target/84988
20419         * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
20420         (chkp_find_bound_slots_1): Limit number of iterations.
20422 2018-03-20  David H. Gutteridge  <dhgutteridge@sympatico.ca>
20424         PR target/84838
20425         * Minor grammar fixes for x86 options.
20427 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
20429         PR debug/84875
20430         * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
20431         holding REG_CFA_RESTORE notes, instead turn them into a USE.
20433 2018-03-20  Peter Bergner  <bergner@vnet.ibm.com>
20435         PR target/83789
20436         * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
20437         (altivec_lvx_<mode>_1op): Likewise.
20438         (altivec_stvx_<mode>_2op): Likewise.
20439         (altivec_stvx_<mode>_1op): Likewise.
20440         (altivec_lvx_<VM2:mode>): New define_expand.
20441         (altivec_stvx_<VM2:mode>): Likewise.
20442         (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
20443         (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
20444         (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
20445         (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
20446         * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
20447         (rs6000_gen_lvx): Likewise.
20448         * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
20449         (altivec_expand_stv_builtin): Likewise.
20450         (altivec_expand_builtin): Likewise.
20451         * config/rs6000/vector.md: Likewise.
20453 2018-03-20  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
20455         PR target/82518
20456         * config/arm/arm.c (arm_array_mode_supported_p): Return false for
20457         BYTES_BIG_ENDIAN.
20459 2018-03-20  Richard Biener  <rguenther@suse.de>
20461         PR target/84986
20462         * config/i386/i386.c (ix86_add_stmt_cost): Only cost
20463         sign-conversions as zero, fall back to standard scalar_stmt
20464         cost for the rest.
20466 2018-03-20  Martin Liska  <mliska@suse.cz>
20468         PR ipa/84825
20469         * predict.c (rebuild_frequencies): Handle case when we have
20470         PROFILE_ABSENT, but flag_guess_branch_prob is false.
20472 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
20474         PR target/84990
20475         * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
20476         flag_section_anchors.
20477         * varasm.c (use_blocks_for_decl_p): Remove hack for
20478         dw2_force_const_mem.
20480         PR target/84845
20481         * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
20482         to ...
20483         (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this.  If pseudos can't
20484         be created, use lowpart_subreg of operands[0] rather than operands[0]
20485         itself.
20486         (*aarch64_reg_<mode>3_minus_mask): Rename to ...
20487         (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
20488         (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
20489         and n constraint instead of aarch64_shift_imm_di and Usd.
20490         (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
20491         (*aarch64_<optab>_reg_minus<mode>3): ... this.
20493 2018-03-20  Sudakshina Das  <sudi.das@arm.com>
20495         PR target/82989
20496         * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
20497         to favor GPR over NEON registers.
20498         (<shift>di3_neon): Likewise.
20500 2018-03-20  Tom de Vries  <tom@codesourcery.com>
20502         PR target/84952
20503         * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
20504         (nvptx_process_pars): Emit bar.sync asap and alap.
20506 2018-03-20  Tom de Vries  <tom@codesourcery.com>
20508         PR target/84954
20509         * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
20510         seen_label if seen_label is already set.
20512 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
20514         PR target/84945
20515         * config/i386/i386.c (fold_builtin_cpu): For features above 31
20516         use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
20517         Use 1U instead of 1.  Formatting fixes.
20519         PR c/84953
20520         * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
20521         instead of TREE_TYPE (s1) for the return value.
20523 2018-03-19  Jakub Jelinek  <jakub@redhat.com>
20525         PR tree-optimization/84946
20526         * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
20527         bitsize + bitsize in poly_uint64 rather than poly_int64.
20529         PR sanitizer/78651
20530         * dwarf2asm.c: Include fold-const.c.
20531         (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
20532         of decl rather than decl itself.
20534         PR rtl-optimization/84643
20535         * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
20537 2018-03-19  Maxim Ostapenko  <m.ostapenko@samsung.com>
20539         PR sanitizer/78651
20540         * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
20541         calling assemble_variable.
20543 2018-03-19  Sudakshina Das  <sudi.das@arm.com>
20545         PR target/81647
20546         * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
20547         instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
20549 2018-03-19  Jim Wilson  <jimw@sifive.com>
20551         PR bootstrap/84856
20552         * config/riscv/riscv.c (riscv_function_arg_boundary): Use
20553         PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
20554         (riscv_first_stack_step): Likewise.
20555         (riscv_option_override): Use STACK_BOUNDARY instead of
20556         MIN_STACK_BOUNDARY.
20557         * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
20558         MIN_STACK_BOUNDARY.
20559         (BIGGEST_ALIGNMENT): Set to 128.
20560         (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
20561         (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
20562         STACK_BOUNDARY.
20564 2018-03-19  Richard Biener  <rguenther@suse.de>
20566         PR tree-optimization/84933
20567         * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
20568         values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
20570 2018-03-19  Richard Biener  <rguenther@suse.de>
20572         PR tree-optimization/84859
20573         * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
20574         (cond_if_else_store_replacement): Perform sinking operation on
20575         single-store BBs regardless of MAX_STORES_TO_SINK setting.
20576         Generalize what a BB with a single eligible store is.
20578 2018-03-19  Richard Biener  <rguenther@suse.de>
20580         PR tree-optimization/84929
20581         * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
20582         chrec_is_positive against non-chrec arg.
20584 2018-03-19  Tamar Christina  <tamar.christina@arm.com>
20586         PR target/84711
20587         * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
20589 2018-03-18  Martin Liska  <mliska@suse.cz>
20591         PR rtl-optimization/84635
20592         * regrename.c (build_def_use): Use matches_mode only when
20593         matches >= 0.
20595 2018-03-18  Richard Sandiford  <richard.sandiford@linaro.org>
20597         PR tree-optimization/84913
20598         * tree-vect-loop.c (vectorizable_reduction): Don't try to
20599         vectorize chains of COND_EXPRs.
20601 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
20603         * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
20605 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
20607         * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
20609 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
20611         * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
20613 2018-03-17  Chung-Ju Wu  <jasonwucj@gmail.com>
20614             Kito Cheng  <kito.cheng@gmail.com>
20616         * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
20617         * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
20618         (nds32_adjust_reg_alloc_order): New function.
20619         * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
20621 2018-03-17  Kito Cheng  <kito.cheng@gmail.com>
20623         * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
20624         nds32_print_operand, nds32_print_operand_address): Use
20625         HOST_WIDE_INT_PRINT_DEC instead.
20627 2018-03-17  Chung-Ju Wu  <jasonwucj@gmail.com>
20629         * config/nds32/nds32.c (nds32_register_priority): Modify cost.
20631 2018-03-17  Jakub Jelinek  <jakub@redhat.com>
20633         PR target/84902
20634         * config/i386/i386.c (initial_ix86_tune_features,
20635         initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
20636         unsigned long long.
20637         (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
20638         to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
20639         rather than 1u << ix86_tune.  Formatting fix.
20640         (ix86_option_override_internal): Change ix86_arch_mask from
20641         unsigned int to unsigned HOST_WIDE_INT, initialize to
20642         HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
20643         (ix86_function_specific_restore): Likewise.
20645 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
20647         PR target/84899
20648         * postreload.c (reload_combine_recognize_pattern): Perform
20649         INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
20650         truncate_int_for_mode the result for the destination's mode.
20652         PR c/84909
20653         * hsa-gen.c (mem_type_for_type): Fix comment typo.
20654         * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
20655         Likewise.
20656         * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
20657         Likewise.
20659 2018-03-16  Vladimir Makarov  <vmakarov@redhat.com>
20661         PR target/84876
20662         * lra-assigns.c (lra_split_hard_reg_for): Don't use
20663         regno_allocno_class_array and sorted_pseudos.
20664         * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
20665         insns where regno is used.
20667 2018-03-16  Martin Liska  <mliska@suse.cz>
20669         PR ipa/84833
20670         * multiple_target.c (create_dispatcher_calls): Redirect
20671         reference in the symbol table.
20673 2018-03-16  Martin Liska  <mliska@suse.cz>
20675         PR ipa/84722
20676         * multiple_target.c (create_dispatcher_calls): Redirect also
20677         an alias.
20679 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
20681         PR c++/79937
20682         PR c++/82410
20683         * tree.h (TARGET_EXPR_NO_ELIDE): Define.
20684         * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
20685         TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
20687 2018-03-16  Julia Koval  <julia.koval@intel.com>
20689         * doc/invoke.texi (Skylake Server): Add CLWB.
20690         Cannonlake): Remove CLWB.
20692 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
20694         PR tree-optimization/84841
20695         * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
20696         1 << 3.
20697         (FLOAT_ONE_CONST_TYPE): Define.
20698         (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
20699         (sort_by_operand_rank): Put entries with higher constant_type last
20700         rather than first to match comments.
20702 2018-03-15  Sandra Loosemore  <sandra@codesourcery.com>
20704         * config/nios2/nios2.md (movsi_internal): Fix thinko in
20705         split predicate.
20707 2018-03-15  Jakub Jelinek  <jakub@redhat.com>
20709         PR c++/79085
20710         * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
20711         check and use address of target always.
20713 2018-03-15  H.J. Lu  <hongjiu.lu@intel.com>
20715         PR target/84574
20716         * config/i386/i386.c (indirect_thunk_needed): Update comments.
20717         (indirect_thunk_bnd_needed): Likewise.
20718         (indirect_thunks_used): Likewise.
20719         (indirect_thunks_bnd_used): Likewise.
20720         (indirect_return_needed): New.
20721         (indirect_return_bnd_needed): Likewise.
20722         (output_indirect_thunk_function): Add a bool argument for
20723         function return.
20724         (output_indirect_thunk_function): Don't generate alias for
20725         function return thunk.
20726         (ix86_code_end): Call output_indirect_thunk_function to generate
20727         function return thunks.
20728         (ix86_output_function_return): Set indirect_return_bnd_needed
20729         and indirect_return_needed instead of indirect_thunk_bnd_needed
20730         and indirect_thunk_needed.
20732 2018-03-15  Olga Makhotina  <olga.makhotina@intel.com>
20734         * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
20735         (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
20736         (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
20738 2018-03-15  David Malcolm  <dmalcolm@redhat.com>
20739             Paul Hua <paul.hua.gm@gmail.com>
20741         PR c/84852
20742         * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
20744 2018-03-15  Segher Boessenkool  <segher@kernel.crashing.org>
20746         * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
20747         TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
20748         resp. SFmode cases.
20750 2018-03-15  Tamar Christina  <tamar.christina@arm.com>
20752         PR target/84711
20753         * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
20754         instead of GET_MODE_SIZE when comparing Units.
20756 2018-03-15  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
20758         PR target/68256
20759         * varasm.c (hash_section): Return an unchangeble hash value
20760         * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
20761         Return !aarch64_can_use_per_function_literal_pools_p ().
20763 2018-03-15  Jakub Jelinek  <jakub@redhat.com>
20765         PR target/84860
20766         * optabs.c (emit_conditional_move): Pass address of cmode's copy
20767         rather than address of cmode as last argument to prepare_cmp_insn.
20769 2018-03-15  Julia Koval  <julia.koval@intel.com>
20771         * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
20772         F_AVX512VNNI, F_AVX512BITALG): New.
20774 2018-03-14  John David Anglin  <danglin@gcc.gnu.org>
20776         PR target/83451
20777         * config/pa/pa.c (pa_emit_move_sequence):  Always emit secondary reload
20778         insn for floating-point loads and stores.
20780 2018-03-14  Carl Love  <cel@us.ibm.com>
20782         * config/rs6000/rs6000-c.c: Add macro definitions for
20783         ALTIVEC_BUILTIN_VEC_PERMXOR.
20784         * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
20785         * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
20786         * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
20787         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
20788         UNSPEC_VPERMXOR.
20789         * config/doc/extend.texi: Add prototypes for vec_permxor.
20791 2018-03-14  David Malcolm  <dmalcolm@redhat.com>
20793         PR c/84852
20794         * diagnostic-show-locus.c (class layout_point): Convert m_line
20795         from int to linenum_type.
20796         (line_span::comparator): Use linenum "compare" function when
20797         comparing line numbers.
20798         (test_line_span): New function.
20799         (layout_range::contains_point): Convert param "row" from int to
20800         linenum_type.
20801         (layout_range::intersects_line_p): Likewise.
20802         (layout::will_show_line_p): Likewise.
20803         (layout::print_source_line): Likewise.
20804         (layout::should_print_annotation_line_p): Likewise.
20805         (layout::print_annotation_line): Likewise.
20806         (layout::print_leading_fixits): Likewise.
20807         (layout::annotation_line_showed_range_p): Likewise.
20808         (struct line_corrections): Likewise for field m_row.
20809         (line_corrections::line_corrections): Likewise for param "row".
20810         (layout::print_trailing_fixits): Likewise.
20811         (layout::get_state_at_point): Likewise.
20812         (layout::get_x_bound_for_row): Likewise.
20813         (layout::print_line): Likewise.
20814         (diagnostic_show_locus): Likewise for locals "last_line" and "row".
20815         (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
20816         * input.c (selftest::test_linenum_comparisons): New function.
20817         (selftest::input_c_tests): Call it.
20818         * selftest.c (selftest::test_assertions): Test ASSERT_GT,
20819         ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
20820         * selftest.h (ASSERT_GT): New macro.
20821         (ASSERT_GT_AT): New macro.
20822         (ASSERT_LT): New macro.
20823         (ASSERT_LT_AT): New macro.
20825 2018-03-14  Segher Boessenkool  <segher@kernel.crashing.org>
20827         PR rtl-optimization/84780
20828         * combine.c (distribute_links): Don't make a link based on pc_rtx.
20830 2018-03-14  Martin Liska  <mliska@suse.cz>
20832         * tree.c (record_node_allocation_statistics): Use
20833         get_stats_node_kind.
20834         (get_stats_node_kind): New function extracted from
20835         record_node_allocation_statistics.
20836         (free_node): Use get_stats_node_kind.
20838 2018-03-14  Richard Biener  <rguenther@suse.de>
20840         * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
20841         that the value-set of ANTIC_IN doesn't grow.
20843         Revert
20844         * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
20845         member.
20846         (BB_VISITED_WITH_VISITED_SUCCS): New define.
20847         (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
20849 2018-03-14  Julia Koval  <julia.koval@intel.com>
20851         * config.gcc (icelake-client, icelake-server): New.
20852         (icelake): Remove.
20853         * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
20854         (initial_ix86_arch_features): Ditto.
20855         (PTA_SKYLAKE): Add SGX.
20856         (PTA_ICELAKE): Remove.
20857         (PTA_ICELAKE_CLIENT): New.
20858         (PTA_ICELAKE_SERVER): New.
20859         (ix86_option_override_internal): Split up icelake on icelake client and
20860         icelake server.
20861         (get_builtin_code_for_version): Ditto.
20862         (fold_builtin_cpu): Ditto.
20863         * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
20864         * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
20865         * config/i386/i386.h (processor_type): Ditto.
20866         * doc/invoke.texi: Ditto.
20868 2018-03-14  Jakub Jelinek  <jakub@redhat.com>
20870         PR sanitizer/83392
20871         * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
20872         INTEGER_CST offset, add it together with bitpos / 8 and
20873         sign extend based on POINTER_SIZE.
20875         PR target/84844
20876         Revert
20877         2017-04-20  Uros Bizjak  <ubizjak@gmail.com>
20879         PR target/78090
20880         * config/i386/constraints.md (Yc): New register constraint.
20881         * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
20882         Use Yc constraint for alternative 2 of operand 0.  Remove
20883         preferred_for_speed attribute.
20885 2018-03-14  Richard Biener  <rguenther@suse.de>
20887         PR tree-optimization/84830
20888         * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
20889         with the old one to avoid oscillations.
20891 2018-03-13  Vladimir Makarov  <vmakarov@redhat.com>
20893         PR target/83712
20894         * lra-assigns.c (find_all_spills_for): Ignore uninteresting
20895         pseudos.
20896         (assign_by_spills): Return a flag of reload assignment failure.
20897         Do not process the reload assignment failures.  Do not spill other
20898         reload pseudos if they has the same reg class.  Update n if
20899         necessary.
20900         (lra_assign): Add a return arg.  Set up from the result of
20901         assign_by_spills call.
20902         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
20903         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
20904         usage_insns if it is not NULL.
20905         (spill_hard_reg_in_range): New function.
20906         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
20907         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
20908         function prototypes.
20909         (lra_assign): Change prototype.
20910         * lra.c (lra): Add code to deal with fails by splitting hard reg
20911         live ranges.
20913 2018-03-01  Palmer Dabbelt  <palmer@sifive.com>
20915         * config/riscv/riscv.opt (mrelax): New option.
20916         * config/riscv/riscv.c (riscv_file_start): Emit ".option
20917         "norelax" when riscv_mrelax is disabled.
20918         * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
20920 2018-03-13  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
20922         PR target/84743
20923         * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
20924         reassociation for int modes.
20926 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
20928         * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
20929         Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
20930         for big-endian.
20931         * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
20932         * config/aarch64/aarch64-sve.md
20933         (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
20934         (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
20935         (*extend<mode><Vwide>2): Rename to...
20936         (aarch64_sve_extend<mode><Vwide>2): ...this.
20937         (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
20938         renaming the old pattern to...
20939         (aarch64_sve_punpk<perm_hilo>_<mode>): ...this.  Only define
20940         unsigned packs.
20941         (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
20942         define_expand, renaming the old pattern to...
20943         (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
20944         (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
20945         (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
20946         account when deciding which SVE instruction the optab should use.
20947         (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
20949 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
20951         * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
20952         (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
20953         (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
20954         (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
20955         (tlsdesc_small_<mode>): Turn a define_expand and use
20956         tlsdesc_small_sve_<mode> for SVE.  Rename original define_insn to...
20957         (tlsdesc_small_advsimd_<mode>): ...this.
20958         (tlsdesc_small_sve_<mode>): New pattern.
20960 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
20962         * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
20963         (UNSPEC_UMUL_HIGHPART): New constants.
20964         (MUL_HIGHPART): New int iteraor.
20965         (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
20966         * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
20967         define_expand.
20968         (*<su>mul<mode>3_highpart): New define_insn.
20970 2018-03-13  Eric Botcazou  <ebotcazou@adacore.com>
20972         PR lto/84805
20973         * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
20974         incomplete types.
20976 2018-03-13  Martin Liska  <mliska@suse.cz>
20978         PR ipa/84658.
20979         * (sem_item_optimizer::sem_item_optimizer): Initialize new
20980         vector.
20981         (sem_item_optimizer::~sem_item_optimizer): Release it.
20982         (sem_item_optimizer::merge_classes): Register variable aliases.
20983         (sem_item_optimizer::fixup_pt_set): New function.
20984         (sem_item_optimizer::fixup_points_to_sets): Likewise.
20985         * ipa-icf.h: Declare new variables and functions.
20987 2018-03-13  Jakub Jelinek  <jakub@redhat.com>
20989         PR middle-end/84834
20990         * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
20991         integer_pow2p@2 and test integer_pow2p in condition.
20992         (A < 0 ? C : 0): Similarly for @1.
20994         PR middle-end/84831
20995         * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
20996         characters starting at p contain '\0' character, don't look beyond
20997         that.
20999         PR target/84827
21000         * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
21001         pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
21003         PR target/84828
21004         * reg-stack.c (change_stack): Change update_end var from int to
21005         rtx_insn *, if non-NULL don't update just BB_END (current_block), but
21006         also call set_block_for_insn on the newly added insns and rescan.
21008         PR target/84786
21009         * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
21010         on the last operand.
21012         PR c++/84704
21013         * tree.c (stabilize_reference_1): Return save_expr (e) for
21014         STATEMENT_LIST even if it doesn't have side-effects.
21016 2018-03-12  Jonathan Wakely  <jwakely@redhat.com>
21018         * doc/invoke.texi (-mclflushopt): Fix spelling of option.
21020 2018-03-12  Renlin Li  <renlin.li@arm.com>
21022         * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
21023         aarch64_output_scalar_simd_mov_immediate.
21025 2018-03-12  Martin Sebor  <msebor@redhat.com>
21027         PR tree-optimization/83456
21028         * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
21029         for perfectly overlapping calls to memcpy.
21030         (gimple_fold_builtin_memory_chk): Same.
21031         (gimple_fold_builtin_strcpy): Handle no-warning.
21032         (gimple_fold_builtin_stxcpy_chk): Same.
21033         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
21035 2018-03-12  Segher Boessenkool  <segher@kernel.crashing.org>
21037         * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
21038         parameter.  Use it for SFmode.
21039         (rs6000_function_arg_advance_1): Adjust.
21040         (rs6000_function_arg): Adjust.
21041         (rs6000_gimplify_va_arg): Pass false for that new parameter.
21043 2018-03-12  Segher Boessenkool  <segher@kernel.crashing.org>
21045         PR rtl-optimization/84169
21046         PR rtl-optimization/84780
21047         * combine.c (can_combine_p): Check for a 2-insn combination whether
21048         the destination register is used between the two insns, too.
21050 2018-03-12  Richard Biener  <rguenther@suse.de>
21052         PR tree-optimization/84803
21053         * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
21054         for refs DR analysis didn't process.
21056 2018-03-12  Richard Biener  <rguenther@suse.de>
21058         PR tree-optimization/84777
21059         * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
21060         force-vectorize loops ignore whether we are optimizing for size.
21062 2018-03-12  Chung-Ju Wu  <jasonwucj@gmail.com>
21064         * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
21065         (TARGET_MD_ASM_ADJUST): Define.
21067 2018-03-12  Monk Chiang  <sh.chiang04@gmail.com>
21068             Kito Cheng  <kito.cheng@gmail.com>
21069             Chung-Ju Wu  <jasonwucj@gmail.com>
21071         * config/nds32/nds32.c (nds32_compute_stack_frame,
21072         nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
21073         nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
21074         nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
21075         nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
21076         * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
21077         NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
21078         * config/nds32/nds32.md (prologue, epilogue): Use macro
21079         NDS32_V3PUSH_AVAILABLE_P to do checking.
21081 2018-03-11  Jakub Jelinek  <jakub@redhat.com>
21083         PR debug/58150
21084         * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
21085         DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
21086         but on TYPE_SIZE.  Don't do anything for ENUM_IS_OPAQUE if not creating
21087         a new die.  Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE.  Guard
21088         addition of most attributes on !orig_type_die or the attribute not
21089         being present already.  Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
21091 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
21092             Chung-Ju Wu  <jasonwucj@gmail.com>
21094         * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
21095         __NDS32_VH__ macro.
21096         * config/nds32/nds32.opt (mvh): New option.
21098 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
21099             Chung-Ju Wu  <jasonwucj@gmail.com>
21101         * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
21102         function.
21103         * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
21104         * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
21105         definition.
21107 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
21108             Chung-Ju Wu  <jasonwucj@gmail.com>
21110         * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
21111         function.
21112         * config/nds32/nds32-multiple.md (strlensi): New pattern.
21113         * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
21115 2018-03-11  Monk Chiang  <sh.chiang04@gmail.com>
21116             Kito Cheng  <kito.cheng@gmail.com>
21117             Chung-Ju Wu  <jasonwucj@gmail.com>
21119         * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
21120         UNSPEC_FFMISM and UNSPEC_FLMISM.
21121         * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
21122         for ffb, ffmism and flmism.
21123         * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
21124         (unspec_ffmism): Ditto.
21125         (unspec_flmism): Ditto.
21126         (nds32_expand_builtin_impl): Check if string extension is available.
21127         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
21128         NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
21130 2018-03-10  Vladimir Makarov  <vmakarov@redhat.com>
21132         Reverting patch:
21133         2018-03-09  Vladimir Makarov  <vmakarov@redhat.com>
21135         PR target/83712
21136         * lra-assigns.c (assign_by_spills): Return a flag of reload
21137         assignment failure.  Do not process the reload assignment
21138         failures.  Do not spill other reload pseudos if they has the same
21139         reg class.
21140         (lra_assign): Add a return arg.  Set up from the result of
21141         assign_by_spills call.
21142         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
21143         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
21144         usage_insns if it is not NULL.
21145         (spill_hard_reg_in_range): New function.
21146         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
21147         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
21148         function prototypes.
21149         (lra_assign): Change prototype.
21150         * lra.c (lra): Add code to deal with fails by splitting hard reg
21151         live ranges.
21153 2018-03-10  H.J. Lu  <hongjiu.lu@intel.com>
21155         PR target/84807
21156         * config/i386/i386.opt: Replace Enforcment with Enforcement.
21158 2018-03-10  Alexandre Oliva  <aoliva@redhat.com>
21160         PR debug/84620
21161         * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
21162         (dw_val_node): Add val_symbolic_view.
21163         * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
21164         (symview_upper_bound): New.
21165         (new_line_info_table): Initialize symviews_since_reset.
21166         (dwarf2out_source_line): Count symviews_since_reset and set
21167         symview_upper_bound.
21168         (dw_val_equal_p): Handle symview.
21169         (add_AT_symview): New.
21170         (print_dw_val): Handle symview.
21171         (attr_checksum, attr_checksum_ordered): Likewise.
21172         (same_dw_val_p, size_of_die): Likewise.
21173         (value_format, output_die): Likewise.
21174         (add_high_low_attributes): Use add_AT_symview for entry_view.
21175         (dwarf2out_finish): Reset symview_upper_bound, clear
21176         zero_view_p.
21178 2018-03-09  Peter Bergner  <bergner@vnet.ibm.com>
21180         PR target/83969
21181         * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
21182         Add strict argument and use it.
21183         (rs6000_split_multireg_move): Update for new strict argument.
21184         (mem_operand_gpr): Disallow all non-offsettable addresses.
21185         * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
21187 2018-03-09  Jakub Jelinek  <jakub@redhat.com>
21189         PR target/84772
21190         * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
21191         temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
21192         * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
21194         PR c++/84767
21195         * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
21196         decl, use remap_type if we want to use the type.
21198 2018-03-09  Martin Sebor  <msebor@redhat.com>
21200         PR tree-optimization/84526
21201         * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
21202         Remove dead code.
21203         (builtin_access::generic_overlap): Be prepared to handle non-array
21204         base objects.
21206 2018-03-09  Alexandre Oliva  <aoliva@redhat.com>
21208         PR rtl-optimization/84682
21209         * lra-constraints.c (process_address_1): Check is_address flag
21210         for address constraints.
21211         (process_alt_operands): Likewise.
21212         * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
21213         preprocess_constraints.
21214         * recog.h (preprocess_constraints): Add oploc parameter.
21215         Adjust callers.
21216         * recog.c (preprocess_constraints): Test address_operand for
21217         CT_ADDRESS constraints.
21219 2018-03-09  Vladimir Makarov  <vmakarov@redhat.com>
21221         PR target/83712
21222         * lra-assigns.c (assign_by_spills): Return a flag of reload
21223         assignment failure.  Do not process the reload assignment
21224         failures.  Do not spill other reload pseudos if they has the same
21225         reg class.
21226         (lra_assign): Add a return arg.  Set up from the result of
21227         assign_by_spills call.
21228         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
21229         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
21230         usage_insns if it is not NULL.
21231         (spill_hard_reg_in_range): New function.
21232         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
21233         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
21234         function prototypes.
21235         (lra_assign): Change prototype.
21236         * lra.c (lra): Add code to deal with fails by splitting hard reg
21237         live ranges.
21239 2018-03-09  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
21241         PR target/83193
21242         * common/config/arm/arm-common.c (arm_parse_arch_option_name):
21243         Accept complain bool parameter.  Only emit errors if it is true.
21244         (arm_parse_cpu_option_name): Likewise.
21245         (arm_target_thumb_only): Adjust callers of the above.
21246         * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
21247         prototype to take a default true bool parameter.
21248         (arm_parse_arch_option_name): Likewise.
21250 2018-03-09  David Malcolm  <dmalcolm@redhat.com>
21251             Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
21253         PR jit/64089
21254         PR jit/84288
21255         * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
21256         * configure: Regenerate.
21257         * configure.ac ("linker --version-script option"): New.
21258         ("linker soname option"): New.
21260 2018-03-09  Richard Biener  <rguenther@suse.de>
21262         PR tree-optimization/84775
21263         * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
21264         immediate uses of predicate stmts and mark them modified.
21266         Revert
21267         PR tree-optimization/84178
21268         * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
21269         to caller.
21270         (version_loop_for_if_conversion): Delay update_ssa call.
21271         (tree_if_conversion): Delay update_ssa until after predicate
21272         insertion.
21274 2018-03-09  Eric Botcazou  <ebotcazou@adacore.com>
21276         PR target/84763
21277         * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
21278         when the function accesses prior frames.
21280 2018-03-08  Jakub Jelinek  <jakub@redhat.com>
21282         PR debug/84456
21283         * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
21284         gen_llsym, otherwise call maybe_gen_llsym.
21286         PR inline-asm/84742
21287         * recog.c (asm_operand_ok): Return 0 if multi-character constraint
21288         has ',' character inside of it.
21290 2018-03-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
21292         PR target/84748
21293         * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
21294         as clobbering CC_REGNUM.
21296 2018-03-08  Richard Biener  <rguenther@suse.de>
21298         PR middle-end/84552
21299         * tree-scalar-evolution.c: Include tree-into-ssa.h.
21300         (follow_copies_to_constant): Do not follow SSA names registered
21301         for update.
21303 2018-03-08  Richard Biener  <rguenther@suse.de>
21305         PR tree-optimization/84178
21306         * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
21307         to caller.
21308         (version_loop_for_if_conversion): Delay update_ssa call.
21309         (tree_if_conversion): Delay update_ssa until after predicate
21310         insertion.
21312 2018-03-08  David Malcolm  <dmalcolm@redhat.com>
21314         PR tree-optimization/84178
21315         * tree-if-conv.c (release_bb_predicate): Remove the
21316         the assertion that the stmts have NULL use_ops.
21317         Discard the statements, asserting that they haven't
21318         yet been added to a BB.
21320 2018-03-08  Richard Biener  <rguenther@suse.de>
21322         PR tree-optimization/84746
21323         * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
21324         (phi_translate): Pass in destination ANTIC_OUT set.
21325         (phi_translate_1): Likewise.  For a simplified result lookup
21326         a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
21327         (phi_translate_set): Adjust.
21328         (do_pre_regular_insertion): Likewise.
21329         (do_pre_partial_partial_insertion): Likewise.
21331 2018-03-08  Martin Liska  <mliska@suse.cz>
21333         PR gcov-profile/84735
21334         * doc/gcov.texi: Document usage of profile files.
21335         * gcov-io.h: Document changes in the format.
21337 2018-03-08  Alexandre Oliva  <aoliva@redhat.com>
21339         PR debug/84404
21340         PR debug/84408
21341         * dwarf2out.c (struct dw_line_info_table): Update comments for
21342         view == -1.
21343         (FORCE_RESET_NEXT_VIEW): New.
21344         (FORCE_RESETTING_VIEW_P): New.
21345         (RESETTING_VIEW_P): Check for -1 too.
21346         (ZERO_VIEW_P): Likewise.
21347         (new_line_info_table): Force-reset next view.
21348         (dwarf2out_begin_function): Likewise.
21349         (dwarf2out_source_line): Simplify zero_view_p initialization.
21350         Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
21351         view directly.  Omit view when omitting .loc at line 0.
21353 2018-03-08  Jakub Jelinek  <jakub@redhat.com>
21355         PR tree-optimization/84740
21356         * tree-switch-conversion.c (process_switch): Call build_constructors
21357         only if info.phi_count is non-zero.
21359         PR tree-optimization/84739
21360         * tree-tailcall.c (find_tail_calls): Check call arguments against
21361         DECL_ARGUMENTS (current_function_decl) rather than
21362         DECL_ARGUMENTS (func) when checking for tail recursion.
21364 2018-03-07  Jakub Jelinek  <jakub@redhat.com>
21366         * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
21367         Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
21368         Volker Reichelt's entry and add entries for people that perform
21369         GCC fuzzy testing and report numerous bugs.
21371 2018-03-07  Segher Boessenkool  <segher@kernel.crashing.org>
21373         PR target/82411
21374         * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
21375         readonly data in sdata, if that is disabled.
21376         * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
21377         * doc/invoke.texi (RS/6000 and PowerPC Options): Document
21378         -mreadonly-in-sdata option.
21380 2018-03-07  Martin Sebor  <msebor@redhat.com>
21382         PR tree-optimization/84468
21383         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
21384         basic block when looking for nul assignment.
21386 2018-03-07  Eric Botcazou  <ebotcazou@adacore.com>
21388         PR target/84277
21389         * except.h (output_function_exception_table): Adjust prototype.
21390         * except.c (output_function_exception_table): Remove FNNAME parameter
21391         and add SECTION parameter.  Ouput one part of the table at a time.
21392         * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
21393         the first part of the exception table and emit unwind directives.
21394         * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
21395         (i386_pe_seh_cold_init): Likewise.
21396         * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
21397         (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
21398         * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
21399         (ix86_output_call_insn): Emit a nop in one more case for SEH.
21400         * config/i386/winnt.c: Include except.h.
21401         (struct seh_frame_state): Add reg_offset, after_prologue and
21402         in_cold_section fields.
21403         (i386_pe_seh_end_prologue): Set seh->after_prologue.
21404         (i386_pe_seh_cold_init): New function.
21405         (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
21406         to seh->in_cold_section.
21407         (seh_emit_push): Record the offset of the push.
21408         (seh_emit_save): Record the offet of the save.
21409         (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
21410         Test seh->after_prologue to disregard the epilogue.
21411         (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
21412         (i386_pe_end_cold_function): New function.
21414 2018-03-07  Jakub Jelinek  <jakub@redhat.com>
21416         PR fortran/84565
21417         * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
21418         aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
21420         PR c++/84704
21421         * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
21422         on tmp_var.
21423         * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
21424         don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
21426         PR middle-end/84723
21427         * multiple_target.c: Include tree-inline.h and intl.h.
21428         (expand_target_clones): Diagnose and fail if node->definition and
21429         !tree_versionable_function_p (node->decl).
21431 2018-03-06  John David Anglin  <danglin@gcc.gnu.org>
21433         * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
21434         sprint_ul.
21435         (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
21436         (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
21437         * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
21439 2018-03-06  Jakub Jelinek  <jakub@redhat.com>
21441         PR target/84710
21442         * combine.c (try_combine): Use reg_or_subregno instead of handling
21443         just paradoxical SUBREGs and REGs.
21445 2018-03-06  Claudiu Zissulescu  <claziss@synopsys.com>
21447         * config/arc/arc.c (arc_finalize_pic): Remove function.
21448         (arc_must_save_register): We use single base PIC register, remove
21449         checks to save/restore the PIC register.
21450         (arc_expand_prologue): Likewise.
21451         * config/arc/arc-protos.h (arc_set_default_type_attributes):
21452         Remove.
21453         (arc_verify_short): Likewise.
21454         (arc_attr_type): Likewise.
21455         * config/arc/arc.c (arc_set_default_type_attributes): Remove.
21456         (walk_stores): Likewise.
21457         (arc_address_cost): Make it static.
21458         (arc_verify_short): Likewise.
21459         (branch_dest): Likewise.
21460         (arc_attr_type): Likewise.
21461         * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
21462         (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
21463         (arc_final_prescan_insn): Remove inserting the nops due to
21464         hardware hazards.  It is done in reorg step.
21465         (insn_length_variant_t): Remove.
21466         (insn_length_parameters_t): Likewise.
21467         (arc_insn_length_parameters): Likewise.
21468         (arc_get_insn_variants): Likewise.
21469         * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
21471 2018-03-06  Jakub Jelinek  <jakub@redhat.com>
21473         PR inline-asm/84683
21474         * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
21475         assertion failure.
21477         PR tree-optimization/84687
21478         * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
21479         on new_node->decl.
21480         * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
21482 2018-03-05  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
21484         * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
21485         Rename to ppc_speculation_barrier.
21486         * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
21487         __builtin_ppc_speculation_barrier.
21489 2018-03-05  Jakub Jelinek  <jakub@redhat.com>
21491         PR target/84700
21492         * combine.c (combine_simplify_rtx): Don't try to simplify if
21493         if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
21494         are equal to x.
21496 2018-03-05  Segher Boessenkool  <segher@kernel.crashing.org>
21498         * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
21499         to 32 bytes when compiling for POWER9.
21501 2018-03-05  Jakub Jelinek  <jakub@redhat.com>
21503         PR target/84564
21504         * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
21505         regparm >= 3 with no arg reg available also for calls with
21506         flag_force_indirect_call.  Pass decl to ix86_function_regparm.
21508         PR target/84524
21509         * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
21510         orig,vex.
21511         (*<plusminus_insn><mode>3): Likewise.  Remove <mask_operand3> uses.
21513 2018-03-05  Peter Bergner  <bergner@vnet.ibm.com>
21515         PR target/84264
21516         * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
21518 2018-03-05  Richard Biener  <rguenther@suse.de>
21520         PR tree-optimization/84486
21521         * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
21522         When inserting a __builtin_assume_aligned call set the LHS
21523         SSA name alignment info accordingly.
21525 2018-03-05  Wilco Dijkstra  <wdijkstr@arm.com>
21527         PR tree-optimization/84114
21528         * config/aarch64/aarch64.c (aarch64_reassociation_width)
21529         Avoid reassociation of FLOAT_MODE addition.
21531 2018-03-05  Olga Makhotina  <olga.makhotina@intel.com>
21533         * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
21534         OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
21535         OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
21536         (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
21537         * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
21538         * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
21539         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
21540         and -mwbnoinvd.
21541         * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
21542         __builtin_ia32_wbinvd): New builtins.
21543         (SPECIAL_ARGS2): New.
21544         * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
21545         (SPECIAL_ARGS2): New.
21546         * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
21547         (ix86_valid_target_attribute_inner_p): Ditto.
21548         (ix86_init_mmx_sse_builtins): Add special_args2.
21549         * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
21550         TARGET_WBNOINVD_P): New.
21551         * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
21552         (define_insn "wbinvd", define_insn "wbnoinvd"): New.
21553         * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
21554         * config/i386/immintrin.h (_wbinvd): New intrinsic.
21555         * config/i386/pconfigintrin.h: New file.
21556         * config/i386/wbnoinvdintrin.h: Ditto.
21557         * config/i386/x86intrin.h: Add headers pconfigintrin.h and
21558         wbnoinvdintrin.h.
21559         * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
21561 2018-03-05  Richard Biener  <rguenther@suse.de>
21563         PR tree-optimization/84670
21564         * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
21565         member.
21566         (BB_VISITED_WITH_VISITED_SUCCS): New define.
21567         (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
21568         (compute_antic_aux): Only assert the number of values in ANTIC_IN
21569         doesn't grow if all successors (recursively) were visited at least
21570         once.
21572 2018-03-05  Richard Biener  <rguenther@suse.de>
21574         PR tree-optimization/84650
21575         * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
21576         if executed in the loop pipeline.
21578 2018-03-05  Sandra Loosemore  <sandra@codesourcery.com>
21580         * doc/configfiles.texi (Configuration Files): Move info about
21581         conditionalizing $target-protos.h to...
21582         * doc/sourcebuild.texi (Back End): Here.  Explain how $target.h
21583         differs from $target-protos.h.
21585 2018-03-05  Kito Cheng  <kito.cheng@gmail.com>
21586             Chung-Ju Wu  <jasonwucj@gmail.com>
21588         * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
21589         * config/nds32/nds32-multiple.md (setmemsi): Define.
21590         * config/nds32/nds32-memory-manipulation.c
21591         (nds32_gen_dup_4_byte_to_word_value): New.
21592         (emit_setmem_word_loop): New.
21593         (emit_setmem_byte_loop): New.
21594         (nds32_expand_setmem_loop): New.
21595         (nds32_expand_setmem_loop_v3m): New.
21596         (nds32_expand_setmem_unroll): New.
21597         (nds32_expand_setmem): New.
21599 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
21600             Chung-Ju Wu  <jasonwucj@gmail.com>
21602         * config/nds32/nds32-memory-manipulation.c
21603         (nds32_emit_load_store): New.
21604         (nds32_emit_post_inc_load_store): New.
21605         (nds32_emit_mem_move): New.
21606         (nds32_emit_mem_move_block): New.
21607         (nds32_expand_movmemsi_loop_unknown_size): New.
21608         (nds32_expand_movmemsi_loop_known_size): New.
21609         (nds32_expand_movmemsi_loop): New.
21610         (nds32_expand_movmemsi_unroll): New.
21611         (nds32_expand_movmemqi): Rename ...
21612         (nds32_expand_movmemsi): ... to this.
21613         * config/nds32/nds32-multiple.md (movmemqi): Rename ...
21614         (movmemsi): ... to this.
21615         * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
21616         (nds32_expand_movmemsi): ... to this.
21618 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
21619             Monk Chiang  <sh.chiang04@gmail.com>
21620             Chung-Ju Wu  <jasonwucj@gmail.com>
21622         * config/nds32/nds32-protos.h
21623         (nds32_expand_load_multiple): New arguments.
21624         (nds32_expand_store_multiple): Ditto.
21625         (nds32_valid_multiple_load_store): Rename ...
21626         (nds32_valid_multiple_load_store_p): ... to this.
21627         * config/nds32/nds32-memory-manipulation.c
21628         (nds32_expand_load_multiple): Refine implementation.
21629         (nds32_expand_store_multiple): Ditto.
21630         * config/nds32/nds32-multiple.md
21631         (load_multiple): Update nds32_expand_load_multiple interface.
21632         (store_multiple): Update nds32_expand_store_multiple interface.
21633         * config/nds32/nds32-predicates.c
21634         (nds32_valid_multiple_load_store): Rename ...
21635         (nds32_valid_multiple_load_store_p): ... to this and refine
21636         implementation.
21637         * config/nds32/predicates.md
21638         (nds32_load_multiple_and_update_address_operation): New predicate.
21639         (nds32_store_multiple_and_update_address_operation): New predicate.
21641 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
21642             Chung-Ju Wu  <jasonwucj@gmail.com>
21644         * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
21645         (combo): New attribute.
21646         * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
21648 2018-03-03  Chung-Ju Wu  <jasonwucj@gmail.com>
21650         * config/nds32/nds32.opt: Change -mcmodel= default value.
21652 2018-03-03  Kito Cheng  <kito.cheng@gmail.com>
21653             Monk Chiang  <sh.chiang04@gmail.com>
21654             Chung-Ju Wu  <jasonwucj@gmail.com>
21656         * config/nds32/constants.md (unspec_element): New enum.
21657         * config/nds32/constraints.md (Umw): New constraint.
21658         * config/nds32/nds32-intrinsic.c: Add more builtin functions.
21659         * config/nds32/nds32-intrinsic.md: Likewise.
21660         * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
21661         (nds32_valid_smw_lwm_base_p): New.
21662         (nds32_output_smw_single_word): New.
21663         (nds32_output_lmw_single_word): New.
21664         (nds32_expand_unaligned_load): New.
21665         (nds32_expand_unaligned_store): New.
21666         * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
21667         (nds32_output_smw_single_word): Declare.
21668         (nds32_output_lmw_single_word): Declare.
21669         (nds32_expand_unaligned_load): Declare.
21670         (nds32_expand_unaligned_store): Declare.
21671         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
21672         NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
21673         NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
21674         NDS32_BUILTIN_UASTORE_DW.
21675         * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
21676         predicate.
21678 2018-03-03  Monk Chiang  <sh.chiang04@gmail.com>
21679             Kito Cheng  <kito.cheng@gmail.com>
21680             Chung-Ju Wu  <jasonwucj@gmail.com>
21682         * config/nds32/nds32-intrinsic.c
21683         (nds32_expand_builtin_null_ftype_reg): Delete.
21684         (nds32_expand_builtin_reg_ftype_imm): Ditto.
21685         (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
21686         (nds32_read_argument): New.
21687         (nds32_legitimize_target): Ditto.
21688         (nds32_legitimize_argument): Ditto.
21689         (nds32_check_constant_argument): Ditto.
21690         (nds32_expand_unop_builtin): Ditto.
21691         (nds32_expand_unopimm_builtin): Ditto.
21692         (nds32_expand_binop_builtin): Ditto.
21693         (nds32_builtin_decl_impl): Ditto.
21694         (builtin_description): Ditto.
21695         (nds32_expand_builtin_impl): Rewrite with new infrastructure.
21696         (nds32_init_builtins_impl): Ditto.
21697         * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
21698         (nds32_builtin_decl): New.
21699         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
21700         * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
21702 2018-03-02  Jeff Law  <law@redhat.com>
21704         * reorg.c (stop_search_p): Handle DEBUG_INSN.
21705         (redundant_insn, fill_simple_delay_slots): Likewise.
21706         (fill_slots_from_thread): Likewise.
21707         * resource.c (mark_referenced_resources): Likewise.
21708         (mark_set_resources, find_dead_or_set_registers): Likewise.
21710 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
21712         * substring-locations.h (format_warning_va): Formatting fix for
21713         ATTRIBUTE_GCC_DIAG.
21714         (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
21715         argument.
21716         (format_warning_n_va, format_warning_at_substring_n): New prototypes.
21717         * substring-locations.c: Include intl.h.
21718         (format_warning_va): Turned into small wrapper around
21719         format_warning_n_va, renamed to ...
21720         (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
21721         rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
21722         use ngettext.
21723         (format_warning_at_substring_n): New function.
21724         * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
21725         (fmtwarn): Add ATTRIBUTE_GCC_DIAG.  Turn into a copy of
21726         format_warning_at_substring with just a shorter name instead of
21727         const function pointer.
21728         (fmtwarn_n): New function.
21729         (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
21730         appropriate, get rid of all the fmtstr temporaries, move conditionals
21731         with G_() wrapped string literals directly into fmtwarn arguments,
21732         cast dir.len to (int), formatting fixes.
21734 2018-03-02  Thomas Schwinge  <thomas@codesourcery.com>
21736         * doc/invoke.texi: Remove "Cilk Plus" references.
21738 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
21739             Richard Biener  <rguenther@suse.de>
21741         PR ipa/84628
21742         * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
21743         for error or warning attributes if CALL_FROM_THUNK_P is set.
21744         Formatting fixes.
21746 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
21748         PR target/56540
21749         * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
21750         __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
21752         PR target/56540
21753         * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
21754         __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
21756         * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
21757         instead of -1U in last predictors element's probability member.
21759 2018-03-02  Eric Botcazou  <ebotcazou@adacore.com>
21761         PR ipa/83983
21762         * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
21763         arguments if they are comparable.
21765 2018-03-02  Richard Sandiford  <richard.sandiford@linaro.org>
21767         PR tree-optimization/84634
21768         * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
21769         masks and masked_loop_p with a single loop_masks, making sure it's
21770         null for bb vectorization.
21772 2018-03-02  Richard Sandiford  <richard.sandiford@linaro.org>
21774         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
21775         (vect_analyze_data_ref_access): Use loop->safe_len rather than
21776         loop->force_vectorize to check whether there is no alias.
21778 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
21780         PR target/84614
21781         * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
21782         prototypes.
21783         * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
21784         comments.
21785         (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
21786         * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
21787         instead of a loop around prev_real_insn.
21788         * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
21789         prev_real_insn.
21791         PR inline-asm/84625
21792         * config/i386/i386.c (ix86_print_operand): Use conditional
21793         output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
21794         zero vector.
21796 2018-03-02  Richard Biener  <rguenther@suse.de>
21798         PR tree-optimization/84427
21799         * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
21800         (bitmap_set_subtract_values): Rewrite to handle multiple
21801         exprs per value.
21802         (clean): Likewise.
21803         (prune_clobbered_mems): Likewise.
21804         (phi_translate): Take edge instead of pred/phiblock.
21805         (phi_translate_1): Likewise.
21806         (phi_translate_set): Likewise.  Insert all translated
21807         exprs for a value into the set, keeping possibly multiple
21808         expressions per value.
21809         (compute_antic_aux): Adjust for phi_translate changes.
21810         When intersecting union the expressions and prune those
21811         not in the final value set, keeping possibly multiple
21812         expressions per value.  Do not use value-insertion
21813         for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
21814         all expressions.  Add verification that the value-sets
21815         only shrink during iteration.
21816         (compute_partial_antic_aux): Adjust for the phi_translate changes.
21817         (do_pre_regular_insertion): Likewise.
21818         (do_pre_partial_partial_insertion): Likewise.
21820 2018-03-02  Richard Biener  <rguenther@suse.de>
21822         PR target/82005
21823         * config/darwin.c (saved_debug_info_level): New static global.
21824         (darwin_asm_lto_start): Disable debug info generation for LTO out.
21825         (darwin_asm_lto_end): Restore debug info generation settings.
21827 2018-03-01  Martin Liska  <mliska@suse.cz>
21829         PR sanitizer/82484
21830         * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
21831         volatile arguments.
21833 2018-03-01  Richard Biener  <rguenther@suse.de>
21835         PR debug/84645
21836         * dwarf2out.c (gen_variable_die): Properly handle late VLA
21837         type annotation with LTO when debug was disabled at compile-time.
21839 2018-03-01  Matthew Fortune  <mfortune@gmail.com>
21841         * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
21842         XINT with INTVAL.
21843         (mips_final_postscan_insn): Likewise.
21845 2018-03-01  Richard Sandiford  <richard.sandiford@linaro.org>
21847         PR rtl-optimization/84528
21848         * alias.c (init_alias_target): Add commentary.
21849         (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
21850         a unique base value if the frame pointer is not eliminated
21851         to the stack pointer.
21853 2018-03-01  Tom de Vries  <tom@codesourcery.com>
21855         PR rtl-optimization/83327
21856         * lra-int.h (hard_regs_spilled_into): Declare.
21857         * lra.c (hard_regs_spilled_into): Define.
21858         (init_reg_info): Init hard_regs_spilled_into.
21859         * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
21860         * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
21861         (process_bb_lives): Handle hard_regs_spilled_into.
21862         (lra_create_live_ranges_1): Before doing liveness propagation, clear
21863         regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
21865 2018-02-28  David Edelsohn  <dje.gcc@gmail.com>
21867         * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
21868         (powerpc-ibm-aix[789]*): Default to AIX 7.2.
21869         * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
21870         * config/rs6000/aix72.h: New file.
21872 2018-02-28  Jakub Jelinek  <jakub@redhat.com>
21874         * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
21875         instead of warning_at with conditional singular and plural messages
21876         where possible.
21878         PR target/52991
21879         * stor-layout.c (update_alignment_for_field): For
21880         targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
21881         && !DECL_PACKED (field), do the alignment update, just use
21882         only desired_align instead of MAX (type_align, desired_align)
21883         as the alignment.
21884         (place_field): Don't do known_align < desired_align handling
21885         early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
21886         is non-NULL, instead do it after rli->prev_field handling and
21887         only if not within a bitfield word.  For DECL_PACKED (field)
21888         use type_align of BITS_PER_UNIT.
21890 2018-02-28  Eric Botcazou  <ebotcazou@adacore.com>
21892         * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
21893         superfluous parentheses and trailing spaces.
21895 2018-02-28  Richard Biener  <rguenther@suse.de>
21897         PR tree-optimization/84584
21898         * graphite-scop-detection.c (scop_detection::add_scop): Discard
21899         SCoPs with fake exit edge.
21901 2018-02-28  Martin Liska  <mliska@suse.cz>
21903         PR testsuite/84597
21904         * timevar.c (timer::print): Fix format to properly print 100%
21905         values.
21907 2018-02-28  Richard Biener  <rguenther@suse.de>
21909         PR middle-end/84607
21910         * genmatch.c (capture_info::walk_match): Do not mark
21911         captured expressions without operands as expr_p given
21912         they act more like predicates and should be subject to
21913         "lost tail" side-effect preserving.
21915 2018-02-28  Alexandre Oliva  <aoliva@redhat.com>
21917         PR rtl-optimization/81611
21918         * auto-inc-dec.c (attempt_change): Move dead note from
21919         mem_insn if it's the next use of regno
21920         (find_address): Take address use of reg holding
21921         non-incremented value.  Add parm to limit search to the named
21922         reg only.
21923         (merge_in_block): Attempt to use a mem insn that is the next
21924         use of the original regno.
21926 2018-02-27  Martin Sebor  <msebor@redhat.com>
21928         PR c++/83871
21929         * doc/invoke.texi (-Wmissing-attributes): New option.
21930         * print-tree.c (print_node): Handle DECL_UNINLINABLE.
21932 2018-02-27  Martin Sebor  <msebor@redhat.com>
21934         PR translation/84207
21935         * diagnostic-core.h (warning_n, error_n, inform_n): Change
21936         n argument to unsigned HOST_WIDE_INT.
21937         * diagnostic.c (warning_n, error_n, inform_n): Ditto.
21938         (diagnostic_n_impl): Ditto.  Handle arguments in excess of LONG_MAX.
21939         * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
21940         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
21942 2018-02-27  Richard Biener  <rguenther@suse.de>
21944         PR tree-optimization/84512
21945         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
21946         Do not use the estimate returned from record_stmt_cost for
21947         the scalar iteration cost but sum properly using add_stmt_cost.
21949 2018-02-27  Richard Biener  <rguenther@suse.de>
21951         PR tree-optimization/84466
21952         * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
21953         Adjust last change to less strictly validate use operands.
21955 2018-02-27  Martin Liska  <mliska@suse.cz>
21957         PR gcov-profile/84548
21958         * gcov.c (process_file): Allow partial overlap and consider it
21959         also as group functions.
21960         (output_lines): Properly calculate range of lines for a group.
21962 2018-02-27  Martin Liska  <mliska@suse.cz>
21964         * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
21965         'ggc' suffixes.  Change first column width.
21966         (timer::print): Fix formatting of the column.
21968 2018-02-27  Alexandre Oliva  <aoliva@redhat.com>
21970         * tree-ssa-live.c (remove_unused_scope_block_p): Do not
21971         preserve inline entry blocks for the sake of debug inline
21972         entry point markers alone.
21973         (remove_unused_locals): Suggest in comments a better place to
21974         force the preservation of inline entry blocks that are
21975         otherwise unused, but do not preserve them.
21977 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
21979         * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
21981 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
21983         PR target/84039
21984         * config/i386/constraints.md (Bs): Replace
21985         ix86_indirect_branch_register with
21986         TARGET_INDIRECT_BRANCH_REGISTER.
21987         (Bw): Likewise.
21988         * config/i386/i386.md (indirect_jump): Likewise.
21989         (tablejump): Likewise.
21990         (*sibcall_memory): Likewise.
21991         (*sibcall_value_memory): Likewise.
21992         Peepholes of indirect call and jump via memory: Likewise.
21993         (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
21994         (*sibcall_value_GOT_32): Likewise.
21995         * config/i386/predicates.md (indirect_branch_operand): Likewise.
21996         (GOT_memory_operand): Likewise.
21997         (call_insn_operand): Likewise.
21998         (sibcall_insn_operand): Likewise.
21999         (GOT32_symbol_operand): Likewise.
22000         * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
22002 2018-02-26  Eric Botcazou  <ebotcazou@adacore.com>
22004         PR rtl-optimization/83496
22005         * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
22006         booleans to RTXes.  Call fix_reg_dead_note on every non-null element.
22007         (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
22008         redundant insn, if any.
22009         (relax_delay_slots): Likewise.
22010         (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
22012 2018-02-26  Richard Sandiford  <richard.sandiford@linaro.org>
22014         PR tree-optimization/83965
22015         * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
22016         that grouped statements are part of a reduction chain.  Return
22017         true if the statement is not marked as a reduction itself but
22018         is part of a group.
22019         (vect_recog_dot_prod_pattern): Don't check whether the statement
22020         is part of a group here.
22021         (vect_recog_sad_pattern): Likewise.
22022         (vect_recog_widen_sum_pattern): Likewise.
22024 2018-02-26  Eric Botcazou  <ebotcazou@adacore.com>
22026         PR debug/84545
22027         * final.c (rest_of_clean_state): Also look for calls inside sequences.
22029 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
22031         PR target/84530
22032         * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
22033         the bool argument.
22034         (ix86_output_indirect_function_return): New prototype.
22035         (ix86_split_simple_return_pop_internal): Likewise.
22036         * config/i386/i386.c (indirect_return_via_cx): New.
22037         (indirect_return_via_cx_bnd): Likewise.
22038         (indirect_thunk_name): Handle return va CX_REG.
22039         (output_indirect_thunk_function): Create alias for
22040         __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
22041         (ix86_output_indirect_jmp): Remove the bool argument.
22042         (ix86_output_indirect_function_return): New function.
22043         (ix86_split_simple_return_pop_internal): Likewise.
22044         * config/i386/i386.md (*indirect_jump): Don't pass false
22045         to ix86_output_indirect_jmp.
22046         (*tablejump_1): Likewise.
22047         (simple_return_pop_internal): Change it to define_insn_and_split.
22048         Call ix86_split_simple_return_pop_internal to split it for
22049         -mfunction-return=.
22050         (simple_return_indirect_internal): Call
22051         ix86_output_indirect_function_return instead of
22052         ix86_output_indirect_jmp.
22054 2018-02-26  Jakub Jelinek  <jakub@redhat.com>
22056         PR bootstrap/84405
22057         * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
22058         memset and value initialization afterwards.
22060 2018-02-26  Christophe Lyon  <christophe.lyon@linaro.org>
22062         * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
22064 2018-02-26  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
22066         PR target/84521
22067         * common/config/aarch64/aarch64-common.c
22068         (aarch_option_optimization_table[]): Switch
22069         off fomit-frame-pointer
22071 2018-02-26  Kito Cheng  <kito.cheng@gmail.com>
22072             Chung-Ju Wu  <jasonwucj@gmail.com>
22074         * config/nds32/nds32-multiple.md (load_multiple): Disallow
22075         volatile memory.
22076         (store_multiple): Ditto.
22078 2018-02-26  Kito Cheng  <kito.cheng@gmail.com>
22080         * config.gcc: Add --with-cpu support for nds32 target.
22081         * config/nds32/nds32-opts.h (nds32_cpu_type): New.
22082         * config/nds32/nds32.opt: Add -mcpu= option.
22084 2018-02-25  Segher Boessenkool  <segher@kernel.crashing.org>
22086         * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
22087         isel=yes): Warn for these deprecated options.
22089 2018-02-23  David Edelsohn  <dje.gcc@gmail.com>
22091         * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
22092         ISA_2_5_MASKS_EMBEDDED.
22094 2018-02-23  Jakub Jelinek  <jakub@redhat.com>
22096         * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
22097         p->max as pointers rather than using iterative_hash_expr.
22099 2018-02-23  Carl Love  <cel@us.ibm.com>
22101         * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
22102         macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
22103         BU_P8V_OVERLOAD_2.
22104         * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
22105         P8V_BUILTIN_VEC_VSIGNED2.  Change VSX_BUILTIN_VEC_VUNSIGNED2 to
22106         P8V_BUILTIN_VEC_VUNSIGNED2.
22108 2018-02-22  Vladimir Makarov  <vmakarov@redhat.com>
22110         PR target/81572
22111         * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
22112         * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
22113         LRA_UNKNOWN_ALT.
22114         * lra-constraints.c (curr_insn_transform): Set up
22115         LRA_NON_CLOBBERED_ALT for moves processed on the fast path.  Use
22116         LRA_UNKNOWN_ALT.
22117         (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
22118         * lra-eliminations.c (spill_pseudos): Ditto.
22119         (process_insn_for_elimination): Ditto.
22120         * lra-lives.c (reg_early_clobber_p): Use the new macros.
22121         * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
22122         LRA_NON_CLOBBERED_ALT.
22124 2018-02-22  Martin Sebor  <msebor@redhat.com>
22126         PR tree-optimization/84480
22127         * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
22128         to maybe_diag_stxncpy_trunc.  Call it.
22129         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
22130         from gimple_fold_builtin_strcpy.  Print inlining stack.
22131         (handle_builtin_stxncpy): Print inlining stack.
22132         * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
22134 2018-02-22  H.J. Lu  <hongjiu.lu@intel.com>
22136         PR target/84176
22137         * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
22138         error when -mindirect-branch=thunk-extern, -fcf-protection=branch
22139         and -fcheck-pointer-bounds are used together.
22140         (indirect_thunk_prefix): New enum.
22141         (indirect_thunk_need_prefix): New function.
22142         (indirect_thunk_name): Replace need_bnd_p with need_prefix.  Use
22143         "_nt" instead of "_bnd" for NOTRACK prefix.
22144         (output_indirect_thunk): Replace need_bnd_p with need_prefix.
22145         (output_indirect_thunk_function): Likewise.
22146         (): Likewise.
22147         (ix86_code_end): Update output_indirect_thunk_function calls.
22148         (ix86_output_indirect_branch_via_reg): Replace
22149         ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
22150         (ix86_output_indirect_branch_via_push): Likewise.
22151         (ix86_output_function_return): Likewise.
22152         * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
22153         incompatible with -fcf-protection=branch and
22154         -fcheck-pointer-bounds.
22156 2018-02-22  Steve Ellcey  <sellcey@cavium.com>
22158         PR target/83335
22159         * config/aarch64/aarch64.c (aarch64_print_address_internal):
22160         Change gcc_assert call to output_operand_lossage.
22162 2018-02-22  Steve Ellcey  <sellcey@cavium.com>
22164         * doc/extend.texi (__builtin_extend_pointer): Document builtin.
22166 2018-02-22  DJ Delorie  <dj@redhat.com>
22167             Sebastian Perta  <sebastian.perta@renesas.com>
22168             Oleg Endo  <olegendo@gcc.gnu.org>
22170         * config/rx/rx.c (rx_rtx_costs): New function.
22171         (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
22173 2018-02-22  Thomas Preud'homme  <thomas.preudhomme@arm.com>
22175         * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
22177 2018-02-22  Martin Liska  <mliska@suse.cz>
22179         PR driver/83193
22180         * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
22181         Add "native" as a possible value.
22183 2018-02-22  Martin Liska  <mliska@suse.cz>
22185         PR driver/83193
22186         * config/i386/i386.c (ix86_option_override_internal):
22187         Add "native" as a possible value for -march and -mtune.
22189 2018-02-22  Jakub Jelinek  <jakub@redhat.com>
22191         PR target/84502
22192         * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
22193         to all type variants.
22195         PR tree-optimization/84503
22196         * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
22197         width as info->bitpos + info->bitsize - start.
22198         (merged_store_group::merge_overlapping): Simplify width computation.
22199         (check_no_overlap): New function.
22200         (imm_store_chain_info::try_coalesce_bswap): Compute expected
22201         start + width and last_order of the group, fail if check_no_overlap
22202         fails.
22203         (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
22204         to group if check_no_overlap fails.
22206 2018-02-21  Segher Boessenkool  <segher@kernel.crashing.org>
22208         * config/rs6000/altivec.md: Delete contraint arguments to
22209         define_expand, define_split, and define_peephole2, and in
22210         define_insn_and_split if always unused.
22211         * config/rs6000/darwin.md: Ditto.
22212         * config/rs6000/dfp.md: Ditto.
22213         * config/rs6000/rs6000.md: Ditto.
22214         * config/rs6000/sync.md: Ditto.
22215         * config/rs6000/vector.md: Ditto.
22216         * config/rs6000/vsx.md: Ditto.
22218 2018-02-21  Segher Boessenkool  <segher@kernel.crashing.org>
22220         * config/rs6000/altivec.md: Write output control strings as braced
22221         blocks instead of double-quoted strings.
22222         * config/rs6000/darwin.md: Ditto.
22223         * config/rs6000/rs6000.md: Ditto.
22224         * config/rs6000/vector.md: Ditto.
22225         * config/rs6000/vsx.md: Ditto.
22227 2018-02-21  Jason Merrill  <jason@redhat.com>
22229         PR c++/84314 - ICE with templates and fastcall attribute.
22230         * attribs.c (build_type_attribute_qual_variant): Remove assert.
22232 2018-02-21  Jan Hubicka  <hubicka@ucw.cz>
22234         * ipa-cp.c (determine_versionability): Fix comment typos.
22236 2018-02-21  Jan Hubicka  <hubicka@ucw.cz>
22238         PR c/84229
22239         * ipa-cp.c (determine_versionability): Do not version functions caling
22240         va_arg_pack.
22242 2018-02-21  Martin Liska  <mliska@suse.cz>
22244         PR driver/83193
22245         * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
22246         Add "native" as a possible value.
22247         * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT):  Define
22248         the macro when native cpu detection is available.
22250 2018-02-21  Martin Liska  <mliska@suse.cz>
22252         PR driver/83193
22253         * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
22254         Add "native" as a possible value.
22255         * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
22256         when native cpu detection is available.
22258 2018-02-21  Jakub Jelinek  <jakub@redhat.com>
22259             Martin Sebor  <msebor@redhat.com>
22261         PR tree-optimization/84478
22262         * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
22263         false.
22264         * gimple-fold.c (get_range_strlen): Make minlen const and assume it
22265         can't be NULL.  Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
22266         support which is conservatively correct, for 2 only stay conservative
22267         for maxlen.  Formatting and comment capitalization fixes.  Add STRICT
22268         argument to the 2 argument get_range_strlen, adjust 6 arg
22269         get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
22270         false.
22271         (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
22272         (gimple_fold_builtin_strlen): Pass true as last argument to
22273         get_range_strlen.
22275 2018-02-20  Martin Sebor  <msebor@redhat.com>
22277         PR middle-end/84095
22278         * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
22279         (builtin_memref::set_base_and_offset): Same.  Handle inner references.
22280         (builtin_memref::builtin_memref): Factor out parts into
22281         set_base_and_offset and call it.
22283 2018-02-20  Richard Sandiford  <richard.sandiford@linaro.org>
22285         PR middle-end/84406
22286         * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
22287         is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
22288         greater precision.  If to_mode is a MODE_PARTIAL_INT, stop the
22289         search at the associated MODE_INT.
22291 2018-02-20  Jeff Law  <law@redhat.com>
22293         PR middle-end/82123
22294         PR tree-optimization/81592
22295         PR middle-end/79257
22296         * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
22297         for range data rather than using global data.
22298         * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
22299         range data rather than using global data.
22300         * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
22301         pass it to children as needed.
22302         (struct directive::fmtresult): Similarly.
22303         (struct directive::set_width): Similarly.
22304         (struct directive::set_precision): Similarly.
22305         (format_integer, format_directive, parse_directive): Similarly.
22306         (format_none): Accept unnamed vr_values parameter.
22307         (format_percent, format_floating, format_character): Similarly.
22308         (format_string, format_plain): Similarly.
22309         * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
22310         the EVRP range analyzer for range data rather than using global data.
22311         * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
22312         gimple-ssa-evrp-analyze.h
22313         (class sprintf_dom_walker): Add after_dom_children member function.
22314         Add evrp_range_analyzer member.
22315         (sprintf_dom_walker::before_dom_children): Call into the EVRP
22316         range analyzer as needed.
22317         (sprintf_dom_walker::after_dom_children): New member function.
22318         * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
22319         if not optimizing.
22320         (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
22321         (evrp_range_analyzer::pop_to_marker): Likewise.
22323 2018-02-20  Richard Sandiford  <richard.sandiford@linaro.org>
22325         PR tree-optimization/84419
22326         * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
22327         with the required type if its current type is compatible but
22328         different.
22330 2018-02-20  Jakub Jelinek  <jakub@redhat.com>
22332         PR middle-end/82004
22333         * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
22334         after vectorization.
22336 2018-02-20  Martin Liska  <mliska@suse.cz>
22338         PR driver/83193
22339         * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
22340         possible values if we don't have a hint.
22342 2018-02-20  Martin Liska  <mliska@suse.cz>
22344         PR c/84310
22345         PR target/79747
22346         * final.c (shorten_branches): Build align_tab array with one
22347         more element.
22348         * opts.c (finish_options): Add alignment option limit check.
22349         (MAX_CODE_ALIGN): Likewise.
22350         (MAX_CODE_ALIGN_VALUE): Likewise.
22351         * doc/invoke.texi: Document maximum allowed option value for
22352         all -falign-* options.
22354 2018-02-19  Jakub Jelinek  <jakub@redhat.com>
22356         PR target/84146
22357         * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
22358         * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
22359         * var-tracking.c (emit_note_insn_var_location): Remove all references
22360         to NOTE_INSN_CALL_ARG_LOCATION.
22361         (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
22362         the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
22363         Use copy_rtx_if_shared.
22364         * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
22365         NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
22366         (dwarf2out_var_location): Remove handling of
22367         NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
22368         on call_insn.
22369         * final.c (final_scan_insn): Remove all references to
22370         NOTE_INSN_CALL_ARG_LOCATION.
22371         (rest_of_clean_state): Likewise.  Remove REG_CALL_ARG_LOCATION notes
22372         before dumping final insns.
22373         * except.c (emit_note_eh_region_end): Remove all references to
22374         NOTE_INSN_CALL_ARG_LOCATION.
22375         * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
22376         * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
22377         * config/arc/arc.c (hwloop_optimize): Likewise.
22378         * config/arm/arm.c (create_fix_barrier): Likewise.
22379         * config/s390/s390.c (s390_chunkify_start): Likewise.
22380         * config/sh/sh.c (find_barrier): Likewise.
22381         * config/i386/i386.c (rest_of_insert_endbranch,
22382         ix86_seh_fixup_eh_fallthru): Likewise.
22383         * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
22384         * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
22385         * config/frv/frv.c (frv_function_prologue): Likewise.
22386         * emit-rtl.c (try_split): Likewise.  Copy over REG_CALL_ARG_LOCATION
22387         reg note.
22388         (note_outside_basic_block_p): Remove all references to
22389         NOTE_INSN_CALL_ARG_LOCATION.
22390         * gengtype.c (adjust_field_rtx_def): Likewise.
22391         * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
22392         Likewise.
22393         * jump.c (cleanup_barriers, delete_related_insns): Likewise.
22394         * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
22396         PR c++/84444
22397         * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
22398         is ADDR_EXPR.
22400         PR tree-optimization/84452
22401         * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
22402         expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
22403         is NULL.
22405 2018-02-19  Martin Liska  <mliska@suse.cz>
22407         PR sanitizer/82183
22408         * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
22410 2018-02-19  Martin Liska  <mliska@suse.cz>
22411             Richard Sandiford  <richard.sandiford@linaro.org>
22413         PR tree-optimization/82491
22414         * gimple-fold.c (get_base_constructor): Make earlier bail out
22415         to prevent ubsan.
22417 2018-02-19  Carl Love  <cel@us.ibm.com>
22419         * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
22420         BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
22421         BU_P8V_OVERLOAD_1.
22422         * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
22423         P8V_BUILTIN_VEC_NEG.
22425 2018-02-19  Sebastian Perta  <sebastian.perta@renesas.com>
22427         * config/rl78/rl78.md (movdf): New define expand.
22429 2018-02-19  Martin Liska  <mliska@suse.cz>
22431         PR other/80589
22432         * doc/invoke.texi: Fix typo.
22433         * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
22435 2018-02-18  Segher Boessenkool  <segher@kernel.crashing.org>
22437         * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
22438         handle rs6000_single_float and rs6000_double_float specially for
22439         e500 family CPUs.
22441 2018-02-16  Jeff Law  <law@redhat.com>
22443         * config/rx/rx.c (add_pop_cfi_notes): New function.;
22444         (pop_regs): Use it.
22446 2018-02-16  Jakub Jelinek  <jakub@redhat.com>
22448         PR ipa/84425
22449         * ipa-inline.c (inline_small_functions): Fix a typo.
22451 2018-02-16  Nathan Sidwell  <nathan@acm.org>
22453         * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
22455 2018-02-16  Carl Love  <cel@us.ibm.com>
22457         * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
22458         Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
22459         from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
22460         * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
22461         expansion to P8V_BUILTIN_VEC_FLOAT2.
22463 2018-02-16  Vladimir Makarov  <vmakarov@redhat.com>
22465         PR rtl-optimization/70023
22466         * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
22467         src_regno into account.
22469 2018-02-16  Carl Love  <cel@us.ibm.com>
22471         * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
22472         * config/rs6000/rs6000-builtin.def: Remove macro expansion for
22473         VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
22474         * config/rs6000/rs6000.c: Remove case statements for
22475         P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
22476         P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
22477         and P9V_BUILTIN_VEC_VINSERT4B.
22478         * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
22479         P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
22480         * config/rs6000/vsx.md:
22481         * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
22482         vec_insert4b.
22484 2018-02-16  Carl Love  <cel@us.ibm.com>
22486         * config/rs6000/altivec.h: Add builtin names vec_extract4b
22487         vec_insert4b.
22488         * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
22489         definitions.
22490         * config/rs6000/rs6000-c.c: Add the definitions for
22491         P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
22492         * config/rs6000/rs6000.c (altivec_expand_builtin): Add
22493         P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
22494         * config/rs6000/vsx.md: Add define_insn extract4b.  Add define_expand
22495         definition for insert4b and define insn *insert3b_internal.
22496         * doc/extend.texi: Add documentation for vec_extract4b.
22498 2018-02-16  Nathan Sidwell  <nathan@acm.org>
22500         * doc/extend.texi (Backwards Compatibility): Mention friend
22501         injection.  Note for-scope is deprecated.
22502         * doc/invoke.texi (-ffriend-injection): Deprecate.
22504 2018-02-16  Segher Boessenkool  <segher@kernel.crashing.org>
22506         * combine.c (try_combine): When adjusting LOG_LINKS for the destination
22507         that moved to I2, also allow destinations that are a paradoxical
22508         subreg (instead of a normal reg).
22510 2018-02-16  Oleg Endo  <olegendo@gcc.gnu.org>
22512         PR target/83831
22513         * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
22514         to QImode.
22516 2018-02-16  Richard Biener  <rguenther@suse.de>
22518         PR tree-optimization/84037
22519         PR tree-optimization/84016
22520         PR target/82862
22521         * config/i386/i386.c (ix86_builtin_vectorization_cost):
22522         Adjust vec_construct for the fact we need additional higher latency
22523         128bit inserts for AVX256 and AVX512 vector builds.
22524         (ix86_add_stmt_cost): Scale vector construction cost for
22525         elementwise loads.
22527 2018-02-16  Richard Biener  <rguenther@suse.de>
22529         PR tree-optimization/84417
22530         * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
22531         the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
22532         (non_rewritable_lvalue_p): Likewise, use poly-ints.
22534 2018-02-16  Martin Liska  <mliska@suse.cz>
22536         PR sanitizer/84307
22537         * internal-fn.def (ASAN_CHECK): Set proper flags.
22538         (ASAN_MARK): Likewise.
22540 2018-02-16  Julia Koval  <julia.koval@intel.com>
22542         * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
22543         from PTA_CANNONLAKE.
22545 2018-02-16  Jakub Jelinek  <jakub@redhat.com>
22547         PR target/84272
22548         * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
22549         Use ++iter rather than iter++ for std::list iterators.
22550         (func_fma_steering::dfs): Likewise.  Don't delete nodes right away,
22551         defer deleting them until all nodes in the forest are processed.  Do
22552         free even leaf nodes.  Change to_process into auto_vec.
22554         PR bootstrap/84405
22555         * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
22556         * vec.h (vec_default_construct): Use memset instead of placement new
22557         if BROKEN_VALUE_INITIALIZATION is defined.
22558         * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
22559         memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
22560         is defined.
22562         PR rtl-optimization/83723
22563         * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
22564         * lra.c (lra_substitute_pseudo): Likewise.  If true, use
22565         gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG.  Pass DEBUG_P to
22566         recursive calls.
22567         (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
22568         callers.
22569         * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
22571 2018-02-16  Eric Botcazou  <ebotcazou@adacore.com>
22573         PR rtl-optimization/81443
22574         * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
22575         from inner REGs to paradoxical SUBREGs.
22577 2018-02-16  Richard Biener  <rguenther@suse.de>
22579         PR tree-optimization/84399
22580         * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
22581         For operands we can analyze at their definition make sure we can
22582         analyze them at each use as well.
22584 2018-02-16  Richard Biener  <rguenther@suse.de>
22586         PR tree-optimization/84190
22587         * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
22588         volatile accesses if the decl isn't volatile.
22590 2018-02-15  Jason Merrill  <jason@redhat.com>
22592         PR c++/84314 - ICE with templates and fastcall attribute.
22593         * attribs.c (build_type_attribute_qual_variant): Don't clobber
22594         TYPE_CANONICAL on an existing type.
22596 2018-02-15  Jakub Jelinek  <jakub@redhat.com>
22598         PR tree-optimization/84383
22599         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
22600         dstoff nor call operand_equal_p if dstbase is NULL.
22602         PR tree-optimization/84334
22603         * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
22604         also a CONSTANT_CLASS_P, punt.
22606 2018-02-14  Jim Wilson  <jimw@sifive.com>
22608         * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
22609         first SMALL_OPERAND check.  New local min_second_step.  Move assert
22610         to where locals are set.  Add TARGET_RVC support.
22611         * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
22613 2018-02-14  Indu Bhagat  <indu.bhagat@oracle.com>
22615         * doc/invoke.texi: Correct -Wformat-overflow code sample.
22617 2018-02-14  Martin Sebor  <msebor@redhat.com>
22619         PR tree-optimization/83698
22620         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
22621         arrays constrain the offset range to their bounds.
22622         (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
22623         (builtin_access::overlap): Avoid setting the size of overlap if it's
22624         already been set.
22625         (maybe_diag_overlap): Also consider arrays when deciding what values
22626         of offsets to include in diagnostics.
22628 2018-02-14  Martin Sebor  <msebor@redhat.com>
22630         PR c/84108
22631         * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
22632         that correspond to the kind of a declaration.
22634 2018-02-14  John David Anglin  <danglin@gcc.gnu.org>
22636         PR target/83984
22637         * config/pa/pa.md: Load address of PIC label using the linkage table
22638         if the label is nonlocal.
22640 2018-02-14  Kelvin Nilsen  <kelvin@gcc.gnu.org>
22642         * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
22643         warning message if user requests -maltivec=be.
22644         * doc/invoke.texi: Document deprecation of -maltivec=be.
22646 2018-02-14  Will Schmidt  <will_schmidt@vnet.ibm.com>
22648         PR target/84220
22649         * config/rs6000/rs6000-c.c: Update definitions for
22650         ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
22651         VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
22653 2018-02-14  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
22655         PR target/84239
22656         * config/i386/cetintrin.h: Remove _rdssp[d|q] and
22657         add _get_ssp intrinsics. Remove argument from
22658         __builtin_ia32_rdssp[d|q].
22659         * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
22660         * config/i386/i386-builtin.def: Remove argument from
22661         __builtin_ia32_rdssp[d|q].
22662         * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
22663         ix86_expand_special_args_builtin for _rdssp[d|q].
22664         * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
22665         Clear register before usage.
22666         * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
22667         Add documentation for new _get_ssp and _inc_ssp intrinsics.
22669 2018-02-14  Richard Sandiford  <richard.sandiford@linaro.org>
22671         PR tree-optimization/84357
22672         * tree-data-ref.c (object_address_invariant_in_loop_p): Check
22673         operand 1 of an ARRAY_REF too.
22675 2018-02-14  Oleg Endo  <olegendo@gcc.gnu.org>
22677         PR target/83831
22678         * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
22679         rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
22680         declarations.
22681         (set_of_reg): New struct.
22682         (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
22683         * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
22684         rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
22685         functions.
22686         * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
22687         Split into bitclr, bitset, bitinvert patterns if appropriate.
22688         (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
22689         use rx_fuse_in_memory_bitop.
22690         (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
22691         to named insn, correct maximum insn length.
22693 2018-02-14  Jozef Lawrynowicz  <jozefl.gcc@gmail.com>
22695         PR target/79242
22696         * machmode.def: Define a complex mode for PARTIAL_INT.
22697         * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
22698         MODE_PARTIAL_INT.
22699         * doc/rtl.texi: Document CSPImode.
22700         * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
22701         handling.
22702         (msp430_hard_regno_nregs_with_padding): Likewise.
22704 2018-02-13  Peter Bergner  <bergner@vnet.ibm.com>
22706         PR target/84279
22707         * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
22709 2018-02-13  Segher Boessenkool  <segher@kernel.crashing.org>
22711         PR rtl-optimization/84169
22712         * combine.c (try_combine): New variable split_i2i3.  Set it to true if
22713         we generated a parallel as new i3 and we split that to new i2 and i3
22714         instructions.  Handle split_i2i3 similar to swap_i2i3: scan the
22715         LOG_LINKs of i3 to see which of those need to link to i2 now.  Link
22716         those to i2, not i1.  Partially rewrite this scan code.
22718 2018-02-13  Jakub Jelinek  <jakub@redhat.com>
22720         PR c/82210
22721         * stor-layout.c (place_field): For variable length fields, adjust
22722         offset_align afterwards not just based on the field's alignment,
22723         but also on the size.
22725         PR middle-end/84309
22726         * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
22727         of exps and logs in the use_exp2 case.
22729 2018-02-13  Jeff Law  <law@redhat.com>
22731         * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
22732         entry for "vector".
22734         * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
22735         ARGS as unused.
22737 2018-02-13  Alexandre Oliva  <aoliva@redhat.com>
22739         PR debug/84342
22740         PR debug/84319
22741         * common.opt (gas-loc-support, gas-locview-support): New.
22742         (ginline-points, ginternal-reset-location-views): New.
22743         * doc/invoke.texi: Document them.  Use @itemx where intended.
22744         (gvariable-location-views): Adjust.
22745         * target.def (reset_location_view): New.
22746         * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
22747         (TARGET_RESET_LOCATION_VIEW): New.
22748         * doc/tm.texi: Rebuilt.
22749         * dwarf2out.c (dwarf2out_default_as_loc_support): New.
22750         (dwarf2out_default_as_locview_support): New.
22751         (output_asm_line_debug_info): Use option variables.
22752         (dwarf2out_maybe_output_loclist_view_pair): Likewise.
22753         (output_loc_list): Likewise.
22754         (add_high_low_attributes): Check option variables.
22755         Don't output entry view attribute in strict mode.
22756         (gen_inlined_subroutine_die): Check option variables.
22757         (dwarf2out_inline_entry): Likewise.
22758         (init_sections_and_labels): Likewise.
22759         (dwarf2out_early_finish): Likewise.
22760         (maybe_reset_location_view): New, from...
22761         (dwarf2out_var_location): ... here.  Call it.
22762         * debug.h (dwarf2out_default_as_loc_support): Declare.
22763         (dwarf2out_default_as_locview_support): Declare.
22764         * hooks.c (hook_int_rtx_insn_0): New.
22765         * hooks.h (hook_int_rtx_insn_0): Declare.
22766         * toplev.c (process_options): Take -gas-loc-support and
22767         -gas-locview-support from dwarf2out.  Enable
22768         -gvariable-location-views by default only with locview
22769         assembler support.  Enable -ginternal-reset-location-views by
22770         default only if the target defines the corresponding hook.
22771         Enable -ginline-points by default if location views are
22772         enabled; force it disabled if statement frontiers are
22773         disabled.
22774         * tree-inline.c (expand_call_inline): Check option variables.
22775         * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
22777 2018-02-13  Richard Sandiford  <richard.sandiford@linaro.org>
22779         PR tree-optimization/84321
22780         * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
22781         handling.  Also check whether the anti-range contains any values
22782         that satisfy the mask; switch to a VR_RANGE if not.
22784 2018-02-13  Paolo Bonzini  <bonzini@gnu.org>
22786         PR sanitizer/84340
22787         * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
22789 2018-02-13  Martin Jambor  <mjambor@suse.cz>
22791         PR c++/83990
22792         * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
22793         of call statements, also set location of a load to a temporary.
22795 2018-02-13  Sebastian Perta  <sebastian.perta@renesas.com>
22797         * config/rl78/rl78.c (add_vector_labels): New function.
22798         * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
22799         * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
22800         * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
22801         which checks that no arguments are passed.
22802         * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
22803         * doc/extend.texi: Documentation for the new attribute.
22805 2018-02-13  Andreas Schwab  <schwab@suse.de>
22807         * config/riscv/linux.h (CPP_SPEC): Define.
22809 2018-02-13  Jakub Jelinek  <jakub@redhat.com>
22811         PR target/84335
22812         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
22813         OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
22814         OPTION_MASK_ISA_AES as first argument to def_builtin_const
22815         for AES builtins.  Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
22816         instead of OPTION_MASK_ISA_PCLMUL as first argument to
22817         def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
22818         * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
22819         temporarily for AES and PCLMUL builtins.
22821         PR tree-optimization/84339
22822         * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
22823         ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
22824         Formatting fixes.
22826         PR middle-end/84309
22827         * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
22828         exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
22829         * generic-match-head.c (canonicalize_math_after_vectorization_p): New
22830         inline function.
22831         * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
22832         inline function.
22833         * omp-simd-clone.h: New file.
22834         * omp-simd-clone.c: Include omp-simd-clone.h.
22835         (expand_simd_clones): No longer static.
22836         * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
22837         cgraph.h and omp-simd-clone.h.
22838         (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
22839         (vect_recog_widen_shift_pattern): Formatting fix.
22840         (vect_pattern_recog_1): Don't check optab for calls.
22842         PR target/84336
22843         * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
22844         operands[2] into a REG before using gen_lowpart on it.
22846 2018-02-12  Jeff Law  <law@redhat.com>
22848         PR target/83760
22849         * config/sh/sh.c (find_barrier): Consider a sibling call
22850         a barrier as well.
22852         * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
22853         successfully back substituting a reg.
22855 2018-02-12  Richard Biener  <rguenther@suse.de>
22857         PR tree-optimization/84037
22858         * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
22859         parameter, move visited init to caller.
22860         (vect_slp_analyze_operations): Separate cost from validity
22861         check, initialize visited once for all instances.
22862         (vect_schedule_slp): Analyze map to CSE vectorized nodes once
22863         for all instances.
22864         * tree-vect-stmts.c (vect_model_simple_cost): Make early
22865         out an assert.
22866         (vect_model_promotion_demotion_cost): Likewise.
22867         (vectorizable_bswap): Guard cost modeling with !slp_node
22868         instead of !PURE_SLP_STMT to avoid double-counting on hybrid
22869         SLP stmts.
22870         (vectorizable_call): Likewise.
22871         (vectorizable_conversion): Likewise.
22872         (vectorizable_assignment): Likewise.
22873         (vectorizable_shift): Likewise.
22874         (vectorizable_operation): Likewise.
22875         (vectorizable_store): Likewise.
22876         (vectorizable_load): Likewise.
22877         (vectorizable_condition): Likewise.
22878         (vectorizable_comparison): Likewise.
22880 2018-02-12  Paolo Bonzini  <bonzini@gnu.org>
22882         PR sanitizer/84307
22883         * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
22884         (ASAN_MARK): Fix fnspec to account for return value, change pointer
22885         argument from 'R' to 'W' so that the pointed-to datum is clobbered.
22887 2018-02-08  Jan Hubicka  <hubicka@ucw.cz>
22889         PR middle-end/83665
22890         * params.def (inline-min-speedup): Increase from 8 to 15.
22891         (max-inline-insns-auto): Decrease from 40 to 30.
22892         * ipa-split.c (consider_split): Add some buffer for function to
22893         be considered inlining candidate.
22894         * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
22895         default values.
22897 2018-02-12  Richard Biener  <rguenther@suse.de>
22899         PR tree-optimization/84037
22900         * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
22901         matched stmts if we cannot swap the non-matched ones.
22903 2018-02-12  Olga Makhotina  <olga.makhotina@intel.com>
22905         * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
22906         _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
22907         _mm_maskz_scalef_round_ss): New intrinsics.
22908         (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
22909         * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
22910         __builtin_ia32_scalefss_round): Remove.
22911         (__builtin_ia32_scalefsd_mask_round,
22912         __builtin_ia32_scalefss_mask_round): New intrinsics.
22913         * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
22914         (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
22915         ((match_operand:VF_128 2 "<round_nimm_predicate>"
22916         "<round_constraint>")): Changed to ...
22917         ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
22918         "<round_scalar_constraint>")): ... this.
22919         ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
22920         %0, %1, %2<round_op3>}"): Changed to ...
22921         ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
22922         %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
22923         %2<round_scalar_mask_op3>}"): ... this.
22924         * config/i386/subst.md (round_scalar_nimm_predicate): New.
22926 2018-02-12  Olga Makhotina  <olga.makhotina@intel.com>
22928         * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
22929         (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
22930         (_mm_maskz_sqrt_round_ss): New intrinsics.
22931         (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
22932         (__builtin_ia32_sqrtsd_mask_round)
22933         (__builtin_ia32_sqrtss_mask_round): New builtins.
22934         * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
22935         (__builtin_ia32_sqrtss_round): Remove.
22936         (__builtin_ia32_sqrtsd_mask_round)
22937         (__builtin_ia32_sqrtss_mask_round): New builtins.
22938         * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
22939         (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
22940         ((match_operand:VF_128 1 "vector_operand"
22941         "xBm,<round_constraint>")): Changed to ...
22942         ((match_operand:VF_128 1 "vector_operand"
22943         "xBm,<round_scalar_constraint>")): ... this.
22944         (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
22945         %0, %2, %<iptr>1<round_op3>}): Changed to ...
22946         (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
22947         %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
22948         %<iptr>1<round_scalar_mask_op3>}): ... this.
22949         ((set_attr "prefix" "<round_prefix>")): Changed to ...
22950         ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
22952 2018-02-11  Steven Munroe  <munroesj@gcc.gnu.org>
22954         PR target/84266
22955         * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
22956         Cast vec_cmpeq result to correct type.
22957         * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
22958         Cast vec_cmpgt result to correct type.
22960 2018-02-11  Alexandre Oliva  <aoliva@redhat.com>
22962         * final.c (final_scan_insn_1): Renamed from...
22963         (final_scan_insn): ... this.  New wrapper, to recover
22964         seen from the outermost call in recursive ones.
22965         * config/sparc/sparc.c (output_return): Drop seen from call.
22966         (output_sibcall): Likewise.
22967         * config/visium/visium.c (output_branch): Likewise.
22969 2018-02-10  John David Anglin  <danglin@gcc.gnu.org>
22971         * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
22972         function label.
22974 2018-02-10  Alan Modra  <amodra@gmail.com>
22976         PR target/84300
22977         * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
22978         Specify LR as an input.
22980 2018-02-10  Jakub Jelinek  <jakub@redhat.com>
22982         PR sanitizer/83987
22983         * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
22984         remove_member_access_dummy_vars): New functions.
22985         (lower_omp_for, lower_omp_taskreg, lower_omp_target,
22986         lower_omp_1, execute_lower_omp): Use them.
22988         PR rtl-optimization/84308
22989         * shrink-wrap.c (spread_components): Release todo vector.
22991 2018-02-09  Vladimir Makarov  <vmakarov@redhat.com>
22993         PR rtl-optimization/57193
22994         * ira-color.c (struct allocno_color_data): Add member
22995         conflict_allocno_hard_prefs.
22996         (update_conflict_allocno_hard_prefs): New.
22997         (bucket_allocno_compare_func): Add a preference based on
22998         conflict_allocno_hard_prefs.
22999         (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
23000         (color_allocnos): Remove a dead code.  Initiate
23001         conflict_allocno_hard_prefs.  Call update_costs_from_prefs.
23003 2018-02-09  Jakub Jelinek  <jakub@redhat.com>
23005         PR target/84226
23006         * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
23007         constraint from =wa to wa.  Avoid a subreg on the output operand,
23008         instead use a pseudo and subreg it in a move.
23009         (p9_xxbrd_<mode>): Changed to ...
23010         (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
23011         (p9_xxbrd_v2df): New expander.
23012         (p9_xxbrw_<mode>): Changed to ...
23013         (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
23014         (p9_xxbrw_v4sf): New expander.
23016 2018-02-09  Sebastian Perta  <sebastian.perta@renesas.com>
23018         * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
23020 2018-02-09  Peter Bergner  <bergner@vnet.ibm.com>
23022         PR target/83926
23023         * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
23024         multiply in 32-bit mode.
23025         (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
23026         (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
23027         mode.
23029 2018-02-09  Sebastian Perta  <sebastian.perta@renesas.com>
23031         * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
23032         to allow or block "symbol_ref" depending on the value of TARGET_JSR.
23033         * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
23034         * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
23036 2018-02-09  Pierre-Marie de Rodat  <derodat@adacore.com>
23038         PR lto/84213
23039         * dwarf2out.c (is_trivial_indirect_ref): New function.
23040         (dwarf2out_late_global_decl): Do not generate a location
23041         attribute for variables that have a non-trivial DECL_VALUE_EXPR
23042         and that are not defined in the current unit.
23044 2018-02-09  Eric Botcazou  <ebotcazou@adacore.com>
23046         * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
23047         instead of a libcall for UNORDERED.
23049 2018-02-09  Tamar Christina  <tamar.christina@arm.com>
23051         PR target/82641
23052         * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
23053         __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
23055 2018-02-09  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
23057         PR target/PR84295
23058         * config/s390/s390.c (s390_set_current_function): Invoke
23059         s390_indirect_branch_settings also if fndecl didn't change.
23061 2018-02-09  Alexandre Oliva  <aoliva@redhat.com>
23063         * config/rs6000/rs6000.md (blockage): Set length to zero.
23065 2018-02-09  Eric Botcazou  <ebotcazou@adacore.com>
23067         * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
23069 2018-02-09  Jakub Jelinek  <jakub@redhat.com>
23071         PR sanitizer/84285
23072         * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
23073         STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
23074         -static-lib*san.
23076         PR debug/84252
23077         * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
23078         PARALLEL incoming that failed vt_get_decl_and_offset check.
23080         PR middle-end/84237
23081         * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
23082         * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
23083         TREE_READONLY bit.
23084         (get_variable_section): For decls in named .bss* sections pass true as
23085         second argument to bss_initializer_p.
23087 2018-02-09  Marek Polacek  <polacek@redhat.com>
23088             Jakub Jelinek  <jakub@redhat.com>
23090         PR c++/83659
23091         * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
23092         Formatting fixes.  Verify first that tree_fits_poly_int64_p (op01).
23093         Sync some changes from cxx_fold_indirect_ref.
23095 2018-02-09  Alexandre Oliva  <aoliva@redhat.com>
23097         * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
23098         markers.
23099         * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
23100         (BLOCK_INLINE_ENTRY_LABEL): New.
23101         (dwarf2out_var_location): Disregard inline entry markers.
23102         (inline_entry_data): New struct.
23103         (inline_entry_data_hasher): New hashtable type.
23104         (inline_entry_data_hasher::hash): New.
23105         (inline_entry_data_hasher::equal): New.
23106         (inline_entry_data_table): New variable.
23107         (add_high_low_attributes): Add DW_AT_entry_pc and
23108         DW_AT_GNU_entry_view attributes if a pending entry is found
23109         in inline_entry_data_table.  Add old entry_pc attribute only
23110         if debug nonbinding markers are disabled.
23111         (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
23112         markers are enabled.
23113         (block_within_block_p, dwarf2out_inline_entry): New.
23114         (dwarf2out_finish): Check that no entries remained in
23115         inline_entry_data_table.
23116         * final.c (reemit_insn_block_notes): Handle inline entry notes.
23117         (final_scan_insn, notice_source_line): Likewise.
23118         (rest_of_clean_state): Skip inline entry markers.
23119         * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
23120         markers.
23121         * gimple.c (gimple_build_debug_inline_entry): New.
23122         * gimple.h (enum gimple_debug_subcode): Add
23123         GIMPLE_DEBUG_INLINE_ENTRY.
23124         (gimple_build_debug_inline_entry): Declare.
23125         (gimple_debug_inline_entry_p): New.
23126         (gimple_debug_nonbind_marker_p): Adjust.
23127         * insn-notes.def (INLINE_ENTRY): New.
23128         * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
23129         inline entry marker notes.
23130         (print_insn): Likewise.
23131         * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
23132         (INSN_DEBUG_MARKER_KIND): Likewise.
23133         (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
23134         * tree-inline.c (expand_call_inline): Build and insert
23135         debug_inline_entry stmt.
23136         * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
23137         inline entry blocks early, if nonbind markers are enabled.
23138         (dump_scope_block): Dump fragment info.
23139         * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
23140         * doc/gimple.texi (gimple_debug_inline_entry_p): New.
23141         (gimple_build_debug_inline_entry): New.
23142         * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
23143         Enable/disable inline entry points too.
23144         * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
23145         (DEBUG_INSN): Describe inline entry markers.
23147         * common.opt (gvariable-location-views): New.
23148         (gvariable-location-views=incompat5): New.
23149         * config.in: Rebuilt.
23150         * configure: Rebuilt.
23151         * configure.ac: Test assembler for view support.
23152         * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
23153         * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
23154         * dwarf2out.c (var_loc_view): New typedef.
23155         (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
23156         (dwarf2out_locviews_in_attribute): New.
23157         (dwarf2out_locviews_in_loclist): New.
23158         (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
23159         (enum dw_line_info_opcode): Add LI_adv_address.
23160         (struct dw_line_info_table): Add view.
23161         (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
23162         (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
23163         (zero_view_p): New variable.
23164         (ZERO_VIEW_P): New macro.
23165         (output_asm_line_debug_info): New.
23166         (struct var_loc_node): Add view.
23167         (add_AT_view_list, AT_loc_list): New.
23168         (add_var_loc_to_decl): Add view param.  Test it against last.
23169         (new_loc_list): Add view params.  Record them.
23170         (AT_loc_list_ptr): Handle loc and view lists.
23171         (view_list_to_loc_list_val_node): New.
23172         (print_dw_val): Handle dw_val_class_view_list.
23173         (size_of_die): Likewise.
23174         (value_format): Likewise.
23175         (loc_list_has_views): New.
23176         (gen_llsym): Set vl_symbol too.
23177         (maybe_gen_llsym, skip_loc_list_entry): New.
23178         (dwarf2out_maybe_output_loclist_view_pair): New.
23179         (output_loc_list): Output view list or entries too.
23180         (output_view_list_offset): New.
23181         (output_die): Handle dw_val_class_view_list.
23182         (output_dwarf_version): New.
23183         (output_compilation_unit_header): Use it.
23184         (output_skeleton_debug_sections): Likewise.
23185         (output_rnglists, output_line_info): Likewise.
23186         (output_pubnames, output_aranges): Update version comments.
23187         (output_one_line_info_table): Output view numbers in asm comments.
23188         (dw_loc_list): Determine current endview, pass it to new_loc_list.
23189         Call maybe_gen_llsym.
23190         (loc_list_from_tree_1): Adjust.
23191         (add_AT_location_description): Create view list attribute if
23192         needed, check it's absent otherwise.
23193         (convert_cfa_to_fb_loc_list): Adjust.
23194         (maybe_emit_file): Call output_asm_line_debug_info for test.
23195         (dwarf2out_var_location): Reset views as needed.  Precompute
23196         add_var_loc_to_decl args.  Call get_attr_min_length only if we have the
23197         attribute.  Set view.
23198         (new_line_info_table): Reset next view.
23199         (set_cur_line_info_table): Call output_asm_line_debug_info for test.
23200         (dwarf2out_source_line): Likewise.  Output view resets and labels to
23201         the assembler, or select appropriate line info opcodes.
23202         (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
23203         (optimize_string_length): Catch it.  Adjust.
23204         (resolve_addr): Copy vl_symbol along with ll_symbol.  Handle
23205         dw_val_class_view_list, and remove it if no longer needed.
23206         (hash_loc_list): Hash view numbers.
23207         (loc_list_hasher::equal): Compare them.
23208         (optimize_location_lists): Check whether a view list symbol is
23209         needed, and whether the locview attribute is present, and
23210         whether they match.  Remove the locview attribute if no longer
23211         needed.
23212         (index_location_lists): Call skip_loc_list_entry for test.
23213         (dwarf2out_finish): Call output_asm_line_debug_info for test.
23214         Use output_dwarf_version.
23215         * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
23216         (struct dw_val_node): Add val_view_list.
23217         * final.c (SEEN_NEXT_VIEW): New.
23218         (set_next_view_needed): New.
23219         (clear_next_view_needed): New.
23220         (maybe_output_next_view): New.
23221         (final_start_function): Rename to...
23222         (final_start_function_1): ... this.  Take pointer to FIRST,
23223         add SEEN parameter.  Emit param bindings in the initial view.
23224         (final_start_function): Reintroduce SEEN-less interface.
23225         (final): Rename to...
23226         (final_1): ... this.  Take SEEN parameter.  Output final pending
23227         next view at the end.
23228         (final): Reintroduce seen-less interface.
23229         (final_scan_insn): Output pending next view before switching
23230         sections or ending a block.  Mark the next view as needed when
23231         outputting variable locations.  Notify debug backend of section
23232         changes, and of location view changes.
23233         (rest_of_handle_final): Adjust.
23234         * toplev.c (process_options): Autodetect value for debug variable
23235         location views option.  Warn on incompat5 without -gdwarf-5.
23236         * doc/invoke.texi (gvariable-location-views): New.
23237         (gvariable-location-views=incompat5): New.
23238         (gno-variable-location-views): New.
23240 2018-02-08  David Malcolm  <dmalcolm@redhat.com>
23242         PR tree-optimization/84136
23243         * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
23244         that the result of find_edge is non-NULL.
23246 2018-02-08  Sergey Shalnov  <sergey.shalnov@intel.com>
23248         PR target/83008
23249         * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
23250         storing integer register in SImode.  Fix cost of 256 and 512
23251         byte aligned SSE register store.
23253 2018-02-08  Sergey Shalnov  <sergey.shalnov@intel.com>
23255         * config/i386/i386.c (ix86_multiplication_cost): Fix
23256         multiplication cost for TARGET_AVX512DQ.
23258 2018-02-08  Marek Polacek  <polacek@redhat.com>
23260         PR tree-optimization/84238
23261         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
23262         get_range_strlen.
23264 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
23266         PR tree-optimization/84265
23267         * tree-vect-stmts.c (vectorizable_store): Don't treat
23268         VMAT_CONTIGUOUS accesses as grouped.
23269         (vectorizable_load): Likewise.
23271 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
23273         PR tree-optimization/81635
23274         * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
23275         * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
23276         (test_round_for_mask): New functions.
23277         (wide_int_cc_tests): Call test_round_for_mask.
23278         * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
23279         * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
23280         * tree-data-ref.c (split_constant_offset_1): Use it to refine the
23281         range returned by get_range_info.
23283 2018-02-08  Jan Hubicka  <hubicka@ucw.cz>
23285         PR ipa/81360
23286         * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
23287         * symtab.c: Include builtins.h
23288         (symtab_node::output_to_lto_symbol_table_p): Move here
23289         from lto-streamer-out.c:output_symbol_p.
23290         * lto-streamer-out.c (write_symbol): Turn early exit to assert.
23291         (output_symbol_p): Move all logic to symtab.c
23292         (produce_symtab): Update.
23294 2018-02-08  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
23296         * config/s390/s390-opts.h (enum indirect_branch): Define.
23297         * config/s390/s390-protos.h (s390_return_addr_from_memory)
23298         (s390_indirect_branch_via_thunk)
23299         (s390_indirect_branch_via_inline_thunk): Add function prototypes.
23300         (enum s390_indirect_branch_type): Define.
23301         * config/s390/s390.c (struct s390_frame_layout, struct
23302         machine_function): Remove.
23303         (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
23304         (indirect_branch_table_label_no, indirect_branch_table_name):
23305         Define variables.
23306         (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
23307         (enum s390_indirect_branch_option): Define.
23308         (s390_return_addr_from_memory): New function.
23309         (s390_handle_string_attribute): New function.
23310         (s390_attribute_table): Add new attribute handler.
23311         (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
23312         (s390_indirect_branch_via_thunk): New function.
23313         (s390_indirect_branch_via_inline_thunk): New function.
23314         (s390_function_ok_for_sibcall): When jumping via thunk disallow
23315         sibling call optimization for non z10 compiles.
23316         (s390_emit_call): Force indirect branch target to be a single
23317         register.  Add r1 clobber for non-z10 compiles.
23318         (s390_emit_epilogue): Emit return jump via return_use expander.
23319         (s390_reorg): Handle JUMP_INSNs as execute targets.
23320         (s390_option_override_internal): Perform validity checks for the
23321         new command line options.
23322         (s390_indirect_branch_attrvalue): New function.
23323         (s390_indirect_branch_settings): New function.
23324         (s390_set_current_function): Invoke s390_indirect_branch_settings.
23325         (s390_output_indirect_thunk_function):  New function.
23326         (s390_code_end): Implement target hook.
23327         (s390_case_values_threshold): Implement target hook.
23328         (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
23329         macros.
23330         * config/s390/s390.h (struct s390_frame_layout)
23331         (struct machine_function): Move here from s390.c.
23332         (TARGET_INDIRECT_BRANCH_NOBP_RET)
23333         (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
23334         (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
23335         (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
23336         (TARGET_INDIRECT_BRANCH_NOBP_CALL)
23337         (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
23338         (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
23339         (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
23340         (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
23341         * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
23342         (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
23343         (mnemonic attribute): Add values which aren't recognized
23344         automatically.
23345         ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
23346         pattern for branch conversion.  Fix mnemonic attribute.
23347         ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
23348         indirect branch via thunk if requested.
23349         ("indirect_jump", "<code>"): Expand patterns for branch conversion.
23350         ("*indirect_jump"): Disable for branch conversion using out of
23351         line thunks.
23352         ("indirect_jump_via_thunk<mode>_z10")
23353         ("indirect_jump_via_thunk<mode>")
23354         ("indirect_jump_via_inlinethunk<mode>_z10")
23355         ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
23356         ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
23357         ("casesi_jump_via_inlinethunk<mode>_z10")
23358         ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
23359         ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
23360         ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
23361         ("*indirect2_jump"): Disable for branch conversion.
23362         ("casesi_jump"): Turn into expander and expand patterns for branch
23363         conversion.
23364         ("return_use"): New expander.
23365         ("*return"): Emit return via thunk and rename it to ...
23366         ("*return<mode>"): ... this one.
23367         * config/s390/s390.opt: Add new options and and enum for the
23368         option values.
23370 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
23372         * lra-constraints.c (match_reload): Unconditionally use
23373         gen_lowpart_SUBREG, rather than selecting between that
23374         and equivalent gen_rtx_SUBREG code.
23376 2018-02-08  Richard Biener  <rguenther@suse.de>
23378         PR tree-optimization/84233
23379         * tree-ssa-phiprop.c (propagate_with_phi): Use separate
23380         changed flag instead of boguously re-using phi_inserted.
23382 2018-02-08  Martin Jambor  <mjambor@suse.cz>
23384         * hsa-gen.c (get_symbol_for_decl): Set program allocation for
23385         static local variables.
23387 2018-02-08  Richard Biener  <rguenther@suse.de>
23389         PR tree-optimization/84278
23390         * tree-vect-stmts.c (vectorizable_store): When looking for
23391         smaller vector types to perform grouped strided loads/stores
23392         make sure the mode is supported by the target.
23393         (vectorizable_load): Likewise.
23395 2018-02-08  Wilco Dijkstra  <wdijkstr@arm.com>
23397         * config/aarch64/aarch64.c (aarch64_components_for_bb):
23398         Increase LDP/STP opportunities by adding adjacent callee-saves.
23400 2018-02-08  Wilco Dijkstra  <wdijkstr@arm.com>
23402         PR rtl-optimization/84068
23403         PR rtl-optimization/83459
23404         * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
23406 2018-02-08  Aldy Hernandez  <aldyh@redhat.com>
23408         PR tree-optimization/84224
23409         * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
23410         * calls.c (gimple_alloca_call_p): Only return TRUE when we have
23411         non-zero arguments.
23413 2018-02-07  Iain Sandoe  <iain@codesourcery.com>
23415         PR target/84113
23416         * config/rs6000/altivec.md (*restore_world): Remove LR use.
23417         * config/rs6000/predicates.md (restore_world_operation): Adjust op
23418         count, remove one USE.
23420 2018-02-07  Michael Meissner  <meissner@linux.vnet.ibm.com>
23422         * doc/install.texi (Configuration): Document the
23423         --with-long-double-format={ibm,ieee} PowerPC configuration
23424         options.
23426         PR target/84154
23427         * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
23428         Convert from define_expand to be define_insn_and_split.  Rework
23429         float/double/_Float128 conversions to QI/HI/SImode to work with
23430         both ISA 2.07 (power8) or ISA 3.0 (power9).  Fix regression where
23431         conversions to QI/HImode types did a store and then a load to
23432         truncate the value.  For conversions to VSX registers, don't split
23433         the insn, instead emit the code directly.  Use the code iterator
23434         any_fix to combine signed and unsigned conversions.
23435         (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
23436         (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
23437         (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
23438         (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
23439         (fix_<mode>di2_hw): Likewise.
23440         (fixuns_<mode>di2_hw): Likewise.
23441         (fix_<mode>si2_hw): Likewise.
23442         (fixuns_<mode>si2_hw): Likewise.
23443         (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
23444         (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
23445         (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
23446         fix<uns>_trunc<SFDF:mode>si2_p8.
23447         (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer used.
23448         (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
23449         (fix<uns>_<mode>_mem): Likewise.
23450         (fctiw<u>z_<mode>_mem): Likewise.
23451         (fix<uns>_<mode>_mem): Likewise.
23452         (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
23453         the register allocator from doing a direct move to the GPRs to do
23454         a store, and instead use the ISA 3.0 store byte/half-word from
23455         vector register instruction.  For IEEE 128-bit floating point,
23456         also optimize stores of 32-bit ints.
23457         (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
23459 2018-02-07  Alan Hayward  <alan.hayward@arm.com>
23461         * genextract.c (push_pathstr_operand): New function to support
23462         [a-zA-Z].
23463         (walk_rtx): Call push_pathstr_operand.
23464         (print_path): Support [a-zA-Z].
23466 2018-02-07  Richard Biener  <rguenther@suse.de>
23468         PR tree-optimization/84037
23469         * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
23470         (cse_and_gimplify_to_preheader): Declare.
23471         (vect_get_place_in_interleaving_chain): Likewise.
23472         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
23473         ivexpr_map.
23474         (_loop_vec_info::~_loop_vec_info): Delete it.
23475         (cse_and_gimplify_to_preheader): New function.
23476         * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
23477         * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
23478         (vectorizable_load): Likewise.  For grouped stores always base
23479         the IV on the first element.
23480         * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
23481         condition before gimplifying.
23483 2018-02-07  Jakub Jelinek  <jakub@redhat.com>
23485         * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
23486         *DIV_EXPR and *MOD_EXPR.
23488 2018-02-07  H.J. Lu  <hongjiu.lu@intel.com>
23490         PR target/84248
23491         * config/i386/i386.c (ix86_option_override_internal): Mask out
23492         the CF_SET bit when checking -fcf-protection.
23494 2018-02-07  Tom de Vries  <tom@codesourcery.com>
23496         PR libgomp/84217
23497         * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
23498         enough.
23500 2018-02-07  Richard Biener  <rguenther@suse.de>
23502         PR tree-optimization/84204
23503         * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
23504         this place.
23506         PR tree-optimization/84205
23507         * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
23508         special-case isl_ast_op_zdiv_r.
23510         PR tree-optimization/84223
23511         * graphite-scop-detection.c (gather_bbs::before_dom_children):
23512         Only add conditions from within the region.
23513         (gather_bbs::after_dom_children): Adjust.
23515 2018-02-07  Georg-Johann Lay  <avr@gjlay.de>
23517         PR target/84209
23518         * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
23519         * config/avr/avr.md: Only post-reload split REG-REG moves if
23520         either register is GENERAL_REG_P.
23522 2018-02-07  Jakub Jelinek  <jakub@redhat.com>
23524         PR tree-optimization/84235
23525         * tree-ssa-scopedtables.c
23526         (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
23527         if the subtraction is performed in floating point type where NaNs are
23528         honored.  For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
23529         build 1.  Formatting fix.
23531 2018-02-06  Jakub Jelinek  <jakub@redhat.com>
23533         PR target/84146
23534         * config/i386/i386.c (rest_of_insert_endbranch): Only skip
23535         NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
23536         and skip it regardless of bb boundaries.  Use CALL_P macro,
23537         don't test INSN_P (insn) together with CALL_P or JUMP_P check
23538         unnecessarily, formatting fix.
23540 2018-02-06  Michael Collison  <michael.collison@arm.com>
23542         * config/arm/thumb2.md:
23543         (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
23544         (*thumb_mov_notscc): Ditto.
23546 2018-02-06  Michael Meissner  <meissner@linux.vnet.ibm.com>
23548         PR target/84154
23549         * config/rs6000/rs6000.md (su code attribute): Use "u" for
23550         unsigned_fix, not "s".
23552 2018-02-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
23554         * configure.ac (gcc_fn_eh_frame_ro): New function.
23555         (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
23556         correct .eh_frame permissions.
23557         * configure: Regenerate.
23559 2018-02-06  Andrew Jenner  <andrew@codeourcery.com>
23561         * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
23562         irrelevant options.
23564 2018-02-06  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
23566         * config/rs6000/rs6000.c (rs6000_option_override_internal):
23567         Display warning message for -mno-speculate-indirect-jumps.
23569 2018-02-06  Andrew Jenner  <andrew@codesourcery.com>
23571         * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
23572         Undocumented.
23573         * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
23575 2018-02-06  Aldy Hernandez  <aldyh@redhat.com>
23577         PR tree-optimization/84225
23578         * tree-eh.c (find_trapping_overflow): Only call
23579         operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
23581 2018-02-06  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
23583         PR target/84145
23584         * config/i386/i386.c: Reimplement the check of possible options
23585         -mibt/-mshstk conbination. Change error messages.
23586         * doc/invoke.texi: Fix a typo: remove extra '='.
23588 2018-02-06  Marek Polacek  <polacek@redhat.com>
23590         PR tree-optimization/84228
23591         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
23593 2018-02-06  Tamar Christina  <tamar.christina@arm.com>
23595         PR target/82641
23596         * config/arm/arm.c (arm_print_asm_arch_directives): Record already
23597         emitted arch directives.
23598         * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
23599         __ARM_FEATURE_COPROC before changing architectures.
23601 2018-02-06  Richard Biener  <rguenther@suse.de>
23603         * config/i386/i386.c (print_reg): Fix typo.
23604         (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
23606 2018-02-06  Eric Botcazou  <ebotcazou@adacore.com>
23608         * configure: Regenerate.
23610 2018-02-05  Martin Sebor  <msebor@redhat.com>
23612         PR tree-optimization/83369
23613         * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
23614         inlining context.
23616 2018-02-05  Martin Liska  <mliska@suse.cz>
23618         * doc/invoke.texi: Cherry-pick upstream r323995.
23620 2018-02-05  Richard Sandiford  <richard.sandiford@linaro.org>
23622         * ira.c (ira_init_register_move_cost): Adjust comment.
23624 2018-02-05  Martin Liska  <mliska@suse.cz>
23626         PR gcov-profile/84137
23627         * doc/gcov.texi: Fix typo in documentation.
23629 2018-02-05  Martin Liska  <mliska@suse.cz>
23631         PR gcov-profile/83879
23632         * doc/gcov.texi: Document necessity of --dynamic-list-data when
23633         using dlopen functionality.
23635 2018-02-05  Olga Makhotina  <olga.makhotina@intel.com>
23637         * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
23638         _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
23639         _mm_maskz_range_ss, _mm_mask_range_round_ss,
23640         _mm_maskz_range_round_ss): New intrinsics.
23641         (__builtin_ia32_rangesd128_round)
23642         (__builtin_ia32_rangess128_round): Remove.
23643         (__builtin_ia32_rangesd128_mask_round,
23644         __builtin_ia32_rangess128_mask_round): New builtins.
23645         * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
23646         __builtin_ia32_rangess128_round): Remove.
23647         (__builtin_ia32_rangesd128_mask_round,
23648         __builtin_ia32_rangess128_mask_round): New builtins.
23649         * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
23650         (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
23651         ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
23652         "<round_saeonly_constraint>")): Changed to ...
23653         ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
23654         "<round_saeonly_scalar_constraint>")): ... this.
23655         ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
23656         %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
23657         ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
23658         %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
23659         %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
23661 2018-02-02  Andrew Jenner  <andrew@codesourcery.com>
23663         * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
23664         options.
23665         * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
23666         Remove all values except native, 8540 and 8548.
23668 2018-02-02  H.J. Lu  <hongjiu.lu@intel.com>
23670         * config/i386/i386.c (ix86_output_function_return): Pass
23671         INVALID_REGNUM, instead of -1, as invalid register number to
23672         indirect_thunk_name and output_indirect_thunk.
23674 2018-02-02  Julia Koval  <julia.koval@intel.com>
23676         * config.gcc: Add -march=icelake.
23677         * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
23678         * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
23679         * config/i386/i386.c (processor_costs): Add m_ICELAKE.
23680         (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
23681         PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
23682         (processor_target_table): Add icelake.
23683         (ix86_option_override_internal): Handle new PTAs.
23684         (get_builtin_code_for_version): Handle icelake.
23685         (M_INTEL_COREI7_ICELAKE): New.
23686         (fold_builtin_cpu): Handle icelake.
23687         * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
23688         * doc/invoke.texi: Add -march=icelake.
23690 2018-02-02  Julia Koval  <julia.koval@intel.com>
23692         * config/i386/i386.c (ix86_option_override_internal): Change flags type
23693         to wide_int_bitmask.
23694         * wide-int-bitmask.h: New.
23696 2018-02-02  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
23698         PR target/84066
23699         * config/i386/i386.md: Replace Pmode with word_mode in
23700         builtin_setjmp_setup and builtin_longjmp to support x32.
23702 2018-02-01  Peter Bergner  <bergner@vnet.ibm.com>
23704         PR target/56010
23705         PR target/83743
23706         * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
23707         #include "opts.h".
23708         (rs6000_supported_cpu_names): New static variable.
23709         (linux_cpu_translation_table): Likewise.
23710         (elf_platform) <cpu>: Define new static variable and use it.
23711         Translate kernel AT_PLATFORM name to canonical name if needed.
23712         Error if platform name is unknown.
23714 2018-02-01  Aldy Hernandez  <aldyh@redhat.com>
23716         PR target/84089
23717         * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
23719 2018-02-01  Jeff Law  <law@redhat.com>
23721         PR target/84128
23722         * config/i386/i386.c (release_scratch_register_on_entry): Add new
23723         OFFSET and RELEASE_VIA_POP arguments.  Use SP+OFFSET to restore
23724         the scratch if RELEASE_VIA_POP is false.
23725         (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
23726         If we have to save a temporary register, decrement SIZE appropriately.
23727         Pass new arguments to release_scratch_register_on_entry.
23728         (ix86_adjust_stack_and_probe): Likewise.
23729         (ix86_emit_probe_stack_range): Pass new arguments to
23730         release_scratch_register_on_entry.
23732 2018-02-01  Uros Bizjak  <ubizjak@gmail.com>
23734         PR rtl-optimization/84157
23735         * combine.c (change_zero_ext): Use REG_P predicate in
23736         front of HARD_REGISTER_P predicate.
23738 2018-02-01  Georg-Johann Lay  <avr@gjlay.de>
23740         * config/avr/avr.c (avr_option_override): Move disabling of
23741         -fdelete-null-pointer-checks to...
23742         * common/config/avr/avr-common.c (avr_option_optimization_table):
23743         ...here.
23745 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
23747         PR tree-optimization/81635
23748         * tree-data-ref.c (split_constant_offset_1): For types that
23749         wrap on overflow, try to use range info to prove that wrapping
23750         cannot occur.
23752 2018-02-01  Renlin Li  <renlin.li@arm.com>
23754         PR target/83370
23755         * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
23756         TAILCALL_ADDR_REGS.
23757         (aarch64_register_move_cost): Likewise.
23758         * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
23759         TAILCALL_ADDR_REGS.
23760         (REG_CLASS_NAMES): Likewise.
23761         (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
23762         TAILCALL_ADDR_REGS. Remove IP registers.
23763         * config/aarch64/aarch64.md (Ucs): Update register constraint.
23765 2018-02-01  Richard Biener  <rguenther@suse.de>
23767         * domwalk.h (dom_walker::dom_walker): Add additional constructor
23768         for specifying RPO order and allow NULL for that.
23769         * domwalk.c (dom_walker::dom_walker): Likewise.
23770         (dom_walker::walk): Handle NULL RPO order.
23771         * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
23772         in RPO order.
23773         (rewrite_update_dom_walker): Likewise.
23774         (mark_def_dom_walker): Likewise.
23776 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
23778         * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
23779         (aarch64_maybe_expand_sve_subreg_move): Declare.
23780         * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
23781         * config/aarch64/predicates.md (aarch64_any_register_operand): New
23782         predicate.
23783         * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
23784         that are semantically a reverse operation.
23785         (*aarch64_sve_mov<mode>_subreg_be): New pattern.
23786         * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
23787         (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
23788         functions.
23789         (aarch64_can_change_mode_class): For big-endian, forbid changes
23790         between two SVE modes if they have different element sizes.
23792 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
23794         * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
23795         the TImode handling for big-endian targets.
23797 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
23799         * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
23800         (*sve_ld1rq<Vesize>): ... this new pattern.  Handle all element sizes,
23801         not just bytes.
23802         * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
23803         Remove BSWAP handing for big-endian targets and use the form of
23804         LD1RQ appropariate for the mode.
23806 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
23808         * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
23809         all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
23810         duplicated element.
23812 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
23814         PR tearget/83845
23815         * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
23816         check for operands that need to go through aarch64_sve_reload_be.
23818 2018-02-01  Jakub Jelinek  <jakub@redhat.com>
23820         PR tree-optimization/81661
23821         PR tree-optimization/84117
23822         * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
23823         * tree-eh.c: Include gimplify.h.
23824         (find_trapping_overflow, replace_trapping_overflow,
23825         rewrite_to_non_trapping_overflow): New functions.
23826         * tree-vect-loop.c: Include tree-eh.h.
23827         (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
23828         * tree-data-ref.c: Include tree-eh.h.
23829         (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
23831 2018-01-31  Uros Bizjak  <ubizjak@gmail.com>
23833         PR rtl-optimization/84123
23834         * combine.c (change_zero_ext): Check if hard register satisfies
23835         can_change_dest_mode before calling gen_lowpart_SUBREG.
23837 2018-01-31  Vladimir Makarov  <vmakarov@redhat.com>
23839         PR target/82444
23840         * ira.c (ira_init_register_move_cost): Remove assert.
23842 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
23844         PR rtl-optimization/84071
23845         * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
23846         * doc/tm.texi: Regenerate.
23848 2018-01-31  Richard Biener  <rguenther@suse.de>
23850         PR tree-optimization/84132
23851         * tree-data-ref.c (analyze_miv_subscript): Properly
23852         check whether evolution_function_is_affine_multivariate_p
23853         before calling gcd_of_steps_may_divide_p.
23855 2018-01-31  Julia Koval  <julia.koval@intel.com>
23857         PR target/83618
23858         * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
23859         * config/i386/i386.md (rdpid_rex64) New.
23860         (rdpid): Make 32bit only.
23862 2018-01-29  Aldy Hernandez  <aldyh@redhat.com>
23864         PR lto/84105
23865         * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
23866         an IDENTIFIER_NODE for FUNCTION_TYPE's.
23868 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
23870         Revert
23871         2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
23873         * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
23875 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
23877         PR rtl-optimization/84071
23878         * combine.c (record_dead_and_set_regs_1): Record the source unmodified
23879         for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
23881 2018-01-31  Claudiu Zissulescu  <claziss@synopsys.com>
23883         * config/arc/arc.c (arc_handle_aux_attribute): New function.
23884         (arc_attribute_table): Add 'aux' attribute.
23885         (arc_in_small_data_p): Consider aux like variables.
23886         (arc_is_aux_reg_p): New function.
23887         (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
23888         (arc_get_aux_arg): New function.
23889         (prepare_move_operands): Handle aux-register access.
23890         (arc_handle_aux_attribute): New function.
23891         * doc/extend.texi (ARC Variable attributes): Add subsection.
23893 2018-01-31  Claudiu Zissulescu  <claziss@synopsys.com>
23895         * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
23896         * config/arc/arc.c (arc_handle_uncached_attribute): New function.
23897         (arc_attribute_table): Add 'uncached' attribute.
23898         (arc_print_operand): Print '.di' flag for uncached memory
23899         accesses.
23900         (arc_in_small_data_p): Do not consider for small data the uncached
23901         types.
23902         (arc_is_uncached_mem_p): New function.
23903         * config/arc/predicates.md (compact_store_memory_operand): Check
23904         for uncached memory accesses.
23905         (nonvol_nonimm_operand): Likewise.
23906         * doc/extend.texi (ARC Type Attribute): New subsection.
23908 2018-01-31  Jakub Jelinek  <jakub@redhat.com>
23910         PR c/84100
23911         * common.opt (falign-functions=, falign-jumps=, falign-labels=,
23912         falign-loops=): Add Optimization flag.
23914 2018-01-30  Jeff Law  <law@redhat.com>
23916         PR target/84064
23917         * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
23918         INT_REGISTERS_SAVED.  Check it prior to calling
23919         get_scratch_register_on_entry.
23920         (ix86_adjust_stack_and_probe): Similarly.
23921         (ix86_emit_probe_stack_range): Similarly.
23922         (ix86_expand_prologue): Corresponding changes.
23924 2018-01-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
23926         PR target/40411
23927         * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
23928         -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
23930 2018-01-30  Vladimir Makarov  <vmakarov@redhat.com>
23932         PR target/84112
23933         * lra-constraints.c (curr_insn_transform): Process AND in the
23934         address.
23936 2018-01-30  Jakub Jelinek  <jakub@redhat.com>
23938         PR rtl-optimization/83986
23939         * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
23940         dependence against last_pending_memory_flush in addition to
23941         pending_jump_insns.
23943 2018-01-30  Alexandre Oliva  <aoliva@redhat.com>
23945         PR tree-optimization/81611
23946         * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
23947         copies.
23949 2018-01-30  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
23951         PR target/83758
23952         * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
23953         a reg rtx.
23955 2018-01-30  Richard Biener  <rguenther@suse.de>
23956             Jakub Jelinek  <jakub@redhat.com>
23958         PR tree-optimization/84111
23959         * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
23960         inner loops added during recursion, as they don't have up-to-date
23961         SSA form.
23963 2018-01-30  Jan Hubicka  <hubicka@ucw.cz>
23965         PR ipa/81360
23966         * ipa-inline.c (can_inline_edge_p): Break out late tests to...
23967         (can_inline_edge_by_limits_p): ... here.
23968         (can_early_inline_edge_p, check_callers,
23969         update_caller_keys, update_callee_keys, recursive_inlining,
23970         add_new_edges_to_heap, speculation_useful_p,
23971         inline_small_functions,
23972         inline_small_functions, flatten_function,
23973         inline_to_all_callers_1): Update.
23975 2018-01-30  Jan Hubicka  <hubicka@ucw.cz>
23977         * profile-count.c (profile_count::combine_with_ipa_count): Handle
23978         zeros correctly.
23980 2018-01-30  Richard Biener  <rguenther@suse.de>
23982         PR tree-optimization/83008
23983         * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
23984         invariant and constant vector uses in stmts when they need
23985         more than one stmt.
23987 2018-01-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
23989         PR bootstrap/84017
23990         * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
23991         * configure: Regenerate.
23993 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
23995         * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
23996         pattern.
23997         (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
23998         Use gen_rtx_REG rather than gen_lowpart.
24000 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
24002         * lra-constraints.c (match_reload): Use subreg_lowpart_offset
24003         rather than 0 when creating partial subregs.
24005 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
24007         * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
24008         of usage.
24010 2018-01-29  Michael Meissner  <meissner@linux.vnet.ibm.com>
24012         PR target/81550
24013         * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
24014         and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
24015         -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
24016         flags.  This restores the settings used before the 2017-07-24.
24017         Turning off pre increment/decrement/modify allows IVOPTS to
24018         optimize DF/SF loops where the index is an int.
24020 2018-01-29  Richard Biener  <rguenther@suse.de>
24021             Kelvin Nilsen  <kelvin@gcc.gnu.org>
24023         PR bootstrap/80867
24024         * tree-vect-stmts.c (vectorizable_call): Don't call
24025         targetm.vectorize_builtin_md_vectorized_function if callee is
24026         NULL.
24028 2018-01-22  Carl Love  <cel@us.ibm.com>
24030         * doc/extend.tex: Fix typo in second arg in
24031         __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
24033 2018-01-29  Richard Biener  <rguenther@suse.de>
24035         PR tree-optimization/84086
24036         * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
24037         (flush_ssaname_freelist): When SSA names were released reset
24038         the SCEV hash table.
24040 2018-01-29  Richard Biener  <rguenther@suse.de>
24042         PR tree-optimization/84057
24043         * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
24044         removed paths when removing edges.
24046 2018-01-27  H.J. Lu  <hongjiu.lu@intel.com>
24048         * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
24049         -mfunction-return=@var{choice}.
24051 2018-01-27  Bernd Edlinger  <bernd.edlinger@hotmail.de>
24053         PR diagnostic/84034
24054         * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
24055         Handle CR like TAB.
24056         (layout::print_source_line): Likewise.
24057         (test_get_line_width_without_trailing_whitespace): Add test cases.
24059 2018-01-27  Jakub Jelinek  <jakub@redhat.com>
24061         PR middle-end/84040
24062         * sched-deps.c (sched_macro_fuse_insns): Return immediately for
24063         debug insns.
24065 2018-01-26  Jim Wilson  <jimw@sifive.com>
24067         * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
24069         * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
24070         specified.
24072 2018-01-26  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
24074         * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
24075         and CMP + SUB-immediate -> SUBS.
24077 2018-01-26  Martin Sebor  <msebor@redhat.com>
24079         PR tree-optimization/83896
24080         * tree-ssa-strlen.c (get_string_len): Rename...
24081         (get_string_cst_length): ...to this.  Return HOST_WIDE_INT.
24082         Avoid assuming length is constant.
24083         (handle_char_store): Use HOST_WIDE_INT for string length.
24085 2018-01-26  Uros Bizjak  <ubizjak@gmail.com>
24087         PR target/81763
24088         * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
24089         to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
24091 2018-01-26  Richard Biener  <rguenther@suse.de>
24093         PR rtl-optimization/84003
24094         * dse.c (record_store): Only record redundant stores when
24095         the earlier store aliases at least all accesses the later one does.
24097 2018-01-26  Jakub Jelinek  <jakub@redhat.com>
24099         PR rtl-optimization/83985
24100         * dce.c (deletable_insn_p): Return false for separate shrink wrapping
24101         REG_CFA_RESTORE insns.
24102         (delete_unmarked_insns): Don't ignore separate shrink wrapping
24103         REG_CFA_RESTORE insns here.
24105         PR c/83989
24106         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
24107         use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
24109 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
24111         * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
24112         * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
24113         (arc_init): Likewise.
24114         (arc_override_options): Likewise.
24115         (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
24116         value.
24117         (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
24118         support.
24119         * config/arc/arc.h (TARGET_DBNZ): Define.
24120         * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
24121         properly set the tune attribute.
24122         (dbnz): Use TARGET_DBNZ guard.
24123         * config/arc/arc.opt (mtune): Add core3 option.
24125 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
24127         * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
24128         recognize new pic like addresses.
24129         (arc_delegitimize_address): Clean up.
24131 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
24133         * config/arc/arc-arches.def: Option mrf16 valid for all
24134         architectures.
24135         * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
24136         * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
24137         * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
24138         * config/arc/arc-tables.opt: Regenerate.
24139         * config/arc/arc.c (arc_conditional_register_usage): Handle
24140         reduced register file case.
24141         (arc_file_start): Set must have build attributes.
24142         * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
24143         mrf16 option value.
24144         * config/arc/arc.opt (mrf16): Add new option.
24145         * config/arc/elf.h (ATTRIBUTE_PCS): Define.
24146         * config/arc/genmultilib.awk: Handle new mrf16 option.
24147         * config/arc/linux.h (ATTRIBUTE_PCS): Define.
24148         * config/arc/t-multilib: Regenerate.
24149         * doc/invoke.texi (ARC Options): Document mrf16 option.
24151 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
24153         * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
24154         * config/arc/arc.c (arc_handle_secure_attribute): New function.
24155         (arc_attribute_table): Add 'secure_call' attribute.
24156         (arc_print_operand): Print secure call operand.
24157         (arc_function_ok_for_sibcall): Don't optimize tail calls when
24158         secure.
24159         (arc_is_secure_call_p): New function.  * config/arc/arc.md
24160         (call_i): Add support for sjli instruction.
24161         (call_value_i): Likewise.
24162         * config/arc/constraints.md (Csc): New constraint.
24164 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
24165             John Eric Martin  <John.Martin@emmicro-us.com>
24167         * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
24168         * config/arc/arc.c (_arc_jli_section): New struct.
24169         (arc_jli_section): New type.
24170         (rc_jli_sections): New static variable.
24171         (arc_handle_jli_attribute): New function.
24172         (arc_attribute_table): Add jli_always and jli_fixed attribute.
24173         (arc_file_end): New function.
24174         (TARGET_ASM_FILE_END): Define.
24175         (arc_print_operand): Reuse 'S' letter for JLI output instruction.
24176         (arc_add_jli_section): New function.
24177         (jli_call_scan): Likewise.
24178         (arc_reorg): Call jli_call_scan.
24179         (arc_output_addsi): Remove 'S' from printing asm operand.
24180         (arc_is_jli_call_p): New function.
24181         * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
24182         operand.
24183         (movhi_insn): Likewise.
24184         (movsi_insn): Likewise.
24185         (movsi_set_cc_insn): Likewise.
24186         (loadqi_update): Likewise.
24187         (load_zeroextendqisi_update): Likewise.
24188         (load_signextendqisi_update): Likewise.
24189         (loadhi_update): Likewise.
24190         (load_zeroextendhisi_update): Likewise.
24191         (load_signextendhisi_update): Likewise.
24192         (loadsi_update): Likewise.
24193         (loadsf_update): Likewise.
24194         (movsicc_insn): Likewise.
24195         (bset_insn): Likewise.
24196         (bxor_insn): Likewise.
24197         (bclr_insn): Likewise.
24198         (bmsk_insn): Likewise.
24199         (bicsi3_insn): Likewise.
24200         (cmpsi_cc_c_insn): Likewise.
24201         (movsi_ne): Likewise.
24202         (movsi_cond_exec): Likewise.
24203         (clrsbsi2): Likewise.
24204         (norm_f): Likewise.
24205         (normw): Likewise.
24206         (swap): Likewise.
24207         (divaw): Likewise.
24208         (flag): Likewise.
24209         (sr): Likewise.
24210         (kflag): Likewise.
24211         (ffs): Likewise.
24212         (ffs_f): Likewise.
24213         (fls): Likewise.
24214         (call_i): Remove 'S' asm letter, add jli instruction.
24215         (call_value_i): Likewise.
24216         * config/arc/arc.op (mjli-always): New option.
24217         * config/arc/constraints.md (Cji): New constraint.
24218         * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
24219         operand.
24220         (subsf3_fpx): Likewise.
24221         (mulsf3_fpx): Likewise.
24222         * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
24223         asm operand.
24224         * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
24225         function attrbutes.
24226         * doc/invoke.texi (ARC): Document mjli-always option.
24228 2018-01-26  Sebastian Perta  <sebastian.perta@renesas.com>
24230         * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
24231         avoid addition with 0 and use incw and decw where possible.
24233 2018-01-26  Richard Biener  <rguenther@suse.de>
24235         PR tree-optimization/81082
24236         * fold-const.c (fold_plusminus_mult_expr): Do not perform the
24237         association if it requires casting to unsigned.
24238         * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
24239         from fold_plusminus_mult_expr to catch important cases late when
24240         range info is available.
24242 2018-01-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
24244         * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
24245         * configure.ac (hidden_linkonce): New test.
24246         * configure: Regenerate.
24247         * config.in: Regenerate.
24249 2018-01-26  Julia Koval  <julia.koval@intel.com>
24251         * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
24252         _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
24253         _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
24254         _mm_mask_bitshuffle_epi64_mask): Fix type.
24255         * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
24256         USI_FTYPE_V4DI_V4DI_USI): Remove.
24257         * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
24258         __builtin_ia32_vpshufbitqmb256_mask,
24259         __builtin_ia32_vpshufbitqmb128_mask): Fix types.
24260         * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
24261         * config/i386/sse.md (VI1_AVX512VLBW): Change types.
24263 2018-01-26  Alan Modra  <amodra@gmail.com>
24265         PR target/84033
24266         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
24267         UNSPEC_VBPERMQ.  Sort other unspecs.
24269 2018-01-25  David Edelsohn  <dje.gcc@gmail.com>
24271         * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
24273 2018-01-25  Jan Hubicka  <hubicka@ucw.cz>
24275         PR middle-end/83055
24276         * predict.c (drop_profile): Do not push/pop cfun; update also
24277         node->count.
24278         (handle_missing_profiles): Fix logic looking for zero profiles.
24280 2018-01-25  Jakub Jelinek  <jakub@redhat.com>
24282         PR middle-end/83977
24283         * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
24284         on functions with #pragma omp declare simd or functions with simd
24285         attribute.
24286         * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
24287         * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
24288         Remove trailing \n from warning_at calls.
24290 2018-01-25  Tom de Vries  <tom@codesourcery.com>
24292         PR target/84028
24293         * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
24294         for neutered workers.
24296 2018-01-24  Joseph Myers  <joseph@codesourcery.com>
24298         PR target/68467
24299         * config/m68k/m68k.c (m68k_promote_function_mode): New function.
24300         (TARGET_PROMOTE_FUNCTION_MODE): New macro.
24302 2018-01-24  Jeff Law  <law@redhat.com>
24304         PR target/83994
24305         * i386.c (get_probe_interval): Move to earlier point.
24306         (ix86_compute_frame_layout): If -fstack-clash-protection and
24307         the frame is larger than the probe interval, then use pushes
24308         to save registers rather than reg->mem moves.
24309         (ix86_expand_prologue): Remove conditional for int_registers_saved
24310         assertion.
24312 2018-01-24  Vladimir Makarov  <vmakarov@redhat.com>
24314         PR target/84014
24315         * ira-build.c (setup_min_max_allocno_live_range_point): Set up
24316         min/max for never referenced object.
24318 2018-01-24  Jakub Jelinek  <jakub@redhat.com>
24320         PR middle-end/83977
24321         * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
24322         here.
24323         * omp-low.c (create_omp_child_function): Remove "omp declare simd"
24324         attributes from DECL_ATTRIBUTES (decl) without affecting
24325         DECL_ATTRIBUTES (current_function_decl).
24326         * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
24327         functions with non-NULL DECL_ABSTRACT_ORIGIN.
24329 2018-01-24  Richard Sandiford  <richard.sandiford@linaro.org>
24331         PR tree-optimization/83979
24332         * fold-const.c (fold_comparison): Use constant_boolean_node
24333         instead of boolean_{true,false}_node.
24335 2018-01-24  Jan Hubicka  <hubicka@ucw.cz>
24337         * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
24338         with zero counts.
24340 2018-01-24  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
24342         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
24343         Simplify the clause that sets the length attribute.
24344         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
24345         (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
24346         clause that sets the length attribute.
24347         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
24349 2018-01-24  Tom de Vries  <tom@codesourcery.com>
24351         PR target/83589
24352         * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
24353         (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
24354         Add strict parameter.
24355         (prevent_branch_around_nothing): Insert dummy insn between branch to
24356         label and label with no ptx insn inbetween.
24357         * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
24359 2018-01-24  Tom de Vries  <tom@codesourcery.com>
24361         PR target/81352
24362         * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
24363         for neutered threads in warp.
24364         * config/nvptx/nvptx.md (define_insn "exit"): New insn.
24366 2018-01-24  Richard Biener  <rguenther@suse.de>
24368         PR tree-optimization/83176
24369         * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
24370         operands.
24372 2018-01-24  Richard Biener  <rguenther@suse.de>
24374         PR tree-optimization/82819
24375         * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
24376         code generating pluses that are no-ops in the target precision.
24378 2018-01-24  Richard Biener  <rguenther@suse.de>
24380         PR middle-end/84000
24381         * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
24383 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
24385         * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
24386         to merge probabilities.
24387         * predict.c (probably_never_executed): Also mark as cold functions
24388         with global 0 profile and guessed local profile.
24389         * profile-count.c (profile_probability::combine_with_count): New
24390         member function.
24391         * profile-count.h (profile_probability::operator*,
24392         profile_probability::operator*=, profile_probability::operator/,
24393         profile_probability::operator/=): Reduce precision to adjusted
24394         and set value to guessed on contradictory divisions.
24395         (profile_probability::combine_with_freq): Remove.
24396         (profile_probability::combine_wiht_count): Declare.
24397         (profile_count::force_nonzero):: Set to adjusted.
24398         (profile_count::probability_in):: Set quality to adjusted.
24399         * tree-ssa-tail-merge.c (replace_block_by): Use
24400         combine_with_count.
24402 2018-01-23  Andrew Waterman  <andrew@sifive.com>
24403             Jim Wilson  <jimw@sifive.com>
24405         * config/riscv/riscv.c (riscv_stack_boundary): New.
24406         (riscv_option_override): Set riscv_stack_boundary.  Handle
24407         riscv_preferred_stack_boundary_arg.
24408         * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
24409         (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
24410         (STACK_BOUNDARY): Set to riscv_stack_boundary.
24411         (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
24412         * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
24413         * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
24415 2018-01-23  H.J. Lu  <hongjiu.lu@intel.com>
24417         PR target/83905
24418         * config/i386/i386.c (ix86_expand_prologue): Use cost reference
24419         of struct ix86_frame.
24420         (ix86_expand_epilogue): Likewise.  Add a local variable for
24421         the reg_save_offset field in struct ix86_frame.
24423 2018-01-23  Bin Cheng  <bin.cheng@arm.com>
24425         PR tree-optimization/82604
24426         * tree-loop-distribution.c (enum partition_kind): New enum item
24427         PKIND_PARTIAL_MEMSET.
24428         (partition_builtin_p): Support above new enum item.
24429         (generate_code_for_partition): Ditto.
24430         (compute_access_range): Differentiate cases that equality can be
24431         proven at all loops, the innermost loops or no loops.
24432         (classify_builtin_st, classify_builtin_ldst): Adjust call to above
24433         function.  Set PKIND_PARTIAL_MEMSET for partition appropriately.
24434         (finalize_partitions, distribute_loop): Don't fuse partition of
24435         PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
24436         (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
24437         parloop is enabled.
24439 2018-01-23  Martin Liska  <mliska@suse.cz>
24441         * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
24442         order to ignore the predictor.
24443         (PRED_POLYMORPHIC_CALL): Likewise.
24444         (PRED_RECURSIVE_CALL): Likewise.
24446 2018-01-23  Martin Liska  <mliska@suse.cz>
24448         * tree-profile.c (tree_profiling): Print function header to
24449         aware reader which function we are working on.
24450         * value-prof.c (gimple_find_values_to_profile): Do not print
24451         not interesting value histograms.
24453 2018-01-23  Martin Liska  <mliska@suse.cz>
24455         * profile-count.h (enum profile_quality): Add
24456         profile_uninitialized as the first value. Do not number values
24457         as they are zero based.
24458         (profile_count::verify): Update sanity check.
24459         (profile_probability::verify): Likewise.
24461 2018-01-23  Nathan Sidwell  <nathan@acm.org>
24463         * doc/invoke.texi (ffor-scope): Deprecate.
24465 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
24467         PR tree-optimization/83510
24468         * domwalk.c (set_all_edges_as_executable): New function.
24469         (dom_walker::dom_walker): Convert bool param
24470         "skip_unreachable_blocks" to enum reachability.  Move setup of
24471         edge flags to set_all_edges_as_executable and only do it when
24472         reachability is REACHABLE_BLOCKS.
24473         * domwalk.h (enum dom_walker::reachability): New enum.
24474         (dom_walker::dom_walker): Convert bool param
24475         "skip_unreachable_blocks" to enum reachability.
24476         (set_all_edges_as_executable): New decl.
24477         * graphite-scop-detection.c  (gather_bbs::gather_bbs): Convert
24478         from false for "skip_unreachable_blocks" to ALL_BLOCKS for
24479         "reachability".
24480         * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
24481         but converting true to REACHABLE_BLOCKS.
24482         * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
24483         * tree-vrp.c
24484         (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
24485         Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
24486         (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
24487         REACHABLE_BLOCKS.
24488         (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
24489         if check_all_array_refs will be called.
24491 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
24493         * tree.c (selftest::test_location_wrappers): Add more test
24494         coverage.
24496 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
24498         * sbitmap.c (selftest::test_set_range): Fix memory leaks.
24499         (selftest::test_bit_in_range): Likewise.
24501 2018-01-23  Richard Sandiford  <richard.sandiford@linaro.org>
24503         PR testsuite/83888
24504         * doc/sourcebuild.texi (vect_float): Say that the selector
24505         only describes the situation when -funsafe-math-optimizations is on.
24506         (vect_float_strict): Document.
24508 2018-01-23  Richard Sandiford  <richard.sandiford@linaro.org>
24510         PR tree-optimization/83965
24511         * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
24512         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
24513         instead of checking only for a reduction.
24514         (vect_recog_widen_sum_pattern): Likewise.
24516 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
24518         * predict.c (probably_never_executed): Only use precise profile info.
24519         (compute_function_frequency): Skip after inlining hack since we now
24520         have quality checking.
24522 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
24524         * profile-count.h (profile_probability::very_unlikely,
24525         profile_probability::unlikely, profile_probability::even): Set
24526         precision to guessed.
24528 2018-01-23  Richard Biener  <rguenther@suse.de>
24530         PR tree-optimization/83963
24531         * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
24532         Properly terminate dominator walk when crossing the exit edge not
24533         when visiting its source block.
24535 2018-01-23  Jakub Jelinek  <jakub@redhat.com>
24537         PR c++/83918
24538         * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
24539         VIEW_CONVERT_EXPR to wrap CONST_DECLs.
24541 2018-01-22  Jakub Jelinek  <jakub@redhat.com>
24543         PR tree-optimization/83957
24544         * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs.  Remove
24545         semicolon after for body surrounded by braces.
24547         PR tree-optimization/83081
24548         * profile-count.h (profile_probability::split): New method.
24549         * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
24550         Use profile_probability::split.
24551         (do_compare_rtx_and_jump): Fix adjustment of probabilities
24552         when splitting a single conditional jump into 2.
24554 2018-01-22  David Malcolm  <dmalcolm@redhat.com>
24556         PR tree-optimization/69452
24557         * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
24558         decl.
24560 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
24562         * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
24563         * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
24564         * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
24566 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
24568         * config/rl78/rl78-protos.h (rl78_split_movdi): New function
24569         declaration.
24570         * config/rl78/rl78.md (movdi): New define_expand.
24571         * config/rl78/rl78.c (rl78_split_movdi): New function.
24573 2018-01-22  Michael Meissner  <meissner@linux.vnet.ibm.com>
24575         PR target/83862
24576         * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
24577         no longer used.
24578         * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
24579         * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
24580         128-bit to produce an UNSPEC move to get the double word with the
24581         signbit and then a shift directly to do signbit.
24582         (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
24583         implementation with a new version that just does either a direct
24584         move or a regular move.  Move memory interface to separate insns.
24585         Move insns so they are next to the expander.
24586         (signbit<mode>2_dm_mem_be): New combiner insns to combine load
24587         with signbit move.  Split big and little endian case.
24588         (signbit<mode>2_dm_mem_le): Likewise.
24589         (signbit<mode>2_dm_<su>ext): Delete, no longer used.
24590         (signbit<mode>2_dm2): Likewise.
24592 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
24594         * config/rl78/rl78.md (anddi3): New define_expand.
24596 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
24598         * config/rl78/rl78.md (umindi3): New define_expand.
24600 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
24602         * config/rl78/rl78.md (smindi3): New define_expand.
24604 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
24606         * config/rl78/rl78.md (smaxdi3): New define_expand.
24608 2018-01-22  Carl Love  <cel@us.ibm.com>
24610         * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
24611         LVX_V1TI): Add macro expansion.
24612         * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
24613         definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
24614         VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
24615         * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
24616         Change check to determine if the instruction is a byte reversing
24617         entry.  Fix typo in comment.
24618         * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
24619         for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
24620         Add def_builtin calls for new builtins.
24621         * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
24622         Add define_insn expansion.
24624 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
24626         * config/rl78/rl78.md (umaxdi3): New define_expand.
24628 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
24630         * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
24631         for non-QImode registers.
24633 2018-01-22  Richard Biener  <rguenther@suse.de>
24635         PR tree-optimization/83963
24636         * graphite-scop-detection.c (scop_detection::get_sese): Delay
24637         including the loop exit block.
24638         (scop_detection::merge_sese): Likewise.
24639         (scop_detection::add_scop): Do it here instead.
24641 2018-01-22  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
24643         * doc/sourcebuild.texi (arm_softfloat): Document.
24645 2018-01-21  John David Anglin  <danglin@gcc.gnu.org>
24647         PR gcc/77734
24648         * config/pa/pa.c (pa_function_ok_for_sibcall): Use
24649         targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
24650         Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
24652 2018-01-21  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
24653             David Edelsohn  <dje.gcc@gmail.com>
24655         PR target/83946
24656         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
24657         Change "crset eq" to "crset 2".
24658         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
24659         (*call_indirect_aix<mode>_nospec): Likewise.
24660         (*call_value_indirect_aix<mode>_nospec): Likewise.
24661         (*call_indirect_elfv2<mode>_nospec): Likewise.
24662         (*call_value_indirect_elfv2<mode>_nospec): Likewise.
24663         (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
24664         change assembly output from . to $.
24665         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
24666         (indirect_jump<mode>_nospec): Change assembly output from . to $.
24667         (*tablejump<mode>_internal1_nospec): Likewise.
24669 2018-01-21  Oleg Endo  <olegendo@gcc.gnu.org>
24671         PR target/80870
24672         * config/sh/sh_optimize_sett_clrt.cc:
24673         Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
24675 2018-01-20  Richard Sandiford  <richard.sandiford@linaro.org>
24677         PR tree-optimization/83940
24678         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
24679         offset_dt to vect_constant_def rather than vect_unknown_def_type.
24680         (vect_check_load_store_mask): Add a mask_dt_out parameter and
24681         use it to pass back the definition type.
24682         (vect_check_store_rhs): Likewise rhs_dt_out.
24683         (vect_build_gather_load_calls): Add a mask_dt argument and use
24684         it instead of a call to vect_is_simple_use.
24685         (vectorizable_store): Update calls to vect_check_load_store_mask
24686         and vect_check_store_rhs.  Use the dt returned by the latter instead
24687         of scatter_src_dt.  Use the cached mask_dt and gs_info.offset_dt
24688         instead of calls to vect_is_simple_use.  Pass the scalar rather
24689         than the vector operand to vect_is_simple_use when handling
24690         second and subsequent copies of an rhs value.
24691         (vectorizable_load): Update calls to vect_check_load_store_mask
24692         and vect_build_gather_load_calls.  Use the cached mask_dt and
24693         gs_info.offset_dt instead of calls to vect_is_simple_use.
24695 2018-01-20  Jakub Jelinek  <jakub@redhat.com>
24697         PR middle-end/83945
24698         * tree-emutls.c: Include gimplify.h.
24699         (lower_emutls_2): New function.
24700         (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
24701         with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
24702         it before further processing.
24704         PR target/83930
24705         * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
24706         UINTVAL (trueop1) instead of INTVAL (op1).
24708 2018-01-19  Jakub Jelinek  <jakub@redhat.com>
24710         PR debug/81570
24711         PR debug/83728
24712         * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
24713         INCOMING_FRAME_SP_OFFSET if not defined.
24714         (scan_trace): Add ENTRY argument.  If true and
24715         DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
24716         emit a note to adjust the CFA offset.
24717         (create_cfi_notes): Adjust scan_trace callers.
24718         (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
24719         INCOMING_FRAME_SP_OFFSET in the CIE.
24720         * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
24721         * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
24722         Likewise.
24723         * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
24724         * doc/tm.texi: Regenerated.
24726 2018-01-19  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
24728         PR rtl-optimization/83147
24729         * lra-constraints.c (remove_inheritance_pseudos): Use
24730         lra_substitute_pseudo_within_insn.
24732 2018-01-19  Tom de Vries  <tom@codesourcery.com>
24733             Cesar Philippidis  <cesar@codesourcery.com>
24735         PR target/83920
24736         * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
24738 2018-01-19  Cesar Philippidis  <cesar@codesourcery.com>
24740         PR target/83790
24741         * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
24742         spaces for function labels.
24744 2018-01-19  Martin Liska  <mliska@suse.cz>
24746         * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
24747         (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
24748         (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
24749         (PRED_OPCODE_POSITIVE): Change from 64 to 59.
24750         (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
24751         (PRED_CONST_RETURN): Change from 69 to 65.
24752         (PRED_NULL_RETURN): Change from 91 to 71.
24753         (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
24754         (PRED_LOOP_GUARD): Change from 66 to 73.
24756 2018-01-19  Martin Liska  <mliska@suse.cz>
24758         * predict.c (predict_insn_def): Add new assert.
24759         (struct branch_predictor): Change type to signed integer.
24760         (test_prediction_value_range): Amend test to cover
24761         PROB_UNINITIALIZED.
24762         * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
24763         (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
24764         (PRED_LOOP_ITERATIONS_MAX): Likewise.
24765         (PRED_LOOP_IV_COMPARE): Likewise.
24766         * predict.h (PROB_UNINITIALIZED): Define new constant.
24768 2018-01-19  Martin Liska  <mliska@suse.cz>
24770         * predict.c (dump_prediction): Add new format for
24771         analyze_brprob.py script which is enabled with -details
24772         suboption.
24773         * profile-count.h (precise_p): New function.
24775 2018-01-19  Richard Sandiford  <richard.sandiford@linaro.org>
24777         PR tree-optimization/83922
24778         * tree-vect-loop.c (vect_verify_full_masking): Return false if
24779         there are no statements that need masking.
24780         (vect_active_double_reduction_p): New function.
24781         (vect_analyze_loop_operations): Use it when handling phis that
24782         are not in the loop header.
24784 2018-01-19  Richard Sandiford  <richard.sandiford@linaro.org>
24786         PR tree-optimization/83914
24787         * tree-vect-loop.c (vectorizable_induction): Don't convert
24788         init_expr or apply the peeling adjustment for inductions
24789         that are nested within the vectorized loop.
24791 2018-01-19  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
24793         * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
24794         instead of NEG.
24796 2018-01-18  Jakub Jelinek  <jakub@redhat.com>
24798         PR sanitizer/81715
24799         PR testsuite/83882
24800         * function.h (gimplify_parameters): Add gimple_seq * argument.
24801         * function.c: Include gimple.h and options.h.
24802         (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
24803         for the added local temporaries if needed.
24804         * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
24805         if there are any parameter cleanups, wrap whole body into a
24806         try/finally with the cleanups.
24808 2018-01-18  Wilco Dijkstra  <wdijkstr@arm.com>
24810         PR target/82964
24811         * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
24812         Use GET_MODE_CLASS for scalar floating point.
24814 2018-01-18  Jan Hubicka  <hubicka@ucw.cz>
24816         PR ipa/82256
24817         patch by PaX Team
24818         * cgraphclones.c (cgraph_node::create_version_clone_with_body):
24819         Fix call of call_cgraph_insertion_hooks.
24821 2018-01-18  Martin Sebor  <msebor@redhat.com>
24823         * doc/invoke.texi (-Wclass-memaccess): Tweak text.
24825 2018-01-18  Jan Hubicka  <hubicka@ucw.cz>
24827         PR ipa/83619
24828         * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
24829         frequencies.
24831 2018-01-18  Boris Kolpackov  <boris@codesynthesis.com>
24833         PR other/70268
24834         * common.opt: (-ffile-prefix-map): New option.
24835         * opts.c (common_handle_option): Defer it.
24836         * opts-global.c (handle_common_deferred_options): Handle it.
24837         * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
24838         * file-prefix-map.h: New file.
24839         (remap_debug_filename, add_debug_prefix_map): ...here.
24840         (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
24841         * final.c (debug_prefix_map, add_debug_prefix_map
24842         remap_debug_filename): Move to...
24843         * file-prefix-map.c: New file.
24844         (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
24845         generalize, get rid of alloca(), use strrchr() instead of strchr().
24846         (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
24847         Implement in terms of add_prefix_map().
24848         (remap_macro_filename, remap_debug_filename): Implement in term of
24849         remap_filename().
24850         * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
24851         * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
24852         * dbxout.c: Include file-prefix-map.h.
24853         * varasm.c: Likewise.
24854         * vmsdbgout.c: Likewise.
24855         * xcoffout.c: Likewise.
24856         * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
24857         * doc/cppopts.texi (-fmacro-prefix-map): Document.
24858         * doc/invoke.texi (-ffile-prefix-map): Document.
24859         (-fdebug-prefix-map): Update description.
24861 2018-01-18  Martin Liska  <mliska@suse.cz>
24863         * config/i386/i386.c (indirect_thunk_name): Document that also
24864         lfence is emitted.
24865         (output_indirect_thunk): Document why both instructions
24866         (pause and lfence) are generated.
24868 2018-01-18  Richard Biener  <rguenther@suse.de>
24870         PR tree-optimization/83887
24871         * graphite-scop-detection.c
24872         (scop_detection::get_nearest_dom_with_single_entry): Remove.
24873         (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
24874         (scop_detection::merge_sese): Re-implement with a flood-fill
24875         algorithm that properly finds a SESE region if it exists.
24877 2018-01-18  Jakub Jelinek  <jakub@redhat.com>
24879         PR c/61240
24880         * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
24881         pointer_diff optimizations use view_convert instead of convert.
24883 2018-01-17  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
24885         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
24886         Generate different code for -mno-speculate-indirect-jumps.
24887         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
24888         (*call_indirect_aix<mode>): Disable for
24889         -mno-speculate-indirect-jumps.
24890         (*call_indirect_aix<mode>_nospec): New define_insn.
24891         (*call_value_indirect_aix<mode>): Disable for
24892         -mno-speculate-indirect-jumps.
24893         (*call_value_indirect_aix<mode>_nospec): New define_insn.
24894         (*sibcall_nonlocal_sysv<mode>): Generate different code for
24895         -mno-speculate-indirect-jumps.
24896         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
24898 2018-01-17  Michael Meissner  <meissner@linux.vnet.ibm.com>
24900         * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
24901         long double type, set the flags for noting the default long double
24902         type, even if we don't pass or return a long double type.
24904 2018-01-17  Jan Hubicka  <hubicka@ucw.cz>
24906         PR ipa/83051
24907         * ipa-inline.c (flatten_function): Do not overwrite final inlining
24908         failure.
24910 2018-01-17  Will Schmidt  <will_schmidt@vnet.ibm.com>
24912         * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
24913         support for merge[hl].
24914         (fold_mergehl_helper): New helper function.
24915         (tree-vector-builder.h): New #include for tree_vector_builder usage.
24916         * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
24917         (altivec_vmrglw_direct): Add xxmrglw insn.
24919 2018-01-17  Andrew Waterman  <andrew@sifive.com>
24921         * config/riscv/riscv.c (riscv_conditional_register_usage): If
24922         UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
24924 2018-01-17  David Malcolm  <dmalcolm@redhat.com>
24926         PR lto/83121
24927         * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
24928         call the lto_location_cache before reading the
24929         DECL_SOURCE_LOCATION of the types.
24931 2018-01-17  Wilco Dijkstra  <wdijkstr@arm.com>
24932             Richard Sandiford  <richard.sandiford@linaro.org>
24934         * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
24935         * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
24936         (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
24937         SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
24938         * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
24939         Add declaration.
24940         * config/aarch64/constraints.md (aarch64_movti_operand):
24941         Limit immediates.
24942         * config/aarch64/predicates.md (Uti): Add new constraint.
24944 2018-01-17  Carl Love  <cel@us.ibm.com>
24946         * config/rs6000/vsx.md (define_expand xl_len_r,
24947         define_expand stxvl, define_expand *stxvl): Add match_dup argument.
24948         (define_insn): Add, match_dup 1 argument to define_insn stxvll and
24949         lxvll.
24950         (define_expand, define_insn): Move the shift left from  the
24951         define_insn to the define_expand for lxvl and stxvl instructions.
24952         * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
24953         and XL_LEN_R definitions to PURE.
24955 2018-01-17  Uros Bizjak  <ubizjak@gmail.com>
24957         * config/i386/i386.c (indirect_thunk_name): Declare regno
24958         as unsigned int.  Compare regno with INVALID_REGNUM.
24959         (output_indirect_thunk): Ditto.
24960         (output_indirect_thunk_function): Ditto.
24961         (ix86_code_end): Declare regno as unsigned int.  Use INVALID_REGNUM
24962         in the call to output_indirect_thunk_function.
24964 2018-01-17  Richard Sandiford  <richard.sandiford@linaro.org>
24966         PR middle-end/83884
24967         * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
24968         rather than the size of inner_type to determine the stack slot size
24969         when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
24971 2018-01-16  Sebastian Peryt  <sebastian.peryt@intel.com>
24973         PR target/83546
24974         * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
24975         to PTA_SILVERMONT.
24977 2018-01-16  Michael Meissner  <meissner@linux.vnet.ibm.com>
24979         * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
24980         endian Linux systems to optionally enable multilibs for selecting
24981         the long double type if the user configured an explicit type.
24982         * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
24983         have no long double multilibs if not defined.
24984         * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
24985         warn if the user used -mabi={ieee,ibm}longdouble and we built
24986         multilibs for long double.
24987         * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
24988         appropriate multilib option.
24989         (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
24990         multilib options.
24991         * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
24992         for building long double multilibs.
24993         * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
24995 2018-01-16  John David Anglin  <danglin@gcc.gnu.org>
24997         * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
24998         copies.
25000         * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
25001         64 bits.
25002         * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
25003         128 bits.
25005         * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
25006         variables.
25008         * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
25009         return value.
25011 2018-01-16  Eric Botcazou  <ebotcazou@adacore.com>
25013         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
25014         ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
25016 2018-01-16  Kelvin Nilsen  <kelvin@gcc.gnu.org>
25018         * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
25019         different rtl trees depending on TARGET_64BIT.
25020         (rs6000_gen_lvx): Likewise.
25022 2018-01-16  Eric Botcazou  <ebotcazou@adacore.com>
25024         * config/visium/visium.md (nop): Tweak comment.
25025         (hazard_nop): Likewise.
25027 2018-01-16  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
25029         * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
25030         -mspeculate-indirect-jumps.
25031         * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
25032         for -mno-speculate-indirect-jumps.
25033         (*call_indirect_elfv2<mode>_nospec): New define_insn.
25034         (*call_value_indirect_elfv2<mode>): Disable for
25035         -mno-speculate-indirect-jumps.
25036         (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
25037         (indirect_jump): Emit different RTL for
25038         -mno-speculate-indirect-jumps.
25039         (*indirect_jump<mode>): Disable for
25040         -mno-speculate-indirect-jumps.
25041         (*indirect_jump<mode>_nospec): New define_insn.
25042         (tablejump): Emit different RTL for
25043         -mno-speculate-indirect-jumps.
25044         (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
25045         (tablejumpsi_nospec): New define_expand.
25046         (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
25047         (tablejumpdi_nospec): New define_expand.
25048         (*tablejump<mode>_internal1): Disable for
25049         -mno-speculate-indirect-jumps.
25050         (*tablejump<mode>_internal1_nospec): New define_insn.
25051         * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
25052         option.
25054 2018-01-16  Artyom Skrobov tyomitch@gmail.com
25056         * caller-save.c (insert_save): Drop unnecessary parameter.  All
25057         callers updated.
25059 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
25060             Richard Biener  <rguenth@suse.de>
25062         PR libgomp/83590
25063         * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
25064         return early, inline manually is_gimple_sizepos.  Make sure if we
25065         call gimplify_expr we don't end up with a gimple constant.
25066         * tree.c (variably_modified_type_p): Don't return true for
25067         is_gimple_constant (_t).  Inline manually is_gimple_sizepos.
25068         * gimplify.h (is_gimple_sizepos): Remove.
25070 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
25072         PR tree-optimization/83857
25073         * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
25074         vectorizable_live_operation for pure SLP statements.
25075         (vectorizable_live_operation): Handle PHIs.
25077 2018-01-16  Richard Biener  <rguenther@suse.de>
25079         PR tree-optimization/83867
25080         * tree-vect-stmts.c (vect_transform_stmt): Precompute
25081         nested_in_vect_loop_p since the scalar stmt may get invalidated.
25083 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
25085         PR c/83844
25086         * stor-layout.c (handle_warn_if_not_align): Use byte_position and
25087         multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
25088         If off is not INTEGER_CST, issue a may not be aligned warning
25089         rather than isn't aligned.  Use isn%'t rather than isn't.
25090         * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
25091         into MULT_EXPR.
25092         <case MULT_EXPR>: Improve the case when bottom and one of the
25093         MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
25094         operand, in that case check if the other operand is multiple of
25095         bottom divided by the INTEGER_CST operand.
25097 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
25099         PR target/83858
25100         * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
25101         * config/pa/pa-protos.h (pa_function_arg_size): Declare.
25102         * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
25103         pa_function_arg_size instead of FUNCTION_ARG_SIZE.
25104         * config/pa/pa.c (pa_function_arg_advance): Likewise.
25105         (pa_function_arg, pa_arg_partial_bytes): Likewise.
25106         (pa_function_arg_size): New function.
25108 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
25110         * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
25111         in a separate statement.
25113 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
25115         PR tree-optimization/83847
25116         * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
25117         group gathers and scatters.
25119 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
25121         PR rtl-optimization/86620
25122         * params.def (max-sched-ready-insns): Bump minimum value to 1.
25124         PR rtl-optimization/83213
25125         * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
25126         to last if both are JUMP_INSNs.
25128         PR tree-optimization/83843
25129         * gimple-ssa-store-merging.c
25130         (imm_store_chain_info::output_merged_store): Handle bit_not_p on
25131         store_immediate_info for bswap/nop orig_stores.
25133 2018-01-15  Andrew Waterman  <andrew@sifive.com>
25135         * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
25136         !TARGET_MUL.
25137         <UDIV>: Increase cost if !TARGET_DIV.
25139 2018-01-15  Segher Boessenkool  <segher@kernel.crashing.org>
25141         * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
25142         (define_attr "cr_logical_3op"): New.
25143         (cceq_ior_compare): Adjust.
25144         (cceq_ior_compare_complement): Adjust.
25145         (*cceq_rev_compare): Adjust.
25146         * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
25147         (is_cracked_insn): Adjust.
25148         (insn_must_be_first_in_group): Adjust.
25149         * config/rs6000/40x.md: Adjust.
25150         * config/rs6000/440.md: Adjust.
25151         * config/rs6000/476.md: Adjust.
25152         * config/rs6000/601.md: Adjust.
25153         * config/rs6000/603.md: Adjust.
25154         * config/rs6000/6xx.md: Adjust.
25155         * config/rs6000/7450.md: Adjust.
25156         * config/rs6000/7xx.md: Adjust.
25157         * config/rs6000/8540.md: Adjust.
25158         * config/rs6000/cell.md: Adjust.
25159         * config/rs6000/e300c2c3.md: Adjust.
25160         * config/rs6000/e500mc.md: Adjust.
25161         * config/rs6000/e500mc64.md: Adjust.
25162         * config/rs6000/e5500.md: Adjust.
25163         * config/rs6000/e6500.md: Adjust.
25164         * config/rs6000/mpc.md: Adjust.
25165         * config/rs6000/power4.md: Adjust.
25166         * config/rs6000/power5.md: Adjust.
25167         * config/rs6000/power6.md: Adjust.
25168         * config/rs6000/power7.md: Adjust.
25169         * config/rs6000/power8.md: Adjust.
25170         * config/rs6000/power9.md: Adjust.
25171         * config/rs6000/rs64.md: Adjust.
25172         * config/rs6000/titan.md: Adjust.
25174 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
25176         * config/i386/predicates.md (indirect_branch_operand): Rewrite
25177         ix86_indirect_branch_register logic.
25179 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
25181         * config/i386/constraints.md (Bs): Update
25182         ix86_indirect_branch_register check.  Don't check
25183         ix86_indirect_branch_register with GOT_memory_operand.
25184         (Bw): Likewise.
25185         * config/i386/predicates.md (GOT_memory_operand): Don't check
25186         ix86_indirect_branch_register here.
25187         (GOT32_symbol_operand): Likewise.
25189 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
25191         * config/i386/predicates.md (constant_call_address_operand):
25192         Rewrite ix86_indirect_branch_register logic.
25193         (sibcall_insn_operand): Likewise.
25195 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
25197         * config/i386/constraints.md (Bs): Replace
25198         ix86_indirect_branch_thunk_register with
25199         ix86_indirect_branch_register.
25200         (Bw): Likewise.
25201         * config/i386/i386.md (indirect_jump): Likewise.
25202         (tablejump): Likewise.
25203         (*sibcall_memory): Likewise.
25204         (*sibcall_value_memory): Likewise.
25205         Peepholes of indirect call and jump via memory: Likewise.
25206         * config/i386/i386.opt: Likewise.
25207         * config/i386/predicates.md (indirect_branch_operand): Likewise.
25208         (GOT_memory_operand): Likewise.
25209         (call_insn_operand): Likewise.
25210         (sibcall_insn_operand): Likewise.
25211         (GOT32_symbol_operand): Likewise.
25213 2018-01-15  Jakub Jelinek  <jakub@redhat.com>
25215         PR middle-end/83837
25216         * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
25217         type rather than type addr's type points to.
25218         (expand_omp_atomic_mutex): Likewise.
25219         (expand_omp_atomic): Likewise.
25221 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
25223         PR target/83839
25224         * config/i386/i386.c (output_indirect_thunk_function): Use
25225         ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
25226         for  __x86_return_thunk.
25228 2018-01-15  Richard Biener  <rguenther@suse.de>
25230         PR middle-end/83850
25231         * expmed.c (extract_bit_field_1): Fix typo.
25233 2018-01-15  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
25235         PR target/83687
25236         * config/arm/iterators.md (VF): New mode iterator.
25237         * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
25238         Remove integer-related logic from pattern.
25239         (neon_vabd<mode>_3): Likewise.
25241 2018-01-15  Jakub Jelinek  <jakub@redhat.com>
25243         PR middle-end/82694
25244         * common.opt (fstrict-overflow): No longer an alias.
25245         (fwrapv-pointer): New option.
25246         * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
25247         also for pointer types based on flag_wrapv_pointer.
25248         * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
25249         opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
25250         opts->x_flag_wrapv got set.
25251         * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
25252         changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
25253         POINTER_TYPE_OVERFLOW_UNDEFINED.
25254         * match.pd: Likewise in address comparison pattern.
25255         * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
25257 2018-01-15  Richard Biener  <rguenther@suse.de>
25259         PR lto/83804
25260         * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
25261         from TYPE_FIELDS.  Free TYPE_BINFO if not used by devirtualization.
25262         Reset type names to their identifier if their TYPE_DECL doesn't
25263         have linkage (and thus is used for ODR and devirt).
25264         (save_debug_info_for_decl): Remove.
25265         (save_debug_info_for_type): Likewise.
25266         (add_tree_to_fld_list): Adjust.
25267         * tree-pretty-print.c (dump_generic_node): Make dumping of
25268         type names more robust.
25270 2018-01-15  Richard Biener  <rguenther@suse.de>
25272         * BASE-VER: Bump to 8.0.1.
25274 2018-01-14  Martin Sebor  <msebor@redhat.com>
25276         PR other/83508
25277         * builtins.c (check_access): Avoid warning when the no-warning bit
25278         is set.
25280 2018-01-14  Cory Fields  <cory-nospam-@coryfields.com>
25282         * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
25283         * ira-color (allocno_hard_regs_compare): Likewise.
25285 2018-01-14  Nathan Rossi  <nathan@nathanrossi.com>
25287         PR target/83013
25288         * config/microblaze/microblaze.c (microblaze_asm_output_ident):
25289         Use .pushsection/.popsection.
25291 2018-01-14  Martin Sebor  <msebor@redhat.com>
25293         PR c++/81327
25294         * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
25296 2018-01-14  Jakub Jelinek  <jakub@redhat.com>
25298         * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
25299         entry from extra_headers.
25300         (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
25301         extra_headers, make the list bitwise identical to the i?86-*-* one.
25303 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
25305         * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
25306         -mcmodel=large with -mindirect-branch=thunk,
25307         -mindirect-branch=thunk-extern, -mfunction-return=thunk and
25308         -mfunction-return=thunk-extern.
25309         * doc/invoke.texi: Document -mcmodel=large is incompatible with
25310         -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
25311         -mfunction-return=thunk and -mfunction-return=thunk-extern.
25313 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
25315         * config/i386/i386.c (print_reg): Print the name of the full
25316         integer register without '%'.
25317         (ix86_print_operand): Handle 'V'.
25318         * doc/extend.texi: Document 'V' modifier.
25320 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
25322         * config/i386/constraints.md (Bs): Disallow memory operand for
25323         -mindirect-branch-register.
25324         (Bw): Likewise.
25325         * config/i386/predicates.md (indirect_branch_operand): Likewise.
25326         (GOT_memory_operand): Likewise.
25327         (call_insn_operand): Likewise.
25328         (sibcall_insn_operand): Likewise.
25329         (GOT32_symbol_operand): Likewise.
25330         * config/i386/i386.md (indirect_jump): Call convert_memory_address
25331         for -mindirect-branch-register.
25332         (tablejump): Likewise.
25333         (*sibcall_memory): Likewise.
25334         (*sibcall_value_memory): Likewise.
25335         Disallow peepholes of indirect call and jump via memory for
25336         -mindirect-branch-register.
25337         (*call_pop): Replace m with Bw.
25338         (*call_value_pop): Likewise.
25339         (*sibcall_pop_memory): Replace m with Bs.
25340         * config/i386/i386.opt (mindirect-branch-register): New option.
25341         * doc/invoke.texi: Document -mindirect-branch-register option.
25343 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
25345         * config/i386/i386-protos.h (ix86_output_function_return): New.
25346         * config/i386/i386.c (ix86_set_indirect_branch_type): Also
25347         set function_return_type.
25348         (indirect_thunk_name): Add ret_p to indicate thunk for function
25349         return.
25350         (output_indirect_thunk_function): Pass false to
25351         indirect_thunk_name.
25352         (ix86_output_indirect_branch_via_reg): Likewise.
25353         (ix86_output_indirect_branch_via_push): Likewise.
25354         (output_indirect_thunk_function): Create alias for function
25355         return thunk if regno < 0.
25356         (ix86_output_function_return): New function.
25357         (ix86_handle_fndecl_attribute): Handle function_return.
25358         (ix86_attribute_table): Add function_return.
25359         * config/i386/i386.h (machine_function): Add
25360         function_return_type.
25361         * config/i386/i386.md (simple_return_internal): Use
25362         ix86_output_function_return.
25363         (simple_return_internal_long): Likewise.
25364         * config/i386/i386.opt (mfunction-return=): New option.
25365         (indirect_branch): Mention -mfunction-return=.
25366         * doc/extend.texi: Document function_return function attribute.
25367         * doc/invoke.texi: Document -mfunction-return= option.
25369 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
25371         * config/i386/i386-opts.h (indirect_branch): New.
25372         * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
25373         * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
25374         with local indirect jump when converting indirect call and jump.
25375         (ix86_set_indirect_branch_type): New.
25376         (ix86_set_current_function): Call ix86_set_indirect_branch_type.
25377         (indirectlabelno): New.
25378         (indirect_thunk_needed): Likewise.
25379         (indirect_thunk_bnd_needed): Likewise.
25380         (indirect_thunks_used): Likewise.
25381         (indirect_thunks_bnd_used): Likewise.
25382         (INDIRECT_LABEL): Likewise.
25383         (indirect_thunk_name): Likewise.
25384         (output_indirect_thunk): Likewise.
25385         (output_indirect_thunk_function): Likewise.
25386         (ix86_output_indirect_branch_via_reg): Likewise.
25387         (ix86_output_indirect_branch_via_push): Likewise.
25388         (ix86_output_indirect_branch): Likewise.
25389         (ix86_output_indirect_jmp): Likewise.
25390         (ix86_code_end): Call output_indirect_thunk_function if needed.
25391         (ix86_output_call_insn): Call ix86_output_indirect_branch if
25392         needed.
25393         (ix86_handle_fndecl_attribute): Handle indirect_branch.
25394         (ix86_attribute_table): Add indirect_branch.
25395         * config/i386/i386.h (machine_function): Add indirect_branch_type
25396         and has_local_indirect_jump.
25397         * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
25398         to true.
25399         (tablejump): Likewise.
25400         (*indirect_jump): Use ix86_output_indirect_jmp.
25401         (*tablejump_1): Likewise.
25402         (simple_return_indirect_internal): Likewise.
25403         * config/i386/i386.opt (mindirect-branch=): New option.
25404         (indirect_branch): New.
25405         (keep): Likewise.
25406         (thunk): Likewise.
25407         (thunk-inline): Likewise.
25408         (thunk-extern): Likewise.
25409         * doc/extend.texi: Document indirect_branch function attribute.
25410         * doc/invoke.texi: Document -mindirect-branch= option.
25412 2018-01-14  Jan Hubicka  <hubicka@ucw.cz>
25414         PR ipa/83051
25415         * ipa-inline.c (edge_badness): Tolerate roundoff errors.
25417 2018-01-14  Richard Sandiford  <richard.sandiford@linaro.org>
25419         * ipa-inline.c (want_inline_small_function_p): Return false if
25420         inlining has already failed with CIF_FINAL_ERROR.
25421         (update_caller_keys): Call want_inline_small_function_p before
25422         can_inline_edge_p.
25423         (update_callee_keys): Likewise.
25425 2018-01-10  Kelvin Nilsen  <kelvin@gcc.gnu.org>
25427         * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
25428         New function.
25429         (rs6000_quadword_masked_address_p): Likewise.
25430         (quad_aligned_load_p): Likewise.
25431         (quad_aligned_store_p): Likewise.
25432         (const_load_sequence_p): Add comment to describe the outer-most loop.
25433         (mimic_memory_attributes_and_flags): New function.
25434         (rs6000_gen_stvx): Likewise.
25435         (replace_swapped_aligned_store): Likewise.
25436         (rs6000_gen_lvx): Likewise.
25437         (replace_swapped_aligned_load): Likewise.
25438         (replace_swapped_load_constant): Capitalize argument name in
25439         comment describing this function.
25440         (rs6000_analyze_swaps): Add a third pass to search for vector loads
25441         and stores that access quad-word aligned addresses and replace
25442         with stvx or lvx instructions when appropriate.
25443         * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
25444         New function prototype.
25445         (rs6000_quadword_masked_address_p): Likewise.
25446         (rs6000_gen_lvx): Likewise.
25447         (rs6000_gen_stvx): Likewise.
25448         * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
25449         VSX_D (V2DF, V2DI), modify this split to select lvx instruction
25450         when memory address is aligned.
25451         (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
25452         this split to select lvx instruction when memory address is aligned.
25453         (*vsx_le_perm_load_v8hi): Modify this split to select lvx
25454         instruction when memory address is aligned.
25455         (*vsx_le_perm_load_v16qi): Likewise.
25456         (four unnamed splitters): Modify to select the stvx instruction
25457         when memory is aligned.
25459 2018-01-13  Jan Hubicka  <hubicka@ucw.cz>
25461         * predict.c (determine_unlikely_bbs): Handle correctly BBs
25462         which appears in the queue multiple times.
25464 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
25465             Alan Hayward  <alan.hayward@arm.com>
25466             David Sherwood  <david.sherwood@arm.com>
25468         * tree-vectorizer.h (vec_lower_bound): New structure.
25469         (_loop_vec_info): Add check_nonzero and lower_bounds.
25470         (LOOP_VINFO_CHECK_NONZERO): New macro.
25471         (LOOP_VINFO_LOWER_BOUNDS): Likewise.
25472         (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
25473         * tree-data-ref.h (dr_with_seg_len): Add access_size and align
25474         fields.  Make seg_len the distance travelled, not including the
25475         access size.
25476         (dr_direction_indicator): Declare.
25477         (dr_zero_step_indicator): Likewise.
25478         (dr_known_forward_stride_p): Likewise.
25479         * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
25480         tree-ssanames.h.
25481         (runtime_alias_check_p): Allow runtime alias checks with
25482         variable strides.
25483         (operator ==): Compare access_size and align.
25484         (prune_runtime_alias_test_list): Rework for new distinction between
25485         the access_size and seg_len.
25486         (create_intersect_range_checks_index): Likewise.  Cope with polynomial
25487         segment lengths.
25488         (get_segment_min_max): New function.
25489         (create_intersect_range_checks): Use it.
25490         (dr_step_indicator): New function.
25491         (dr_direction_indicator): Likewise.
25492         (dr_zero_step_indicator): Likewise.
25493         (dr_known_forward_stride_p): Likewise.
25494         * tree-loop-distribution.c (data_ref_segment_size): Return
25495         DR_STEP * (niters - 1).
25496         (compute_alias_check_pairs): Update call to the dr_with_seg_len
25497         constructor.
25498         * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
25499         (vect_preserves_scalar_order_p): New function, split out from...
25500         (vect_analyze_data_ref_dependence): ...here.  Check for zero steps.
25501         (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
25502         (vect_vfa_access_size): New function.
25503         (vect_vfa_align): Likewise.
25504         (vect_compile_time_alias): Take access_size_a and access_b arguments.
25505         (dump_lower_bound): New function.
25506         (vect_check_lower_bound): Likewise.
25507         (vect_small_gap_p): Likewise.
25508         (vectorizable_with_step_bound_p): Likewise.
25509         (vect_prune_runtime_alias_test_list): Ignore cross-iteration
25510         depencies if the vectorization factor is 1.  Convert the checks
25511         for nonzero steps into checks on the bounds of DR_STEP.  Try using
25512         a bunds check for variable steps if the minimum required step is
25513         relatively small. Update calls to the dr_with_seg_len
25514         constructor and to vect_compile_time_alias.
25515         * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
25516         function.
25517         (vect_loop_versioning): Call it.
25518         * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
25519         when retrying.
25520         (vect_estimate_min_profitable_iters): Account for any bounds checks.
25522 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
25523             Alan Hayward  <alan.hayward@arm.com>
25524             David Sherwood  <david.sherwood@arm.com>
25526         * doc/sourcebuild.texi (vect_scatter_store): Document.
25527         * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
25528         optabs.
25529         * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
25530         Document.
25531         * genopinit.c (main): Add supports_vec_scatter_store and
25532         supports_vec_scatter_store_cached to target_optabs.
25533         * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
25534         IFN_MASK_SCATTER_STORE.
25535         * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
25536         functions.
25537         * internal-fn.h (internal_store_fn_p): Declare.
25538         (internal_fn_stored_value_index): Likewise.
25539         * internal-fn.c (scatter_store_direct): New macro.
25540         (expand_scatter_store_optab_fn): New function.
25541         (direct_scatter_store_optab_supported_p): New macro.
25542         (internal_store_fn_p): New function.
25543         (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
25544         IFN_MASK_SCATTER_STORE.
25545         (internal_fn_mask_index): Likewise.
25546         (internal_fn_stored_value_index): New function.
25547         (internal_gather_scatter_fn_supported_p): Adjust operand numbers
25548         for scatter stores.
25549         * optabs-query.h (supports_vec_scatter_store_p): Declare.
25550         * optabs-query.c (supports_vec_scatter_store_p): New function.
25551         * tree-vectorizer.h (vect_get_store_rhs): Declare.
25552         * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
25553         true for scatter stores.
25554         (vect_gather_scatter_fn_p): Handle scatter stores too.
25555         (vect_check_gather_scatter): Consider using scatter stores if
25556         supports_vec_scatter_store_p.
25557         * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
25558         scatter stores too.
25559         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
25560         internal_fn_stored_value_index.
25561         (check_load_store_masking): Handle scatter stores too.
25562         (vect_get_store_rhs): Make public.
25563         (vectorizable_call): Use internal_store_fn_p.
25564         (vectorizable_store): Handle scatter store internal functions.
25565         (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
25566         when deciding whether the end of the group has been reached.
25567         * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
25568         * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
25569         (mask_scatter_store<mode>): New insns.
25571 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
25572             Alan Hayward  <alan.hayward@arm.com>
25573             David Sherwood  <david.sherwood@arm.com>
25575         * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
25576         * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
25577         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
25578         function.
25579         (vect_use_strided_gather_scatters_p): Take a masked_p argument.
25580         Use vect_truncate_gather_scatter_offset if we can't treat the
25581         operation as a normal gather load or scatter store.
25582         (get_group_load_store_type): Take the gather_scatter_info
25583         as argument.  Try using a gather load or scatter store for
25584         single-element groups.
25585         (get_load_store_type): Update calls to get_group_load_store_type
25586         and vect_use_strided_gather_scatters_p.
25588 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
25589             Alan Hayward  <alan.hayward@arm.com>
25590             David Sherwood  <david.sherwood@arm.com>
25592         * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
25593         optional tree argument.
25594         * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
25595         null target hooks.
25596         (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
25597         but continue to use the current value as a fallback.
25598         (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
25599         to compare the updates.
25600         * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
25601         (get_load_store_type): Use it when handling a strided access.
25602         (vect_get_strided_load_store_ops): New function.
25603         (vect_get_data_ptr_increment): Likewise.
25604         (vectorizable_load): Handle strided gather loads.  Always pass
25605         a step to vect_create_data_ref_ptr and bump_vector_ptr.
25607 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
25608             Alan Hayward  <alan.hayward@arm.com>
25609             David Sherwood  <david.sherwood@arm.com>
25611         * doc/md.texi (gather_load@var{m}): Document.
25612         (mask_gather_load@var{m}): Likewise.
25613         * genopinit.c (main): Add supports_vec_gather_load and
25614         supports_vec_gather_load_cached to target_optabs.
25615         * optabs-tree.c (init_tree_optimization_optabs): Use
25616         ggc_cleared_alloc to allocate target_optabs.
25617         * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
25618         * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
25619         functions.
25620         * internal-fn.h (internal_load_fn_p): Declare.
25621         (internal_gather_scatter_fn_p): Likewise.
25622         (internal_fn_mask_index): Likewise.
25623         (internal_gather_scatter_fn_supported_p): Likewise.
25624         * internal-fn.c (gather_load_direct): New macro.
25625         (expand_gather_load_optab_fn): New function.
25626         (direct_gather_load_optab_supported_p): New macro.
25627         (direct_internal_fn_optab): New function.
25628         (internal_load_fn_p): Likewise.
25629         (internal_gather_scatter_fn_p): Likewise.
25630         (internal_fn_mask_index): Likewise.
25631         (internal_gather_scatter_fn_supported_p): Likewise.
25632         * optabs-query.c (supports_at_least_one_mode_p): New function.
25633         (supports_vec_gather_load_p): Likewise.
25634         * optabs-query.h (supports_vec_gather_load_p): Declare.
25635         * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
25636         and memory_type field.
25637         (NUM_PATTERNS): Bump to 15.
25638         * tree-vect-data-refs.c: Include internal-fn.h.
25639         (vect_gather_scatter_fn_p): New function.
25640         (vect_describe_gather_scatter_call): Likewise.
25641         (vect_check_gather_scatter): Try using internal functions for
25642         gather loads.  Recognize existing calls to a gather load function.
25643         (vect_analyze_data_refs): Consider using gather loads if
25644         supports_vec_gather_load_p.
25645         * tree-vect-patterns.c (vect_get_load_store_mask): New function.
25646         (vect_get_gather_scatter_offset_type): Likewise.
25647         (vect_convert_mask_for_vectype): Likewise.
25648         (vect_add_conversion_to_patterm): Likewise.
25649         (vect_try_gather_scatter_pattern): Likewise.
25650         (vect_recog_gather_scatter_pattern): New pattern recognizer.
25651         (vect_vect_recog_func_ptrs): Add it.
25652         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
25653         internal_fn_mask_index and internal_gather_scatter_fn_p.
25654         (check_load_store_masking): Take the gather_scatter_info as an
25655         argument and handle gather loads.
25656         (vect_get_gather_scatter_ops): New function.
25657         (vectorizable_call): Check internal_load_fn_p.
25658         (vectorizable_load): Likewise.  Handle gather load internal
25659         functions.
25660         (vectorizable_store): Update call to check_load_store_masking.
25661         * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
25662         * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
25663         * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
25664         (aarch64_gather_scale_operand_d): New predicates.
25665         * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
25666         (mask_gather_load<mode>): New insns.
25668 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
25669             Alan Hayward  <alan.hayward@arm.com>
25670             David Sherwood  <david.sherwood@arm.com>
25672         * optabs.def (fold_left_plus_optab): New optab.
25673         * doc/md.texi (fold_left_plus_@var{m}): Document.
25674         * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
25675         * internal-fn.c (fold_left_direct): Define.
25676         (expand_fold_left_optab_fn): Likewise.
25677         (direct_fold_left_optab_supported_p): Likewise.
25678         * fold-const-call.c (fold_const_fold_left): New function.
25679         (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
25680         * tree-parloops.c (valid_reduction_p): New function.
25681         (gather_scalar_reductions): Use it.
25682         * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
25683         (vect_finish_replace_stmt): Declare.
25684         * tree-vect-loop.c (fold_left_reduction_fn): New function.
25685         (needs_fold_left_reduction_p): New function, split out from...
25686         (vect_is_simple_reduction): ...here.  Accept reductions that
25687         forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
25688         (vect_force_simple_reduction): Also store the reduction type in
25689         the assignment's STMT_VINFO_REDUC_TYPE.
25690         (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
25691         (merge_with_identity): New function.
25692         (vect_expand_fold_left): Likewise.
25693         (vectorize_fold_left_reduction): Likewise.
25694         (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION.  Leave the
25695         scalar phi in place for it.  Check for target support and reject
25696         cases that would reassociate the operation.  Defer the transform
25697         phase to vectorize_fold_left_reduction.
25698         * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
25699         * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
25700         (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
25702 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
25704         * tree-if-conv.c (predicate_mem_writes): Remove redundant
25705         call to ifc_temp_var.
25707 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
25708             Alan Hayward  <alan.hayward@arm.com>
25709             David Sherwood  <david.sherwood@arm.com>
25711         * target.def (legitimize_address_displacement): Take the original
25712         offset as a poly_int.
25713         * targhooks.h (default_legitimize_address_displacement): Update
25714         accordingly.
25715         * targhooks.c (default_legitimize_address_displacement): Likewise.
25716         * doc/tm.texi: Regenerate.
25717         * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
25718         as an argument, moving assert of ad->disp == ad->disp_term to...
25719         (process_address_1): ...here.  Update calls to base_plus_disp_to_reg.
25720         Try calling targetm.legitimize_address_displacement before expanding
25721         the address rather than afterwards, and adjust for the new interface.
25722         * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
25723         Match the new hook interface.  Handle SVE addresses.
25724         * config/sh/sh.c (sh_legitimize_address_displacement): Make the
25725         new hook interface.
25727 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
25729         * Makefile.in (OBJS): Add early-remat.o.
25730         * target.def (select_early_remat_modes): New hook.
25731         * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
25732         * doc/tm.texi: Regenerate.
25733         * targhooks.h (default_select_early_remat_modes): Declare.
25734         * targhooks.c (default_select_early_remat_modes): New function.
25735         * timevar.def (TV_EARLY_REMAT): New timevar.
25736         * passes.def (pass_early_remat): New pass.
25737         * tree-pass.h (make_pass_early_remat): Declare.
25738         * early-remat.c: New file.
25739         * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
25740         function.
25741         (TARGET_SELECT_EARLY_REMAT_MODES): Define.
25743 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
25744             Alan Hayward  <alan.hayward@arm.com>
25745             David Sherwood  <david.sherwood@arm.com>
25747         * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
25748         vfm1 with a bound_epilog parameter.
25749         (vect_do_peeling): Update calls accordingly, and move the prologue
25750         call earlier in the function.  Treat the base bound_epilog as 0 for
25751         fully-masked loops and retain vf - 1 for other loops.  Add 1 to
25752         this base when peeling for gaps.
25753         * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
25754         with fully-masked loops.
25755         (vect_estimate_min_profitable_iters): Handle the single peeled
25756         iteration in that case.
25758 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
25759             Alan Hayward  <alan.hayward@arm.com>
25760             David Sherwood  <david.sherwood@arm.com>
25762         * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
25763         single-element interleaving even if the size is not a power of 2.
25764         * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
25765         accesses for single-element interleaving if the group size is
25766         not a power of 2.
25768 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
25769             Alan Hayward  <alan.hayward@arm.com>
25770             David Sherwood  <david.sherwood@arm.com>
25772         * doc/md.texi (fold_extract_last_@var{m}): Document.
25773         * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
25774         * optabs.def (fold_extract_last_optab): New optab.
25775         * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
25776         * internal-fn.c (fold_extract_direct): New macro.
25777         (expand_fold_extract_optab_fn): Likewise.
25778         (direct_fold_extract_optab_supported_p): Likewise.
25779         * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
25780         * tree-vect-loop.c (vect_model_reduction_cost): Handle
25781         EXTRACT_LAST_REDUCTION.
25782         (get_initial_def_for_reduction): Do not create an initial vector
25783         for EXTRACT_LAST_REDUCTION reductions.
25784         (vectorizable_reduction): Leave the scalar phi in place for
25785         EXTRACT_LAST_REDUCTIONs.  Try using EXTRACT_LAST_REDUCTION
25786         ahead of INTEGER_INDUC_COND_REDUCTION.  Do not check for an
25787         epilogue code for EXTRACT_LAST_REDUCTION and defer the
25788         transform phase to vectorizable_condition.
25789         * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
25790         split out from...
25791         (vect_finish_stmt_generation): ...here.
25792         (vect_finish_replace_stmt): New function.
25793         (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
25794         * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
25795         pattern.
25796         * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
25798 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
25799             Alan Hayward  <alan.hayward@arm.com>
25800             David Sherwood  <david.sherwood@arm.com>
25802         * doc/md.texi (extract_last_@var{m}): Document.
25803         * optabs.def (extract_last_optab): New optab.
25804         * internal-fn.def (EXTRACT_LAST): New internal function.
25805         * internal-fn.c (cond_unary_direct): New macro.
25806         (expand_cond_unary_optab_fn): Likewise.
25807         (direct_cond_unary_optab_supported_p): Likewise.
25808         * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
25809         loops using EXTRACT_LAST.
25810         * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
25811         (extract_last_<mode>): ...this optab.
25812         (vec_extract<mode><Vel>): Update accordingly.
25814 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
25815             Alan Hayward  <alan.hayward@arm.com>
25816             David Sherwood  <david.sherwood@arm.com>
25818         * target.def (empty_mask_is_expensive): New hook.
25819         * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
25820         * doc/tm.texi: Regenerate.
25821         * targhooks.h (default_empty_mask_is_expensive): Declare.
25822         * targhooks.c (default_empty_mask_is_expensive): New function.
25823         * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
25824         if the target says that empty masks are expensive.
25825         * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
25826         New function.
25827         (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
25829 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
25830             Alan Hayward  <alan.hayward@arm.com>
25831             David Sherwood  <david.sherwood@arm.com>
25833         * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
25834         (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
25835         (vect_use_loop_mask_for_alignment_p): New function.
25836         (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
25837         * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
25838         niters_skip argument.  Make sure that the first niters_skip elements
25839         of the first iteration are inactive.
25840         (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
25841         Update call to vect_set_loop_masks_directly.
25842         (get_misalign_in_elems): New function, split out from...
25843         (vect_gen_prolog_loop_niters): ...here.
25844         (vect_update_init_of_dr): Take a code argument that specifies whether
25845         the adjustment should be added or subtracted.
25846         (vect_update_init_of_drs): Likewise.
25847         (vect_prepare_for_masked_peels): New function.
25848         (vect_do_peeling): Skip prologue peeling if we're using a mask
25849         instead.  Update call to vect_update_inits_of_drs.
25850         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
25851         mask_skip_niters.
25852         (vect_analyze_loop_2): Allow fully-masked loops with peeling for
25853         alignment.  Do not include the number of peeled iterations in
25854         the minimum threshold in that case.
25855         (vectorizable_induction): Adjust the start value down by
25856         LOOP_VINFO_MASK_SKIP_NITERS iterations.
25857         (vect_transform_loop): Call vect_prepare_for_masked_peels.
25858         Take the number of skipped iterations into account when calculating
25859         the loop bounds.
25860         * tree-vect-stmts.c (vect_gen_while_not): New function.
25862 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
25863             Alan Hayward  <alan.hayward@arm.com>
25864             David Sherwood  <david.sherwood@arm.com>
25866         * doc/sourcebuild.texi (vect_fully_masked): Document.
25867         * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
25868         default value to 0.
25869         * tree-vect-loop.c (vect_analyze_loop_costing): New function,
25870         split out from...
25871         (vect_analyze_loop_2): ...here. Don't check the vectorization
25872         factor against the number of loop iterations if the loop is
25873         fully-masked.
25875 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
25876             Alan Hayward  <alan.hayward@arm.com>
25877             David Sherwood  <david.sherwood@arm.com>
25879         * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
25880         (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
25881         (dump_groups): Update accordingly.
25882         (iv_use::mem_type): New member variable.
25883         (address_p): New function.
25884         (record_use): Add a mem_type argument and initialize the new
25885         mem_type field.
25886         (record_group_use): Add a mem_type argument.  Use address_p.
25887         Remove obsolete null checks of base_object.  Update call to record_use.
25888         (find_interesting_uses_op): Update call to record_group_use.
25889         (find_interesting_uses_cond): Likewise.
25890         (find_interesting_uses_address): Likewise.
25891         (get_mem_type_for_internal_fn): New function.
25892         (find_address_like_use): Likewise.
25893         (find_interesting_uses_stmt): Try find_address_like_use before
25894         calling find_interesting_uses_op.
25895         (addr_offset_valid_p): Use the iv mem_type field as the type
25896         of the addressed memory.
25897         (add_autoinc_candidates): Likewise.
25898         (get_address_cost): Likewise.
25899         (split_small_address_groups_p): Use address_p.
25900         (split_address_groups): Likewise.
25901         (add_iv_candidate_for_use): Likewise.
25902         (autoinc_possible_for_pair): Likewise.
25903         (rewrite_groups): Likewise.
25904         (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
25905         (determine_group_iv_cost): Update after split of USE_ADDRESS.
25906         (get_alias_ptr_type_for_ptr_address): New function.
25907         (rewrite_use_address): Rewrite address uses in calls that were
25908         identified by find_address_like_use.
25910 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
25911             Alan Hayward  <alan.hayward@arm.com>
25912             David Sherwood  <david.sherwood@arm.com>
25914         * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
25915         TARGET_MEM_REFs.
25916         * gimple-expr.h (is_gimple_addressable: Likewise.
25917         * gimple-expr.c (is_gimple_address): Likewise.
25918         * internal-fn.c (expand_call_mem_ref): New function.
25919         (expand_mask_load_optab_fn): Use it.
25920         (expand_mask_store_optab_fn): Likewise.
25922 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
25923             Alan Hayward  <alan.hayward@arm.com>
25924             David Sherwood  <david.sherwood@arm.com>
25926         * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
25927         (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
25928         (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
25929         (cond_umax@var{mode}): Document.
25930         * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
25931         (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
25932         (cond_umin_optab, cond_umax_optab): New optabs.
25933         * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
25934         (COND_IOR, COND_XOR): New internal functions.
25935         * internal-fn.h (get_conditional_internal_fn): Declare.
25936         * internal-fn.c (cond_binary_direct): New macro.
25937         (expand_cond_binary_optab_fn): Likewise.
25938         (direct_cond_binary_optab_supported_p): Likewise.
25939         (get_conditional_internal_fn): New function.
25940         * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
25941         Cope with reduction statements that are vectorized as calls rather
25942         than assignments.
25943         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
25944         * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
25945         (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
25946         (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
25947         (UNSPEC_COND_EOR): New unspecs.
25948         (optab): Add mappings for them.
25949         (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
25950         (sve_int_op, sve_fp_op): New int attributes.
25952 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
25953             Alan Hayward  <alan.hayward@arm.com>
25954             David Sherwood  <david.sherwood@arm.com>
25956         * optabs.def (while_ult_optab): New optab.
25957         * doc/md.texi (while_ult@var{m}@var{n}): Document.
25958         * internal-fn.def (WHILE_ULT): New internal function.
25959         * internal-fn.h (direct_internal_fn_supported_p): New override
25960         that takes two types as argument.
25961         * internal-fn.c (while_direct): New macro.
25962         (expand_while_optab_fn): New function.
25963         (convert_optab_supported_p): Likewise.
25964         (direct_while_optab_supported_p): New macro.
25965         * wide-int.h (wi::udiv_ceil): New function.
25966         * tree-vectorizer.h (rgroup_masks): New structure.
25967         (vec_loop_masks): New typedef.
25968         (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
25969         and fully_masked_p.
25970         (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
25971         (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
25972         (vect_max_vf): New function.
25973         (slpeel_make_loop_iterate_ntimes): Delete.
25974         (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
25975         (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
25976         (vect_record_loop_mask, vect_get_loop_mask): Likewise.
25977         * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
25978         internal-fn.h, stor-layout.h and optabs-query.h.
25979         (vect_set_loop_mask): New function.
25980         (add_preheader_seq): Likewise.
25981         (add_header_seq): Likewise.
25982         (interleave_supported_p): Likewise.
25983         (vect_maybe_permute_loop_masks): Likewise.
25984         (vect_set_loop_masks_directly): Likewise.
25985         (vect_set_loop_condition_masked): Likewise.
25986         (vect_set_loop_condition_unmasked): New function, split out from
25987         slpeel_make_loop_iterate_ntimes.
25988         (slpeel_make_loop_iterate_ntimes): Rename to..
25989         (vect_set_loop_condition): ...this.  Use vect_set_loop_condition_masked
25990         for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
25991         (vect_do_peeling): Update call accordingly.
25992         (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
25993         loops.
25994         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
25995         mask_compare_type, can_fully_mask_p and fully_masked_p.
25996         (release_vec_loop_masks): New function.
25997         (_loop_vec_info): Use it to free the loop masks.
25998         (can_produce_all_loop_masks_p): New function.
25999         (vect_get_max_nscalars_per_iter): Likewise.
26000         (vect_verify_full_masking): Likewise.
26001         (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
26002         retries, and free the mask rgroups before retrying.  Check loop-wide
26003         reasons for disallowing fully-masked loops.  Make the final decision
26004         about whether use a fully-masked loop or not.
26005         (vect_estimate_min_profitable_iters): Do not assume that peeling
26006         for the number of iterations will be needed for fully-masked loops.
26007         (vectorizable_reduction): Disable fully-masked loops.
26008         (vectorizable_live_operation): Likewise.
26009         (vect_halve_mask_nunits): New function.
26010         (vect_double_mask_nunits): Likewise.
26011         (vect_record_loop_mask): Likewise.
26012         (vect_get_loop_mask): Likewise.
26013         (vect_transform_loop): Handle the case in which the final loop
26014         iteration might handle a partial vector.  Call vect_set_loop_condition
26015         instead of slpeel_make_loop_iterate_ntimes.
26016         * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
26017         (check_load_store_masking): New function.
26018         (prepare_load_store_mask): Likewise.
26019         (vectorizable_store): Handle fully-masked loops.
26020         (vectorizable_load): Likewise.
26021         (supportable_widening_operation): Use vect_halve_mask_nunits for
26022         booleans.
26023         (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
26024         (vect_gen_while): New function.
26025         * config/aarch64/aarch64.md (umax<mode>3): New expander.
26026         (aarch64_uqdec<mode>): New insn.
26028 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
26029             Alan Hayward  <alan.hayward@arm.com>
26030             David Sherwood  <david.sherwood@arm.com>
26032         * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
26033         (reduc_xor_scal_optab): New optabs.
26034         * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
26035         (reduc_xor_scal_@var{m}): Document.
26036         * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
26037         * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
26038         internal functions.
26039         * fold-const-call.c (fold_const_call): Handle them.
26040         * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
26041         internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
26042         * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
26043         (*reduc_<bit_reduc>_scal_<mode>): New patterns.
26044         * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
26045         (UNSPEC_XORV): New unspecs.
26046         (optab): Add entries for them.
26047         (BITWISEV): New int iterator.
26048         (bit_reduc_op): New int attributes.
26050 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
26051             Alan Hayward  <alan.hayward@arm.com>
26052             David Sherwood  <david.sherwood@arm.com>
26054         * doc/md.texi (vec_shl_insert_@var{m}): New optab.
26055         * internal-fn.def (VEC_SHL_INSERT): New internal function.
26056         * optabs.def (vec_shl_insert_optab): New optab.
26057         * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
26058         (duplicate_and_interleave): Likewise.
26059         * tree-vect-loop.c: Include internal-fn.h.
26060         (neutral_op_for_slp_reduction): New function, split out from
26061         get_initial_defs_for_reduction.
26062         (get_initial_def_for_reduction): Handle option 2 for variable-length
26063         vectors by loading the neutral value into a vector and then shifting
26064         the initial value into element 0.
26065         (get_initial_defs_for_reduction): Replace the code argument with
26066         the neutral value calculated by neutral_op_for_slp_reduction.
26067         Use gimple_build_vector for constant-length vectors.
26068         Use IFN_VEC_SHL_INSERT for variable-length vectors if all
26069         but the first group_size elements have a neutral value.
26070         Use duplicate_and_interleave otherwise.
26071         (vect_create_epilog_for_reduction): Take a neutral_op parameter.
26072         Update call to get_initial_defs_for_reduction.  Handle SLP
26073         reductions for variable-length vectors by creating one vector
26074         result for each scalar result, with the elements associated
26075         with other scalar results stubbed out with the neutral value.
26076         (vectorizable_reduction): Call neutral_op_for_slp_reduction.
26077         Require IFN_VEC_SHL_INSERT for double reductions on
26078         variable-length vectors, or SLP reductions that have
26079         a neutral value.  Require can_duplicate_and_interleave_p
26080         support for variable-length unchained SLP reductions if there
26081         is no neutral value, such as for MIN/MAX reductions.  Also require
26082         the number of vector elements to be a multiple of the number of
26083         SLP statements when doing variable-length unchained SLP reductions.
26084         Update call to vect_create_epilog_for_reduction.
26085         * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
26086         and remove initial values.
26087         (duplicate_and_interleave): Make public.
26088         * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
26089         * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
26091 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
26092             Alan Hayward  <alan.hayward@arm.com>
26093             David Sherwood  <david.sherwood@arm.com>
26095         * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
26096         (can_duplicate_and_interleave_p): New function.
26097         (vect_get_and_check_slp_defs): Take the vector of statements
26098         rather than just the current one.  Remove excess parentheses.
26099         Restriction rejectinon of vect_constant_def and vect_external_def
26100         for variable-length vectors to boolean types, or types for which
26101         can_duplicate_and_interleave_p is false.
26102         (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
26103         (duplicate_and_interleave): New function.
26104         (vect_get_constant_vectors): Use gimple_build_vector for
26105         constant-length vectors and suitable variable-length constant
26106         vectors.  Use duplicate_and_interleave for other variable-length
26107         vectors.  Don't defer the update when inserting new statements.
26109 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
26110             Alan Hayward  <alan.hayward@arm.com>
26111             David Sherwood  <david.sherwood@arm.com>
26113         * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
26114         min_profitable_iters doesn't go negative.
26116 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
26117             Alan Hayward  <alan.hayward@arm.com>
26118             David Sherwood  <david.sherwood@arm.com>
26120         * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
26121         (vec_mask_store_lanes@var{m}@var{n}): Likewise.
26122         * optabs.def (vec_mask_load_lanes_optab): New optab.
26123         (vec_mask_store_lanes_optab): Likewise.
26124         * internal-fn.def (MASK_LOAD_LANES): New internal function.
26125         (MASK_STORE_LANES): Likewise.
26126         * internal-fn.c (mask_load_lanes_direct): New macro.
26127         (mask_store_lanes_direct): Likewise.
26128         (expand_mask_load_optab_fn): Handle masked operations.
26129         (expand_mask_load_lanes_optab_fn): New macro.
26130         (expand_mask_store_optab_fn): Handle masked operations.
26131         (expand_mask_store_lanes_optab_fn): New macro.
26132         (direct_mask_load_lanes_optab_supported_p): Likewise.
26133         (direct_mask_store_lanes_optab_supported_p): Likewise.
26134         * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
26135         parameter.
26136         (vect_load_lanes_supported): Likewise.
26137         * tree-vect-data-refs.c (strip_conversion): New function.
26138         (can_group_stmts_p): Likewise.
26139         (vect_analyze_data_ref_accesses): Use it instead of checking
26140         for a pair of assignments.
26141         (vect_store_lanes_supported): Take a masked_p parameter.
26142         (vect_load_lanes_supported): Likewise.
26143         * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
26144         vect_store_lanes_supported and vect_load_lanes_supported.
26145         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
26146         * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
26147         parameter.  Don't allow gaps for masked accesses.
26148         Use vect_get_store_rhs.  Update calls to vect_store_lanes_supported
26149         and vect_load_lanes_supported.
26150         (get_load_store_type): Take a masked_p parameter and update
26151         call to get_group_load_store_type.
26152         (vectorizable_store): Update call to get_load_store_type.
26153         Handle IFN_MASK_STORE_LANES.
26154         (vectorizable_load): Update call to get_load_store_type.
26155         Handle IFN_MASK_LOAD_LANES.
26157 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
26158             Alan Hayward  <alan.hayward@arm.com>
26159             David Sherwood  <david.sherwood@arm.com>
26161         * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
26162         modes for SVE.
26163         * config/aarch64/aarch64-protos.h
26164         (aarch64_sve_struct_memory_operand_p): Declare.
26165         * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
26166         (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
26167         (VPRED, vpred): Handle SVE structure modes.
26168         * config/aarch64/constraints.md (Utx): New constraint.
26169         * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
26170         (aarch64_sve_struct_nonimmediate_operand): New predicates.
26171         * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
26172         * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
26173         (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
26174         structure modes.  Split into pieces after RA.
26175         (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
26176         (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
26177         New patterns.
26178         * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
26179         SVE structure modes.
26180         (aarch64_classify_address): Likewise.
26181         (sizetochar): Move earlier in file.
26182         (aarch64_print_operand): Handle SVE register lists.
26183         (aarch64_array_mode): New function.
26184         (aarch64_sve_struct_memory_operand_p): Likewise.
26185         (TARGET_ARRAY_MODE): Redefine.
26187 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
26188             Alan Hayward  <alan.hayward@arm.com>
26189             David Sherwood  <david.sherwood@arm.com>
26191         * target.def (array_mode): New target hook.
26192         * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
26193         * doc/tm.texi: Regenerate.
26194         * hooks.h (hook_optmode_mode_uhwi_none): Declare.
26195         * hooks.c (hook_optmode_mode_uhwi_none): New function.
26196         * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
26197         targetm.array_mode.
26198         * stor-layout.c (mode_for_array): Likewise.  Support polynomial
26199         type sizes.
26201 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
26202             Alan Hayward  <alan.hayward@arm.com>
26203             David Sherwood  <david.sherwood@arm.com>
26205         * fold-const.c (fold_binary_loc): Check the argument types
26206         rather than the result type when testing for a vector operation.
26208 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
26210         * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
26211         * doc/tm.texi: Regenerate.
26213 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
26214             Alan Hayward  <alan.hayward@arm.com>
26215             David Sherwood  <david.sherwood@arm.com>
26217         * doc/invoke.texi (-msve-vector-bits=): Document new option.
26218         (sve): Document new AArch64 extension.
26219         * doc/md.texi (w): Extend the description of the AArch64
26220         constraint to include SVE vectors.
26221         (Upl, Upa): Document new AArch64 predicate constraints.
26222         * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
26223         enum.
26224         * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
26225         (msve-vector-bits=): New option.
26226         * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
26227         SVE when these are disabled.
26228         (sve): New extension.
26229         * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
26230         modes.  Adjust their number of units based on aarch64_sve_vg.
26231         (MAX_BITSIZE_MODE_ANY_MODE): Define.
26232         * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
26233         aarch64_addr_query_type.
26234         (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
26235         (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
26236         (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
26237         (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
26238         (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
26239         (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
26240         (aarch64_simd_imm_zero_p): Delete.
26241         (aarch64_check_zero_based_sve_index_immediate): Declare.
26242         (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
26243         (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
26244         (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
26245         (aarch64_sve_float_mul_immediate_p): Likewise.
26246         (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
26247         rather than an rtx.
26248         (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
26249         (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
26250         (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
26251         (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
26252         (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
26253         (aarch64_regmode_natural_size): Likewise.
26254         * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
26255         (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
26256         left one place.
26257         (AARCH64_ISA_SVE, TARGET_SVE): New macros.
26258         (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
26259         for VG and the SVE predicate registers.
26260         (V_ALIASES): Add a "z"-prefixed alias.
26261         (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
26262         (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
26263         (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
26264         (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
26265         (REG_CLASS_NAMES): Add entries for them.
26266         (REG_CLASS_CONTENTS): Likewise.  Update ALL_REGS to include VG
26267         and the predicate registers.
26268         (aarch64_sve_vg): Declare.
26269         (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
26270         (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
26271         (REGMODE_NATURAL_SIZE): Define.
26272         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
26273         SVE macros.
26274         * config/aarch64/aarch64.c: Include cfgrtl.h.
26275         (simd_immediate_info): Add a constructor for series vectors,
26276         and an associated step field.
26277         (aarch64_sve_vg): New variable.
26278         (aarch64_dbx_register_number): Handle VG and the predicate registers.
26279         (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
26280         (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
26281         (VEC_ANY_DATA, VEC_STRUCT): New constants.
26282         (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
26283         (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
26284         (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
26285         (aarch64_get_mask_mode): New functions.
26286         (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
26287         and FP_LO_REGS.  Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
26288         (aarch64_hard_regno_mode_ok): Handle VG.  Also handle the SVE
26289         predicate modes and predicate registers.  Explicitly restrict
26290         GPRs to modes of 16 bytes or smaller.  Only allow FP registers
26291         to store a vector mode if it is recognized by
26292         aarch64_classify_vector_mode.
26293         (aarch64_regmode_natural_size): New function.
26294         (aarch64_hard_regno_caller_save_mode): Return the original mode
26295         for predicates.
26296         (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
26297         (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
26298         (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
26299         (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
26300         functions.
26301         (aarch64_add_offset): Add a temp2 parameter.  Assert that temp1
26302         does not overlap dest if the function is frame-related.  Handle
26303         SVE constants.
26304         (aarch64_split_add_offset): New function.
26305         (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
26306         them aarch64_add_offset.
26307         (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
26308         and update call to aarch64_sub_sp.
26309         (aarch64_add_cfa_expression): New function.
26310         (aarch64_expand_prologue): Pass extra temporary registers to the
26311         functions above.  Handle the case in which we need to emit new
26312         DW_CFA_expressions for registers that were originally saved
26313         relative to the stack pointer, but now have to be expressed
26314         relative to the frame pointer.
26315         (aarch64_output_mi_thunk): Pass extra temporary registers to the
26316         functions above.
26317         (aarch64_expand_epilogue): Likewise.  Prevent inheritance of
26318         IP0 and IP1 values for SVE frames.
26319         (aarch64_expand_vec_series): New function.
26320         (aarch64_expand_sve_widened_duplicate): Likewise.
26321         (aarch64_expand_sve_const_vector): Likewise.
26322         (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
26323         Handle SVE constants.  Use emit_move_insn to move a force_const_mem
26324         into the register, rather than emitting a SET directly.
26325         (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
26326         (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
26327         (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
26328         (offset_9bit_signed_scaled_p): New functions.
26329         (aarch64_replicate_bitmask_imm): New function.
26330         (aarch64_bitmask_imm): Use it.
26331         (aarch64_cannot_force_const_mem): Reject expressions involving
26332         a CONST_POLY_INT.  Update call to aarch64_classify_symbol.
26333         (aarch64_classify_index): Handle SVE indices, by requiring
26334         a plain register index with a scale that matches the element size.
26335         (aarch64_classify_address): Handle SVE addresses.  Assert that
26336         the mode of the address is VOIDmode or an integer mode.
26337         Update call to aarch64_classify_symbol.
26338         (aarch64_classify_symbolic_expression): Update call to
26339         aarch64_classify_symbol.
26340         (aarch64_const_vec_all_in_range_p): New function.
26341         (aarch64_print_vector_float_operand): Likewise.
26342         (aarch64_print_operand): Handle 'N' and 'C'.  Use "zN" rather than
26343         "vN" for FP registers with SVE modes.  Handle (const ...) vectors
26344         and the FP immediates 1.0 and 0.5.
26345         (aarch64_print_address_internal): Handle SVE addresses.
26346         (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
26347         (aarch64_regno_regclass): Handle predicate registers.
26348         (aarch64_secondary_reload): Handle big-endian reloads of SVE
26349         data modes.
26350         (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
26351         (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
26352         (aarch64_convert_sve_vector_bits): New function.
26353         (aarch64_override_options): Use it to handle -msve-vector-bits=.
26354         (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
26355         rather than an rtx.
26356         (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
26357         Handle SVE vector and predicate modes.  Accept VL-based constants
26358         that need only one temporary register, and VL offsets that require
26359         no temporary registers.
26360         (aarch64_conditional_register_usage): Mark the predicate registers
26361         as fixed if SVE isn't available.
26362         (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
26363         Return true for SVE vector and predicate modes.
26364         (aarch64_simd_container_mode): Take the number of bits as a poly_int64
26365         rather than an unsigned int.  Handle SVE modes.
26366         (aarch64_preferred_simd_mode): Update call accordingly.  Handle
26367         SVE modes.
26368         (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
26369         if SVE is enabled.
26370         (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
26371         (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
26372         (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
26373         (aarch64_sve_float_mul_immediate_p): New functions.
26374         (aarch64_sve_valid_immediate): New function.
26375         (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
26376         Explicitly reject structure modes.  Check for INDEX constants.
26377         Handle PTRUE and PFALSE constants.
26378         (aarch64_check_zero_based_sve_index_immediate): New function.
26379         (aarch64_simd_imm_zero_p): Delete.
26380         (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
26381         vector modes.  Accept constants in the range of CNT[BHWD].
26382         (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
26383         ask for an Advanced SIMD mode.
26384         (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
26385         (aarch64_simd_vector_alignment): Handle SVE predicates.
26386         (aarch64_vectorize_preferred_vector_alignment): New function.
26387         (aarch64_simd_vector_alignment_reachable): Use it instead of
26388         the vector size.
26389         (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
26390         (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
26391         functions.
26392         (MAX_VECT_LEN): Delete.
26393         (expand_vec_perm_d): Add a vec_flags field.
26394         (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
26395         (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
26396         (aarch64_evpc_ext): Don't apply a big-endian lane correction
26397         for SVE modes.
26398         (aarch64_evpc_rev): Rename to...
26399         (aarch64_evpc_rev_local): ...this.  Use a predicated operation for SVE.
26400         (aarch64_evpc_rev_global): New function.
26401         (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
26402         (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
26403         MAX_VECT_LEN.
26404         (aarch64_evpc_sve_tbl): New function.
26405         (aarch64_expand_vec_perm_const_1): Update after rename of
26406         aarch64_evpc_rev.  Handle SVE permutes too, trying
26407         aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
26408         than aarch64_evpc_tbl.
26409         (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
26410         (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
26411         (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
26412         (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
26413         (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
26414         (aarch64_expand_sve_vcond): New functions.
26415         (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
26416         of aarch64_vector_mode_p.
26417         (aarch64_dwarf_poly_indeterminate_value): New function.
26418         (aarch64_compute_pressure_classes): Likewise.
26419         (aarch64_can_change_mode_class): Likewise.
26420         (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
26421         (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
26422         (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
26423         (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
26424         (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
26425         (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
26426         * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
26427         (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
26428         constraints.
26429         (Dn, Dl, Dr): Accept const as well as const_vector.
26430         (Dz): Likewise.  Compare against CONST0_RTX.
26431         * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
26432         of "vector" where appropriate.
26433         (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
26434         (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
26435         (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
26436         (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
26437         (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
26438         (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
26439         (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
26440         (v_int_equiv): Extend to SVE modes.
26441         (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
26442         mode attributes.
26443         (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
26444         (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
26445         (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
26446         (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
26447         (SVE_COND_FP_CMP): New int iterators.
26448         (perm_hilo): Handle the new unpack unspecs.
26449         (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
26450         attributes.
26451         * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
26452         (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
26453         (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
26454         (aarch64_equality_operator, aarch64_constant_vector_operand)
26455         (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
26456         (aarch64_sve_nonimmediate_operand): Likewise.
26457         (aarch64_sve_general_operand): Likewise.
26458         (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
26459         (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
26460         (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
26461         (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
26462         (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
26463         (aarch64_sve_float_arith_immediate): Likewise.
26464         (aarch64_sve_float_arith_with_sub_immediate): Likewise.
26465         (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
26466         (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
26467         (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
26468         (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
26469         (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
26470         (aarch64_sve_float_arith_operand): Likewise.
26471         (aarch64_sve_float_arith_with_sub_operand): Likewise.
26472         (aarch64_sve_float_mul_operand): Likewise.
26473         (aarch64_sve_vec_perm_operand): Likewise.
26474         (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
26475         (aarch64_mov_operand): Accept const_poly_int and const_vector.
26476         (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
26477         as well as const_vector.
26478         (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
26479         in file.  Use CONST0_RTX and CONSTM1_RTX.
26480         (aarch64_simd_or_scalar_imm_zero): Likewise.  Add match_codes.
26481         (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
26482         Use aarch64_simd_imm_zero.
26483         * config/aarch64/aarch64-sve.md: New file.
26484         * config/aarch64/aarch64.md: Include it.
26485         (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
26486         (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
26487         (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
26488         (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
26489         (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
26490         (sve): New attribute.
26491         (enabled): Disable instructions with the sve attribute unless
26492         TARGET_SVE.
26493         (movqi, movhi): Pass CONST_POLY_INT operaneds through
26494         aarch64_expand_mov_immediate.
26495         (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
26496         CNT[BHSD] immediates.
26497         (movti): Split CONST_POLY_INT moves into two halves.
26498         (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
26499         Split additions that need a temporary here if the destination
26500         is the stack pointer.
26501         (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
26502         (*add<mode>3_poly_1): New instruction.
26503         (set_clobber_cc): New expander.
26505 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
26507         * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
26508         parameter and use it instead of GET_MODE_SIZE (innermode).  Use
26509         inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
26510         Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
26511         GET_MODE_NUNITS (innermode).  Also add a first_elem parameter.
26512         Change innermode from fixed_mode_size to machine_mode.
26513         (simplify_subreg): Update call accordingly.  Handle a constant-sized
26514         subreg of a variable-length CONST_VECTOR.
26516 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
26517             Alan Hayward  <alan.hayward@arm.com>
26518             David Sherwood  <david.sherwood@arm.com>
26520         * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
26521         (add_offset_to_base): New function, split out from...
26522         (create_mem_ref): ...here.  When handling a scale other than 1,
26523         check first whether the address is valid without the offset.
26524         Add it into the base if so, leaving the index and scale as-is.
26526 2018-01-12  Jakub Jelinek  <jakub@redhat.com>
26528         PR c++/83778
26529         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
26530         fold_for_warn before checking if arg2 is INTEGER_CST.
26532 2018-01-12  Segher Boessenkool  <segher@kernel.crashing.org>
26534         * config/rs6000/predicates.md (load_multiple_operation): Delete.
26535         (store_multiple_operation): Delete.
26536         * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
26537         * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
26538         * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
26539         guarded by TARGET_STRING.
26540         (rs6000_output_load_multiple): Delete.
26541         * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
26542         OPTION_MASK_STRING / TARGET_STRING handling.
26543         (print_operand) <'N', 'O'>: Add comment that these are unused now.
26544         (const rs6000_opt_masks) <"string">: Change mask to 0.
26545         * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
26546         (MASK_STRING): Delete.
26547         * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
26548         parts.  Simplify.
26549         (load_multiple): Delete.
26550         (*ldmsi8): Delete.
26551         (*ldmsi7): Delete.
26552         (*ldmsi6): Delete.
26553         (*ldmsi5): Delete.
26554         (*ldmsi4): Delete.
26555         (*ldmsi3): Delete.
26556         (store_multiple): Delete.
26557         (*stmsi8): Delete.
26558         (*stmsi7): Delete.
26559         (*stmsi6): Delete.
26560         (*stmsi5): Delete.
26561         (*stmsi4): Delete.
26562         (*stmsi3): Delete.
26563         (movmemsi_8reg): Delete.
26564         (corresponding unnamed define_insn): Delete.
26565         (movmemsi_6reg): Delete.
26566         (corresponding unnamed define_insn): Delete.
26567         (movmemsi_4reg): Delete.
26568         (corresponding unnamed define_insn): Delete.
26569         (movmemsi_2reg): Delete.
26570         (corresponding unnamed define_insn): Delete.
26571         (movmemsi_1reg): Delete.
26572         (corresponding unnamed define_insn): Delete.
26573         * config/rs6000/rs6000.opt (mno-string): New.
26574         (mstring): Replace by deprecation warning stub.
26575         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
26577 2018-01-12  Jakub Jelinek  <jakub@redhat.com>
26579         * regrename.c (regrename_do_replace): If replacing the same
26580         reg multiple times, try to reuse last created gen_raw_REG.
26582         PR debug/81155
26583         * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
26584         main to workaround a bug in GDB.
26586 2018-01-12  Tom de Vries  <tom@codesourcery.com>
26588         PR target/83737
26589         * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
26591 2018-01-12  Vladimir Makarov  <vmakarov@redhat.com>
26593         PR rtl-optimization/80481
26594         * ira-color.c (get_cap_member): New function.
26595         (allocnos_conflict_by_live_ranges_p): Use it.
26596         (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
26597         (setup_slot_coalesced_allocno_live_ranges): Ditto.
26599 2018-01-12  Uros Bizjak  <ubizjak@gmail.com>
26601         PR target/83628
26602         * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
26603         (*saddl_se_1): Ditto.
26604         (*ssubsi_1): Ditto.
26605         (*ssubl_se_1): Ditto.
26607 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
26609         * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
26610         rather than wi::to_widest for DR_INITs.
26611         * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
26612         wi::to_poly_offset rather than wi::to_offset for DR_INIT.
26613         (vect_analyze_data_ref_accesses): Require both DR_INITs to be
26614         INTEGER_CSTs.
26615         (vect_analyze_group_access_1): Note that here.
26617 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
26619         * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
26620         polynomial type sizes.
26622 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
26624         * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
26625         poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
26626         (gimple_add_tmp_var): Likewise.
26628 2018-01-12  Martin Liska  <mliska@suse.cz>
26630         * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
26631         (gimple_alloc_sizes): Likewise.
26632         (dump_gimple_statistics): Use PRIu64 in printf format.
26633         * gimple.h: Change uint64_t to int.
26635 2018-01-12  Martin Liska  <mliska@suse.cz>
26637         * tree-core.h: Use uint64_t instead of int.
26638         * tree.c (tree_node_counts): Likewise.
26639         (tree_node_sizes): Likewise.
26640         (dump_tree_statistics): Use PRIu64 in printf format.
26642 2018-01-12  Martin Liska  <mliska@suse.cz>
26644         * Makefile.in: As qsort_chk is implemented in vec.c, add
26645         vec.o to linkage of gencfn-macros.
26646         * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
26647         passing the info to record_node_allocation_statistics.
26648         (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
26649         and pass the info.
26650         * ggc-common.c (struct ggc_usage): Add operator== and use
26651         it in operator< and compare function.
26652         * mem-stats.h (struct mem_usage): Likewise.
26653         * vec.c (struct vec_usage): Remove operator< and compare
26654         function. Can be simply inherited.
26656 2018-01-12  Martin Jambor  <mjambor@suse.cz>
26658         PR target/81616
26659         * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
26660         * tree-ssa-math-opts.c: Include domwalk.h.
26661         (convert_mult_to_fma_1): New function.
26662         (fma_transformation_info): New type.
26663         (fma_deferring_state): Likewise.
26664         (cancel_fma_deferring): New function.
26665         (result_of_phi): Likewise.
26666         (last_fma_candidate_feeds_initial_phi): Likewise.
26667         (convert_mult_to_fma): Added deferring logic, split actual
26668         transformation to convert_mult_to_fma_1.
26669         (math_opts_dom_walker): New type.
26670         (math_opts_dom_walker::after_dom_children): New method, body moved
26671         here from pass_optimize_widening_mul::execute, added deferring logic
26672         bits.
26673         (pass_optimize_widening_mul::execute): Moved most of code to
26674         math_opts_dom_walker::after_dom_children.
26675         * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
26676         * config/i386/i386.c (ix86_option_override_internal): Added
26677         maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
26679 2018-01-12  Richard Biener  <rguenther@suse.de>
26681         PR debug/83157
26682         * dwarf2out.c (gen_variable_die): Do not reset old_die for
26683         inline instance vars.
26685 2018-01-12  Oleg Endo  <olegendo@gcc.gnu.org>
26687         PR target/81819
26688         * config/rx/rx.c (rx_is_restricted_memory_address):
26689         Handle SUBREG case.
26691 2018-01-12  Richard Biener  <rguenther@suse.de>
26693         PR tree-optimization/80846
26694         * target.def (split_reduction): New target hook.
26695         * targhooks.c (default_split_reduction): New function.
26696         * targhooks.h (default_split_reduction): Declare.
26697         * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
26698         target requests first reduce vectors by combining low and high
26699         parts.
26700         * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
26701         (get_vectype_for_scalar_type_and_size): Export.
26702         * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
26703         * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
26704         * doc/tm.texi: Regenerate.
26705         * config/i386/i386.c (ix86_split_reduction): Implement
26706         TARGET_VECTORIZE_SPLIT_REDUCTION.
26708 2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
26710         PR target/83368
26711         * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
26712         in PIC mode except for TARGET_VXWORKS_RTP.
26713         * config/sparc/sparc.c: Include cfgrtl.h.
26714         (TARGET_INIT_PIC_REG): Define.
26715         (TARGET_USE_PSEUDO_PIC_REG): Likewise.
26716         (sparc_pic_register_p): New predicate.
26717         (sparc_legitimate_address_p): Use it.
26718         (sparc_legitimize_pic_address): Likewise.
26719         (sparc_delegitimize_address): Likewise.
26720         (sparc_mode_dependent_address_p): Likewise.
26721         (gen_load_pcrel_sym): Remove 4th parameter.
26722         (load_got_register): Adjust call to above.  Remove obsolete stuff.
26723         (sparc_expand_prologue): Do not call load_got_register here.
26724         (sparc_flat_expand_prologue): Likewise.
26725         (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
26726         (sparc_use_pseudo_pic_reg): New function.
26727         (sparc_init_pic_reg): Likewise.
26728         * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
26729         (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
26731 2018-01-12  Christophe Lyon  <christophe.lyon@linaro.org>
26733         * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
26734         Add item for branch_cost.
26736 2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
26738         PR rtl-optimization/83565
26739         * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
26740         not extend the result to a larger mode for rotate operations.
26741         (num_sign_bit_copies1): Likewise.
26743 2018-01-12  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
26745         PR target/40411
26746         * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
26747         -symbolic.
26748         Use values-Xc.o for -pedantic.
26749         Link with values-xpg4.o for C90, values-xpg6.o otherwise.
26751 2018-01-12  Martin Liska  <mliska@suse.cz>
26753         PR ipa/83054
26754         * ipa-devirt.c (final_warning_record::grow_type_warnings):
26755         New function.
26756         (possible_polymorphic_call_targets): Use it.
26757         (ipa_devirt): Likewise.
26759 2018-01-12  Martin Liska  <mliska@suse.cz>
26761         * profile-count.h (enum profile_quality): Use 0 as invalid
26762         enum value of profile_quality.
26764 2018-01-12  Chung-Ju Wu  <jasonwucj@gmail.com>
26766         * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
26767         -mext-string options.
26769 2018-01-12  Richard Biener  <rguenther@suse.de>
26771         * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
26772         DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
26773         * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
26774         Likewise.
26775         * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
26777 2018-01-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
26779         * configure.ac (--with-long-double-format): Add support for the
26780         configuration option to change the default long double format on
26781         PowerPC systems.
26782         * config.gcc (powerpc*-linux*-*): Likewise.
26783         * configure: Regenerate.
26784         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
26785         double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
26786         used without modification.
26788 2018-01-11  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
26790         * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
26791         (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
26792         * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
26793         MISC_BUILTIN_SPEC_BARRIER.
26794         (rs6000_init_builtins): Likewise.
26795         * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
26796         enum value.
26797         (speculation_barrier): New define_insn.
26798         * doc/extend.texi: Document __builtin_speculation_barrier.
26800 2018-01-11  Jakub Jelinek  <jakub@redhat.com>
26802         PR target/83203
26803         * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
26804         is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
26805         * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
26806         iterators.
26807         (ssescalarmodesuffix): Add 512-bit vectors.  Use "d" or "q" for
26808         integral modes instead of "ss" and "sd".
26809         (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
26810         vectors with 32-bit and 64-bit elements.
26811         (vecdupssescalarmodesuffix): New mode attribute.
26812         (vec_dup<mode>): Use it.
26814 2018-01-11  H.J. Lu  <hongjiu.lu@intel.com>
26816         PR target/83330
26817         * config/i386/i386.c (ix86_compute_frame_layout): Align stack
26818         frame if argument is passed on stack.
26820 2018-01-11  Jakub Jelinek  <jakub@redhat.com>
26822         PR target/82682
26823         * ree.c (combine_reaching_defs): Optimize also
26824         reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
26825         reg2=any_extend(exp); reg1=reg2;, formatting fix.
26827 2018-01-11  Jan Hubicka  <hubicka@ucw.cz>
26829         PR middle-end/83189
26830         * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
26832 2018-01-11  Jan Hubicka  <hubicka@ucw.cz>
26834         PR middle-end/83718
26835         * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
26836         after they are computed.
26838 2018-01-11  Bin Cheng  <bin.cheng@arm.com>
26840         PR tree-optimization/83695
26841         * gimple-loop-linterchange.cc
26842         (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
26843         reset cached scev information after interchange.
26844         (pass_linterchange::execute): Remove call to scev_reset_htab.
26846 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
26848         * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
26849         vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
26850         vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
26851         vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
26852         vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
26853         vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
26854         * config/arm/arm_neon_builtins.def (vfmal_lane_low,
26855         vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
26856         vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
26857         vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
26858         vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
26859         * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
26860         (V_lane_reg): Likewise.
26861         * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
26862         New define_expand.
26863         (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
26864         (vfmal_lane_low<mode>_intrinsic,
26865         vfmal_lane_low<vfmlsel2><mode>_intrinsic,
26866         vfmal_lane_high<vfmlsel2><mode>_intrinsic,
26867         vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
26868         vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
26869         vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
26870         vfmsl_lane_high<mode>_intrinsic): New define_insns.
26872 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
26874         * config/arm/arm-cpus.in (fp16fml): New feature.
26875         (ALL_SIMD): Add fp16fml.
26876         (armv8.2-a): Add fp16fml as an option.
26877         (armv8.3-a): Likewise.
26878         (armv8.4-a): Add fp16fml as part of fp16.
26879         * config/arm/arm.h (TARGET_FP16FML): Define.
26880         * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
26881         when appropriate.
26882         * config/arm/arm-modes.def (V2HF): Define.
26883         * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
26884         vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
26885         vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
26886         * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
26887         vfmsl_low, vfmsl_high): New set of builtins.
26888         * config/arm/iterators.md (PLUSMINUS): New code iterator.
26889         (vfml_op): New code attribute.
26890         (VFMLHALVES): New int iterator.
26891         (VFML, VFMLSEL): New mode attributes.
26892         (V_reg): Define mapping for V2HF.
26893         (V_hi, V_lo): New mode attributes.
26894         (VF_constraint): Likewise.
26895         (vfml_half, vfml_half_selector): New int attributes.
26896         * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
26897         define_expand.
26898         (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
26899         vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
26900         New define_insn.
26901         * config/arm/t-arm-elf (v8_fps): Add fp16fml.
26902         * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
26903         * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
26904         * doc/invoke.texi (ARM Options): Document fp16fml.  Update armv8.4-a
26905         documentation.
26906         * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
26907         Document new effective target and option set.
26909 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
26911         * config/arm/arm-cpus.in (armv8_4): New feature.
26912         (ARMv8_4a): New fgroup.
26913         (armv8.4-a): New arch.
26914         * config/arm/arm-tables.opt: Regenerate.
26915         * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
26916         * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
26917         * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
26918         Add matching rules for -march=armv8.4-a and extensions.
26919         * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
26921 2018-01-11  Oleg Endo  <olegendo@gcc.gnu.org>
26923         PR target/81821
26924         * config/rx/rx.md (BW): New mode attribute.
26925         (sync_lock_test_and_setsi): Add mode suffix to insn output.
26927 2018-01-11  Richard Biener  <rguenther@suse.de>
26929         PR tree-optimization/83435
26930         * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
26931         * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
26932         * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
26934 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
26935             Alan Hayward  <alan.hayward@arm.com>
26936             David Sherwood  <david.sherwood@arm.com>
26938         * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
26939         field.
26940         (aarch64_classify_address): Initialize it.  Track polynomial offsets.
26941         (aarch64_print_address_internal): Use it to check for a zero offset.
26943 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
26944             Alan Hayward  <alan.hayward@arm.com>
26945             David Sherwood  <david.sherwood@arm.com>
26947         * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
26948         * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
26949         Return a poly_int64 rather than a HOST_WIDE_INT.
26950         (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
26951         rather than a HOST_WIDE_INT.
26952         * config/aarch64/aarch64.h (aarch64_frame): Protect with
26953         HAVE_POLY_INT_H rather than HOST_WIDE_INT.  Change locals_offset,
26954         hard_fp_offset, frame_size, initial_adjust, callee_offset and
26955         final_offset from HOST_WIDE_INT to poly_int64.
26956         * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
26957         to_constant when getting the number of units in an Advanced SIMD
26958         mode.
26959         (aarch64_builtin_vectorized_function): Check for a constant number
26960         of units.
26961         * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
26962         GET_MODE_SIZE.
26963         (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
26964         attribute instead of GET_MODE_NUNITS.
26965         * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
26966         (aarch64_class_max_nregs): Use the constant_lowest_bound of the
26967         GET_MODE_SIZE for fixed-size registers.
26968         (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
26969         (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
26970         (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
26971         (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
26972         (aarch64_print_operand, aarch64_print_address_internal)
26973         (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
26974         (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
26975         (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
26976         Handle polynomial GET_MODE_SIZE.
26977         (aarch64_hard_regno_caller_save_mode): Likewise.  Return modes
26978         wider than SImode without modification.
26979         (tls_symbolic_operand_type): Use strip_offset instead of split_const.
26980         (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
26981         (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
26982         passing and returning SVE modes.
26983         (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
26984         rather than GEN_INT.
26985         (aarch64_emit_probe_stack_range): Take the size as a poly_int64
26986         rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
26987         (aarch64_allocate_and_probe_stack_space): Likewise.
26988         (aarch64_layout_frame): Cope with polynomial offsets.
26989         (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
26990         start_offset as a poly_int64 rather than a HOST_WIDE_INT.  Track
26991         polynomial offsets.
26992         (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
26993         (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
26994         poly_int64 rather than a HOST_WIDE_INT.
26995         (aarch64_get_separate_components, aarch64_process_components)
26996         (aarch64_expand_prologue, aarch64_expand_epilogue)
26997         (aarch64_use_return_insn_p): Handle polynomial frame offsets.
26998         (aarch64_anchor_offset): New function, split out from...
26999         (aarch64_legitimize_address): ...here.
27000         (aarch64_builtin_vectorization_cost): Handle polynomial
27001         TYPE_VECTOR_SUBPARTS.
27002         (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
27003         GET_MODE_NUNITS.
27004         (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
27005         number of elements from the PARALLEL rather than the mode.
27006         (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
27007         rather than GET_MODE_BITSIZE.
27008         (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
27009         (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
27010         (aarch64_expand_vec_perm_const_1): Handle polynomial
27011         d->perm.length () and d->perm elements.
27012         (aarch64_evpc_tbl): Likewise.  Use nelt rather than GET_MODE_NUNITS.
27013         Apply to_constant to d->perm elements.
27014         (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
27015         polynomial CONST_VECTOR_NUNITS.
27016         (aarch64_move_pointer): Take amount as a poly_int64 rather
27017         than an int.
27018         (aarch64_progress_pointer): Avoid temporary variable.
27019         * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
27020         the mode attribute instead of GET_MODE.
27022 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
27023             Alan Hayward  <alan.hayward@arm.com>
27024             David Sherwood  <david.sherwood@arm.com>
27026         * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
27027         x exists before using it.
27028         (aarch64_add_constant_internal): Rename to...
27029         (aarch64_add_offset_1): ...this.  Replace regnum with separate
27030         src and dest rtxes.  Handle the case in which they're different,
27031         including when the offset is zero.  Replace scratchreg with an rtx.
27032         Use 2 additions if there is no spare register into which we can
27033         move a 16-bit constant.
27034         (aarch64_add_constant): Delete.
27035         (aarch64_add_offset): Replace reg with separate src and dest
27036         rtxes.  Take a poly_int64 offset instead of a HOST_WIDE_INT.
27037         Use aarch64_add_offset_1.
27038         (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
27039         an rtx rather than an int.  Take the delta as a poly_int64
27040         rather than a HOST_WIDE_INT.  Use aarch64_add_offset.
27041         (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
27042         (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
27043         aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
27044         (aarch64_expand_epilogue): Update calls to aarch64_add_offset
27045         and aarch64_add_sp.
27046         (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
27047         aarch64_add_constant.
27049 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
27051         * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
27052         Use scalar_float_mode.
27054 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
27056         * config/aarch64/aarch64-simd.md
27057         (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
27058         (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
27059         (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
27060         (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
27061         (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
27062         (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
27063         (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
27064         (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
27065         (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
27066         (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
27068 2018-01-11  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
27070         PR target/83514
27071         * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
27072         targ_options->x_arm_arch_string is non NULL.
27074 2018-01-11  Tamar Christina  <tamar.christina@arm.com>
27076         * config/aarch64/aarch64.h
27077         (AARCH64_FL_FOR_ARCH8_4): Add  AARCH64_FL_DOTPROD.
27079 2018-01-11  Sudakshina Das  <sudi.das@arm.com>
27081         PR target/82096
27082         * expmed.c (emit_store_flag_force): Swap if const op0
27083         and change VOIDmode to mode of op0.
27085 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
27087         PR rtl-optimization/83761
27088         * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
27089         than bytes to mode_for_size.
27091 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
27093         PR middle-end/83189
27094         * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
27095         * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
27096         profile.
27098 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
27100         PR middle-end/83575
27101         * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
27102         when in layout mode.
27103         (cfg_layout_finalize): Do not verify cfg before we are out of layout.
27104         * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
27105         partition fixup.
27107 2018-01-10  Michael Collison  <michael.collison@arm.com>
27109         * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
27110         * config/aarch64/aarch64-option-extension.def: Add
27111         AARCH64_OPT_EXTENSION of 'fp16fml'.
27112         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
27113         (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
27114         * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
27115         * config/aarch64/constraints.md (Ui7): New constraint.
27116         * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
27117         (VFMLA_SEL_W): Ditto.
27118         (f16quad): Ditto.
27119         (f16mac1): Ditto.
27120         (VFMLA16_LOW): New int iterator.
27121         (VFMLA16_HIGH): Ditto.
27122         (UNSPEC_FMLAL): New unspec.
27123         (UNSPEC_FMLSL): Ditto.
27124         (UNSPEC_FMLAL2): Ditto.
27125         (UNSPEC_FMLSL2): Ditto.
27126         (f16mac): New code attribute.
27127         * config/aarch64/aarch64-simd-builtins.def
27128         (aarch64_fmlal_lowv2sf): Ditto.
27129         (aarch64_fmlsl_lowv2sf): Ditto.
27130         (aarch64_fmlalq_lowv4sf): Ditto.
27131         (aarch64_fmlslq_lowv4sf): Ditto.
27132         (aarch64_fmlal_highv2sf): Ditto.
27133         (aarch64_fmlsl_highv2sf): Ditto.
27134         (aarch64_fmlalq_highv4sf): Ditto.
27135         (aarch64_fmlslq_highv4sf): Ditto.
27136         (aarch64_fmlal_lane_lowv2sf): Ditto.
27137         (aarch64_fmlsl_lane_lowv2sf): Ditto.
27138         (aarch64_fmlal_laneq_lowv2sf): Ditto.
27139         (aarch64_fmlsl_laneq_lowv2sf): Ditto.
27140         (aarch64_fmlalq_lane_lowv4sf): Ditto.
27141         (aarch64_fmlsl_lane_lowv4sf): Ditto.
27142         (aarch64_fmlalq_laneq_lowv4sf): Ditto.
27143         (aarch64_fmlsl_laneq_lowv4sf): Ditto.
27144         (aarch64_fmlal_lane_highv2sf): Ditto.
27145         (aarch64_fmlsl_lane_highv2sf): Ditto.
27146         (aarch64_fmlal_laneq_highv2sf): Ditto.
27147         (aarch64_fmlsl_laneq_highv2sf): Ditto.
27148         (aarch64_fmlalq_lane_highv4sf): Ditto.
27149         (aarch64_fmlsl_lane_highv4sf): Ditto.
27150         (aarch64_fmlalq_laneq_highv4sf): Ditto.
27151         (aarch64_fmlsl_laneq_highv4sf): Ditto.
27152         * config/aarch64/aarch64-simd.md:
27153         (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
27154         (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
27155         (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
27156         (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
27157         (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
27158         (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
27159         (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
27160         (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
27161         (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
27162         (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
27163         (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
27164         (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
27165         (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
27166         (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
27167         (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
27168         (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
27169         (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
27170         (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
27171         (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
27172         (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
27173         * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
27174         (vfmlsl_low_u32): Ditto.
27175         (vfmlalq_low_u32): Ditto.
27176         (vfmlslq_low_u32): Ditto.
27177         (vfmlal_high_u32): Ditto.
27178         (vfmlsl_high_u32): Ditto.
27179         (vfmlalq_high_u32): Ditto.
27180         (vfmlslq_high_u32): Ditto.
27181         (vfmlal_lane_low_u32): Ditto.
27182         (vfmlsl_lane_low_u32): Ditto.
27183         (vfmlal_laneq_low_u32): Ditto.
27184         (vfmlsl_laneq_low_u32): Ditto.
27185         (vfmlalq_lane_low_u32): Ditto.
27186         (vfmlslq_lane_low_u32): Ditto.
27187         (vfmlalq_laneq_low_u32): Ditto.
27188         (vfmlslq_laneq_low_u32): Ditto.
27189         (vfmlal_lane_high_u32): Ditto.
27190         (vfmlsl_lane_high_u32): Ditto.
27191         (vfmlal_laneq_high_u32): Ditto.
27192         (vfmlsl_laneq_high_u32): Ditto.
27193         (vfmlalq_lane_high_u32): Ditto.
27194         (vfmlslq_lane_high_u32): Ditto.
27195         (vfmlalq_laneq_high_u32): Ditto.
27196         (vfmlslq_laneq_high_u32): Ditto.
27197         * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
27198         (AARCH64_FL_FOR_ARCH8_4): New.
27199         (AARCH64_ISA_F16FML): New ISA flag.
27200         (TARGET_F16FML): New feature flag for fp16fml.
27201         (doc/invoke.texi): Document new fp16fml option.
27203 2018-01-10  Michael Collison  <michael.collison@arm.com>
27205         * config/aarch64/aarch64-builtins.c:
27206         (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
27207         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
27208         (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
27209         * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
27210         (AARCH64_ISA_SHA3): New ISA flag.
27211         (TARGET_SHA3): New feature flag for sha3.
27212         * config/aarch64/iterators.md (sha512_op): New int attribute.
27213         (CRYPTO_SHA512): New int iterator.
27214         (UNSPEC_SHA512H): New unspec.
27215         (UNSPEC_SHA512H2): Ditto.
27216         (UNSPEC_SHA512SU0): Ditto.
27217         (UNSPEC_SHA512SU1): Ditto.
27218         * config/aarch64/aarch64-simd-builtins.def
27219         (aarch64_crypto_sha512hqv2di): New builtin.
27220         (aarch64_crypto_sha512h2qv2di): Ditto.
27221         (aarch64_crypto_sha512su0qv2di): Ditto.
27222         (aarch64_crypto_sha512su1qv2di): Ditto.
27223         (aarch64_eor3qv8hi): Ditto.
27224         (aarch64_rax1qv2di): Ditto.
27225         (aarch64_xarqv2di): Ditto.
27226         (aarch64_bcaxqv8hi): Ditto.
27227         * config/aarch64/aarch64-simd.md:
27228         (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
27229         (aarch64_crypto_sha512su0qv2di): Ditto.
27230         (aarch64_crypto_sha512su1qv2di): Ditto.
27231         (aarch64_eor3qv8hi): Ditto.
27232         (aarch64_rax1qv2di): Ditto.
27233         (aarch64_xarqv2di): Ditto.
27234         (aarch64_bcaxqv8hi): Ditto.
27235         * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
27236         (vsha512h2q_u64): Ditto.
27237         (vsha512su0q_u64): Ditto.
27238         (vsha512su1q_u64): Ditto.
27239         (veor3q_u16): Ditto.
27240         (vrax1q_u64): Ditto.
27241         (vxarq_u64): Ditto.
27242         (vbcaxq_u16): Ditto.
27243         * config/arm/types.md (crypto_sha512): New type attribute.
27244         (crypto_sha3): Ditto.
27245         (doc/invoke.texi): Document new sha3 option.
27247 2018-01-10  Michael Collison  <michael.collison@arm.com>
27249         * config/aarch64/aarch64-builtins.c:
27250         (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
27251         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
27252         (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
27253         (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
27254         * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
27255         (AARCH64_ISA_SM4): New ISA flag.
27256         (TARGET_SM4): New feature flag for sm4.
27257         * config/aarch64/aarch64-simd-builtins.def
27258         (aarch64_sm3ss1qv4si): Ditto.
27259         (aarch64_sm3tt1aq4si): Ditto.
27260         (aarch64_sm3tt1bq4si): Ditto.
27261         (aarch64_sm3tt2aq4si): Ditto.
27262         (aarch64_sm3tt2bq4si): Ditto.
27263         (aarch64_sm3partw1qv4si): Ditto.
27264         (aarch64_sm3partw2qv4si): Ditto.
27265         (aarch64_sm4eqv4si): Ditto.
27266         (aarch64_sm4ekeyqv4si): Ditto.
27267         * config/aarch64/aarch64-simd.md:
27268         (aarch64_sm3ss1qv4si): Ditto.
27269         (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
27270         (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
27271         (aarch64_sm4eqv4si): Ditto.
27272         (aarch64_sm4ekeyqv4si): Ditto.
27273         * config/aarch64/iterators.md (sm3tt_op): New int iterator.
27274         (sm3part_op): Ditto.
27275         (CRYPTO_SM3TT): Ditto.
27276         (CRYPTO_SM3PART): Ditto.
27277         (UNSPEC_SM3SS1): New unspec.
27278         (UNSPEC_SM3TT1A): Ditto.
27279         (UNSPEC_SM3TT1B): Ditto.
27280         (UNSPEC_SM3TT2A): Ditto.
27281         (UNSPEC_SM3TT2B): Ditto.
27282         (UNSPEC_SM3PARTW1): Ditto.
27283         (UNSPEC_SM3PARTW2): Ditto.
27284         (UNSPEC_SM4E): Ditto.
27285         (UNSPEC_SM4EKEY): Ditto.
27286         * config/aarch64/constraints.md (Ui2): New constraint.
27287         * config/aarch64/predicates.md (aarch64_imm2): New predicate.
27288         * config/arm/types.md (crypto_sm3): New type attribute.
27289         (crypto_sm4): Ditto.
27290         * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
27291         (vsm3tt1aq_u32): Ditto.
27292         (vsm3tt1bq_u32): Ditto.
27293         (vsm3tt2aq_u32): Ditto.
27294         (vsm3tt2bq_u32): Ditto.
27295         (vsm3partw1q_u32): Ditto.
27296         (vsm3partw2q_u32): Ditto.
27297         (vsm4eq_u32): Ditto.
27298         (vsm4ekeyq_u32): Ditto.
27299         (doc/invoke.texi): Document new sm4 option.
27301 2018-01-10  Michael Collison  <michael.collison@arm.com>
27303         * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
27304         * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
27305         (AARCH64_FL_FOR_ARCH8_4): New.
27306         (AARCH64_FL_V8_4): New flag.
27307         (doc/invoke.texi): Document new armv8.4-a option.
27309 2018-01-10  Michael Collison  <michael.collison@arm.com>
27311         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
27312         (__ARM_FEATURE_AES): Define if TARGET_AES is true.
27313         (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
27314         * config/aarch64/aarch64-option-extension.def: Add
27315         AARCH64_OPT_EXTENSION of 'sha2'.
27316         (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
27317         (crypto): Disable sha2 and aes if crypto disabled.
27318         (crypto): Enable aes and sha2 if enabled.
27319         (simd): Disable sha2 and aes if simd disabled.
27320         * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
27321         New flags.
27322         (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
27323         (TARGET_SHA2): New feature flag for sha2.
27324         (TARGET_AES): New feature flag for aes.
27325         * config/aarch64/aarch64-simd.md:
27326         (aarch64_crypto_aes<aes_op>v16qi): Make pattern
27327         conditional on TARGET_AES.
27328         (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
27329         (aarch64_crypto_sha1hsi): Make pattern conditional
27330         on TARGET_SHA2.
27331         (aarch64_crypto_sha1hv4si): Ditto.
27332         (aarch64_be_crypto_sha1hv4si): Ditto.
27333         (aarch64_crypto_sha1su1v4si): Ditto.
27334         (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
27335         (aarch64_crypto_sha1su0v4si): Ditto.
27336         (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
27337         (aarch64_crypto_sha256su0v4si): Ditto.
27338         (aarch64_crypto_sha256su1v4si): Ditto.
27339         (doc/invoke.texi): Document new aes and sha2 options.
27341 2018-01-10  Martin Sebor  <msebor@redhat.com>
27343         PR tree-optimization/83781
27344         * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
27345         as string arrays.
27347 2018-01-11  Martin Sebor  <msebor@gmail.com>
27348             Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
27350         PR tree-optimization/83501
27351         PR tree-optimization/81703
27353         * tree-ssa-strlen.c (get_string_cst): Rename...
27354         (get_string_len): ...to this.  Handle global constants.
27355         (handle_char_store): Adjust.
27357 2018-01-10  Kito Cheng  <kito.cheng@gmail.com>
27358             Jim Wilson  <jimw@sifive.com>
27360         * config/riscv/riscv-protos.h (riscv_output_return): New.
27361         * config/riscv/riscv.c (struct machine_function): New naked_p field.
27362         (riscv_attribute_table, riscv_output_return),
27363         (riscv_handle_fndecl_attribute, riscv_naked_function_p),
27364         (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
27365         (riscv_compute_frame_info): Only compute frame->mask if not a naked
27366         function.
27367         (riscv_expand_prologue): Add early return for naked function.
27368         (riscv_expand_epilogue): Likewise.
27369         (riscv_function_ok_for_sibcall): Return false for naked function.
27370         (riscv_set_current_function): New.
27371         (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
27372         (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
27373         * config/riscv/riscv.md (simple_return): Call riscv_output_return.
27374         * doc/extend.texi (RISC-V Function Attributes): New.
27376 2018-01-10  Michael Meissner  <meissner@linux.vnet.ibm.com>
27378         * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
27379         check for 128-bit long double before checking TCmode.
27380         * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
27381         128-bit long doubles before checking TFmode or TCmode.
27382         (FLOAT128_IBM_P): Likewise.
27384 2018-01-10  Martin Sebor  <msebor@redhat.com>
27386         PR tree-optimization/83671
27387         * builtins.c (c_strlen): Unconditionally return zero for the empty
27388         string.
27389         Use -Warray-bounds for warnings.
27390         * gimple-fold.c (get_range_strlen): Handle non-constant lengths
27391         for non-constant array indices with COMPONENT_REF, arrays of
27392         arrays, and pointers to arrays.
27393         (gimple_fold_builtin_strlen): Determine and set length range for
27394         non-constant character arrays.
27396 2018-01-10  Aldy Hernandez  <aldyh@redhat.com>
27398         PR middle-end/81897
27399         * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
27400         empty blocks.
27402 2018-01-10  Eric Botcazou  <ebotcazou@adacore.com>
27404         * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
27406 2018-01-10  Peter Bergner  <bergner@vnet.ibm.com>
27408         PR target/83399
27409         * config/rs6000/rs6000.c (print_operand) <'y'>: Use
27410         VECTOR_MEM_ALTIVEC_OR_VSX_P.
27411         * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
27412         indexed_or_indirect_operand predicate.
27413         (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
27414         (*vsx_le_perm_load_v8hi): Likewise.
27415         (*vsx_le_perm_load_v16qi): Likewise.
27416         (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
27417         (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
27418         (*vsx_le_perm_store_v8hi): Likewise.
27419         (*vsx_le_perm_store_v16qi): Likewise.
27420         (eight unnamed splitters): Likewise.
27422 2018-01-10  Peter Bergner  <bergner@vnet.ibm.com>
27424         * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
27425         * config/rs6000/emmintrin.h: Likewise.
27426         * config/rs6000/mmintrin.h: Likewise.
27427         * config/rs6000/xmmintrin.h: Likewise.
27429 2018-01-10  David Malcolm  <dmalcolm@redhat.com>
27431         PR c++/43486
27432         * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
27433         "public_flag".
27434         * tree.c (tree_nop_conversion): Return true for location wrapper
27435         nodes.
27436         (maybe_wrap_with_location): New function.
27437         (selftest::check_strip_nops): New function.
27438         (selftest::test_location_wrappers): New function.
27439         (selftest::tree_c_tests): Call it.
27440         * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
27441         (maybe_wrap_with_location): New decl.
27442         (EXPR_LOCATION_WRAPPER_P): New macro.
27443         (location_wrapper_p): New inline function.
27444         (tree_strip_any_location_wrapper): New inline function.
27446 2018-01-10  H.J. Lu  <hongjiu.lu@intel.com>
27448         PR target/83735
27449         * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
27450         stack_realign_offset for the largest alignment of stack slot
27451         actually used.
27452         (ix86_find_max_used_stack_alignment): New function.
27453         (ix86_finalize_stack_frame_flags): Use it.  Set
27454         max_used_stack_alignment if we don't realign stack.
27455         * config/i386/i386.h (machine_function): Add
27456         max_used_stack_alignment.
27458 2018-01-10  Christophe Lyon  <christophe.lyon@linaro.org>
27460         * config/arm/arm.opt (-mbranch-cost): New option.
27461         * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
27462         account.
27464 2018-01-10  Segher Boessenkool  <segher@kernel.crashing.org>
27466         PR target/83629
27467         * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
27468         load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
27470 2018-01-10  Richard Biener  <rguenther@suse.de>
27472         PR debug/83765
27473         * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
27474         early out so it also covers the case where we have a non-NULL
27475         origin.
27477 2018-01-10  Richard Sandiford  <richard.sandiford@linaro.org>
27479         PR tree-optimization/83753
27480         * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
27481         for non-strided grouped accesses if the number of elements is 1.
27483 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
27485         PR target/81616
27486         * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
27487         * i386.h (TARGET_USE_GATHER): Define.
27488         * x86-tune.def (X86_TUNE_USE_GATHER): New.
27490 2018-01-10  Martin Liska  <mliska@suse.cz>
27492         PR bootstrap/82831
27493         * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
27494         * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
27495         partitioning.
27496         * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
27497         CLEANUP_NO_PARTITIONING is not set.
27499 2018-01-10  Richard Sandiford  <richard.sandiford@linaro.org>
27501         * doc/rtl.texi: Remove documentation of (const ...) wrappers
27502         for vectors, as a partial revert of r254296.
27503         * rtl.h (const_vec_p): Delete.
27504         (const_vec_duplicate_p): Don't test for vector CONSTs.
27505         (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
27506         * expmed.c (make_tree): Likewise.
27508         Revert:
27509         * common.md (E, F): Use CONSTANT_P instead of checking for
27510         CONST_VECTOR.
27511         * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
27512         checking for CONST_VECTOR.
27514 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
27516         PR middle-end/83575
27517         * predict.c (force_edge_cold): Handle in more sane way edges
27518         with no prediction.
27520 2018-01-09  Carl Love  <cel@us.ibm.com>
27522         * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
27523         V4SI, V4SF types.
27524         (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
27525         * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
27526         VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
27527         VMRGOW_V2DI, VMRGOW_V2DF.  Remove definition for VMRGOW.
27528         * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
27529         P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW):  Add definitions.
27530         * config/rs6000/rs6000-protos.h: Add extern defition for
27531         rs6000_generate_float2_double_code.
27532         * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
27533         function.
27534         * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
27535         (float2_v2df): Add define_expand.
27537 2018-01-09  Uros Bizjak  <ubizjak@gmail.com>
27539         PR target/83628
27540         * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
27541         op_mode in the force_to_mode call.
27543 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
27545         * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
27546         instead of checking each element individually.
27547         (aarch64_evpc_uzp): Likewise.
27548         (aarch64_evpc_zip): Likewise.
27549         (aarch64_evpc_ext): Likewise.
27550         (aarch64_evpc_rev): Likewise.
27551         (aarch64_evpc_dup): Test the encoding for a single duplicated element,
27552         instead of checking each element individually.  Return true without
27553         generating rtl if
27554         (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
27555         whether all selected elements come from the same input, instead of
27556         checking each element individually.  Remove calls to gen_rtx_REG,
27557         start_sequence and end_sequence and instead assert that no rtl is
27558         generated.
27560 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
27562         * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
27563         order of HIGH and CONST checks.
27565 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
27567         * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
27568         if the destination isn't an SSA_NAME.
27570 2018-01-09  Richard Biener  <rguenther@suse.de>
27572         PR tree-optimization/83668
27573         * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
27574         move prologue...
27575         (canonicalize_loop_form): ... here, renamed from ...
27576         (canonicalize_loop_closed_ssa_form): ... this and amended to
27577         swap successor edges for loop exit blocks to make us use
27578         the RPO order we need for initial schedule generation.
27580 2018-01-09  Joseph Myers  <joseph@codesourcery.com>
27582         PR tree-optimization/64811
27583         * match.pd: When optimizing comparisons with Inf, avoid
27584         introducing or losing exceptions from comparisons with NaN.
27586 2018-01-09  Martin Liska  <mliska@suse.cz>
27588         PR sanitizer/82517
27589         * asan.c (shadow_mem_size): Add gcc_assert.
27591 2018-01-09  Georg-Johann Lay  <avr@gjlay.de>
27593         Don't save registers in main().
27595         PR target/83738
27596         * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
27597         * config/avr/avr.opt (-mmain-is-OS_task): New target option.
27598         * config/avr/avr.c (avr_set_current_function): Don't error if
27599         naked, OS_task or OS_main are specified at the same time.
27600         (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
27601         OS_main.
27602         (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
27603         attribute.
27604         * common/config/avr/avr-common.c (avr_option_optimization_table):
27605         Switch on -mmain-is-OS_task for optimizing compilations.
27607 2018-01-09  Richard Biener  <rguenther@suse.de>
27609         PR tree-optimization/83572
27610         * graphite.c: Include cfganal.h.
27611         (graphite_transform_loops): Connect infinite loops to exit
27612         and remove fake edges at the end.
27614 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
27616         * ipa-inline.c (edge_badness): Revert accidental checkin.
27618 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
27620         PR ipa/80763
27621         * ipa-comdats.c (set_comdat_group): Only set comdat group of real
27622         symbols; not inline clones.
27624 2018-01-09  Jakub Jelinek  <jakub@redhat.com>
27626         PR target/83507
27627         * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
27628         hard registers.  Formatting fixes.
27630         PR preprocessor/83722
27631         * gcc.c (try_generate_repro): Pass
27632         &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
27633         &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
27634         do_report_bug.
27636 2018-01-08  Monk Chiang  <sh.chiang04@gmail.com>
27637             Kito Cheng  <kito.cheng@gmail.com>
27639         * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
27640         (riscv_leaf_function_p): Delete.
27641         (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
27643 2018-01-08  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
27645         * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
27646         function.
27647         (do_ifelse): New function.
27648         (do_isel): New function.
27649         (do_sub3): New function.
27650         (do_add3): New function.
27651         (do_load_mask_compare): New function.
27652         (do_overlap_load_compare): New function.
27653         (expand_compare_loop): New function.
27654         (expand_block_compare): Call expand_compare_loop() when appropriate.
27655         * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
27656         option description.
27657         (-mblock-compare-inline-loop-limit): New option.
27659 2018-01-08  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
27661         PR target/83677
27662         * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
27663         Reverse order of second and third operands in first alternative.
27664         * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
27665         of first and second elements in UNSPEC_VPERMR vector.
27666         (altivec_expand_vec_perm_le): Likewise.
27668 2018-01-08  Jeff Law  <law@redhat.com>
27670         PR rtl-optimizatin/81308
27671         * tree-switch-conversion.c (cfg_altered): New file scoped static.
27672         (process_switch): If group_case_labels makes a change, then set
27673         cfg_altered.
27674         (pass_convert_switch::execute): If a switch is converted, then
27675         set cfg_altered.  Return TODO_cfg_cleanup if cfg_altered is true.
27677         PR rtl-optimization/81308
27678         * recog.c (split_all_insns): Conditionally cleanup the CFG after
27679         splitting insns.
27681 2018-01-08  Vidya Praveen  <vidyapraveen@arm.com>
27683         PR target/83663 - Revert r255946
27684         * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
27685         generation for cases where splatting a value is not useful.
27686         * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
27687         across a vec_duplicate and a paradoxical subreg forming a vector
27688         mode to a vec_concat.
27690 2018-01-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
27692         * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
27693         -march=armv8.3-a variants.
27694         * config/arm/t-multilib: Likewise.
27695         * config/arm/t-arm-elf: Likewise.  Handle dotprod extension.
27697 2018-01-08  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
27699         * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
27700         to generate rtl.
27701         (cceq_ior_compare_complement): Give it a name so I can use it, and
27702         change boolean_or_operator predicate to boolean_operator so it can
27703         be used to generate a crand.
27704         (eqne): New code iterator.
27705         (bd/bd_neg): New code_attrs.
27706         (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
27707         a single define_insn.
27708         (<bd>tf_<mode>): A new insn pattern for the conditional form branch
27709         decrement (bdnzt/bdnzf/bdzt/bdzf).
27710         * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
27711         with the new names of the branch decrement patterns, and added the
27712         names of the branch decrement conditional patterns.
27714 2018-01-08  Richard Biener  <rguenther@suse.de>
27716         PR tree-optimization/83563
27717         * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
27718         cache.
27720 2018-01-08  Richard Biener  <rguenther@suse.de>
27722         PR middle-end/83713
27723         * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
27725 2018-01-08  Richard Biener  <rguenther@suse.de>
27727         PR tree-optimization/83685
27728         * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
27729         references to abnormals.
27731 2018-01-08  Richard Biener  <rguenther@suse.de>
27733         PR lto/83719
27734         * dwarf2out.c (output_indirect_strings): Handle empty
27735         skeleton_debug_str_hash.
27736         (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
27738 2018-01-08  Claudiu Zissulescu  <claziss@synopsys.com>
27740         * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
27741         (emit_store_direct): Likewise.
27742         (arc_trampoline_adjust_address): Likewise.
27743         (arc_asm_trampoline_template): New function.
27744         (arc_initialize_trampoline): Use asm_trampoline_template.
27745         (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
27746         * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
27747         * config/arc/arc.md (flush_icache): Delete pattern.
27749 2018-01-08  Claudiu Zissulescu  <claziss@synopsys.com>
27751         * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
27752         * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
27753         munaligned-access.
27755 2018-01-08  Sebastian Huber  <sebastian.huber@embedded-brains.de>
27757         PR target/83681
27758         * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
27759         by not USED_FOR_TARGET.
27760         (make_pass_resolve_sw_modes): Likewise.
27762 2018-01-08  Sebastian Huber  <sebastian.huber@embedded-brains.de>
27764         * config/nios2/nios2.h (nios2_section_threshold): Guard by not
27765         USED_FOR_TARGET.
27767 2018-01-08  Richard Biener  <rguenther@suse.de>
27769         PR middle-end/83580
27770         * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
27772 2018-01-08  Richard Biener  <rguenther@suse.de>
27774         PR middle-end/83517
27775         * match.pd ((t * 2) / 2) -> t): Add missing :c.
27777 2018-01-06  Aldy Hernandez  <aldyh@redhat.com>
27779         PR middle-end/81897
27780         * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
27781         basic blocks with a small number of successors.
27782         (convert_control_dep_chain_into_preds): Improve handling of
27783         forwarder blocks.
27784         (dump_predicates): Split apart into...
27785         (dump_pred_chain): ...here...
27786         (dump_pred_info): ...and here.
27787         (can_one_predicate_be_invalidated_p): Add debugging printfs.
27788         (can_chain_union_be_invalidated_p): Improve check for invalidation
27789         of paths.
27790         (uninit_uses_cannot_happen): Avoid unnecessary if
27791         convert_control_dep_chain_into_preds yielded nothing.
27793 2018-01-06  Martin Sebor  <msebor@redhat.com>
27795         PR tree-optimization/83640
27796         * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
27797         subtracting negative offset from size.
27798         (builtin_access::overlap): Adjust offset bounds of the access to fall
27799         within the size of the object if possible.
27801 2018-01-06  Richard Sandiford  <richard.sandiford@linaro.org>
27803         PR rtl-optimization/83699
27804         * expmed.c (extract_bit_field_1): Restrict the vector usage of
27805         extract_bit_field_as_subreg to cases in which the extracted
27806         value is also a vector.
27808         * lra-constraints.c (process_alt_operands): Test for the equivalence
27809         substitutions when detecting a possible reload cycle.
27811 2018-01-06  Jakub Jelinek  <jakub@redhat.com>
27813         PR debug/83480
27814         * toplev.c (process_options): Don't enable debug_nonbind_markers_p
27815         by default if flag_selective_schedling{,2}.  Formatting fixes.
27817         PR rtl-optimization/83682
27818         * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
27819         if it has non-VECTOR_MODE element mode.
27820         (vec_duplicate_p): Likewise.
27822         PR middle-end/83694
27823         * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
27824         and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
27826 2018-01-05  Jakub Jelinek  <jakub@redhat.com>
27828         PR target/83604
27829         * config/i386/i386-builtin.def
27830         (__builtin_ia32_vgf2p8affineinvqb_v64qi,
27831         __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
27832         Require also OPTION_MASK_ISA_AVX512F in addition to
27833         OPTION_MASK_ISA_GFNI.
27834         (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
27835         __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
27836         OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
27837         to OPTION_MASK_ISA_GFNI.
27838         (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
27839         OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
27840         OPTION_MASK_ISA_AVX512BW.
27841         (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
27842         OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
27843         addition to OPTION_MASK_ISA_GFNI.
27844         (__builtin_ia32_vgf2p8affineinvqb_v16qi,
27845         __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
27846         Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
27847         to OPTION_MASK_ISA_GFNI.
27848         * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
27849         a requirement for all ISAs rather than any of them with a few
27850         exceptions.
27851         (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
27852         processing.
27853         (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
27854         bitmasks to be enabled with 3 exceptions, instead of requiring any
27855         enabled ISA with lots of exceptions.
27856         * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
27857         vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
27858         Change avx512bw in isa attribute to avx512f.
27859         * config/i386/sgxintrin.h: Add license boilerplate.
27860         * config/i386/vaesintrin.h: Likewise.  Fix macro spelling __AVX512F
27861         to __AVX512F__ and __AVX512VL to __AVX512VL__.
27862         (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
27863         _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
27864         defined.
27865         * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
27866         _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
27867         temporarily sse2 rather than sse if not enabled already.
27869         PR target/83604
27870         * config/i386/sse.md (VI248_VLBW): Rename to ...
27871         (VI248_AVX512VL): ... this.  Don't guard V32HI with TARGET_AVX512BW.
27872         (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
27873         vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
27874         vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
27875         vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
27876         mode iterator instead of VI248_VLBW.
27878 2018-01-05  Jan Hubicka  <hubicka@ucw.cz>
27880         * ipa-fnsummary.c (record_modified_bb_info): Add OP.
27881         (record_modified): Skip clobbers; add debug output.
27882         (param_change_prob): Use sreal frequencies.
27884 2018-01-05  Richard Sandiford  <richard.sandiford@linaro.org>
27886         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
27887         punt for user-aligned variables.
27889 2018-01-05  Richard Sandiford  <richard.sandiford@linaro.org>
27891         * tree-chrec.c (chrec_contains_symbols): Return true for
27892         POLY_INT_CST.
27894 2018-01-05  Sudakshina Das  <sudi.das@arm.com>
27896         PR target/82439
27897         * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
27898         of (x|y) == x for BICS pattern.
27900 2018-01-05  Jakub Jelinek  <jakub@redhat.com>
27902         PR tree-optimization/83605
27903         * gimple-ssa-strength-reduction.c: Include tree-eh.h.
27904         (find_candidates_dom_walker::before_dom_children): Ignore stmts that
27905         can throw.
27907 2018-01-05  Sebastian Huber  <sebastian.huber@embedded-brains.de>
27909         * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
27910         * config/epiphany/rtems.h: New file.
27912 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
27913             Uros Bizjak  <ubizjak@gmail.com>
27915         PR target/83554
27916         * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
27917         QIreg_operand instead of register_operand predicate.
27918         * config/i386/i386.c (ix86_rop_should_change_byte_p,
27919         set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
27920         comments instead of -fmitigate[-_]rop.
27922 2018-01-04  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
27924         PR bootstrap/81926
27925         * cgraphunit.c (symbol_table::compile): Switch to text_section
27926         before calling assembly_start debug hook.
27927         * run-rtl-passes.c (run_rtl_passes): Likewise.
27928         Include output.h.
27930 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
27932         * tree-vrp.c (extract_range_from_binary_expr_1): Check
27933         range_int_cst_p rather than !symbolic_range_p before calling
27934         extract_range_from_multiplicative_op_1.
27936 2018-01-04  Jeff Law  <law@redhat.com>
27938         * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
27939         redundant test in assertion.
27941 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
27943         * doc/rtl.texi: Document machine_mode wrapper classes.
27945 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
27947         * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
27948         using tree_to_uhwi.
27950 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
27952         * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
27953         the VEC_PERM_EXPR fold to fail.
27955 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
27957         PR debug/83585
27958         * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
27959         to switched_sections.
27961 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
27963         PR target/83680
27964         * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
27965         test for d.testing.
27967 2018-01-04  Peter Bergner  <bergner@vnet.ibm.com>
27969         PR target/83387
27970         * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
27971         allow arguments in FP registers if TARGET_HARD_FLOAT is false.
27973 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
27975         PR debug/83666
27976         * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
27977         is BLKmode and bitpos not zero or mode change is needed.
27979 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
27981         PR target/83675
27982         * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
27983         TARGET_VIS2.
27985 2018-01-04  Uros Bizjak  <ubizjak@gmail.com>
27987         PR target/83628
27988         * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
27989         instead of MULT rtx.  Update all corresponding splitters.
27990         (*saddl_se): Ditto.
27991         (*ssub<modesuffix>): Ditto.
27992         (*ssubl_se): Ditto.
27993         (*cmp_sadd_di): Update split patterns.
27994         (*cmp_sadd_si): Ditto.
27995         (*cmp_sadd_sidi): Ditto.
27996         (*cmp_ssub_di): Ditto.
27997         (*cmp_ssub_si): Ditto.
27998         (*cmp_ssub_sidi): Ditto.
27999         * config/alpha/predicates.md (const23_operand): New predicate.
28000         * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
28001         Look for ASHIFT, not MULT inner operand.
28002         (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
28004 2018-01-04  Martin Liska  <mliska@suse.cz>
28006         PR gcov-profile/83669
28007         * gcov.c (output_intermediate_file): Add version to intermediate
28008         gcov file.
28009         * doc/gcov.texi: Document new field 'version' in intermediate
28010         file format. Fix location of '-k' option of gcov command.
28012 2018-01-04  Martin Liska  <mliska@suse.cz>
28014         PR ipa/82352
28015         * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
28017 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
28019         * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
28021 2018-01-03  Martin Sebor  <msebor@redhat.com>
28023         PR tree-optimization/83655
28024         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
28025         checking calls with invalid arguments.
28027 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28029         * tree-vect-stmts.c (vect_get_store_rhs): New function.
28030         (vectorizable_mask_load_store): Delete.
28031         (vectorizable_call): Return false for masked loads and stores.
28032         (vectorizable_store): Handle IFN_MASK_STORE.  Use vect_get_store_rhs
28033         instead of gimple_assign_rhs1.
28034         (vectorizable_load): Handle IFN_MASK_LOAD.
28035         (vect_transform_stmt): Don't set is_store for call_vec_info_type.
28037 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28039         * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
28040         split out from..,
28041         (vectorizable_mask_load_store): ...here.
28042         (vectorizable_load): ...and here.
28044 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28046         * tree-vect-stmts.c (vect_build_all_ones_mask)
28047         (vect_build_zero_merge_argument): New functions, split out from...
28048         (vectorizable_load): ...here.
28050 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28052         * tree-vect-stmts.c (vect_check_store_rhs): New function,
28053         split out from...
28054         (vectorizable_mask_load_store): ...here.
28055         (vectorizable_store): ...and here.
28057 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28059         * tree-vect-stmts.c (vect_check_load_store_mask): New function,
28060         split out from...
28061         (vectorizable_mask_load_store): ...here.
28063 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28065         * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
28066         (vect_model_store_cost): Take a vec_load_store_type instead of a
28067         vect_def_type.
28068         * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
28069         (vect_model_store_cost): Take a vec_load_store_type instead of a
28070         vect_def_type.
28071         (vectorizable_mask_load_store): Update accordingly.
28072         (vectorizable_store): Likewise.
28073         * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
28075 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28077         * tree-vect-loop.c (vect_transform_loop): Stub out scalar
28078         IFN_MASK_LOAD calls here rather than...
28079         * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
28081 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28082             Alan Hayward  <alan.hayward@arm.com>
28083             David Sherwood  <david.sherwood@arm.com>
28085         * expmed.c (extract_bit_field_1): For vector extracts,
28086         fall back to extract_bit_field_as_subreg if vec_extract
28087         isn't available.
28089 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28090             Alan Hayward  <alan.hayward@arm.com>
28091             David Sherwood  <david.sherwood@arm.com>
28093         * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
28094         they are variable or constant sized.
28095         (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
28096         slots for constant-sized data.
28098 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28099             Alan Hayward  <alan.hayward@arm.com>
28100             David Sherwood  <david.sherwood@arm.com>
28102         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
28103         handling COND_EXPRs with boolean comparisons, try to find a better
28104         basis for the mask type than the boolean itself.
28106 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28108         * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
28109         is calculated and how it can be overridden.
28110         * genmodes.c (max_bitsize_mode_any_mode): New variable.
28111         (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
28112         if defined.
28113         (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
28114         if nonzero.
28116 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28117             Alan Hayward  <alan.hayward@arm.com>
28118             David Sherwood  <david.sherwood@arm.com>
28120         * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
28121         Remove the mode argument.
28122         (aarch64_simd_valid_immediate): Remove the mode and inverse
28123         arguments.
28124         * config/aarch64/iterators.md (bitsize): New iterator.
28125         * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
28126         (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
28127         * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
28128         aarch64_simd_valid_immediate.
28129         * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
28130         (aarch64_reg_or_bic_imm): Likewise.
28131         * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
28132         with an insn_type enum and msl with a modifier_type enum.
28133         Replace element_width with a scalar_mode.  Change the shift
28134         to unsigned int.  Add constructors for scalar_float_mode and
28135         scalar_int_mode elements.
28136         (aarch64_vect_float_const_representable_p): Delete.
28137         (aarch64_can_const_movi_rtx_p)
28138         (aarch64_simd_scalar_immediate_valid_for_move)
28139         (aarch64_simd_make_constant): Update call to
28140         aarch64_simd_valid_immediate.
28141         (aarch64_advsimd_valid_immediate_hs): New function.
28142         (aarch64_advsimd_valid_immediate): Likewise.
28143         (aarch64_simd_valid_immediate): Remove mode and inverse
28144         arguments.  Rewrite to use the above.  Use const_vec_duplicate_p
28145         to detect duplicated constants and use aarch64_float_const_zero_rtx_p
28146         and aarch64_float_const_representable_p on the result.
28147         (aarch64_output_simd_mov_immediate): Remove mode argument.
28148         Update call to aarch64_simd_valid_immediate and use of
28149         simd_immediate_info.
28150         (aarch64_output_scalar_simd_mov_immediate): Update call
28151         accordingly.
28153 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28154             Alan Hayward  <alan.hayward@arm.com>
28155             David Sherwood  <david.sherwood@arm.com>
28157         * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
28158         (mode_nunits): Likewise CONST_MODE_NUNITS.
28159         * machmode.def (ADJUST_NUNITS): Document.
28160         * genmodes.c (mode_data::need_nunits_adj): New field.
28161         (blank_mode): Update accordingly.
28162         (adj_nunits): New variable.
28163         (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
28164         parameter.
28165         (emit_mode_size_inline): Set need_bytesize_adj for all modes
28166         listed in adj_nunits.
28167         (emit_mode_nunits_inline): Set need_nunits_adj for all modes
28168         listed in adj_nunits.  Don't emit case statements for such modes.
28169         (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
28170         and CONST_MODE_PRECISION.  Make CONST_MODE_SIZE expand to
28171         nothing if adj_nunits is nonnull.
28172         (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
28173         (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
28174         (emit_mode_fbit): Update use of print_maybe_const_decl.
28175         (emit_move_size): Likewise.  Treat the array as non-const
28176         if adj_nunits.
28177         (emit_mode_adjustments): Handle adj_nunits.
28179 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28181         * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
28182         * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
28183         (VECTOR_MODES): Use it.
28184         (make_vector_modes): Take the prefix as an argument.
28186 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28187             Alan Hayward  <alan.hayward@arm.com>
28188             David Sherwood  <david.sherwood@arm.com>
28190         * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
28191         * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
28192         for MODE_VECTOR_BOOL.
28193         * machmode.def (VECTOR_BOOL_MODE): Document.
28194         * genmodes.c (VECTOR_BOOL_MODE): New macro.
28195         (make_vector_bool_mode): New function.
28196         (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
28197         MODE_VECTOR_BOOL.
28198         * lto-streamer-in.c (lto_input_mode_table): Likewise.
28199         * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
28200         Likewise.
28201         * stor-layout.c (int_mode_for_mode): Likewise.
28202         * tree.c (build_vector_type_for_mode): Likewise.
28203         * varasm.c (output_constant_pool_2): Likewise.
28204         * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
28205         CONSTM1_RTX (BImode) are the same thing.  Initialize const_tiny_rtx
28206         for MODE_VECTOR_BOOL.
28207         * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
28208         of mode class checks.
28209         * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
28210         instead of a list of mode class checks.
28211         (expand_vector_scalar_condition): Likewise.
28212         (type_for_widest_vector_mode): Handle BImode as an inner mode.
28214 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28215             Alan Hayward  <alan.hayward@arm.com>
28216             David Sherwood  <david.sherwood@arm.com>
28218         * machmode.h (mode_size): Change from unsigned short to
28219         poly_uint16_pod.
28220         (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
28221         (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
28222         or if measurement_type is not polynomial.
28223         (fixed_size_mode::includes_p): Check for constant-sized modes.
28224         * genmodes.c (emit_mode_size_inline): Make mode_size_inline
28225         return a poly_uint16 rather than an unsigned short.
28226         (emit_mode_size): Change the type of mode_size from unsigned short
28227         to poly_uint16_pod.  Use ZERO_COEFFS for the initializer.
28228         (emit_mode_adjustments): Cope with polynomial vector sizes.
28229         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
28230         for GET_MODE_SIZE.
28231         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
28232         for GET_MODE_SIZE.
28233         * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
28234         * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
28235         * caller-save.c (setup_save_areas): Likewise.
28236         (replace_reg_with_saved_mem): Likewise.
28237         * calls.c (emit_library_call_value_1): Likewise.
28238         * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
28239         * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
28240         (gen_lowpart_for_combine): Likewise.
28241         * convert.c (convert_to_integer_1): Likewise.
28242         * cse.c (equiv_constant, cse_insn): Likewise.
28243         * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
28244         (cselib_subst_to_values): Likewise.
28245         * dce.c (word_dce_process_block): Likewise.
28246         * df-problems.c (df_word_lr_mark_ref): Likewise.
28247         * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
28248         * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
28249         (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
28250         (rtl_for_decl_location): Likewise.
28251         * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
28252         * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
28253         * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
28254         (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
28255         (expand_expr_real_1): Likewise.
28256         * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
28257         (pad_below): Likewise.
28258         * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
28259         * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
28260         * ira.c (get_subreg_tracking_sizes): Likewise.
28261         * ira-build.c (ira_create_allocno_objects): Likewise.
28262         * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
28263         (ira_sort_regnos_for_alter_reg): Likewise.
28264         * ira-costs.c (record_operand_costs): Likewise.
28265         * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
28266         (resolve_simple_move): Likewise.
28267         * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
28268         (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
28269         (lra_constraints): Likewise.
28270         (CONST_POOL_OK_P): Reject variable-sized modes.
28271         * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
28272         (add_pseudo_to_slot, lra_spill): Likewise.
28273         * omp-low.c (omp_clause_aligned_alignment): Likewise.
28274         * optabs-query.c (get_best_extraction_insn): Likewise.
28275         * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
28276         * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
28277         (expand_mult_highpart, valid_multiword_target_p): Likewise.
28278         * recog.c (offsettable_address_addr_space_p): Likewise.
28279         * regcprop.c (maybe_mode_change): Likewise.
28280         * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
28281         * regrename.c (build_def_use): Likewise.
28282         * regstat.c (dump_reg_info): Likewise.
28283         * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
28284         (find_reloads, find_reloads_subreg_address): Likewise.
28285         * reload1.c (eliminate_regs_1): Likewise.
28286         * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
28287         * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
28288         (simplify_binary_operation_1, simplify_subreg): Likewise.
28289         * targhooks.c (default_function_arg_padding): Likewise.
28290         (default_hard_regno_nregs, default_class_max_nregs): Likewise.
28291         * tree-cfg.c (verify_gimple_assign_binary): Likewise.
28292         (verify_gimple_assign_ternary): Likewise.
28293         * tree-inline.c (estimate_move_cost): Likewise.
28294         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
28295         * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
28296         (get_address_cost_ainc): Likewise.
28297         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
28298         (vect_supportable_dr_alignment): Likewise.
28299         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
28300         (vectorizable_reduction): Likewise.
28301         * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
28302         (vectorizable_operation, vectorizable_load): Likewise.
28303         * tree.c (build_same_sized_truth_vector_type): Likewise.
28304         * valtrack.c (cleanup_auto_inc_dec): Likewise.
28305         * var-tracking.c (emit_note_insn_var_location): Likewise.
28306         * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
28307         (ADDR_VEC_ALIGN): Likewise.
28309 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28310             Alan Hayward  <alan.hayward@arm.com>
28311             David Sherwood  <david.sherwood@arm.com>
28313         * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
28314         unsigned short.
28315         (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
28316         or if measurement_type is polynomial.
28317         * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
28318         * combine.c (make_extraction): Likewise.
28319         * dse.c (find_shift_sequence): Likewise.
28320         * dwarf2out.c (mem_loc_descriptor): Likewise.
28321         * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
28322         (extract_bit_field, extract_low_bits): Likewise.
28323         * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
28324         (optimize_bitfield_assignment_op, expand_assignment): Likewise.
28325         (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
28326         * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
28327         * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
28328         * reload.c (find_reloads): Likewise.
28329         * reload1.c (alter_reg): Likewise.
28330         * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
28331         * targhooks.c (default_secondary_memory_needed_mode): Likewise.
28332         * tree-if-conv.c (predicate_mem_writes): Likewise.
28333         * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
28334         * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
28335         * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
28336         * valtrack.c (dead_debug_insert_temp): Likewise.
28337         * varasm.c (mergeable_constant_section): Likewise.
28338         * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
28340 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28341             Alan Hayward  <alan.hayward@arm.com>
28342             David Sherwood  <david.sherwood@arm.com>
28344         * expr.c (expand_assignment): Cope with polynomial mode sizes
28345         when assigning to a CONCAT.
28347 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28348             Alan Hayward  <alan.hayward@arm.com>
28349             David Sherwood  <david.sherwood@arm.com>
28351         * machmode.h (mode_precision): Change from unsigned short to
28352         poly_uint16_pod.
28353         (mode_to_precision): Return a poly_uint16 rather than an unsigned
28354         short.
28355         (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
28356         or if measurement_type is not polynomial.
28357         (HWI_COMPUTABLE_MODE_P): Turn into a function.  Optimize the case
28358         in which the mode is already known to be a scalar_int_mode.
28359         * genmodes.c (emit_mode_precision): Change the type of mode_precision
28360         from unsigned short to poly_uint16_pod.  Use ZERO_COEFFS for the
28361         initializer.
28362         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
28363         for GET_MODE_PRECISION.
28364         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
28365         for GET_MODE_PRECISION.
28366         * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
28367         as polynomial.
28368         (try_combine, find_split_point, combine_simplify_rtx): Likewise.
28369         (expand_field_assignment, make_extraction): Likewise.
28370         (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
28371         (get_last_value): Likewise.
28372         * convert.c (convert_to_integer_1): Likewise.
28373         * cse.c (cse_insn): Likewise.
28374         * expr.c (expand_expr_real_1): Likewise.
28375         * lra-constraints.c (simplify_operand_subreg): Likewise.
28376         * optabs-query.c (can_atomic_load_p): Likewise.
28377         * optabs.c (expand_atomic_load): Likewise.
28378         (expand_atomic_store): Likewise.
28379         * ree.c (combine_reaching_defs): Likewise.
28380         * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
28381         * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
28382         * tree.h (type_has_mode_precision_p): Likewise.
28383         * ubsan.c (instrument_si_overflow): Likewise.
28385 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28386             Alan Hayward  <alan.hayward@arm.com>
28387             David Sherwood  <david.sherwood@arm.com>
28389         * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
28390         polynomial numbers of units.
28391         (SET_TYPE_VECTOR_SUBPARTS): Likewise.
28392         (valid_vector_subparts_p): New function.
28393         (build_vector_type): Remove temporary shim and take the number
28394         of units as a poly_uint64 rather than an int.
28395         (build_opaque_vector_type): Take the number of units as a
28396         poly_uint64 rather than an int.
28397         * tree.c (build_vector_from_ctor): Handle polynomial
28398         TYPE_VECTOR_SUBPARTS.
28399         (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
28400         (uniform_vector_p, vector_type_mode, build_vector): Likewise.
28401         (build_vector_from_val): If the number of units is variable,
28402         use build_vec_duplicate_cst for constant operands and
28403         VEC_DUPLICATE_EXPR otherwise.
28404         (make_vector_type): Remove temporary is_constant ().
28405         (build_vector_type, build_opaque_vector_type): Take the number of
28406         units as a poly_uint64 rather than an int.
28407         (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
28408         VECTOR_CST_NELTS.
28409         * cfgexpand.c (expand_debug_expr): Likewise.
28410         * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
28411         (store_constructor, expand_expr_real_1): Likewise.
28412         (const_scalar_mask_from_tree): Likewise.
28413         * fold-const-call.c (fold_const_reduction): Likewise.
28414         * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
28415         (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
28416         (native_encode_vector, vec_cst_ctor_to_array): Likewise.
28417         (fold_relational_const): Likewise.
28418         (native_interpret_vector): Likewise.  Change the size from an
28419         int to an unsigned int.
28420         * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
28421         TYPE_VECTOR_SUBPARTS.
28422         (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
28423         (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
28424         duplicating a non-constant operand into a variable-length vector.
28425         * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
28426         TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
28427         * ipa-icf.c (sem_variable::equals): Likewise.
28428         * match.pd: Likewise.
28429         * omp-simd-clone.c (simd_clone_subparts): Likewise.
28430         * print-tree.c (print_node): Likewise.
28431         * stor-layout.c (layout_type): Likewise.
28432         * targhooks.c (default_builtin_vectorization_cost): Likewise.
28433         * tree-cfg.c (verify_gimple_comparison): Likewise.
28434         (verify_gimple_assign_binary): Likewise.
28435         (verify_gimple_assign_ternary): Likewise.
28436         (verify_gimple_assign_single): Likewise.
28437         * tree-pretty-print.c (dump_generic_node): Likewise.
28438         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
28439         (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
28440         * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
28441         (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
28442         (vect_shift_permute_load_chain): Likewise.
28443         * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
28444         (expand_vector_condition, optimize_vector_constructor): Likewise.
28445         (lower_vec_perm, get_compute_type): Likewise.
28446         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
28447         (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
28448         * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
28449         (vect_recog_mask_conversion_pattern): Likewise.
28450         * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
28451         (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
28452         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
28453         (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
28454         (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
28455         (vectorizable_shift, vectorizable_operation, vectorizable_store)
28456         (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
28457         (supportable_widening_operation): Likewise.
28458         (supportable_narrowing_operation): Likewise.
28459         * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
28460         Likewise.
28461         * varasm.c (output_constant): Likewise.
28463 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28464             Alan Hayward  <alan.hayward@arm.com>
28465             David Sherwood  <david.sherwood@arm.com>
28467         * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
28468         so that both the length == 3 and length != 3 cases set up their
28469         own permute vectors.  Add comments explaining why we know the
28470         number of elements is constant.
28471         (vect_permute_load_chain): Likewise.
28473 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28474             Alan Hayward  <alan.hayward@arm.com>
28475             David Sherwood  <david.sherwood@arm.com>
28477         * machmode.h (mode_nunits): Change from unsigned char to
28478         poly_uint16_pod.
28479         (ONLY_FIXED_SIZE_MODES): New macro.
28480         (pod_mode::measurement_type, scalar_int_mode::measurement_type)
28481         (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
28482         (complex_mode::measurement_type, fixed_size_mode::measurement_type):
28483         New typedefs.
28484         (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
28485         (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
28486         or if measurement_type is not polynomial.
28487         * genmodes.c (ZERO_COEFFS): New macro.
28488         (emit_mode_nunits_inline): Make mode_nunits_inline return a
28489         poly_uint16.
28490         (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
28491         Use ZERO_COEFFS when emitting initializers.
28492         * data-streamer.h (bp_pack_poly_value): New function.
28493         (bp_unpack_poly_value): Likewise.
28494         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
28495         for GET_MODE_NUNITS.
28496         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
28497         for GET_MODE_NUNITS.
28498         * tree.c (make_vector_type): Remove temporary shim and make
28499         the real function take the number of units as a poly_uint64
28500         rather than an int.
28501         (build_vector_type_for_mode): Handle polynomial nunits.
28502         * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
28503         * emit-rtl.c (const_vec_series_p_1): Likewise.
28504         (gen_rtx_CONST_VECTOR): Likewise.
28505         * fold-const.c (test_vec_duplicate_folding): Likewise.
28506         * genrecog.c (validate_pattern): Likewise.
28507         * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
28508         * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
28509         * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
28510         (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
28511         (expand_vec_cond_expr, expand_mult_highpart): Likewise.
28512         * rtlanal.c (subreg_get_info): Likewise.
28513         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
28514         (vect_grouped_load_supported): Likewise.
28515         * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
28516         * tree-vect-loop.c (have_whole_vector_shift): Likewise.
28517         * simplify-rtx.c (simplify_unary_operation_1): Likewise.
28518         (simplify_const_unary_operation, simplify_binary_operation_1)
28519         (simplify_const_binary_operation, simplify_ternary_operation)
28520         (test_vector_ops_duplicate, test_vector_ops): Likewise.
28521         (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
28522         instead of CONST_VECTOR_NUNITS.
28523         * varasm.c (output_constant_pool_2): Likewise.
28524         * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
28525         explicit-encoded elements in the XVEC for variable-length vectors.
28527 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28529         * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
28531 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28532             Alan Hayward  <alan.hayward@arm.com>
28533             David Sherwood  <david.sherwood@arm.com>
28535         * coretypes.h (fixed_size_mode): Declare.
28536         (fixed_size_mode_pod): New typedef.
28537         * builtins.h (target_builtins::x_apply_args_mode)
28538         (target_builtins::x_apply_result_mode): Change type to
28539         fixed_size_mode_pod.
28540         * builtins.c (apply_args_size, apply_result_size, result_vector)
28541         (expand_builtin_apply_args_1, expand_builtin_apply)
28542         (expand_builtin_return): Update accordingly.
28544 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28546         * cse.c (hash_rtx_cb): Hash only the encoded elements.
28547         * cselib.c (cselib_hash_rtx): Likewise.
28548         * expmed.c (make_tree): Build VECTOR_CSTs directly from the
28549         CONST_VECTOR encoding.
28551 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
28552             Jeff Law  <law@redhat.com>
28554         PR target/83641
28555         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
28556         noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
28557         only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
28558         and add REG_CFA_ADJUST_CFA notes in that case to both insns.
28560         PR target/83641
28561         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
28562         explicitly probe *sp in a noreturn function if there were any callee
28563         register saves or frame pointer is needed.
28565 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
28567         PR debug/83621
28568         * cfgexpand.c (expand_debug_expr): Return NULL if mode is
28569         BLKmode for ternary, binary or unary expressions.
28571         PR debug/83645
28572         * var-tracking.c (delete_vta_debug_insn): New inline function.
28573         (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
28574         insns from get_insns () to NULL instead of each bb separately.
28575         Use delete_vta_debug_insn.  No longer static.
28576         (vt_debug_insns_local, variable_tracking_main_1): Adjust
28577         delete_vta_debug_insns callers.
28578         * rtl.h (delete_vta_debug_insns): Declare.
28579         * final.c (rest_of_handle_final): Call delete_vta_debug_insns
28580         instead of variable_tracking_main.
28582 2018-01-03  Martin Sebor  <msebor@redhat.com>
28584         PR tree-optimization/83603
28585         * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
28586         arguments past the endof the argument list in functions declared
28587         without a prototype.
28588         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
28589         Avoid checking when arguments are null.
28591 2018-01-03  Martin Sebor  <msebor@redhat.com>
28593         PR c/83559
28594         * doc/extend.texi (attribute const): Fix a typo.
28595         * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
28596         issuing -Wsuggest-attribute for void functions.
28598 2018-01-03  Martin Sebor  <msebor@redhat.com>
28600         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
28601         offset_int::from instead of wide_int::to_shwi.
28602         (maybe_diag_overlap): Remove assertion.
28603         Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
28604         * gimple-ssa-sprintf.c (format_directive): Same.
28605         (parse_directive): Same.
28606         (sprintf_dom_walker::compute_format_length): Same.
28607         (try_substitute_return_value): Same.
28609 2018-01-03  Jeff Law  <law@redhat.com>
28611         PR middle-end/83654
28612         * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
28613         non-constant residual for zero at runtime and avoid probing in
28614         that case.  Reorganize code for trailing problem to mirror handling
28615         of the residual.
28617 2018-01-03  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
28619         PR tree-optimization/83501
28620         * tree-ssa-strlen.c (get_string_cst): New.
28621         (handle_char_store): Call get_string_cst.
28623 2018-01-03  Martin Liska  <mliska@suse.cz>
28625         PR tree-optimization/83593
28626         * tree-ssa-strlen.c: Include tree-cfg.h.
28627         (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
28628         (strlen_dom_walker): Add new member variable m_cleanup_cfg.
28629         (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
28630         to false.
28631         (strlen_dom_walker::before_dom_children): Call
28632         gimple_purge_dead_eh_edges. Dump tranformation with details
28633         dump flags.
28634         (strlen_dom_walker::before_dom_children): Update call by adding
28635         new argument cleanup_eh.
28636         (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
28638 2018-01-03  Martin Liska  <mliska@suse.cz>
28640         PR ipa/83549
28641         * cif-code.def (VARIADIC_THUNK): New enum value.
28642         * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
28643         thunks.
28645 2018-01-03  Jan Beulich  <jbeulich@suse.com>
28647         * sse.md (mov<mode>_internal): Tighten condition for when to use
28648         vmovdqu<ssescalarsize> for TI and OI modes.
28650 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
28652         Update copyright years.
28654 2018-01-03  Martin Liska  <mliska@suse.cz>
28656         PR ipa/83594
28657         * ipa-visibility.c (function_and_variable_visibility): Skip
28658         functions with noipa attribure.
28660 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
28662         * gcc.c (process_command): Update copyright notice dates.
28663         * gcov-dump.c (print_version): Ditto.
28664         * gcov.c (print_version): Ditto.
28665         * gcov-tool.c (print_version): Ditto.
28666         * gengtype.c (create_file): Ditto.
28667         * doc/cpp.texi: Bump @copying's copyright year.
28668         * doc/cppinternals.texi: Ditto.
28669         * doc/gcc.texi: Ditto.
28670         * doc/gccint.texi: Ditto.
28671         * doc/gcov.texi: Ditto.
28672         * doc/install.texi: Ditto.
28673         * doc/invoke.texi: Ditto.
28675 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28677         * vector-builder.h (vector_builder::m_full_nelts): Change from
28678         unsigned int to poly_uint64.
28679         (vector_builder::full_nelts): Update prototype accordingly.
28680         (vector_builder::new_vector): Likewise.
28681         (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
28682         (vector_builder::operator ==): Likewise.
28683         (vector_builder::finalize): Likewise.
28684         * int-vector-builder.h (int_vector_builder::int_vector_builder):
28685         Take the number of elements as a poly_uint64 rather than an
28686         unsigned int.
28687         * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
28688         from unsigned int to poly_uint64.
28689         (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
28690         (vec_perm_indices::new_vector): Likewise.
28691         (vec_perm_indices::length): Likewise.
28692         (vec_perm_indices::nelts_per_input): Likewise.
28693         (vec_perm_indices::input_nelts): Likewise.
28694         * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
28695         number of elements per input as a poly_uint64 rather than an
28696         unsigned int.  Use the original encoding for variable-length
28697         vectors, rather than clamping each individual element.
28698         For the second and subsequent elements in each pattern,
28699         clamp the step and base before clamping their sum.
28700         (vec_perm_indices::series_p): Handle polynomial element counts.
28701         (vec_perm_indices::all_in_range_p): Likewise.
28702         (vec_perm_indices_to_tree): Likewise.
28703         (vec_perm_indices_to_rtx): Likewise.
28704         * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
28705         * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
28706         (tree_vector_builder::new_binary_operation): Handle polynomial
28707         element counts.  Return false if we need to know the number
28708         of elements at compile time.
28709         * fold-const.c (fold_vec_perm): Punt if the number of elements
28710         isn't known at compile time.
28712 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28714         * vec-perm-indices.h (vec_perm_builder): Change element type
28715         from HOST_WIDE_INT to poly_int64.
28716         (vec_perm_indices::element_type): Update accordingly.
28717         (vec_perm_indices::clamp): Handle polynomial element_types.
28718         * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
28719         (vec_perm_indices::all_in_range_p): Likewise.
28720         (tree_to_vec_perm_builder): Check for poly_int64 trees rather
28721         than shwi trees.
28722         * vector-builder.h (vector_builder::stepped_sequence_p): Handle
28723         polynomial vec_perm_indices element types.
28724         * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
28725         * fold-const.c (fold_vec_perm): Likewise.
28726         * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
28727         * tree-vect-generic.c (lower_vec_perm): Likewise.
28728         * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
28729         * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
28730         element type to HOST_WIDE_INT.
28732 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28733             Alan Hayward  <alan.hayward@arm.com>
28734             David Sherwood  <david.sherwood@arm.com>
28736         * alias.c (addr_side_effect_eval): Take the size as a poly_int64
28737         rather than an int.  Use plus_constant.
28738         (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
28739         Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
28741 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28742             Alan Hayward  <alan.hayward@arm.com>
28743             David Sherwood  <david.sherwood@arm.com>
28745         * calls.c (emit_call_1, expand_call): Change struct_value_size from
28746         a HOST_WIDE_INT to a poly_int64.
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         * calls.c (load_register_parameters): Cope with polynomial
28753         mode sizes.  Require a constant size for BLKmode parameters
28754         that aren't described by a PARALLEL.  If BLOCK_REG_PADDING
28755         forces a parameter to be padded at the lsb end in order to
28756         fill a complete number of words, require the parameter size
28757         to be ordered wrt UNITS_PER_WORD.
28759 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28760             Alan Hayward  <alan.hayward@arm.com>
28761             David Sherwood  <david.sherwood@arm.com>
28763         * reload1.c (spill_stack_slot_width): Change element type
28764         from unsigned int to poly_uint64_pod.
28765         (alter_reg): Treat mode sizes as polynomial.
28767 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28768             Alan Hayward  <alan.hayward@arm.com>
28769             David Sherwood  <david.sherwood@arm.com>
28771         * reload.c (complex_word_subreg_p): New function.
28772         (reload_inner_reg_of_subreg, push_reload): Use it.
28774 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28775             Alan Hayward  <alan.hayward@arm.com>
28776             David Sherwood  <david.sherwood@arm.com>
28778         * lra-constraints.c (process_alt_operands): Reject matched
28779         operands whose sizes aren't ordered.
28780         (match_reload): Refer to this check here.
28782 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28783             Alan Hayward  <alan.hayward@arm.com>
28784             David Sherwood  <david.sherwood@arm.com>
28786         * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
28787         that the mode size is in the set {1, 2, 4, 8, 16}.
28789 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28790             Alan Hayward  <alan.hayward@arm.com>
28791             David Sherwood  <david.sherwood@arm.com>
28793         * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
28794         Use plus_constant instead of gen_rtx_PLUS.
28796 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28797             Alan Hayward  <alan.hayward@arm.com>
28798             David Sherwood  <david.sherwood@arm.com>
28800         * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
28801         * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
28802         * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
28803         * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
28804         * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
28805         * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
28806         * config/i386/i386-protos.h (ix86_push_rounding): Declare.
28807         * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
28808         * config/i386/i386.c (ix86_push_rounding): ...this new function.
28809         * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
28810         a poly_int64.
28811         * config/m32c/m32c.c (m32c_push_rounding): Likewise.
28812         * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
28813         * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
28814         * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
28815         * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
28816         * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
28817         * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
28818         * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
28819         * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
28820         * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
28821         function.
28822         * expr.c (emit_move_resolve_push): Treat the input and result
28823         of PUSH_ROUNDING as a poly_int64.
28824         (emit_move_complex_push, emit_single_push_insn_1): Likewise.
28825         (emit_push_insn): Likewise.
28826         * lra-eliminations.c (mark_not_eliminable): Likewise.
28827         * recog.c (push_operand): Likewise.
28828         * reload1.c (elimination_effects): Likewise.
28829         * rtlanal.c (nonzero_bits1): Likewise.
28830         * calls.c (store_one_arg): Likewise.  Require the padding to be
28831         known at compile time.
28833 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28834             Alan Hayward  <alan.hayward@arm.com>
28835             David Sherwood  <david.sherwood@arm.com>
28837         * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
28838         Use plus_constant instead of gen_rtx_PLUS.
28840 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28841             Alan Hayward  <alan.hayward@arm.com>
28842             David Sherwood  <david.sherwood@arm.com>
28844         * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
28845         rather than an int.
28847 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28848             Alan Hayward  <alan.hayward@arm.com>
28849             David Sherwood  <david.sherwood@arm.com>
28851         * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
28852         instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
28853         via stack temporaries.  Treat the mode size as polynomial too.
28855 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28856             Alan Hayward  <alan.hayward@arm.com>
28857             David Sherwood  <david.sherwood@arm.com>
28859         * expr.c (expand_expr_real_2): When handling conversions involving
28860         unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
28861         multiplying int_size_in_bytes by BITS_PER_UNIT.  Treat GET_MODE_BISIZE
28862         as a poly_uint64 too.
28864 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28865             Alan Hayward  <alan.hayward@arm.com>
28866             David Sherwood  <david.sherwood@arm.com>
28868         * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
28870 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28871             Alan Hayward  <alan.hayward@arm.com>
28872             David Sherwood  <david.sherwood@arm.com>
28874         * combine.c (can_change_dest_mode): Handle polynomial
28875         REGMODE_NATURAL_SIZE.
28876         * expmed.c (store_bit_field_1): Likewise.
28877         * expr.c (store_constructor): Likewise.
28878         * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
28879         and polynomial REGMODE_NATURAL_SIZE.
28880         (gen_lowpart_common): Likewise.
28881         * reginfo.c (record_subregs_of_mode): Likewise.
28882         * rtlanal.c (read_modify_subreg_p): Likewise.
28884 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28885             Alan Hayward  <alan.hayward@arm.com>
28886             David Sherwood  <david.sherwood@arm.com>
28888         * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
28889         numbers of elements.
28891 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28892             Alan Hayward  <alan.hayward@arm.com>
28893             David Sherwood  <david.sherwood@arm.com>
28895         * match.pd: Cope with polynomial numbers of vector elements.
28897 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28898             Alan Hayward  <alan.hayward@arm.com>
28899             David Sherwood  <david.sherwood@arm.com>
28901         * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
28902         in a POINTER_PLUS_EXPR.
28904 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28905             Alan Hayward  <alan.hayward@arm.com>
28906             David Sherwood  <david.sherwood@arm.com>
28908         * omp-simd-clone.c (simd_clone_subparts): New function.
28909         (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
28910         (ipa_simd_modify_function_body): Likewise.
28912 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28913             Alan Hayward  <alan.hayward@arm.com>
28914             David Sherwood  <david.sherwood@arm.com>
28916         * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
28917         (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
28918         (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
28919         (expand_vector_condition, vector_element): Likewise.
28920         (subparts_gt): New function.
28921         (get_compute_type): Use subparts_gt.
28922         (count_type_subparts): Delete.
28923         (expand_vector_operations_1): Use subparts_gt instead of
28924         count_type_subparts.
28926 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28927             Alan Hayward  <alan.hayward@arm.com>
28928             David Sherwood  <david.sherwood@arm.com>
28930         * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
28931         (vect_compile_time_alias): ...this new function.  Do the calculation
28932         on poly_ints rather than trees.
28933         (vect_prune_runtime_alias_test_list): Update call accordingly.
28935 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28936             Alan Hayward  <alan.hayward@arm.com>
28937             David Sherwood  <david.sherwood@arm.com>
28939         * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
28940         numbers of units.
28941         (vect_schedule_slp_instance): Likewise.
28943 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28944             Alan Hayward  <alan.hayward@arm.com>
28945             David Sherwood  <david.sherwood@arm.com>
28947         * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
28948         constant and extern definitions for variable-length vectors.
28949         (vect_get_constant_vectors): Note that the number of units
28950         is known to be constant.
28952 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28953             Alan Hayward  <alan.hayward@arm.com>
28954             David Sherwood  <david.sherwood@arm.com>
28956         * tree-vect-stmts.c (vectorizable_conversion): Treat the number
28957         of units as polynomial.  Choose between WIDE and NARROW based
28958         on multiple_p.
28960 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28961             Alan Hayward  <alan.hayward@arm.com>
28962             David Sherwood  <david.sherwood@arm.com>
28964         * tree-vect-stmts.c (simd_clone_subparts): New function.
28965         (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
28967 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28968             Alan Hayward  <alan.hayward@arm.com>
28969             David Sherwood  <david.sherwood@arm.com>
28971         * tree-vect-stmts.c (vectorizable_call): Treat the number of
28972         vectors as polynomial.  Use build_index_vector for
28973         IFN_GOMP_SIMD_LANE.
28975 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28976             Alan Hayward  <alan.hayward@arm.com>
28977             David Sherwood  <david.sherwood@arm.com>
28979         * tree-vect-stmts.c (get_load_store_type): Treat the number of
28980         units as polynomial.  Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
28981         for variable-length vectors.
28982         (vectorizable_mask_load_store): Treat the number of units as
28983         polynomial, asserting that it is constant if the condition has
28984         already been enforced.
28985         (vectorizable_store, vectorizable_load): Likewise.
28987 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28988             Alan Hayward  <alan.hayward@arm.com>
28989             David Sherwood  <david.sherwood@arm.com>
28991         * tree-vect-loop.c (vectorizable_live_operation): Treat the number
28992         of units as polynomial.  Punt if we can't tell at compile time
28993         which vector contains the final result.
28995 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28996             Alan Hayward  <alan.hayward@arm.com>
28997             David Sherwood  <david.sherwood@arm.com>
28999         * tree-vect-loop.c (vectorizable_induction): Treat the number
29000         of units as polynomial.  Punt on SLP inductions.  Use an integer
29001         VEC_SERIES_EXPR for variable-length integer reductions.  Use a
29002         cast of such a series for variable-length floating-point
29003         reductions.
29005 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
29006             Alan Hayward  <alan.hayward@arm.com>
29007             David Sherwood  <david.sherwood@arm.com>
29009         * tree.h (build_index_vector): Declare.
29010         * tree.c (build_index_vector): New function.
29011         * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
29012         of units as polynomial, forcibly converting it to a constant if
29013         vectorizable_reduction has already enforced the condition.
29014         (vect_create_epilog_for_reduction): Likewise.  Use build_index_vector
29015         to create a {1,2,3,...} vector.
29016         (vectorizable_reduction): Treat the number of units as polynomial.
29017         Choose vectype_in based on the largest scalar element size rather
29018         than the smallest number of units.  Enforce the restrictions
29019         relied on above.
29021 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
29022             Alan Hayward  <alan.hayward@arm.com>
29023             David Sherwood  <david.sherwood@arm.com>
29025         * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
29026         number of units as polynomial.
29028 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
29029             Alan Hayward  <alan.hayward@arm.com>
29030             David Sherwood  <david.sherwood@arm.com>
29032         * target.h (vector_sizes, auto_vector_sizes): New typedefs.
29033         * target.def (autovectorize_vector_sizes): Return the vector sizes
29034         by pointer, using vector_sizes rather than a bitmask.
29035         * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
29036         * targhooks.c (default_autovectorize_vector_sizes): Likewise.
29037         * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
29038         Likewise.
29039         * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
29040         * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
29041         * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
29042         * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
29043         * omp-general.c (omp_max_vf): Likewise.
29044         * omp-low.c (omp_clause_aligned_alignment): Likewise.
29045         * optabs-query.c (can_vec_mask_load_store_p): Likewise.
29046         * tree-vect-loop.c (vect_analyze_loop): Likewise.
29047         * tree-vect-slp.c (vect_slp_bb): Likewise.
29048         * doc/tm.texi: Regenerate.
29049         * tree-vectorizer.h (current_vector_size): Change from an unsigned int
29050         to a poly_uint64.
29051         * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
29052         the vector size as a poly_uint64 rather than an unsigned int.
29053         (current_vector_size): Change from an unsigned int to a poly_uint64.
29054         (get_vectype_for_scalar_type): Update accordingly.
29055         * tree.h (build_truth_vector_type): Take the size and number of
29056         units as a poly_uint64 rather than an unsigned int.
29057         (build_vector_type): Add a temporary overload that takes
29058         the number of units as a poly_uint64 rather than an unsigned int.
29059         * tree.c (make_vector_type): Likewise.
29060         (build_truth_vector_type): Take the number of units as a poly_uint64
29061         rather than an unsigned int.
29063 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
29064             Alan Hayward  <alan.hayward@arm.com>
29065             David Sherwood  <david.sherwood@arm.com>
29067         * target.def (get_mask_mode): Take the number of units and length
29068         as poly_uint64s rather than unsigned ints.
29069         * targhooks.h (default_get_mask_mode): Update accordingly.
29070         * targhooks.c (default_get_mask_mode): Likewise.
29071         * config/i386/i386.c (ix86_get_mask_mode): Likewise.
29072         * doc/tm.texi: Regenerate.
29074 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
29075             Alan Hayward  <alan.hayward@arm.com>
29076             David Sherwood  <david.sherwood@arm.com>
29078         * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
29079         * omp-general.c (omp_max_vf): Likewise.
29080         * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
29081         (expand_omp_simd): Handle polynomial safelen.
29082         * omp-low.c (omplow_simd_context): Add a default constructor.
29083         (omplow_simd_context::max_vf): Change from int to poly_uint64.
29084         (lower_rec_simd_input_clauses): Update accordingly.
29085         (lower_rec_input_clauses): Likewise.
29087 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
29088             Alan Hayward  <alan.hayward@arm.com>
29089             David Sherwood  <david.sherwood@arm.com>
29091         * tree-vectorizer.h (vect_nunits_for_cost): New function.
29092         * tree-vect-loop.c (vect_model_reduction_cost): Use it.
29093         * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
29094         (vect_analyze_slp_cost): Likewise.
29095         * tree-vect-stmts.c (vect_model_store_cost): Likewise.
29096         (vect_model_load_cost): Likewise.
29098 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
29099             Alan Hayward  <alan.hayward@arm.com>
29100             David Sherwood  <david.sherwood@arm.com>
29102         * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
29103         (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
29104         from an unsigned int * to a poly_uint64_pod *.
29105         (calculate_unrolling_factor): New function.
29106         (vect_analyze_slp_instance): Use it.  Track polynomial max_nunits.
29108 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
29109             Alan Hayward  <alan.hayward@arm.com>
29110             David Sherwood  <david.sherwood@arm.com>
29112         * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
29113         from an unsigned int to a poly_uint64.
29114         (_loop_vec_info::slp_unrolling_factor): Likewise.
29115         (_loop_vec_info::vectorization_factor): Change from an int
29116         to a poly_uint64.
29117         (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
29118         (vect_get_num_vectors): New function.
29119         (vect_update_max_nunits, vect_vf_for_cost): Likewise.
29120         (vect_get_num_copies): Use vect_get_num_vectors.
29121         (vect_analyze_data_ref_dependences): Change max_vf from an int *
29122         to an unsigned int *.
29123         (vect_analyze_data_refs): Change min_vf from an int * to a
29124         poly_uint64 *.
29125         (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
29126         than an unsigned HOST_WIDE_INT.
29127         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
29128         (vect_analyze_data_ref_dependence): Change max_vf from an int *
29129         to an unsigned int *.
29130         (vect_analyze_data_ref_dependences): Likewise.
29131         (vect_compute_data_ref_alignment): Handle polynomial vf.
29132         (vect_enhance_data_refs_alignment): Likewise.
29133         (vect_prune_runtime_alias_test_list): Likewise.
29134         (vect_shift_permute_load_chain): Likewise.
29135         (vect_supportable_dr_alignment): Likewise.
29136         (dependence_distance_ge_vf): Take the vectorization factor as a
29137         poly_uint64 rather than an unsigned HOST_WIDE_INT.
29138         (vect_analyze_data_refs): Change min_vf from an int * to a
29139         poly_uint64 *.
29140         * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
29141         vfm1 as a poly_uint64 rather than an int.  Make the same change
29142         for the returned bound_scalar.
29143         (vect_gen_vector_loop_niters): Handle polynomial vf.
29144         (vect_do_peeling): Likewise.  Update call to
29145         vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
29146         (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
29147         be constant.
29148         * tree-vect-loop.c (vect_determine_vectorization_factor)
29149         (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
29150         (vect_get_known_peeling_cost): Likewise.
29151         (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
29152         (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
29153         (vect_transform_loop): Likewise.  Use the lowest possible VF when
29154         updating the upper bounds of the loop.
29155         (vect_min_worthwhile_factor): Make static.  Return an unsigned int
29156         rather than an int.
29157         * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
29158         polynomial unroll factors.
29159         (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
29160         (vect_make_slp_decision): Likewise.
29161         (vect_supported_load_permutation_p): Likewise, and polynomial
29162         vf too.
29163         (vect_analyze_slp_cost): Handle polynomial vf.
29164         (vect_slp_analyze_node_operations): Likewise.
29165         (vect_slp_analyze_bb_1): Likewise.
29166         (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
29167         than an unsigned HOST_WIDE_INT.
29168         * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
29169         (vectorizable_load): Handle polynomial vf.
29170         * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
29171         a poly_uint64.
29172         (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
29174 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
29175             Alan Hayward  <alan.hayward@arm.com>
29176             David Sherwood  <david.sherwood@arm.com>
29178         * match.pd: Handle bit operations involving three constants
29179         and try to fold one pair.
29181 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
29183         * tree-vect-loop-manip.c: Include gimple-fold.h.
29184         (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
29185         niters_maybe_zero parameters.  Handle other cases besides a step of 1.
29186         (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
29187         Add a path that uses a step of VF instead of 1, but disable it
29188         for now.
29189         (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
29190         and niters_no_overflow parameters.  Update calls to
29191         slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
29192         Create a new SSA name if the latter choses to use a ste other
29193         than zero, and return it via niters_vector_mult_vf_var.
29194         * tree-vect-loop.c (vect_transform_loop): Update calls to
29195         vect_do_peeling, vect_gen_vector_loop_niters and
29196         slpeel_make_loop_iterate_ntimes.
29197         * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
29198         (vect_gen_vector_loop_niters): Update declarations after above changes.
29200 2018-01-02  Michael Meissner  <meissner@linux.vnet.ibm.com>
29202         * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
29203         128-bit round to integer instructions.
29204         (ceil<mode>2): Likewise.
29205         (btrunc<mode>2): Likewise.
29206         (round<mode>2): Likewise.
29208 2018-01-02  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
29210         * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
29211         unaligned VSX load/store on P8/P9.
29212         (expand_block_clear): Allow the use of unaligned VSX
29213         load/store on P8/P9.
29215 2018-01-02  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
29217         * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
29218         New function.
29219         (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
29220         swap associated with both a load and a store.
29222 2018-01-02  Andrew Waterman  <andrew@sifive.com>
29224         * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
29225         * config/riscv/riscv.md (clear_cache): Use it.
29227 2018-01-02  Artyom Skrobov  <tyomitch@gmail.com>
29229         * web.c: Remove out-of-date comment.
29231 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
29233         * expr.c (fixup_args_size_notes): Check that any existing
29234         REG_ARGS_SIZE notes are correct, and don't try to re-add them.
29235         (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
29236         (emit_single_push_insn): ...here.
29238 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
29240         * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
29241         (const_vector_encoded_nelts): New function.
29242         (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
29243         (const_vector_int_elt, const_vector_elt): Declare.
29244         * emit-rtl.c (const_vector_int_elt_1): New function.
29245         (const_vector_elt): Likewise.
29246         * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
29247         of CONST_VECTOR_ELT.
29249 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
29251         * expr.c: Include rtx-vector-builder.h.
29252         (const_vector_mask_from_tree): Use rtx_vector_builder and operate
29253         directly on the tree encoding.
29254         (const_vector_from_tree): Likewise.
29255         * optabs.c: Include rtx-vector-builder.h.
29256         (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
29257         sequence of "u" values.
29258         * vec-perm-indices.c: Include rtx-vector-builder.h.
29259         (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
29260         directly on the vec_perm_indices encoding.
29262 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
29264         * doc/rtl.texi (const_vector): Describe new encoding scheme.
29265         * Makefile.in (OBJS): Add rtx-vector-builder.o.
29266         * rtx-vector-builder.h: New file.
29267         * rtx-vector-builder.c: Likewise.
29268         * rtl.h (rtx_def::u2): Add a const_vector field.
29269         (CONST_VECTOR_NPATTERNS): New macro.
29270         (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
29271         (CONST_VECTOR_DUPLICATE_P): Likewise.
29272         (CONST_VECTOR_STEPPED_P): Likewise.
29273         (CONST_VECTOR_ENCODED_ELT): Likewise.
29274         (const_vec_duplicate_p): Check for a duplicated vector encoding.
29275         (unwrap_const_vec_duplicate): Likewise.
29276         (const_vec_series_p): Check for a non-duplicated vector encoding.
29277         Say that the function only returns true for integer vectors.
29278         * emit-rtl.c: Include rtx-vector-builder.h.
29279         (gen_const_vec_duplicate_1): Delete.
29280         (gen_const_vector): Call gen_const_vec_duplicate instead of
29281         gen_const_vec_duplicate_1.
29282         (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
29283         (gen_const_vec_duplicate): Use rtx_vector_builder.
29284         (gen_const_vec_series): Likewise.
29285         (gen_rtx_CONST_VECTOR): Likewise.
29286         * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
29287         (swap_const_vector_halves): Take an rtx pointer rather than rtx.
29288         Build a new vector rather than modifying a CONST_VECTOR in-place.
29289         (handle_special_swappables): Update call accordingly.
29290         * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
29291         (swap_const_vector_halves): Take an rtx pointer rather than rtx.
29292         Build a new vector rather than modifying a CONST_VECTOR in-place.
29293         (handle_special_swappables): Update call accordingly.
29295 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
29297         * simplify-rtx.c (simplify_const_binary_operation): Use
29298         CONST_VECTOR_ELT instead of XVECEXP.
29300 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
29302         * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
29303         the selector elements to be different from the data elements
29304         if the selector is a VECTOR_CST.
29305         * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
29306         ssizetype for the selector.
29308 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
29310         * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
29311         before testing each element individually.
29312         * tree-vect-generic.c (lower_vec_perm): Likewise.
29314 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
29316         * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
29317         * selftest-run-tests.c (selftest::run_tests): Call it.
29318         * vector-builder.h (vector_builder::operator ==): New function.
29319         (vector_builder::operator !=): Likewise.
29320         * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
29321         (vec_perm_indices::all_from_input_p): New function.
29322         * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
29323         (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
29324         * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
29325         instead of reading the VECTOR_CST directly.  Detect whether both
29326         vector inputs are the same before constructing the vec_perm_indices,
29327         and update the number of inputs argument accordingly.  Use the
29328         utility functions added above.  Only construct sel2 if we need to.
29330 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
29332         * optabs.c (expand_vec_perm_var): Use an explicit encoding for
29333         the broadcast of the low byte.
29334         (expand_mult_highpart): Use an explicit encoding for the permutes.
29335         * optabs-query.c (can_mult_highpart_p): Likewise.
29336         * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
29337         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
29338         (vectorizable_bswap): Likewise.
29339         * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
29340         explicit encoding for the power-of-2 permutes.
29341         (vect_permute_store_chain): Likewise.
29342         (vect_grouped_load_supported): Likewise.
29343         (vect_permute_load_chain): Likewise.
29345 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
29347         * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
29348         * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
29349         * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
29350         * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
29351         * tree-vect-stmts.c (vectorizable_bswap): Likewise.
29352         (vect_gen_perm_mask_any): Likewise.
29354 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
29356         * int-vector-builder.h: New file.
29357         * vec-perm-indices.h: Include int-vector-builder.h.
29358         (vec_perm_indices): Redefine as an int_vector_builder.
29359         (auto_vec_perm_indices): Delete.
29360         (vec_perm_builder): Redefine as a stand-alone class.
29361         (vec_perm_indices::vec_perm_indices): New function.
29362         (vec_perm_indices::clamp): Likewise.
29363         * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
29364         (vec_perm_indices::new_vector): New function.
29365         (vec_perm_indices::new_expanded_vector): Update for new
29366         vec_perm_indices class.
29367         (vec_perm_indices::rotate_inputs): New function.
29368         (vec_perm_indices::all_in_range_p): Operate directly on the
29369         encoded form, without computing elided elements.
29370         (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
29371         encoding.  Update for new vec_perm_indices class.
29372         * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
29373         the given vec_perm_builder.
29374         (expand_vec_perm_var): Update vec_perm_builder constructor.
29375         (expand_mult_highpart): Use vec_perm_builder instead of
29376         auto_vec_perm_indices.
29377         * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
29378         vec_perm_indices instead of auto_vec_perm_indices.  Use a single
29379         or double series encoding as appropriate.
29380         * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
29381         vec_perm_indices instead of auto_vec_perm_indices.
29382         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
29383         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
29384         (vect_permute_store_chain): Likewise.
29385         (vect_grouped_load_supported): Likewise.
29386         (vect_permute_load_chain): Likewise.
29387         (vect_shift_permute_load_chain): Likewise.
29388         * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
29389         (vect_transform_slp_perm_load): Likewise.
29390         (vect_schedule_slp_instance): Likewise.
29391         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
29392         (vectorizable_mask_load_store): Likewise.
29393         (vectorizable_bswap): Likewise.
29394         (vectorizable_store): Likewise.
29395         (vectorizable_load): Likewise.
29396         * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
29397         vec_perm_indices instead of auto_vec_perm_indices.  Use
29398         tree_to_vec_perm_builder to read the vector from a tree.
29399         * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
29400         vec_perm_builder instead of a vec_perm_indices.
29401         (have_whole_vector_shift): Use vec_perm_builder and
29402         vec_perm_indices instead of auto_vec_perm_indices.  Leave the
29403         truncation to calc_vec_perm_mask_for_shift.
29404         (vect_create_epilog_for_reduction): Likewise.
29405         * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
29406         from auto_vec_perm_indices to vec_perm_indices.
29407         (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
29408         instead of changing individual elements.
29409         (aarch64_vectorize_vec_perm_const): Use new_vector to install
29410         the vector in d.perm.
29411         * config/arm/arm.c (expand_vec_perm_d::perm): Change
29412         from auto_vec_perm_indices to vec_perm_indices.
29413         (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
29414         instead of changing individual elements.
29415         (arm_vectorize_vec_perm_const): Use new_vector to install
29416         the vector in d.perm.
29417         * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
29418         Update vec_perm_builder constructor.
29419         (rs6000_expand_interleave): Likewise.
29420         * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
29421         (rs6000_expand_interleave): Likewise.
29423 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
29425         * optabs-query.c (can_vec_perm_var_p): Check whether lowering
29426         to qimode could truncate the indices.
29427         * optabs.c (expand_vec_perm_var): Likewise.
29429 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
29431         * Makefile.in (OBJS): Add vec-perm-indices.o.
29432         * vec-perm-indices.h: New file.
29433         * vec-perm-indices.c: Likewise.
29434         * target.h (vec_perm_indices): Replace with a forward class
29435         declaration.
29436         (auto_vec_perm_indices): Move to vec-perm-indices.h.
29437         * optabs.h: Include vec-perm-indices.h.
29438         (expand_vec_perm): Delete.
29439         (selector_fits_mode_p, expand_vec_perm_var): Declare.
29440         (expand_vec_perm_const): Declare.
29441         * target.def (vec_perm_const_ok): Replace with...
29442         (vec_perm_const): ...this new hook.
29443         * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
29444         (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
29445         * doc/tm.texi: Regenerate.
29446         * optabs.def (vec_perm_const): Delete.
29447         * doc/md.texi (vec_perm_const): Likewise.
29448         (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
29449         * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
29450         expand_vec_perm for constant permutation vectors.  Assert that
29451         the mode of variable permutation vectors is the integer equivalent
29452         of the mode that is being permuted.
29453         * optabs-query.h (selector_fits_mode_p): Declare.
29454         * optabs-query.c: Include vec-perm-indices.h.
29455         (selector_fits_mode_p): New function.
29456         (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
29457         is defined, instead of checking whether the vec_perm_const_optab
29458         exists.  Use targetm.vectorize.vec_perm_const instead of
29459         targetm.vectorize.vec_perm_const_ok.  Check whether the indices
29460         fit in the vector mode before using a variable permute.
29461         * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
29462         vec_perm_indices instead of an rtx.
29463         (expand_vec_perm): Replace with...
29464         (expand_vec_perm_const): ...this new function.  Take the selector
29465         as a vec_perm_indices rather than an rtx.  Also take the mode of
29466         the selector.  Update call to shift_amt_for_vec_perm_mask.
29467         Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
29468         Use vec_perm_indices::new_expanded_vector to expand the original
29469         selector into bytes.  Check whether the indices fit in the vector
29470         mode before using a variable permute.
29471         (expand_vec_perm_var): Make global.
29472         (expand_mult_highpart): Use expand_vec_perm_const.
29473         * fold-const.c: Includes vec-perm-indices.h.
29474         * tree-ssa-forwprop.c: Likewise.
29475         * tree-vect-data-refs.c: Likewise.
29476         * tree-vect-generic.c: Likewise.
29477         * tree-vect-loop.c: Likewise.
29478         * tree-vect-slp.c: Likewise.
29479         * tree-vect-stmts.c: Likewise.
29480         * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
29481         Delete.
29482         * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
29483         * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
29484         (aarch64_vectorize_vec_perm_const_ok): Fuse into...
29485         (aarch64_vectorize_vec_perm_const): ...this new function.
29486         (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
29487         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
29488         * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
29489         * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
29490         * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
29491         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
29492         (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
29493         into...
29494         (arm_vectorize_vec_perm_const): ...this new function.  Explicitly
29495         check for NEON modes.
29496         * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
29497         * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
29498         * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
29499         (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
29500         into...
29501         (ix86_vectorize_vec_perm_const): ...this new function.  Incorporate
29502         the old VEC_PERM_CONST conditions.
29503         * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
29504         * config/ia64/vect.md (vec_perm_const<mode>): Delete.
29505         * config/ia64/ia64.c (ia64_expand_vec_perm_const)
29506         (ia64_vectorize_vec_perm_const_ok): Merge into...
29507         (ia64_vectorize_vec_perm_const): ...this new function.
29508         * config/mips/loongson.md (vec_perm_const<mode>): Delete.
29509         * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
29510         * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
29511         * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
29512         * config/mips/mips.c (mips_expand_vec_perm_const)
29513         (mips_vectorize_vec_perm_const_ok): Merge into...
29514         (mips_vectorize_vec_perm_const): ...this new function.
29515         * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
29516         * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
29517         * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
29518         * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
29519         * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
29520         (rs6000_expand_vec_perm_const): Delete.
29521         * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
29522         Delete.
29523         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
29524         (altivec_expand_vec_perm_const_le): Take each operand individually.
29525         Operate on constant selectors rather than rtxes.
29526         (altivec_expand_vec_perm_const): Likewise.  Update call to
29527         altivec_expand_vec_perm_const_le.
29528         (rs6000_expand_vec_perm_const): Delete.
29529         (rs6000_vectorize_vec_perm_const_ok): Delete.
29530         (rs6000_vectorize_vec_perm_const): New function.
29531         (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
29532         an element count and rtx array.
29533         (rs6000_expand_extract_even): Update call accordingly.
29534         (rs6000_expand_interleave): Likewise.
29535         * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
29536         * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
29537         * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
29538         * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
29539         (rs6000_expand_vec_perm_const): Delete.
29540         * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
29541         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
29542         (altivec_expand_vec_perm_const_le): Take each operand individually.
29543         Operate on constant selectors rather than rtxes.
29544         (altivec_expand_vec_perm_const): Likewise.  Update call to
29545         altivec_expand_vec_perm_const_le.
29546         (rs6000_expand_vec_perm_const): Delete.
29547         (rs6000_vectorize_vec_perm_const_ok): Delete.
29548         (rs6000_vectorize_vec_perm_const): New function.  Remove stray
29549         reference to the SPE evmerge intructions.
29550         (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
29551         an element count and rtx array.
29552         (rs6000_expand_extract_even): Update call accordingly.
29553         (rs6000_expand_interleave): Likewise.
29554         * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
29555         * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
29556         new function.
29557         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
29559 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
29561         * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
29562         vector mode and that that mode matches the mode of the data
29563         being permuted.
29564         (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
29565         out into expand_vec_perm_var.  Do all CONST_VECTOR handling here,
29566         directly using expand_vec_perm_1 when forcing selectors into
29567         registers.
29568         (expand_vec_perm_var): New function, split out from expand_vec_perm.
29570 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
29572         * optabs-query.h (can_vec_perm_p): Delete.
29573         (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
29574         * optabs-query.c (can_vec_perm_p): Split into...
29575         (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
29576         (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
29577         particular selector is valid.
29578         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
29579         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
29580         (vect_grouped_load_supported): Likewise.
29581         (vect_shift_permute_load_chain): Likewise.
29582         * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
29583         (vect_transform_slp_perm_load): Likewise.
29584         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
29585         (vectorizable_bswap): Likewise.
29586         (vect_gen_perm_mask_checked): Likewise.
29587         * fold-const.c (fold_ternary_loc): Likewise.  Don't take
29588         implementations of variable permutation vectors into account
29589         when deciding which selector to use.
29590         * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
29591         vec_perm_const_optab is supported; instead use can_vec_perm_const_p
29592         with a false third argument.
29593         * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
29594         to test whether the constant selector is valid and can_vec_perm_var_p
29595         to test whether a variable selector is valid.
29597 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
29599         * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
29600         * optabs-query.c (can_vec_perm_p): Likewise.
29601         * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
29602         instead of vec_perm_indices.
29603         * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
29604         (vect_gen_perm_mask_checked): Likewise,
29605         * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
29606         (vect_gen_perm_mask_checked): Likewise,
29608 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
29610         * optabs-query.h (qimode_for_vec_perm): Declare.
29611         * optabs-query.c (can_vec_perm_p): Split out qimode search to...
29612         (qimode_for_vec_perm): ...this new function.
29613         * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
29615 2018-01-02  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
29617         * rtlanal.c (canonicalize_condition): Return 0 if final rtx
29618         does not have a conditional at the top.
29620 2018-01-02  Richard Biener  <rguenther@suse.de>
29622         * ipa-inline.c (big_speedup_p): Fix expression.
29624 2018-01-02  Jan Hubicka  <hubicka@ucw.cz>
29626         PR target/81616
29627         * config/i386/x86-tune-costs.h: Increase cost of integer load costs
29628         for generic 4->6.
29630 2018-01-02  Jan Hubicka  <hubicka@ucw.cz>
29632         PR target/81616
29633         Generic tuning.
29634         * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
29635         cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
29636         and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
29637         cond_taken_branch_cost 3->4.
29639 2018-01-01  Jakub Jelinek  <jakub@redhat.com>
29641         PR tree-optimization/83581
29642         * tree-loop-distribution.c (pass_loop_distribution::execute): Return
29643         TODO_cleanup_cfg if any changes have been made.
29645         PR middle-end/83608
29646         * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
29647         convert_modes if target mode has the right side, but different mode
29648         class.
29650         PR middle-end/83609
29651         * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
29652         last argument when extracting from CONCAT.  If either from_real or
29653         from_imag is NULL, use expansion through memory.  If result is not
29654         a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
29655         the parts directly to inner mode, if even that fails, use expansion
29656         through memory.
29658         PR middle-end/83623
29659         * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
29660         check for bswap in mode rather than HImode and use that in expand_unop
29661         too.
29663 Copyright (C) 2018 Free Software Foundation, Inc.
29665 Copying and distribution of this file, with or without modification,
29666 are permitted in any medium without royalty provided the copyright
29667 notice and this notice are preserved.