1 2018-11-01 Joseph Myers <joseph@codesourcery.com>
3 * configure.ac (gcc_cv_as_ia64_ltoffx_ldxmov_relocs): Add newline
4 at end of assembler input text.
5 * configure: Regenerate.
7 2018-11-01 Jakub Jelinek <jakub@redhat.com>
9 PR tree-optimization/87826
10 * gimple-ssa-store-merging.c (do_shift_rotate): Punt if count is
11 negative or larger or equal to type's precision.
13 2018-10-31 Alexandre Oliva <aoliva@redhat.com>
15 * opts.c (default_options_table): Do not enable
16 OPT_fdelayed_branch at -Og.
17 * doc/invoke.texi (-fdelayed-branch): Document it.
19 2018-10-31 Richard Henderson <richard.henderson@linaro.org>
21 * optabs-libfuncs.c (build_libfunc_function_visibility):
22 New, split out from...
23 (build_libfunc_function): ... here.
24 (init_one_libfunc_visibility): New, split out from ...
25 (init_one_libfunc): ... here.
27 * config/aarch64/atomics.md (aarch64_atomic_<ATOMIC_LDOP><ALLI>_lse):
28 scratch register need not be early-clobber. Document the reason
29 why we cannot use ST<OP>.
31 2018-10-31 Joseph Myers <joseph@codesourcery.com>
34 * configure.ac: Remove AC_PREREQ. Use AC_LANG_SOURCE. Use single
35 line for second argument of AC_DEFINE_UNQUOTED.
36 * doc/install.texi (Tools/packages necessary for modifying GCC):
37 Update to autoconf 2.69 and automake 1.15.1.
38 * aclocal.m4, config.in, configure: Regenerate.
40 2018-10-31 Pat Haugen <pthaugen@us.ibm.com>
42 * tree-ssa-loop-ivcanon.c (try_peel_loop): Fix typo and remove dead
45 2018-10-31 Martin Liska <mliska@suse.cz>
48 * common/config/aarch64/aarch64-common.c (aarch64_parse_extension):
49 Add new argument invalid_extension.
50 (aarch64_get_all_extension_candidates): New function.
51 (aarch64_rewrite_selected_cpu): Add NULL to function call.
52 * config/aarch64/aarch64-protos.h (aarch64_parse_extension): Add
54 (aarch64_get_all_extension_candidates): New function.
55 * config/aarch64/aarch64.c (aarch64_parse_arch): Add new
56 argument invalid_extension.
57 (aarch64_parse_cpu): Likewise.
58 (aarch64_print_hint_for_extensions): New function.
59 (aarch64_validate_mcpu): Provide hint about invalid extension.
60 (aarch64_validate_march): Likewise.
61 (aarch64_handle_attr_arch): Pass new argument.
62 (aarch64_handle_attr_cpu): Provide hint about invalid extension.
63 (aarch64_handle_attr_isa_flags): Likewise.
65 2018-10-31 Richard Biener <rguenther@suse.de>
69 * tree-outof-ssa.c (insert_backedge_copies): Restrict
70 copy generation to useful cases. Place the copy before
71 the definition of the backedge value when possible.
73 2018-10-31 Claudiu Zissulescu <claziss@synopsys.com>
75 * config/arc/arc-arch.h (ARC_TUNE_ARC7XX): New tune value.
76 * config/arc/arc.c (arc_active_insn): New function.
77 (check_store_cacheline_hazard): Likewise.
78 (workaround_arc_anomaly): Use check_store_cacheline_hazard.
79 (arc_override_options): Disable delay slot scheduler for older
81 (arc_store_addr_hazard_p): New implementation, old one renamed to
83 (arc_store_addr_hazard_internal_p): Renamed.
84 (arc_reorg): Don't combine into brcc instructions which are part
85 of hardware hazard solution.
86 * config/arc/arc.md (attr tune): Consider new arc7xx tune value.
87 (tune_arc700): Likewise.
88 * config/arc/arc.opt (arc7xx): New tune value.
89 * config/arc/arc700.md: Improve A7 scheduler.
91 2018-10-31 Claudiu Zissulescu <claziss@synopsys.com>
93 * config/arc/arc.c (arc_override_options): Remove
94 TARGET_COMPACT_CASESI.
95 * config/arc/arc.h (ASM_OUTPUT_ADDR_DIFF_ELT): Update.
96 (CASE_VECTOR_MODE): Likewise.
97 (CASE_VECTOR_PC_RELATIVE): Likewise.
98 (CASE_VECTOR_SHORTEN_MODE): Likewise.
99 (CASE_VECTOR_SHORTEN_MODE1): Delete.
100 (ADDR_VEC_ALIGN): Update.
101 (ASM_OUTPUT_CASE_LABEL): Undefine.
102 (ASM_OUTPUT_BEFORE_CASE_LABEL): Undefine.
103 (TARGET_BI_BIH): Define.
104 (DEFAULT_BRANCH_INDEX): Likewise.
105 * config/arc/arc.md (casesi): Rework to accept BI/BIH
106 instructions, remove compact_casesi use case.
107 (casesi_compact_jump): Remove.
108 (casesi_dispatch): New pattern.
109 * config/arc/arc.opt: Add mbranch-index option. Deprecate
110 compact_casesi option.
111 * doc/invoke.texi: Document mbranch-index option.
113 2018-10-31 Claudiu Zissulescu <claziss@synopsys.com>
115 * config/arc/arc.c (arc_get_tp): Remove function.
116 (arc_emit_call_tls_get_addr): Likewise.
117 (arc_call_tls_get_addr): New function.
118 (arc_legitimize_tls_address): Make use of arc_call_tls_get_addr.
119 * config/arc/arc.md (tls_load_tp_soft): Remove.
120 (tls_gd_get_addr): Likewise.
122 2018-10-31 Claudiu Zissulescu <claziss@synopsys.com>
124 * config/arc/arc.md (mulsi3): Remove call to mulsi_600_lib.
125 (mulsi3_600_lib): Remove pattern.
126 (umulsi3_highpart_600_lib_le): Likewise.
127 (umulsi3_highpart): Remove call to umulsi3_highpart_600_lib_le.
128 (umulsidi3): Remove call to umulsidi3_600_lib.
129 (umulsidi3_600_lib): Remove pattern.
130 (peephole2): Remove peephole using the above deprecated patterns.
132 2018-10-31 Thomas Preud'homme <thomas.preudhomme@linaro.org>
135 * config/arm/arm.c (arm_option_check_internal): Disable the combined
136 use of -mslow-flash-data and -mword-relocations.
137 (arm_option_override): Enable -mword-relocations if -fpic or -fPIC.
138 * config/arm/arm.md (SYMBOL_REF MOVT splitter): Stop checking for
140 * doc/invoke.texi (-mword-relocations): Mention conflict with
142 (-mslow-flash-data): Reciprocally.
144 2018-10-31 Richard Henderson <richard.henderson@linaro.org>
146 * config/aarch64/aarch64.c (aarch64_hard_regno_mode_ok): Force
147 16-byte modes held in GP registers to use an even regno.
149 * config/aarch64/aarch64.c (aarch64_emit_bic): Remove.
150 (aarch64_atomic_ldop_supported_p): Remove.
151 (aarch64_gen_atomic_ldop): Remove.
152 * config/aarch64/atomic.md (atomic_<atomic_optab><ALLI>):
153 Fully expand LSE operations here.
154 (atomic_fetch_<atomic_optab><ALLI>): Likewise.
155 (atomic_<atomic_optab>_fetch<ALLI>): Likewise.
156 (aarch64_atomic_<ATOMIC_LDOP><ALLI>_lse): Drop atomic_op iterator
157 and use ATOMIC_LDOP instead; use register_operand for the input;
158 drop the split and emit insns directly.
159 (aarch64_atomic_fetch_<ATOMIC_LDOP><ALLI>_lse): Likewise.
160 (aarch64_atomic_<atomic_op>_fetch<ALLI>_lse): Remove.
161 (@aarch64_atomic_load<ATOMIC_LDOP><ALLI>): Remove.
163 * config/aarch64/aarch64.c (aarch64_emit_atomic_swap): Remove.
164 (aarch64_gen_atomic_ldop): Don't call it.
165 * config/aarch64/atomics.md (atomic_exchange<ALLI>):
166 Use aarch64_reg_or_zero.
167 (aarch64_atomic_exchange<ALLI>): Likewise.
168 (aarch64_atomic_exchange<ALLI>_lse): Remove split; remove & from
169 operand 0; use aarch64_reg_or_zero for input; merge ...
170 (@aarch64_atomic_swp<ALLI>): ... this and remove.
172 * config/aarch64/aarch64.c (aarch64_gen_compare_reg_maybe_ze): New.
173 (aarch64_split_compare_and_swap): Use it.
174 (aarch64_expand_compare_and_swap): Likewise. Remove convert_modes;
175 test oldval against the proper predicate.
176 * config/aarch64/atomics.md (@atomic_compare_and_swap<ALLI>):
177 Use nonmemory_operand for expected.
178 (cas_short_expected_pred): New.
179 (@aarch64_compare_and_swap<SHORT>): Use it; use "rn" not "rI" to match.
180 (@aarch64_compare_and_swap<GPI>): Use "rn" not "rI" for expected.
181 * config/aarch64/predicates.md (aarch64_plushi_immediate): New.
182 (aarch64_plushi_operand): New.
184 * config/aarch64/aarch64.c (aarch64_expand_compare_and_swap):
185 Force oldval into the rval register for TARGET_LSE; emit the compare
186 during initial expansion so that it may be deleted if unused.
187 (aarch64_gen_atomic_cas): Remove.
188 * config/aarch64/atomics.md (@aarch64_compare_and_swap<SHORT>_lse):
189 Change =&r to +r for operand 0; use match_dup for operand 2;
190 remove is_weak and mod_f operands as unused. Drop the split
192 (@aarch64_atomic_cas<SHORT>): ... this pattern's output; remove.
193 (@aarch64_compare_and_swap<GPI>_lse): Similarly.
194 (@aarch64_atomic_cas<GPI>): Similarly.
196 2018-10-31 Richard Biener <rguenther@suse.de>
198 * tree-eh.c (replace_trapping_overflow): Simplify ABS_EXPR case
201 2018-10-31 Sameera Deshpande <sameera.deshpande@linaro.org>
203 * config/aarch64/aarch64-cores.def (saphira): Use saphira pipeline.
204 * config/aarch64/aarch64.md: Include saphira.md
205 * config/aarch64/saphira.md: New file for pipeline description.
207 2018-10-30 Martin Sebor <msebor@redhat.com>
210 * gimple-ssa-sprintf.c (format_directive): Use %G to include
212 (sprintf_dom_walker::compute_format_length):
213 Avoid setting POSUNDER4K here.
214 (get_destination_size): Handle null argument values.
215 (get_user_idx_format): New function.
216 (sprintf_dom_walker::handle_gimple_call): Handle all printf-like
217 functions, including user-defined with attribute format printf.
218 Use %G to include inlining context.
221 2018-10-30 Jan Hubicka <jh@suse.cz>
223 * params.def (lto-partitions): Bump from 32 to 128.
225 2018-10-30 Jan Hubicka <jh@suse.cz>
228 (free_lang_data_d, add_tree_to_fld_list, fld_worklist_push): Move
230 (free_lang_data_in_type): Forward declare.
231 (fld_type_variant_equal_p): New function.
232 (fld_type_variant): New function
233 (fld_incomplete_types): New hash.
234 (fld_incomplete_type_of): New function
235 (fld_simplfied-type): New function.
236 (free_lang_data_in_decl): Add fld parameter; simplify type of FIELD_DECL
237 (free_lang_data): Allocate and free fld_incomplete_type; update call
238 of free_lang_data_in_decl.
240 2018-10-30 Eric Botcazou <ebotcazou@adacore.com>
242 * gcov.c (output_lines): Remove duplicate line.
244 2018-10-30 Aaron Sawdey <acsawdey@linux.ibm.com>
246 * config/rs6000/rs6000.md (bswapdi2): Force address into register
247 if not in indexed or indirect form.
248 (bswapdi2_load): Change predicate to indexed_or_indirect_operand.
249 (bswapdi2_store): Ditto.
250 * config/rs6000/rs6000.c (rs6000_force_indexed_or_indirect_mem): New
252 * config/rs6000/rs6000-protos.h (rs6000_force_indexed_or_indirect_mem):
253 Prototype for helper function.
255 2018-10-30 Martin Sebor <msebor@redhat.com>
257 * doc/extend.texi (optimize): Clarify/expand attribute documentation.
258 (target, pragma GCC optimize, pragma GCC target): Ditto.
260 2018-10-30 Jonathan Wakely <jwakely@redhat.com>
262 * doc/extend.texi: Fix prototype and description of
263 __builtin_expect_with_probability.
265 2018-10-30 Michael Ploujnikov <michael.ploujnikov@oracle.com>
267 * cgraph.h (clone_function_name_1): Replaced by new
268 clone_function_name_numbered that takes name as string; for
269 privatize_symbol_name_1 use only.
270 (clone_function_name): Renamed to
271 clone_function_name_numbered to be explicit about numbering.
272 (clone_function_name): New two-argument function that does
273 not number its output.
274 (clone_function_name): New three-argument function that
275 takes a number to append to its output.
276 * cgraphclones.c (duplicate_thunk_for_node):
277 (clone_function_name_1): Renamed.
278 (clone_function_name_numbered): Two new functions.
279 (clone_function_name): Improved documentation.
280 (cgraph_node::create_virtual_clone): Use clone_function_name_numbered.
281 * config/rs6000/rs6000.c (make_resolver_func): Ditto.
282 * final.c (final_scan_insn_1): Use the new clone_function_name
284 * multiple_target.c (create_dispatcher_calls): Ditto.
285 (create_target_clone): Ditto.
286 * omp-expand.c (grid_expand_target_grid_body): Ditto.
287 * omp-low.c (create_omp_child_function_name): Ditto.
288 * omp-simd-clone.c (simd_clone_create): Ditto.
289 * symtab.c (simd_symtab_node::noninterposable_alias): Use the
290 new clone_function_name without numbering.
292 2018-10-30 Richard Earnshaw <rearnsha@arm.com>
294 * alloc-pool.h (base_pool_allocator <TBlockAllocator>::initialize):
295 Assert that the allocation size is not zero.
297 2018-10-30 Richard Biener <rguenther@suse.de>
299 PR tree-optimization/87800
300 * tree-vect-slp.c (vect_build_slp_tree_2): Reject any
301 non-induction or reduction PHIs.
303 2018-10-30 Sameera Deshpande <sameera.deshpande@linaro.org
305 * config/aarch64/falkor-tag-collision-avoidance.c
306 (execute_tag_collision_avoidance): Call df_note_add_problem.
308 2018-10-30 Martin Liska <mliska@suse.cz>
310 * doc/extend.texi: Fix typo in documentation
311 of __builtin_expect_with_probability.
313 2018-10-29 David Malcolm <dmalcolm@redhat.com>
316 * input.c (get_substring_ranges_for_loc): Detect if
317 linemap_resolve_location gives us a NULL map, and reject
320 2018-10-29 Iain Buclaw <ibuclaw@gdcproject.org>
322 * config.gcc (xstormy16-*-elf): Set tm_d_file.
324 2018-10-29 David Malcolm <dmalcolm@redhat.com>
325 Martin Sebor <msebor@redhat.com>
326 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
328 * doc/ux.texi (Quoting): New subsection, adapted from material at
329 https://gcc.gnu.org/wiki/DiagnosticsGuidelines written by
330 MartinSebor and ManuelLopezIbanez.
331 (Fix-it hints): Note that fix-it hints shouldn't be marked for
334 2018-10-29 Kugan Vivekanandarajah <kuganv@linaro.org>
337 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Fix niter
340 2018-10-29 Paul A. Clarke <pc@us.ibm.com>
342 * gcc.target/powerpc/ssse3-check.h: Remove inaccurate comment.
344 2018-10-29 Paul Koning <ni1d@arrl.net>
346 * doc/rtl.texi (CONST_WIDE_INT_ELT): Give correct macro name.
348 2018-10-29 Paul A. Clarke <pc@us.ibm.com>
350 * gcc/config/rs6000/mmintrin.h (_mm_packs_pi16, _mm_packs_pi32,
351 _mm_packs_pu16, _mm_unpackhi_pi8, _mm_unpacklo_pi8, _mm_add_pi8,
352 _mm_add_pi16, _mm_add_pi32, _mm_sub_pi8, _mm_sub_pi16, _mm_sub_pi32,
353 _mm_cmpgt_pi8, _mm_cmpeq_pi16, _mm_cmpgt_pi16, _mm_cmpeq_pi32,
354 _mm_cmpgt_pi32, _mm_adds_pi8, _mm_adds_pi16, _mm_adds_pu8,
355 _mm_adds_pu16, _mm_subs_pi8, _mm_subs_pi16, _mm_subs_pu8,
356 _mm_subs_pu16, _mm_madd_pi16, _mm_mulhi_pi16, _mm_mullo_pi16,
357 _mm_sll_pi16, _mm_sra_pi16, _mm_srl_pi16, _mm_set1_pi16, _mm_set1_pi8):
358 Change 'vector' to '__vector'.
359 * gcc/config/rs6000/xmmintrin.h (_mm_cvtps_pi32, _mm_cvttps_pi32,
360 _mm_cvtps_pi16, _mm_cvtps_pi8, _mm_max_pi16, _mm_max_pu8, _mm_min_pi16,
361 _mm_min_pu8, _mm_mulhi_pu16, _mm_shuffle_pi16, _mm_avg_pu8,
362 _mm_avg_pu16): Likewise. And, whitespace corrections.
364 2018-10-29 Richard Biener <rguenther@suse.de>
366 PR tree-optimization/87785
367 * tree-vect-slp.c (vect_gather_slp_loads): Only gather
370 2018-10-29 Olivier Hainque <hainque@adacore.com>
372 * VXWORKS_NET_LIBS_RTP: New macro, network part of VXWORKS_LIBS_RTP.
374 2018-10-29 Olivier Hainque <hainque@adacore.com>
376 * config/vxworks.h (VXWORKS_PERSONALITY): New VxWorks
377 ports configuration macro, defaults to "gnu".
378 (VXWORKS_OS_CPP_BUILTINS): Use it. Feed TOOL and
379 TOOL_FAMILY instead of _VX_TOOL/_VXTOOL_FAMILY.
381 2018-10-29 Olivier Hainque <hainque@adacore.com>
383 * config/vxworks.h (CLEAR_INSN_CACHE): #undef before #define.
385 2018-10-29 Richard Biener <rguenther@suse.de>
387 PR tree-optimization/87790
388 * tree-vect-slp.c (vect_mark_slp_stmts): Simplify.
389 (vect_make_slp_decision): Adjust.
390 (vect_slp_analyze_bb_1): Likewise.
391 (vect_detect_hybrid_slp_stmts): Properly union SLP type over
394 2018-10-29 Richard Biener <rguenther@suse.de>
396 PR tree-optimization/87785
397 * tree-vect-slp.c (vect_build_slp_tree_2): Remove loads argument
399 (vect_build_slp_tree): Likewise.
400 (vect_gather_slp_loads): New function.
401 (vect_analyze_slp_instance): Gather loads separately from the
404 2018-10-29 Martin Liska <mliska@suse.cz>
406 * Makefile.in: Make dependency to json.o.
407 * doc/gcov.texi: Document new JSON format, remove
408 old intermediate format documentation.
409 * gcov.c (struct function_info): Come up with m_name and
411 (function_info::function_info): Initialize it.
412 (function_info::~function_info): Release it.
413 (main): Rename flag_intermediate_format to flag_json_format.
414 (print_usage): Describe --json-format.
415 (process_args): Set flag_json_format.
416 (output_intermediate_line): Remove.
417 (output_intermediate_json_line): Likewise.
418 (get_gcov_intermediate_filename): Return new extension
420 (output_intermediate_file): Implement JSON emission.
421 (output_json_intermediate_file): Implement JSON emission.
422 (generate_results): Use ::get_name for function name.
423 Handle JSON output file.
424 (read_graph_file): Use ::get_name instead of cplus_demangle.
425 (read_count_file): Likewise.
426 (solve_flow_graph): Likewise.
427 (add_line_counts): Likewise.
428 (accumulate_line_counts): Use new flag_json_format.
429 (output_function_details): Use ::get_name instead of cplus_demangle.
430 (output_lines): Likewise.
431 * json.cc (test_writing_literals): Add new tests.
432 * json.h (class literal): Add new boolean constructor.
434 2018-10-29 Segher Boessenkool <segher@kernel.crashing.org>
436 PR rtl-optimization/87701
437 PR rtl-optimization/87780
438 * combine.c (make_more_copies): Rewrite.
440 2018-10-28 Kugan Vivekanandarajah <kuganv@linaro.org>
442 * doc/generic.texi (ABSU_EXPR): Document.
443 * match.pd (absu(x)*absu(x) -> x*x): Handle.
444 (absu(absu(X)) -> absu(X)): Likewise.
445 (absu(-X) -> absu(X)): Likewise.
446 (absu(X) where X is nonnegative -> X): Likewise.
448 2018-10-28 Iain Buclaw <ibuclaw@gdcproject.org>
450 * Makefile.in (tm_d_file_list, tm_d_include_list): New variables.
451 (TM_D_H, D_TARGET_DEF, D_TARGET_H, D_TARGET_OBJS): New variables.
452 (tm_d.h, cs-tm_d.h, default-d.o): New rules.
453 (d/d-target-hooks-def.h, s-d-target-hooks-def-h): New rules.
454 (s-tm-texi): Also check timestamp on d-target.def.
455 (generated_files): Add TM_D_H and d-target-hooks-def.h.
456 (build/genhooks.o): Also depend on D_TARGET_DEF.
457 * config.gcc (tm_d_file, d_target_objs, target_has_targetdm): New
459 * config/aarch64/aarch64-d.c: New file.
460 * config/aarch64/aarch64-linux.h (GNU_USER_TARGET_D_CRITSEC_SIZE):
462 * config/aarch64/aarch64-protos.h (aarch64_d_target_versions): New
464 * config/aarch64/aarch64.h (TARGET_D_CPU_VERSIONS): Define.
465 * config/aarch64/t-aarch64 (aarch64-d.o): New rule.
466 * config/arm/arm-d.c: New file.
467 * config/arm/arm-protos.h (arm_d_target_versions): New prototype.
468 * config/arm/arm.h (TARGET_D_CPU_VERSIONS): Define.
469 * config/arm/linux-eabi.h (EXTRA_TARGET_D_OS_VERSIONS): Define.
470 * config/arm/t-arm (arm-d.o): New rule.
471 * config/default-d.c: New file.
472 * config/glibc-d.c: New file.
473 * config/gnu.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
474 * config/i386/i386-d.c: New file.
475 * config/i386/i386-protos.h (ix86_d_target_versions): New prototype.
476 * config/i386/i386.h (TARGET_D_CPU_VERSIONS): Define.
477 * config/i386/linux-common.h (EXTRA_TARGET_D_OS_VERSIONS): Define.
478 (GNU_USER_TARGET_D_CRITSEC_SIZE): Define.
479 * config/i386/t-i386 (i386-d.o): New rule.
480 * config/kfreebsd-gnu.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
481 * config/kopensolaris-gnu.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
482 * config/linux-android.h (ANDROID_TARGET_D_OS_VERSIONS): Define.
483 * config/linux.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
484 * config/mips/linux-common.h (EXTRA_TARGET_D_OS_VERSIONS): Define.
485 * config/mips/mips-d.c: New file.
486 * config/mips/mips-protos.h (mips_d_target_versions): New prototype.
487 * config/mips/mips.h (TARGET_D_CPU_VERSIONS): Define.
488 * config/mips/t-mips (mips-d.o): New rule.
489 * config/powerpcspe/linux.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
490 * config/powerpcspe/linux64.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
491 * config/powerpcspe/powerpcspe-d.c: New file.
492 * config/powerpcspe/powerpcspe-protos.h (rs6000_d_target_versions):
494 * config/powerpcspe/powerpcspe.c (rs6000_output_function_epilogue):
495 Support GNU D by using 0 as the language type.
496 * config/powerpcspe/powerpcspe.h (TARGET_D_CPU_VERSIONS): Define.
497 * config/powerpcspe/t-powerpcspe (powerpcspe-d.o): New rule.
498 * config/riscv/riscv-d.c: New file.
499 * config/riscv/riscv-protos.h (riscv_d_target_versions): New
501 * config/riscv/riscv.h (TARGET_D_CPU_VERSIONS): Define.
502 * config/riscv/t-riscv (riscv-d.o): New rule.
503 * config/rs6000/linux.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
504 * config/rs6000/linux64.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
505 * config/rs6000/rs6000-d.c: New file.
506 * config/rs6000/rs6000-protos.h (rs6000_d_target_versions): New
508 * config/rs6000/rs6000.c (rs6000_output_function_epilogue):
509 Support GNU D by using 0 as the language type.
510 * config/rs6000/rs6000.h (TARGET_D_CPU_VERSIONS): Define.
511 * config/rs6000/t-rs6000 (rs6000-d.o): New rule.
512 * config/s390/s390-d.c: New file.
513 * config/s390/s390-protos.h (s390_d_target_versions): New prototype.
514 * config/s390/s390.h (TARGET_D_CPU_VERSIONS): Define.
515 * config/s390/t-s390 (s390-d.o): New rule.
516 * config/sparc/sparc-d.c: New file.
517 * config/sparc/sparc-protos.h (sparc_d_target_versions): New
519 * config/sparc/sparc.h (TARGET_D_CPU_VERSIONS): Define.
520 * config/sparc/t-sparc (sparc-d.o): New rule.
521 * config/t-glibc (glibc-d.o): New rule.
522 * configure: Regenerated.
523 * configure.ac (tm_d_file): New variable.
524 (tm_d_file_list, tm_d_include_list, d_target_objs): Add substitutes.
525 * doc/contrib.texi (Contributors): Add self for the D frontend.
526 * doc/frontends.texi (G++ and GCC): Mention D as a supported language.
527 * doc/install.texi (Configuration): Mention libphobos as an option for
528 --enable-shared. Mention d as an option for --enable-languages.
529 (Testing): Mention check-d as a target.
530 * doc/invoke.texi (Overall Options): Mention .d, .dd, and .di as file
531 name suffixes. Mention d as a -x option.
532 * doc/sourcebuild.texi (Top Level): Mention libphobos.
533 * doc/standards.texi (Standards): Add section on D language.
534 * doc/tm.texi: Regenerated.
535 * doc/tm.texi.in: Add @node for D language and ABI, and @hook for
536 TARGET_CPU_VERSIONS, TARGET_D_OS_VERSIONS, and TARGET_D_CRITSEC_SIZE.
537 * dwarf2out.c (is_dlang): New function.
538 (gen_compile_unit_die): Use DW_LANG_D for D.
539 (declare_in_namespace): Return module die for D, instead of adding
540 extra declarations into the namespace.
541 (gen_namespace_die): Generate DW_TAG_module for D.
542 (gen_decl_die): Handle CONST_DECLSs for D.
543 (dwarf2out_decl): Likewise.
544 (prune_unused_types_walk_local_classes): Handle DW_tag_interface_type.
545 (prune_unused_types_walk): Handle DW_tag_interface_type same as other
547 * gcc.c (default_compilers): Add entries for .d, .dd and .di.
548 * genhooks.c: Include d/d-target.def.
550 2018-10-28 Iain Sandoe <iain@sandoe.co.uk>
553 * config/rs6000/darwin.h (STACK_BOUNDARY): New.
554 (RS6000_STARTING_FRAME_OFFSET): Adjust to preserve 16byte alignment.
555 (STACK_DYNAMIC_OFFSET): Likewise.
557 2018-10-27 Sandra Loosemore <sandra@codesourcery.com>
560 * config/nios2/nios2.c (nios2_valid_target_attribute_rec): Fix
563 2018-10-26 Tulio Magno Quites Machado Filho <tuliom@linux.ibm.com>
565 * doc/extend.texi (PowerPC builtins): Fix __builtin_unpack_ibm128
566 return type and other typos.
568 2018-10-26 Aaron Sawdey <acsawdey@linux.ibm.com>
570 * config/rs6000/rs6000-string.c (expand_strncmp_gpr_sequence): Change to
571 a shorter sequence with fewer branches.
572 (emit_final_str_compare_gpr): Ditto.
574 2018-10-26 Paul A. Clarke <pc@us.ibm.com>
576 * config/rs6000/tmmintrin.h: New file.
577 * config.gcc (powerpc*-*-*): Add tmmintrin.h to extra_headers.
579 2018-10-26 Paul A. Clarke <pc@us.ibm.com>
581 * config/rs6000/mmintrin.h: Enable 32bit compilation.
582 * config/rs6000/xmmintrin.h: Likewise.
584 2018-10-26 Paul A. Clarke <pc@us.ibm.com>
586 * config/rs6000/xmmintrin.h (_mm_extract_pi16): Fix for big-endian.
588 2018-10-26 Richard Biener <rguenther@suse.de>
590 * tree-vect-slp.c (vect_mark_slp_stmts): Add visited hash_set
592 (vect_mark_slp_stmts_relevant): Likewise.
593 (vect_detect_hybrid_slp_stmts): Likewise.
594 (vect_bb_slp_scalar_cost): Likewise.
595 (vect_remove_slp_scalar_calls): Likewise.
597 2018-10-26 Jan Hubicka <jh@suse.cz>
599 * ipa-devirt.c (odr_subtypes_equivalent_p): Fix recursion.
600 (warn_types_mismatch): Fix walk of DECL_NAME.
601 (odr_types_equivalent_p): Fix overactive assert.
603 2018-10-26 Richard Biener <rguenther@suse.de>
605 PR tree-optimization/87105
606 * tree-vectorizer.h (_slp_tree::refcnt): New member.
607 * tree-vect-slp.c (vect_free_slp_tree): Decrement and honor
609 (vect_create_new_slp_node): Initialize refcnt to one.
611 (scalar_stmts_set_t, bst_fail): Remove.
612 (vect_build_slp_tree_2): Add bst_map argument and adjust calls.
613 (vect_build_slp_tree): Add bst_map argument and lookup
614 already created SLP nodes.
615 (vect_print_slp_tree): Handle a SLP graph, print SLP node
617 (vect_slp_rearrange_stmts): Handle a SLP graph.
618 (vect_analyze_slp_instance): Adjust and free SLP nodes from
619 the CSE map. Fix indenting.
620 (vect_schedule_slp_instance): Add short-cut.
622 2018-10-26 Martin Liska <mliska@suse.cz>
625 * ipa-prop.c (struct ipa_vr_ggc_hash_traits): Hash with
626 addr_expr and not with pointers.
628 2018-10-26 Jan Hubicka <jh@suse.cz>
630 * tree.c (free_lang_data_in_type): Only check main variants.
631 * ipa-devirt.c (warn_odr): Make static.
632 (types_same_for_odr): Drop strict variant.
633 (types_odr_comparable): Likewise.
634 (odr_or_derived_type_p): Look for main variants.
635 (odr_name_hasher::equal): Cleanup comment.
636 (odr_subtypes_equivalent): Add warn and warned arguments; check main
638 (type_variants_equivalent_p): break out from ...
639 (odr_types_equivalent): ... here; go for main variants where needed.
640 (warn_odr): ... here; turn static.
641 (warn_types_mismatch): Compare mangled names of main variants.
642 * ipa-utils.h (types_odr_comparable): Drop strict parameter.
643 (type_with_linkage_p): Sanity check that we look at main variant.
644 * lto.c (lto_read_decls): Only consider main variant to be ODR type.
645 * tree.h (types_same_for_odr): Drop strict argument.
647 2018-10-26 Richard Biener <rguenther@suse.de>
649 PR tree-optimization/87746
650 * tree-vect-data-refs.c (vect_update_misalignment_for_peel):
651 Simplify and fix WRT strided store groups with size not
652 equal to step in element count.
653 (vect_analyze_group_access_1): Dump the whole group.
655 2018-10-25 Carl Love <cel@us.ibm.com>
657 * config/rs6000/rs6000-c.c (P9V_BUILTIN_VEC_VSCEDPGT,
658 P9V_BUILTIN_VEC_VSCEDPLT, P9V_BUILTIN_VEC_VSCEDPEQ,
659 P9V_BUILTIN_VEC_VSCEDPUO): Rename base overloaded name. Add quad
660 precicion entry for each overloaded builtin.
661 * config/rs6000/rs6000-builtin.def (VSCEDPGT, VSCEDPLT, VSCEDPEQ,
662 VSCEDPUO): Rename overloaded name.
663 (VSCEDPGT, VSCEQPGT, VSCEDPLT, VSCEQPLT, VSCEDPEQ, VSCEQPEQ,
664 VSCEDPUO, VSCEQPUO): Add defitions for overloaded builtins.
665 * config/rs6000/vsx.md (xscmpexpqp_<code>_<mode>): Add
666 define_expand for xscmpexqp instruction.
667 (*xscmpexpqp): Add define_insn for the xscmpexqp instruction.
669 2018-10-25 Bill Schmidt <wschmidt@linux.ibm.com>
670 Jinsong Ji <jji@us.ibm.com>
672 * config/rs6000/emmintrin.h (_mm_slli_epi16): Replace deprecated
673 function with vec_sl.
674 (_mm_slli_epi32): Likewise.
675 (_mm_slli_epi64): Likewise.
676 (_mm_srai_epi16): Replace deprecated function with vec_sra.
677 (_mm_srai_epi32): Likewise.
678 (_mm_srli_epi16): Replace deprecated function with vec_sr.
679 (_mm_srli_epi32): Likewise.
680 (_mm_srli_epi64): Likewise.
681 (_mm_sll_epi16): Replace deprecated function with vec_sl.
682 (_mm_sll_epi32): Likewise.
683 (_mm_sll_epi64): Likewise.
684 (_mm_sra_epi16): Replace deprecated function with vec_sra.
685 (_mm_sra_epi32): Likewise.
686 (_mm_srl_epi16): Replace deprecated function with vec_sr.
687 (_mm_srl_epi32): Likewise.
688 (_mm_srl_epi64): Likewise.
690 2018-10-25 Bill Schmidt <wschmidt@linux.ibm.com>
691 Jinsong Ji <jji@us.ibm.com>
693 * gcc/config/rs6000/emmintrin.h (_mm_sll_epi16): Replace
694 comparison operators with vec_cmp* for compatibility due to
695 unfortunate history; clean up formatting and use types more
697 (_mm_sll_epi32): Likewise.
698 (_mm_sll_epi64): Likewise.
699 (_mm_srl_epi16): Likewise.
700 (_mm_srl_epi32): Likewise.
701 (_mm_srl_epi64): Likewise.
703 2018-10-25 Bill Schmidt <wschmidt@linux.ibm.com>
704 Jinsong Ji <jji@us.ibm.com>
706 * config/rs6000/emmintrin.h (_mm_sll_epi64): Remove wrong cast.
707 * config/rs6000/xmmintrin.h (_mm_min_ps): Change m's type to
708 __vector __bool int. Use vec_cmpgt in preference to deprecated
709 function vec_vcmpgtfp.
710 (_mm_max_ps): Likewise.
712 2018-10-25 Jeff Law <law@redhat.com>
714 * config/rl78/rl78.c (insn_ok_now): Always re-recognize the insn
717 2018-10-25 Martin Sebor <msebor@redhat.com>
719 * doc/extend.texi (aligned): Expand attribute description.
720 (Alignment): Rename section. Discuss function arguments.
722 2018-10-25 Jan Hubicka <jh@suse.cz>
724 * ipa-devirt.c (main_odr_variant): Remove.
725 (hash_odr_name, types_same_for_odr, types_odr_comparable,
726 odr_name_hasher::equal, odr_subtypes_equivalent_p):
727 Drop use of main_odr_variant.
728 (add_type_duplicate): Silence confused warnings on integer types.
729 (get_odr_type): Always look for main variant.
730 (register_odr_type): Simplify.
732 2018-10-25 Richard Biener <rguenther@suse.de>
734 * tree-vect-data-refs.c (vect_analyze_data_ref_accesses):
735 Initialize ng to silence error with release checking bootstrap.
737 2018-10-25 Richard Biener <rguenther@suse.de>
739 * tree-if-conv.c: Include tree-ssa-sccvn.h.
740 (tree_if_conversion): Run CSE on the if-converted loop body.
742 2018-10-25 Ilya Leoshkevich <iii@linux.ibm.com>
744 * config/s390/constraints.md (ZL): New constraint.
745 * config/s390/s390.c (legitimate_pic_operand_p): Accept LARL
747 * config/s390/s390.md (movdi_larl): Remove.
748 (movdi_64): Add the LARL alternative.
750 2018-10-25 Ilya Leoshkevich <iii@linux.ibm.com>
753 * rtl.c (RTX_CODE_HWINT_P_1): New helper macro.
754 (RTX_CODE_HWINT_P): New macro.
755 (rtx_code_size): Use RTX_CODE_HWINT_P ().
757 2018-10-25 Jan Hubicka <jh@suse.cz>
759 * ipa-devirt.c (odr_types_equivalent_p): Do not ICE if one of types
762 2018-10-25 Richard Biener <rguenther@suse.de>
764 PR tree-optimization/87665
765 PR tree-optimization/87745
766 * tree-vectorizer.h (get_earlier_stmt): Remove.
767 (get_later_stmt): Pick up UID from the original non-pattern stmt.
769 2018-10-25 Sam Tebbs <sam.tebbs@arm.com>
771 * options.texi (Deprecated): Move list to Var section.
773 2018-10-24 Bill Schmidt <wschmidt@linux.ibm.com>
774 Jinsong Ji <jji@us.ibm.com>
776 * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Change deprecated
777 __vector long to __vector long long.
778 (_mm_cvtpd_ps): Likewise.
779 (_mm_cvttpd_epi32): Likewise.
780 (_mm_cvtpi32_pd): Likewise.
781 (_mm_unpackhi_epi64): Likewise.
782 (_mm_unpacklo_epi64): Likewise.
784 2018-10-24 Segher Boessenkool <segher@kernel.crashing.org>
786 PR rtl-optimization/87720
787 * combine.c (make_more_copies): Skip if the dest is pc_rtx.
789 2018-10-24 Alexandre Oliva <aoliva@redhat.com>
791 * gimple-ssa-isolate-paths.c
792 (find_implicit_erroneous_behavior): Do not change code if the
793 pass is running for warnings only.
794 (find_explicit_erroneous_behavior): Likewise.
796 2018-10-24 Michael Meissner <meissner@linux.ibm.com>
798 * config/rs6000/rs6000.c (TARGET_MANGLE_DECL_ASSEMBLER_NAME):
799 Define as rs6000_mangle_decl_assembler_name.
800 (rs6000_mangle_decl_assembler_name): If the user switched from IBM
801 long double to IEEE long double, switch the names of the long
802 double built-in functions to be <func>f128 instead of <func>l.
804 2018-10-24 Martin Sebor <msebor@redhat.com>
806 * doc/extend.texi (nonnull): List no-argument form. Reference
807 -fno-delete-null-pointer-checks and -fisolate-erroneous-paths-attribute.
809 2018-10-24 Richard Biener <rguenther@suse.de>
811 * tree-ssa-sccvn.c (do_rpo_vn): Free rpo_state.
813 2018-10-24 Martin Liska <mliska@suse.cz>
815 PR tree-optimization/84436
816 * tree-switch-conversion.c (switch_conversion::contains_same_values_p):
818 (switch_conversion::contains_linear_function_p): New.
819 (switch_conversion::build_one_array): Support linear
820 transformation on input.
821 * tree-switch-conversion.h (struct switch_conversion): Add
822 contains_linear_function_p declaration.
824 2018-10-24 Richard Biener <rguenther@suse.de>
826 * varasm.c (const_hash_1): Return hash of ADDR_EXPR
827 if its argument is CONSTANT_CLASS_P.
829 2018-10-11 Jan Hubicka <hubicka@ucw.cz>
831 * ipa-utils.h (type_with_linkage_p): No longer check for TYPE_STUB_DECL;
832 it is wrong for forward declarations.
834 2018-10-24 Ilya Leoshkevich <iii@linux.ibm.com>
836 * config/s390/s390.c (s390_check_qrst_address): Add the missing
837 SYMBOL_REF_P () check.
839 2018-10-24 Richard Biener <rguenther@suse.de>
841 PR tree-optimization/87105
842 * tree-vect-data-refs.c (vect_analyze_group_access_1): Adjust
844 (vect_analyze_data_ref_accesses): Handle duplicate loads and
845 stores by splitting the affected group after the fact.
846 * tree-vect-slp.c (vect_build_slp_tree_2): Dump when we
847 fail the SLP build because of size constraints.
849 2018-10-24 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
851 * configure.ac (gcc_cv_ld_aligned_shf_merge): New test.
852 * configure: Regenerate.
853 * config.in: Regenerate.
854 * varasm.c (mergeable_string_section): Use readonly_data_section
855 if linker doesn't support SHF_MERGE with alignment > 8.
856 (mergeable_constant_section): Likewise.
858 2018-10-24 Richard Biener <rguenther@suse.de>
860 PR tree-optimization/84013
861 * tree-ssa-structalias.c (struct msdi_data): New struct for
862 marshalling data to walk_stmt_load_store_ops.
863 (maybe_set_dependence_info): Refactor as callback for
864 walk_stmt_load_store_ops.
865 (compute_dependence_clique): Set restrict info on all stmt kinds.
867 2018-10-24 Martin Liska <mliska@suse.cz>
869 * cgraph.c (cgraph_node::dump):
870 Remove reduntant dumps and make tp_first_run dump more compact.
872 2018-10-24 Richard Biener <rguenther@suse.de>
874 PR tree-optimization/87665
875 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Adjust
878 2018-10-12 Jeff Law <law@redhat.com>
880 * config/h8300/h8300.c (h8300_expand_prologue): Fix stm generation
883 2018-10-23 Richard Biener <rguenther@suse.de>
885 * tree-vrp.c (add_assert_info): Guard dump_printf with
887 * gimple-ssa-evrp-analyze.c
888 (evrp_range_analyzer::record_ranges_from_incoming_edge):
889 Use value_range::ignore_equivs_equal_p.
891 2018-10-23 Richard Biener <rguenther@suse.de>
893 PR tree-optimization/87105
894 PR tree-optimization/87608
895 * passes.def (pass_all_early_optimizations): Add early phi-opt
897 * tree-ssa-phiopt.c (value_replacement): Ignore NOPs and predicts in
898 addition to debug stmts.
899 (tree_ssa_phiopt_worker): Add early_p argument, do only min/max
900 and abs replacement early.
901 * tree-cfg.c (gimple_empty_block_p): Likewise.
903 2018-10-23 Richard Earnshaw <rearnsha@arm.com>
906 * config.gcc (arm*-*-netbsdelf*): Default to StrongARM if no CPU
907 specified to configure.
908 (arm*-*-*): Use ARM7TDMI as the target CPU if no default provided.
910 2018-10-23 Richard Biener <rguenther@suse.de>
912 PR tree-optimization/87700
913 * tree-ssa-copy.c (set_copy_of_val): Fix change detection logic.
915 2018-10-23 Jakub Jelinek <jakub@redhat.com>
918 * config/i386/avx512vlintrin.h (_mm_mask_mullo_epi32): Change type of
919 second argument from __mmask16 to __mmask8.
920 * config/i386/avx512vlbwintrin.h (_mm_mask_packus_epi32,
921 _mm_mask_packs_epi32): Likewise.
922 * config/i386/avx512pfintrin.h (_mm512_mask_prefetch_i64scatter_ps):
924 (_mm512_mask_prefetch_i64scatter_pd): Likewise. Formatting fix.
926 2018-10-23 Richard Biener <rguenther@suse.de>
928 * tree-vect-stmts.c (vect_analyze_stmt): Fix typo in comment.
930 2018-10-23 Richard Biener <rguenther@suse.de>
932 PR tree-optimization/86144
933 * tree-vect-stmts.c (vect_analyze_stmt): Prefer -mveclibabi
936 2018-10-23 Richard Biener <rguenther@suse.de>
938 PR tree-optimization/87693
939 * tree-ssa-threadedge.c (thread_around_empty_blocks): Handle
940 the case we do not find the taken edge.
942 2018-10-22 Bill Schmidt <wschmidt@linux.ibm.com>
943 Jinsong Ji <jji@us.ibm.com>
945 * config/rs6000/emmintrin.h (_MM_SHUFFLE2): Comment cleanup.
946 (_mm_store_pd): Use unaligned vector type for pointer cast.
947 (_mm_maskmoveu_si128): Likewise.
948 * config/rs6000/xmmintrin.h (__m128_u): New typedef.
949 (_mm_store_ps): Use unaligned vector type for pointer cast.
951 2018-10-22 Paul Koning <ni1d@arrl.net>
953 * symtab.c (symtab_node::increase_alignment): Correct max
956 2018-10-22 Yury Gribov <tetra2005@gmail.com>
958 PR tree-optimization/87633
959 * match.pd: Do not generate unordered integer comparisons.
961 2018-10-22 Segher Boessenkool <segher@kernel.crashing.org>
963 PR rtl-optimization/87600
964 * combine.c: Add include of expr.h.
965 (cant_combine_insn_p): Do not combine moves from any hard non-fixed
966 register to a pseudo.
967 (make_more_copies): New function, add a copy to a new pseudo after
968 the moves from hard registers into pseudos.
969 (rest_of_handle_combine): Declare rebuild_jump_labels_after_combine
970 later. Call make_more_copies.
972 2018-10-22 Andrew Stubbs <ams@codesourcery.com>
974 * lra-constraints.c (process_alt_operands): New local array,
975 matching_early_clobber. Check matching_early_clobber before
976 decrementing reject, and set matching_early_clobber after.
978 2018-10-22 Segher Boessenkool <segher@kernel.crashing.org>
981 * config/rs6000/rs6000.c (print_operand_address): For unexpected RTL
982 call output_addr_const and hope for the best.
984 2018-10-22 Richard Biener <rguenther@suse.de>
986 * gimple-ssa-evrp-analyze.c
987 (evrp_range_analyzer::record_ranges_from_incoming_edge): Be
988 smarter about what ranges to use.
989 * tree-vrp.c (add_assert_info): Dump here.
990 (register_edge_assert_for_2): Instead of here at multiple but
993 * gcc.dg/tree-ssa/evrp12.c: New testcase.
994 * gcc.dg/predict-6.c: Adjust.
995 * gcc.dg/tree-ssa/vrp33.c: Disable EVRP.
996 * gcc.dg/tree-ssa/vrp02.c: Likewise.
997 * gcc.dg/tree-ssa/cunroll-9.c: Likewise.
999 2018-10-22 Steven Bosscher <steven@gcc.gnu.org>
1000 Richard Biener <rguenther@suse.de>
1002 * bitmap.h: Update data structure documentation, including a
1003 description of bitmap views as either linked-lists or splay trees.
1004 (struct bitmap_element_def): Update comments for splay tree bitmaps.
1005 (struct bitmap_head_def): Likewise.
1006 (bitmap_list_view, bitmap_tree_view): New prototypes.
1007 (bitmap_initialize_stat): Initialize a bitmap_head's indx and
1009 (bmp_iter_set_init): Assert the iterated bitmaps are in list form.
1010 (bmp_iter_and_init, bmp_iter_and_compl_init): Likewise.
1011 * bitmap.c (bitmap_elem_to_freelist): Unregister overhead of a
1012 released bitmap element here.
1013 (bitmap_element_free): Remove.
1014 (bitmap_elt_clear_from): Work on splay tree bitmaps.
1015 (bitmap_list_link_element): Renamed from bitmap_element_link. Move
1016 this function similar ones such that linked-list bitmap implementation
1017 functions are grouped.
1018 (bitmap_list_unlink_element): Renamed from bitmap_element_unlink,
1019 and moved for grouping.
1020 (bitmap_list_insert_element_after): Renamed from
1021 bitmap_elt_insert_after, and moved for grouping.
1022 (bitmap_list_find_element): New function spliced from bitmap_find_bit.
1023 (bitmap_tree_link_left, bitmap_tree_link_right,
1024 bitmap_tree_rotate_left, bitmap_tree_rotate_right, bitmap_tree_splay,
1025 bitmap_tree_link_element, bitmap_tree_unlink_element,
1026 bitmap_tree_find_element): New functions for splay-tree bitmap
1028 (bitmap_element_link, bitmap_element_unlink, bitmap_elt_insert_after):
1029 Renamed and moved, see above entries.
1030 (bitmap_tree_listify_from): New function to convert part of a splay
1031 tree bitmap to a linked-list bitmap.
1032 (bitmap_list_view): Convert a splay tree bitmap to linked-list form.
1033 (bitmap_tree_view): Convert a linked-list bitmap to splay tree form.
1034 (bitmap_find_bit): Remove.
1035 (bitmap_clear, bitmap_clear_bit, bitmap_set_bit,
1036 bitmap_single_bit_set_p, bitmap_first_set_bit, bitmap_last_set_bit):
1037 Handle splay tree bitmaps.
1038 (bitmap_copy, bitmap_count_bits, bitmap_and, bitmap_and_into,
1039 bitmap_elt_copy, bitmap_and_compl, bitmap_and_compl_into,
1040 bitmap_compl_and_into, bitmap_elt_ior, bitmap_ior, bitmap_ior_into,
1041 bitmap_xor, bitmap_xor_into, bitmap_equal_p, bitmap_intersect_p,
1042 bitmap_intersect_compl_p, bitmap_ior_and_compl,
1043 bitmap_ior_and_compl_into, bitmap_set_range, bitmap_clear_range,
1044 bitmap_hash): Reject trying to act on splay tree bitmaps. Make
1045 corresponding changes to use linked-list specific bitmap_element
1046 manipulation functions as applicable for efficiency.
1047 (bitmap_tree_to_vec): New function.
1048 (debug_bitmap_elt_file): New function split out from ...
1049 (debug_bitmap_file): ... here. Handle splay tree bitmaps.
1050 (bitmap_print): Likewise.
1052 PR tree-optimization/63155
1053 * tree-ssa-propagate.c (ssa_prop_init): Use tree-view for the
1055 * tree-ssa-coalesce.c (coalesce_ssa_name): Populate used_in_copies
1058 2018-10-22 Martin Liska <mliska@suse.cz>
1060 PR tree-optimization/87686
1062 2018-08-29 Martin Liska <mliska@suse.cz>
1064 * tree-switch-conversion.c (switch_conversion::expand):
1065 Strenghten assumption about gswitch statements.
1067 2018-10-22 Martin Liska <mliska@suse.cz>
1069 * ipa-icf.c (sem_item::compare_attributes): Remove.
1070 (sem_item::compare_referenced_symbol_properties): Use
1071 attribute_list_equal instead.
1072 (sem_function::equals_wpa): Likewise.
1073 * ipa-icf.h: Remove compare_attributes.
1075 2018-10-22 Richard Biener <rguenther@suse.de>
1078 * mem-stats.h (mem_usage::operator==): Fix pasto.
1080 2018-10-22 Richard Biener <rguenther@suse.de>
1082 PR tree-optimization/87640
1083 * tree-vrp.c (set_value_range_with_overflow): Decompose
1085 (extract_range_from_binary_expr_1): Adjust.
1087 2018-10-22 Martin Jambor <mjambor@suse.cz>
1089 * tree-eh.h (stmt_could_throw_p): Add function parameter.
1090 (stmt_can_throw_external): Likewise.
1091 (stmt_can_throw_internal): Likewise.
1092 * tree-eh.c (lower_eh_constructs_2): Pass cfun to stmt_could_throw_p.
1093 (lower_eh_constructs_2): Likewise.
1094 (stmt_could_throw_p): Add fun parameter, use it instead of cfun.
1095 (stmt_can_throw_external): Likewise.
1096 (stmt_can_throw_internal): Likewise.
1097 (maybe_clean_eh_stmt_fn): Pass cfun to stmt_could_throw_p.
1098 (maybe_clean_or_replace_eh_stmt): Pass cfun to stmt_could_throw_p.
1099 (maybe_duplicate_eh_stmt_fn): Pass new_fun to stmt_could_throw_p.
1100 (maybe_duplicate_eh_stmt): Pass cfun to stmt_could_throw_p.
1101 (pass_lower_eh_dispatch::execute): Pass cfun to
1102 stmt_can_throw_external.
1103 (cleanup_empty_eh): Likewise.
1104 (verify_eh_edges): Pass cfun to stmt_could_throw_p.
1105 * cgraph.c (cgraph_edge::set_call_stmt): Pass a function to
1106 stmt_can_throw_external instead of pushing it to cfun.
1107 (symbol_table::create_edge): Likewise.
1108 * gimple-fold.c (fold_builtin_atomic_compare_exchange): Pass cfun to
1109 stmt_can_throw_internal.
1110 * gimple-ssa-evrp.c (evrp_dom_walker::before_dom_children): Pass cfun
1111 to stmt_could_throw_p.
1112 * gimple-ssa-store-merging.c (handled_load): Pass cfun to
1113 stmt_can_throw_internal.
1114 (pass_store_merging::execute): Likewise.
1115 * gimple-ssa-strength-reduction.c
1116 (find_candidates_dom_walker::before_dom_children): Pass cfun to
1118 * gimplify-me.c (gimple_regimplify_operands): Pass cfun to
1119 stmt_can_throw_internal.
1120 * ipa-pure-const.c (check_call): Pass cfun to stmt_could_throw_p and
1121 to stmt_can_throw_external.
1122 (check_stmt): Pass cfun to stmt_could_throw_p.
1123 (check_stmt): Pass cfun to stmt_can_throw_external.
1124 (pass_nothrow::execute): Likewise.
1125 * trans-mem.c (expand_call_tm): Pass cfun to stmt_can_throw_internal.
1126 * tree-cfg.c (is_ctrl_altering_stmt): Pass cfun to
1127 stmt_can_throw_internal.
1128 (verify_gimple_in_cfg): Pass cfun to stmt_could_throw_p.
1129 (stmt_can_terminate_bb_p): Pass cfun to stmt_can_throw_external.
1130 (gimple_purge_dead_eh_edges): Pass cfun to stmt_can_throw_internal.
1131 * tree-complex.c (expand_complex_libcall): Pass cfun to
1132 stmt_could_throw_p and to stmt_can_throw_internal.
1133 (expand_complex_multiplication): Pass cfun to stmt_can_throw_internal.
1134 * tree-inline.c (copy_edges_for_bb): Likewise.
1135 (maybe_move_debug_stmts_to_successors): Likewise.
1136 * tree-outof-ssa.c (ssa_is_replaceable_p): Pass cfun to
1138 * tree-parloops.c (oacc_entry_exit_ok_1): Likewise.
1139 * tree-sra.c (scan_function): Pass cfun to stmt_can_throw_external.
1140 * tree-ssa-alias.c (stmt_kills_ref_p): Pass cfun to
1141 stmt_can_throw_internal.
1142 * tree-ssa-ccp.c (optimize_atomic_bit_test_and): Likewise.
1143 * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Pass cfun to
1145 (mark_aliased_reaching_defs_necessary_1): Pass cfun to
1146 stmt_can_throw_internal.
1147 * tree-ssa-forwprop.c (pass_forwprop::execute): Likewise.
1148 * tree-ssa-loop-im.c (movement_possibility): Pass cfun to
1150 * tree-ssa-loop-ivopts.c (find_givs_in_stmt_scev): Likewise.
1151 (add_autoinc_candidates): Pass cfun to stmt_can_throw_internal.
1152 * tree-ssa-math-opts.c (pass_cse_reciprocals::execute): Likewise.
1153 (convert_mult_to_fma_1): Likewise.
1154 (convert_to_divmod): Likewise.
1155 * tree-ssa-phiprop.c (propagate_with_phi): Likewise.
1156 * tree-ssa-pre.c (compute_avail): Pass cfun to stmt_could_throw_p.
1157 * tree-ssa-propagate.c
1158 (substitute_and_fold_dom_walker::before_dom_children): Likewise.
1159 * tree-ssa-reassoc.c (suitable_cond_bb): Likewise.
1160 (maybe_optimize_range_tests): Likewise.
1161 (linearize_expr_tree): Likewise.
1162 (reassociate_bb): Likewise.
1163 * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
1164 * tree-ssa-scopedtables.c (hashable_expr_equal_p): Likewise.
1165 * tree-ssa-strlen.c (adjust_last_stmt): Likewise.
1166 (handle_char_store): Likewise.
1167 * tree-vect-data-refs.c (vect_find_stmt_data_reference): Pass cfun to
1168 stmt_can_throw_internal.
1169 * tree-vect-patterns.c (check_bool_pattern): Pass cfun to
1171 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
1172 (vectorizable_call): Pass cfun to stmt_can_throw_internal.
1173 (vectorizable_simd_clone_call): Likewise.
1174 * value-prof.c (gimple_ic): Pass cfun to stmt_could_throw_p.
1175 (gimple_stringop_fixed_value): Likewise.
1177 2018-10-22 Ilya Leoshkevich <iii@linux.ibm.com>
1179 * config/s390/s390.c (s390_loadrelative_operand_p): Accept
1180 literal pool references.
1181 (s390_check_qrst_address): Adapt to the new behavior of
1182 s390_loadrelative_operand_p ().
1184 2018-10-22 H.J. Lu <hongjiu.lu@intel.com>
1187 * config/i386/sse.md (*andnot<mode>3_bcst): New.
1189 2018-10-22 H.J. Lu <hongjiu.lu@intel.com>
1192 * config/i386/sse.md (*<code><mode>3_bcst): New.
1194 2018-10-22 H.J. Lu <hongjiu.lu@intel.com>
1197 * config/i386/sse.md (avx512bcst): Updated for V4SI, V2DI, V8SI,
1198 V4DI, V16SI and V8DI.
1199 (*sub<mode>3<mask_name>_bcst): New.
1200 (*add<mode>3<mask_name>_bcst): Likewise.
1202 2018-10-21 Bill Schmidt <wschmidt@linux.ibm.com>
1203 Jinsong Ji <jji@us.ibm.com>
1205 * config/rs6000/emmintrin.h (_mm_movemask_pd): Replace __vector
1206 __m64 with __vector unsigned long long for compatibility.
1207 (_mm_movemask_epi8): Likewise.
1208 * config/rs6000/xmmintrin.h (_mm_cvtps_pi32): Likewise.
1209 (_mm_cvttps_pi32): Likewise.
1210 (_mm_cvtpi32_ps): Likewise.
1211 (_mm_cvtps_pi16): Likewise.
1212 (_mm_loadh_pi): Likewise.
1213 (_mm_storeh_pi): Likewise.
1214 (_mm_movehl_ps): Likewise.
1215 (_mm_movelh_ps): Likewise.
1216 (_mm_loadl_pi): Likewise.
1217 (_mm_storel_pi): Likewise.
1218 (_mm_movemask_ps): Likewise.
1219 (_mm_shuffle_pi16): Likewise.
1221 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
1224 * config/i386/avx512fintrin.h (_mm512_fnmsub_round_pd): Use
1225 __builtin_ia32_vfnmsubpd512_mask.
1226 (_mm512_mask_fnmsub_round_pd): Likewise.
1227 (_mm512_fnmsub_pd): Likewise.
1228 (_mm512_mask_fnmsub_pd): Likewise.
1229 (_mm512_maskz_fnmsub_round_pd): Use
1230 __builtin_ia32_vfnmsubpd512_maskz.
1231 (_mm512_maskz_fnmsub_pd): Likewise.
1232 (_mm512_fnmsub_round_ps): Use __builtin_ia32_vfnmsubps512_mask.
1233 (_mm512_mask_fnmsub_round_ps): Likewise.
1234 (_mm512_fnmsub_ps): Likewise.
1235 (_mm512_mask_fnmsub_ps): Likewise.
1236 (_mm512_maskz_fnmsub_round_ps): Use
1237 __builtin_ia32_vfnmsubps512_maskz.
1238 (_mm512_maskz_fnmsub_ps): Likewise.
1239 * config/i386/avx512vlintrin.h (_mm256_mask_fnmsub_pd): Use
1240 __builtin_ia32_vfnmsubpd256_mask.
1241 (_mm256_maskz_fnmsub_pd): Use __builtin_ia32_vfnmsubpd256_maskz.
1242 (_mm_mask_fnmsub_pd): Use __builtin_ia32_vfmaddpd128_mask
1243 (_mm_maskz_fnmsub_pd): Use __builtin_ia32_vfnmsubpd128_maskz.
1244 (_mm256_mask_fnmsub_ps): Use __builtin_ia32_vfnmsubps256_mask.
1245 (_mm256_mask_fnmsub_ps): Use __builtin_ia32_vfnmsubps256_mask.
1246 (_mm256_maskz_fnmsub_ps): Use __builtin_ia32_vfnmsubps256_maskz.
1247 (_mm_mask_fnmsub_ps): Use __builtin_ia32_vfnmsubps128_mask.
1248 (_mm_maskz_fnmsub_ps): Use __builtin_ia32_vfnmsubps128_maskz.
1249 * config/i386/fmaintrin.h (_mm_fnmsub_pd): Use
1250 __builtin_ia32_vfnmsubpd.
1251 (_mm256_fnmsub_pd): Use __builtin_ia32_vfnmsubpd256.
1252 (_mm_fnmsub_ps): Use __builtin_ia32_vfnmsubps.
1253 (_mm256_fnmsub_ps): Use __builtin_ia32_vfnmsubps256.
1254 (_mm_fnmsub_sd): Use __builtin_ia32_vfnmsubsd3.
1255 (_mm_fnmsub_ss): Use __builtin_ia32_vfnmsubss3.
1256 * config/i386/i386-builtin.def: Add
1257 __builtin_ia32_vfnmsubpd256_mask,
1258 __builtin_ia32_vfnmsubpd256_maskz,
1259 __builtin_ia32_vfnmsubpd128_mask,
1260 __builtin_ia32_vfnmsubpd128_maskz,
1261 __builtin_ia32_vfnmsubps256_mask,
1262 __builtin_ia32_vfnmsubps256_maskz,
1263 __builtin_ia32_vfnmsubps128_mask,
1264 __builtin_ia32_vfnmsubps128_maskz,
1265 __builtin_ia32_vfnmsubpd512_mask,
1266 __builtin_ia32_vfnmsubpd512_maskz,
1267 __builtin_ia32_vfnmsubps512_mask,
1268 __builtin_ia32_vfnmsubps512_maskz, __builtin_ia32_vfnmsubss3,
1269 __builtin_ia32_vfnmsubsd3, __builtin_ia32_vfnmsubps,
1270 __builtin_ia32_vfnmsubpd, __builtin_ia32_vfnmsubps256 and.
1271 __builtin_ia32_vfnmsubpd256.
1272 * config/i386/sse.md (fma4i_fnmsub_<mode>): New.
1273 (<avx512>_fnmsub_<mode>_maskz<round_expand_name>): Likewise.
1274 (*<sd_mask_codefor>fma_fnmsub_<mode><sd_maskz_name>_bcst_1):
1276 (*<sd_mask_codefor>fma_fnmsub_<mode><sd_maskz_name>_bcst_2):
1278 (*<sd_mask_codefor>fma_fnmsub_<mode><sd_maskz_name>_bcst_3):
1280 (fmai_vmfnmsub_<mode><round_name>): Likewise.
1282 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
1285 * config/i386/avx512fintrin.h (_mm512_fnmadd_round_pd): Use
1286 __builtin_ia32_vfnmaddpd512_mask.
1287 (_mm512_mask_fnmadd_round_pd): Likewise.
1288 (_mm512_fnmadd_pd): Likewise.
1289 (_mm512_mask_fnmadd_pd): Likewise.
1290 (_mm512_maskz_fnmadd_round_pd): Use
1291 __builtin_ia32_vfnmaddpd512_maskz.
1292 (_mm512_maskz_fnmadd_pd): Likewise.
1293 (_mm512_fnmadd_round_ps): Use __builtin_ia32_vfnmaddps512_mask.
1294 (_mm512_mask_fnmadd_round_ps): Likewise.
1295 (_mm512_fnmadd_ps): Likewise.
1296 (_mm512_mask_fnmadd_ps): Likewise.
1297 (_mm512_maskz_fnmadd_round_ps): Use
1298 __builtin_ia32_vfnmaddps512_maskz.
1299 (_mm512_maskz_fnmadd_ps): Likewise.
1300 * config/i386/avx512vlintrin.h (_mm256_mask_fnmadd_pd): Use
1301 __builtin_ia32_vfnmaddpd256_mask.
1302 (_mm256_maskz_fnmadd_pd): Use __builtin_ia32_vfnmaddpd256_maskz.
1303 (_mm_mask_fnmadd_pd): Use __builtin_ia32_vfmaddpd128_mask
1304 (_mm_maskz_fnmadd_pd): Use __builtin_ia32_vfnmaddpd128_maskz.
1305 (_mm256_mask_fnmadd_ps): Use __builtin_ia32_vfnmaddps256_mask.
1306 (_mm256_mask_fnmadd_ps): Use __builtin_ia32_vfnmaddps256_mask.
1307 (_mm256_maskz_fnmadd_ps): Use __builtin_ia32_vfnmaddps256_maskz.
1308 (_mm_mask_fnmadd_ps): Use __builtin_ia32_vfnmaddps128_mask.
1309 (_mm_maskz_fnmadd_ps): Use __builtin_ia32_vfnmaddps128_maskz.
1310 * config/i386/fmaintrin.h (_mm_fnmadd_pd): Use
1311 __builtin_ia32_vfnmaddpd.
1312 (_mm256_fnmadd_pd): Use __builtin_ia32_vfnmaddpd256.
1313 (_mm_fnmadd_ps): Use __builtin_ia32_vfnmaddps.
1314 (_mm256_fnmadd_ps): Use __builtin_ia32_vfnmaddps256.
1315 (_mm_fnmadd_sd): Use __builtin_ia32_vfnmaddsd3.
1316 (_mm_fnmadd_ss): Use __builtin_ia32_vfnmaddss3.
1317 * config/i386/i386-builtin.def: Add
1318 __builtin_ia32_vfnmaddpd256_mask,
1319 __builtin_ia32_vfnmaddpd256_maskz,
1320 __builtin_ia32_vfnmaddpd128_mask,
1321 __builtin_ia32_vfnmaddpd128_maskz,
1322 __builtin_ia32_vfnmaddps256_mask,
1323 __builtin_ia32_vfnmaddps256_maskz,
1324 __builtin_ia32_vfnmaddps128_mask,
1325 __builtin_ia32_vfnmaddps128_maskz,
1326 __builtin_ia32_vfnmaddpd512_mask,
1327 __builtin_ia32_vfnmaddpd512_maskz,
1328 __builtin_ia32_vfnmaddps512_mask,
1329 __builtin_ia32_vfnmaddps512_maskz, __builtin_ia32_vfnmaddss3,
1330 __builtin_ia32_vfnmaddsd3, __builtin_ia32_vfnmaddps,
1331 __builtin_ia32_vfnmaddpd, __builtin_ia32_vfnmaddps256 and.
1332 __builtin_ia32_vfnmaddpd256.
1333 * config/i386/sse.md (fma4i_fnmadd_<mode>): New.
1334 (<avx512>_fnmadd_<mode>_maskz<round_expand_name>): Likewise.
1335 (*<sd_mask_codefor>fma_fnmadd_<mode><sd_maskz_name>_bcst_1):
1337 (*<sd_mask_codefor>fma_fnmadd_<mode><sd_maskz_name>_bcst_2):
1339 (*<sd_mask_codefor>fma_fnmadd_<mode><sd_maskz_name>_bcst_3):
1341 (fmai_vmfnmadd_<mode><round_name>): Likewise.
1343 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
1346 * config/i386/avx512fintrin.h (_mm512_fmsub_round_pd): Use
1347 __builtin_ia32_vfmsubpd512_mask.
1348 (_mm512_mask_fmsub_round_pd): Likewise.
1349 (_mm512_fmsub_pd): Likewise.
1350 (_mm512_mask_fmsub_pd): Likewise.
1351 (_mm512_maskz_fmsub_round_pd): Use
1352 __builtin_ia32_vfmsubpd512_maskz.
1353 (_mm512_maskz_fmsub_pd): Likewise.
1354 (_mm512_fmsub_round_ps): Use __builtin_ia32_vfmsubps512_mask.
1355 (_mm512_mask_fmsub_round_ps): Likewise.
1356 (_mm512_fmsub_ps): Likewise.
1357 (_mm512_mask_fmsub_ps): Likewise.
1358 (_mm512_maskz_fmsub_round_ps): Use
1359 __builtin_ia32_vfmsubps512_maskz.
1360 (_mm512_maskz_fmsub_ps): Likewise.
1361 * config/i386/avx512vlintrin.h (_mm256_mask_fmsub_pd): Use
1362 __builtin_ia32_vfmsubpd256_mask.
1363 (_mm256_maskz_fmsub_pd): Use __builtin_ia32_vfmsubpd256_maskz.
1364 (_mm_mask_fmsub_pd): Use __builtin_ia32_vfmaddpd128_mask
1365 (_mm_maskz_fmsub_pd): Use __builtin_ia32_vfmsubpd128_maskz.
1366 (_mm256_mask_fmsub_ps): Use __builtin_ia32_vfmsubps256_mask.
1367 (_mm256_mask_fmsub_ps): Use __builtin_ia32_vfmsubps256_mask.
1368 (_mm256_maskz_fmsub_ps): Use __builtin_ia32_vfmsubps256_maskz.
1369 (_mm_mask_fmsub_ps): Use __builtin_ia32_vfmsubps128_mask.
1370 (_mm_maskz_fmsub_ps): Use __builtin_ia32_vfmsubps128_maskz.
1371 * config/i386/fmaintrin.h (_mm_fmsub_pd): Use
1372 __builtin_ia32_vfmsubpd.
1373 (_mm256_fmsub_pd): Use __builtin_ia32_vfmsubpd256.
1374 (_mm_fmsub_ps): Use __builtin_ia32_vfmsubps.
1375 (_mm256_fmsub_ps): Use __builtin_ia32_vfmsubps256.
1376 (_mm_fmsub_sd): Use __builtin_ia32_vfmsubsd3.
1377 (_mm_fmsub_ss): Use __builtin_ia32_vfmsubss3.
1378 * config/i386/i386-builtin.def: Add
1379 __builtin_ia32_vfmsubpd256_mask,
1380 __builtin_ia32_vfmsubpd256_maskz,
1381 __builtin_ia32_vfmsubpd128_mask,
1382 __builtin_ia32_vfmsubpd128_maskz,
1383 __builtin_ia32_vfmsubps256_mask,
1384 __builtin_ia32_vfmsubps256_maskz,
1385 __builtin_ia32_vfmsubps128_mask,
1386 __builtin_ia32_vfmsubps128_maskz,
1387 __builtin_ia32_vfmsubpd512_mask,
1388 __builtin_ia32_vfmsubpd512_maskz,
1389 __builtin_ia32_vfmsubps512_mask,
1390 __builtin_ia32_vfmsubps512_maskz, __builtin_ia32_vfmsubss3,
1391 __builtin_ia32_vfmsubsd3, __builtin_ia32_vfmsubps,
1392 __builtin_ia32_vfmsubpd, __builtin_ia32_vfmsubps256 and.
1393 __builtin_ia32_vfmsubpd256.
1394 * config/i386/sse.md (fma4i_fmsub_<mode>): New.
1395 (<avx512>_fmsub_<mode>_maskz<round_expand_name>): Likewise.
1396 (*<sd_mask_codefor>fma_fmsub_<mode><sd_maskz_name>_bcst_1):
1398 (*<sd_mask_codefor>fma_fmsub_<mode><sd_maskz_name>_bcst_2):
1400 (*<sd_mask_codefor>fma_fmsub_<mode><sd_maskz_name>_bcst_3):
1402 (fmai_vmfmsub_<mode><round_name>): Likewise.
1404 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
1406 * config/i386/sse.md (*<plusminus_insn><mode>3<mask_name>_bcst_1):
1407 Remove plus. Renamed to ...
1408 (*sub<mode>3<mask_name>_bcst): This.
1409 (*add<mode>3<mask_name>_bcst_2): Renamede to ...
1410 (*add<mode>3<mask_name>_bcst): This.
1412 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
1415 * config/i386/sse.md (*mul<mode>3<mask_name>_bcst): New.
1417 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
1420 * i386/avx512vlintrin.h (_mm256_or_epi32): New.
1421 (_mm_or_epi32): Likewise.
1422 (_mm256_xor_epi32): Likewise.
1423 (_mm_xor_epi32): Likewise.
1424 (_mm256_or_epi64): Likewise.
1425 (_mm_or_epi64): Likewise.
1426 (_mm256_xor_epi64): Likewise.
1427 (_mm_xor_epi64): Likewise.
1429 2018-10-20 H.J. Lu <hongjiu.lu@intel.com>
1432 * config/i386/sse.md (*<avx512>_div<mode>3<mask_name>_bcst): New.
1434 2018-10-20 Jakub Jelinek <jakub@redhat.com>
1437 * varasm.c (decode_addr_const): Handle COMPOUND_LITERAL_EXPR.
1439 2018-10-20 Andreas Schwab <schwab@linux-m68k.org>
1441 * doc/ux.texi: Move @section directly after @node.
1443 2018-10-19 Jakub Jelinek <jakub@redhat.com>
1447 * omp-low.c (check_omp_nesting_restrictions): Diagnose ordered without
1448 depend closely nested inside of loop with ordered clause with
1451 2018-10-19 David Malcolm <dmalcolm@redhat.com>
1453 * Makefile.in (TEXI_GCCINT_FILES): Add ux.texi.
1454 * doc/gccint.texi: Include ux.texi and use it in top-level menu.
1455 * doc/ux.texi: New file.
1457 2018-10-19 Segher Boessenkool <segher@kernel.crashing.org>
1459 * config/rs6000/rs6000.h (REG_ALLOC_ORDER): Move 68 (that is, CR0) to
1460 be the first CR field allocated.
1462 2018-10-19 Richard Biener <rguenther@suse.de>
1465 * config/i386/i386.c (ix86_builtin_vectorization_cost): Use
1466 TYPE_VECTOR_SUBPARTS and avoid relying on vector mode.
1468 2018-10-19 H.J. Lu <hongjiu.lu@intel.com>
1471 * config/i386/sse.md
1472 (*<plusminus_insn><mode>3<mask_name>_bcst_1): New.
1473 (*add<mode>3<mask_name>_bcst_2): Likewise.
1475 2018-10-19 H.J. Lu <hongjiu.lu@intel.com>
1477 * config/i386/sse.md
1478 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_1):
1479 Replace nonimmediate_operand with register_operand.
1480 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_2):
1482 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_3):
1485 2018-10-19 Ilya Leoshkevich <iii@linux.ibm.com>
1487 PR rtl-optimization/87596
1488 * lra-constraints.c (spill_hard_reg_in_range): Use INSN_P () +
1489 lra_get_insn_recog_data () instead of lra_insn_recog_data[]
1490 for instructions in FROM..TO range.
1492 2018-10-19 Eric Botcazou <ebotcazou@adacore.com>
1494 * cfgexpand.c (expand_one_var): Use specific wording in error message
1495 for non-local frame variables.
1496 * stor-layout.c (layout_decl): Do not issue a warning for them.
1498 2018-10-19 Robin Dapp <rdapp@linux.ibm.com>
1500 * haifa-sched.c (priority): Add force_recompute parameter.
1501 (apply_replacement): Call priority () with force_recompute = true.
1502 (restore_pattern): Likewise.
1504 2018-10-18 H.J. Lu <hongjiu.lu@intel.com>
1506 * simplify-rtx.c (simplify_subreg): Limit mask of vec_merge to
1507 HOST_BITS_PER_WIDE_INT.
1508 (test_vector_ops_duplicate): Likewise.
1510 2018-10-18 H.J. Lu <hongjiu.lu@intel.com>
1513 * config/i386/sse.md (VF_AVX512): New.
1514 (avx512bcst): Likewise.
1515 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_1):
1517 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_2):
1519 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_3):
1522 2018-10-18 Jonathan Wakely <jwakely@redhat.com>
1524 * doc/invoke.texi (-dumpversion): Improve grammar.
1525 (-dumpfullversion): Make more consistent with -dumpversion.
1527 2018-10-18 Uros Bizjak <ubizjak@gmail.com>
1529 * config/i386/i386.c (ix86_emit_fp_unordered_jump):
1530 Set JUMP_LABEL to the jump insn.
1531 (ix86_emit_i387_log1p): Use ix86_expand_branch to expand branch.
1532 Predict emitted jump and add label to jump insn.
1534 2018-10-18 David Malcolm <dmalcolm@redhat.com>
1536 PR tree-optimization/87562
1537 * input.c (get_substring_ranges_for_loc): Use
1538 LRK_SPELLING_LOCATION rather than LRK_MACRO_EXPANSION_POINT when
1539 getting the linemap for the endpoint. Verify that it's either
1540 in the same linemap as the start point's spelling location, or
1541 at least in the same file.
1543 2018-10-18 Richard Biener <rguenther@suse.de>
1545 * config/i386/i386.c (ix86_builtin_vectorization_cost): Do not
1546 feed width-specific load/store costs through ix86_vec_cost.
1547 * config/i386/x86-tune-costs.h (athlon_cost): Adjust.
1548 (k8_cost): Likewise.
1549 (bdver_cost): Likewise.
1550 (znver1_cost): Likewise.
1551 (btver1_cost): Likewise.
1552 (btver2_cost): Likewise.
1554 2018-10-18 H.J. Lu <hongjiu.lu@intel.com>
1556 * simplify-rtx.c (simplify_subreg): Call simplify_gen_subreg
1557 to simplify subreg of vec_merge.
1559 2018-10-18 Richard Biener <rguenther@suse.de>
1561 * config/i386/i386.c: Fix costing of vector FMA.
1563 2018-10-18 Richard Biener <rguenther@suse.de>
1565 * config/i386/i386.c (ix86_vec_cost): Remove !parallel path
1567 (ix86_builtin_vectorization_cost): For vec_construct properly
1568 cost insertion into SSE regs.
1569 (...): Adjust calls to ix86_vec_cost.
1571 2018-10-18 Richard Biener <rguenther@suse.de>
1575 2018-02-07 Richard Biener <rguenther@suse.de>
1577 PR tree-optimization/84204
1578 * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
1581 2018-10-18 H.J. Lu <hongjiu.lu@intel.com>
1584 * simplify-rtx.c (simplify_subreg): Simplify subreg of vec_merge
1586 (test_vector_ops_duplicate): Add test for a scalar subreg of a
1587 VEC_MERGE of a VEC_DUPLICATE.
1589 2018-10-17 Joseph Myers <joseph@codesourcery.com>
1591 * doc/cpp.texi (__STDC_VERSION__): Document C2X handling.
1592 * doc/invoke.texi (-std=c2x, -std=gnu2x): Document new options.
1593 * doc/standards.texi (C Language): Document C2X.
1594 * dwarf2out.c (highest_c_language), config/rl78/rl78.c
1595 (rl78_option_override): Handle "GNU C2X" language name.
1597 2018-10-17 Joseph Myers <joseph@codesourcery.com>
1599 * doc/invoke.texi (-std=c17), doc/standards.texi (C Language):
1600 Document C17 as published in 2018.
1602 2018-10-17 Eric Botcazou <ebotcazou@adacore.com>
1605 * fold-const.c (fold_truth_andor_1): If the right side is not constant,
1606 bail out if both sides do not have the same storage order.
1608 2018-10-17 Aldy Hernandez <aldyh@redhat.com>
1610 * bitmap.c (bitmap_head::dump): New.
1611 * bitmap.h (bitmap_head): Add dump().
1612 * gimple-ssa-evrp-analyze.c
1613 (evrp_range_analyzer::try_find_new_range): Adjust for value_range API.
1614 (evrp_range_analyzer::set_ssa_range_info): Same.
1615 (evrp_range_analyzer::record_ranges_from_phis): Same.
1616 (evrp_range_analyzer::record_ranges_from_stmt): Same.
1617 * gimple-ssa-evrp.c (evrp_dom_walker::before_dom_children): Same.
1618 * gimple-ssa-sprintf.c (get_int_range): Same.
1619 (format_integer): Same.
1620 (sprintf_dom_walker::handle_gimple_call): Same.
1621 * ipa-cp.c (ipcp_vr_lattice::meet_with_1): Same.
1622 (ipcp_vr_lattice::top_p): Same.
1623 (ipcp_vr_lattice::bottom_p): Same.
1624 (ipcp_vr_lattice::set_to_bottom): Same.
1625 (ipa_vr_operation_and_type_effects): Same.
1626 (propagate_vr_across_jump_function): Same.
1627 (ipcp_store_vr_results): Same.
1628 * ipa-prop.c (struct ipa_vr_ggc_hash_traits): Same.
1629 (ipa_print_node_jump_functions_for_edge): Same.
1630 (ipa_get_value_range): Same.
1631 (ipa_compute_jump_functions_for_edge): Same.
1632 (ipa_write_jump_function): Same.
1633 * tree-ssa-dom.c (simplify_stmt_for_jump_threading): Same.
1634 * tree-ssa-threadedge.c (record_temporary_equivalences_from_phis):
1636 * vr-values.c (set_value_range_to_nonnegative): Same.
1637 (set_value_range_to_truthvalue): Same.
1638 (vr_values::get_value_range): Same.
1639 (vr_values::set_defs_to_varying): Same.
1640 (vr_values::update_value_range): Same.
1641 (symbolic_range_based_on_p): Same.
1642 (vr_values::op_with_boolean_value_range_p): Same.
1643 (vr_values::extract_range_for_var_from_comparison_expr): Same.
1644 (vr_values::extract_range_from_ssa_name): Same.
1645 (vr_values::extract_range_from_binary_expr): Same.
1646 (vr_values::extract_range_from_unary_expr): Same.
1647 (vr_values::extract_range_from_cond_expr): Same.
1648 (vr_values::extract_range_from_comparison): Same.
1649 (vr_values::check_for_binary_op_overflow): Same.
1650 (vr_values::extract_range_basic): Same.
1651 (vr_values::extract_range_from_assignment): Same.
1652 (compare_ranges): Same.
1653 (compare_range_with_value): Same.
1654 (vr_values::adjust_range_with_scev): Same.
1655 (vrp_valueize): Same.
1656 (vrp_valueize_1): Same.
1657 (vr_values::get_vr_for_comparison): Same.
1658 (vr_values::compare_name_with_value): Same.
1659 (vr_values::compare_names): Same.
1660 (vr_values::vrp_evaluate_conditional): Same.
1661 (find_case_label_ranges): Same.
1662 (vr_values::vrp_visit_switch_stmt): Same.
1663 (vr_values::extract_range_from_phi_node): Same.
1664 (vr_values::simplify_div_or_mod_using_ranges): Same.
1665 (vr_values::simplify_bit_ops_using_ranges): Same.
1666 (test_for_singularity): Same.
1667 (range_fits_type_p): Same.
1668 (vr_values::simplify_cond_using_ranges_1): Same.
1669 (vr_values::simplify_switch_using_ranges): Same.
1670 (vr_values::simplify_float_conversion_using_ranges): Same.
1671 (vr_values::two_valued_val_range_p): Same.
1672 (vr_values::add_equivalence): Move to value_range::equiv_add.
1673 * vr-values.h (vr_values::add_equivalence): Remove.
1674 (VR_INITIALIZER): Remove.
1675 * tree-vrp.c (value_range::set): New.
1676 (value_range::equiv_add): New.
1677 (value_range::value_range): New.
1678 (value_range::deep_copy): New.
1679 (value_range::check): New.
1680 (value_range::equal_p): New.
1681 (value_range::ignore_equivs_equal_p): New.
1682 (value_range::operator==): New.
1683 (value_range::operator!=): New.
1684 (value_range::symbolic_p): New.
1685 (value_range::numeric_p): New.
1686 (value_range::set_undefined): New.
1687 (value_range::set_varying): New.
1688 (value_range::may_contain_p): New.
1689 (value_range::equiv_clear): New.
1690 (value_range::singleton_p): New.
1691 (value_range::intersect): New.
1692 (value_range::dump): New.
1693 (value_range::set_and_canonicalize): New.
1694 (set_value_range): Adjust for value_range API.
1695 (set_value_range_to_undefined): Same.
1696 (set_value_range_to_varying): Same.
1697 (set_and_canonicalize_value_range): Same.
1698 (set_value_range_to_nonnull): Same.
1699 (set_value_range_to_null): Same.
1700 (range_is_null): Same.
1701 (range_is_nonnull): Same.
1702 (range_int_cst_p): Same.
1703 (range_int_cst_singleton_p): Same.
1704 (symbolic_range_p): Same.
1705 (range_includes_zero_p): Same.
1706 (value_range_constant_singleton): Same.
1707 (vrp_set_zero_nonzero_bits): Same.
1708 (ranges_from_anti_range): Same.
1709 (extract_range_into_wide_ints): Same.
1710 (extract_range_from_multiplicative_op): Same.
1711 (set_value_range_with_overflow): Same.
1712 (extract_range_from_binary_expr_1): Same.
1713 (extract_range_from_unary_expr): Same.
1714 (dump_value_range): Same.
1715 (debug_value_range): Same.
1716 (vrp_prop::check_array_ref): Same.
1717 (vrp_prop::check_mem_ref): Same.
1718 (vrp_prop::vrp_initialize): Same.
1719 (vrp_prop::visit_stmt): Same.
1720 (intersect_ranges): Same.
1721 (vrp_prop::visit_phi): Same.
1722 (vrp_prop::vrp_finalize): Same.
1723 (determine_value_range_1): Same.
1724 (determine_value_range): Same.
1725 (vrp_intersect_ranges_1): Rename to...
1726 (vrp_intersect_1): this.
1727 (vrp_intersect_ranges): Rename to...
1728 (value_range::intersect_helper): ...this.
1729 (vrp_meet_1): Rename to...
1730 (value_range::union_helper): ...this.
1731 (vrp_meet): Rename to...
1732 (value_range::union_): ...this.
1733 (copy_value_range): Remove.
1734 * tree-vrp.h (struct value_range): Rewrite into a proper class.
1735 (value_range::vrtype): New.
1736 (value_range::type): New.
1737 (value_range::equiv): New.
1738 (value_range::min): New.
1739 (value_range::max): New.
1740 (value_range::varying_p): New.
1741 (value_range::undefined_p): New.
1742 (value_range::null_p): New.
1743 (value_range::equiv_add): New.
1744 (copy_value_range): Remove.
1746 2018-10-17 David Malcolm <dmalcolm@redhat.com>
1748 * Makefile.in (SELFTEST_TARGETS): New.
1749 (selftest) Change from s-selftest-c to $(SELFTEST_TARGETS).
1750 (C_SELFTEST_FLAGS, C_SELFTEST_DEPS, s-selftest-c, selftest-c-gdb)
1751 (selftest-gdb, selftest-c-valgrind, selftest-valgrind): Move to
1753 (CPP_SELFTEST_FLAGS, CPP_SELFTEST_DEPS, s-selftest-c++)
1754 (selftest-c++-gdb, selftest-c++-valgrind): Move to
1756 * configure: Regenerate.
1757 * configure.ac (selftest_languages): New.
1759 2018-10-17 Aldy Hernandez <aldyh@redhat.com>
1761 * tree-vrp.c (extract_range_from_multiplicative_op): Remove
1762 overflow wraps argument.
1763 (extract_range_from_binary_expr_1): Do not pass overflow wraps to
1764 wide_int_range_multiplicative_op.
1765 * wide-int-range.cc (wide_int_range_mult_wrapping): Remove
1766 overflow wraps argument.
1767 (wide_int_range_multiplicative_op): Same.
1768 (wide_int_range_lshift): Same.
1769 (wide_int_range_div): Same.
1770 * wide-int-range.h (wide_int_range_multiplicative_op): Same.
1771 (wide_int_range_lshift): Same.
1772 (wide_int_range_div): Same.
1774 2018-10-17 Aldy Hernandez <aldyh@redhat.com>
1776 * wide-int-range.h (wide_int_range_shift_undefined_p): Adjust to
1777 use sign as argument.
1778 * tree-vrp.c (extract_range_from_binary_expr_1): Pass sign to
1779 wide_int_range_shift_undefined_p.
1781 2018-10-16 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
1783 * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>):
1785 (@despeculate_copy<ALLI_TI:mode>): ... This.
1786 * config/aarch64/aarch64.c (aarch64_speculation_safe_value): Remove
1789 2018-10-16 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1791 * config.gcc: Obsolete *-*-solaris2.10*.
1792 * doc/install.texi (Specific, *-*-solaris2*): Document it.
1794 2018-10-12 Jeff Law <law@redhat.com>
1796 * config/ft32/ft32.md (ft32_general_movsrc_operand): Disable
1797 reg + sym +- const_int addressing modes.
1799 2018-10-15 David Malcolm <dmalcolm@redhat.com>
1801 * common.opt (fdiagnostics-minimum-margin-width=): New option.
1802 * diagnostic-show-locus.c (layout::layout): Apply the minimum
1804 (layout::start_annotation_line): Only print up to 3 of the
1805 margin character, to avoid touching the left-hand side.
1806 (selftest::test_diagnostic_show_locus_fixit_lines): Update for
1807 minimum margin width, as set by test_diagnostic_context's ctor.
1808 (selftest::test_fixit_insert_containing_newline): Likewise.
1809 (selftest::test_fixit_insert_containing_newline_2): Likewise.
1810 (selftest::test_line_numbers_multiline_range): Clear
1811 dc.min_margin_width.
1812 * diagnostic.c (diagnostic_initialize): Initialize
1814 * diagnostic.h (struct diagnostic_context): Add field
1816 * doc/invoke.texi: Add -fdiagnostics-minimum-margin-width=.
1817 * opts.c (common_handle_option): Handle
1818 OPT_fdiagnostics_minimum_margin_width_.
1819 * selftest-diagnostic.c
1820 (selftest::test_diagnostic_context::test_diagnostic_context):
1821 Initialize min_margin_width to 6.
1822 * toplev.c (general_init): Initialize global_dc->min_margin_width.
1824 2018-10-15 David Malcolm <dmalcolm@redhat.com>
1826 * gcc-rich-location.h (gcc_rich_location::add_location_if_nearby):
1827 Fix usage of "error_at_rich_loc" in the comment.
1829 2018-10-15 Renlin Li <renlin.li@arm.com>
1832 * tree-vectorizer.c (try_vectorize_loop_1): Don't use
1833 if-conversioned loop when it contains ifn with types not
1834 supported by backend.
1835 * internal-fn.c (expand_direct_optab_fn): Add an assert.
1836 (direct_internal_fn_supported_p): New helper function.
1837 * internal-fn.h (direct_internal_fn_supported_p): Declare.
1839 2018-10-15 Jakub Jelinek <jakub@redhat.com>
1842 * common/config/i386/i386-common.c (OPTION_MASK_ISA_AVX512F_UNSET):
1843 Remove OPTION_MASK_ISA_AVX5124FMAPS_UNSET and
1844 OPTION_MASK_ISA_AVX5124VNNIW_UNSET.
1846 2018-10-15 Bin Cheng <bin.cheng@linux.alibaba.com>
1848 PR tree-optimization/87022
1849 * tree-loop-distribution.c (pg_add_dependence_edges): Check all
1850 bits in dist vector rather than the first one.
1852 2018-10-15 Richard Biener <rguenther@suse.de>
1855 * tree-ssa-structalias.c (struct vls_data): Add escaped_p member.
1856 (visit_loadstore): When a used restrict tag escaped verify that
1857 the points-to solution of "other" pointers do not include
1859 (compute_dependence_clique): If a used restrict tag escaped
1860 communicated that down to visit_loadstore.
1862 2018-10-15 Andreas Krebbel <krebbel@linux.ibm.com>
1864 * config/s390/s390.c (s390_expand_vec_init): Force vector element
1865 into reg if it isn't a general operand.
1867 2018-10-14 H.J. Lu <hongjiu.lu@intel.com>
1870 * config/i386/sse.md (*vec_dupv2di): Add register source to
1873 2018-10-14 H.J. Lu <hongjiu.lu@intel.com>
1876 * common/config/i386/i386-common.c (OPTION_MASK_ISA_AVX512F_UNSET):
1877 Add OPTION_MASK_ISA_AVX512IFMA_UNSET,
1878 OPTION_MASK_ISA_AVX5124FMAPS_UNSET and
1879 OPTION_MASK_ISA_AVX5124VNNIW_UNSET.
1881 2018-10-13 Eric Botcazou <ebotcazou@adacore.com>
1883 * dwarf2cfi.c (struct dw_trace_info): Add args_size_defined_for_eh.
1884 (notice_args_size): Set it in the current trace if no insn that can
1885 throw internally has been seen yet.
1886 (connect_traces): When connecting args_size between traces, allow the
1887 incoming values not to match if there is an insn setting it before the
1888 first insn that can throw internally; in that case, force the creation
1889 of a CFI note on this latter insn.
1891 2018-10-13 Jonathan Wakely <jwakely@redhat.com>
1893 * opt-problem.h (opt_wrapper): Use template-argument-list when naming
1894 the base class, because using the injected-class-name was not clearly
1895 specified until DR 176.
1897 2018-10-12 Paul Koning <ni1d@arrl.net>
1899 * config/pdp11/pdp11.md (doloop_end): New expander.
1900 (doloop_end_insn): renamed from "doloop_end".
1901 (addqi3): New pattern.
1902 (subqi3): New pattern.
1903 * config/pdp11/predicates.md (incdec_operand): New predicate.
1905 2018-10-12 Yury Gribov <tetra2005@gmail.com>
1908 * real.c (format_helper::can_represent_integral_type_p): New function
1909 * real.h (format_helper::can_represent_integral_type_p): Ditto.
1910 * match.pd: New pattern.
1912 2018-10-12 Alexandre Oliva <oliva@adacore.com>
1914 * configure.ac: Introduce --enable-large-address-aware
1915 to define MINGW_DEFAULT_LARGE_ADDR_AWARE.
1916 * doc/install.texi: Document it.
1917 * configure, config.in: Rebuilt.
1918 * config/i386/mingw32.h (LINK_SPEC_LARGE_ADDR_AWARE): Define,
1919 based on MINGW_DEFAULT_LARGE_ADDR_AWARE.
1920 (LINK_SPEC): Insert it.
1921 * config/i386/mingw-w64.h: Likewise.
1923 * cygming.h (HAVE_GAS_ALIGNED_COMM): Fallback-define.
1925 2018-10-12 Peter Bergner <bergner@linux.ibm.com>
1927 PR rtl-optimization/87600
1928 * ira-lives (non_conflicting_reg_copy_p): Disable for non LRA targets.
1930 2018-10-12 Paul Koning <ni1d@arrl.net>
1932 * doc/md.texi (doloop_end): Document that the pattern code may
1933 need to check operand mode.
1935 2018-10-12 Wilco Dijkstra <wdijkstr@arm.com>
1937 * config/aarch64/aarch64.md (zero_extendsidi2_aarch64): Add alternatives
1938 to zero-extend between int and floating-point registers.
1939 (load_pair_zero_extendsidi2_aarch64): Add alternative for zero-extended
1940 ldp into floating-point registers. Add type and arch attributes.
1941 (zero_extend<SHORT:mode><GPI:mode>2_aarch64): Add arch attribute.
1942 Use f_loads for type attribute.
1944 2018-10-11 Martin Sebor <msebor@redhat.com>
1946 * doc/extend.texi (attribute packed): Correct typos.
1948 2018-10-11 Martin Sebor <msebor@redhat.com>
1950 * doc/extend.texi (attribute flatten): Mention interaction with
1953 2018-10-11 Jan Hubicka <hubicka@ucw.cz>
1956 * cgraphclones.c (cgraph_node::create_version_clone_with_body):
1957 Set new_decl virtual flag to zero.
1959 2018-10-11 Martin Sebor <msebor@redhat.com>
1962 * doc/extend.texi (attribute format_arg): Discuss using multiple
1963 attributes on a single function.
1965 2018-10-11 Giuliano Belinassi <giuliano.belinassi@usp.br>
1967 PR tree-optimization/86829
1968 * match.pd (sin (atan (x))): New simplification rules.
1969 (cos (atan (x))): Likewise.
1970 * real.c (build_sinatan_real): New function.
1971 * real.h (build_sinatan_real): Prototype.
1973 2018-10-11 Will Schmidt <will_schmidt@vnet.ibm.com>
1975 * config/rs6000/rs6000.c (map_to_integral_tree_type): New helper
1977 (fold_mergeeo_helper): New helper function.
1978 (rs6000_gimple_fold_builtin): Add hooks for vec_mergee and vec_mergeo
1979 intrinsics. Correct some whitespace indentation issues.
1981 2018-10-11 Wilco Dijkstra <wdijkstr@arm.com>
1984 * config/aarch64/aarch64.c (aarch64_mask_and_shift_for_ubfiz_p):
1985 Use HOST_WIDE_INT_1U for shift.
1987 2018-10-11 Doug Rupp <rupp@adacore.com>
1988 Olivier Hainque <hainque@adacore.com>
1990 * config/rs6000/vxworks.h (VXWORKS_RELAX_LINK_SPEC): New macro.
1991 Pass --relax to the linker for RTPs.
1992 (LINK_SPEC): Append VXWORKS_RELAX_LINK_SPEC.
1994 2018-10-11 Andrew Stubbs <ams@codesourcery.com>
1995 Jan Hubicka <jh@suse.cz>
1996 Martin Jambor <mjambor@suse.cz>
1998 * print-rtl.c (print_rtx_operand_codes_E_and_V): Print how many times
1999 the same elements are repeated rather than printing all of them.
2000 * read-rtl.c (rtx_reader::read_rtx_operand): Recognize and expand
2001 "repeated" elements.
2002 * read-rtl-function.c (test_loading_repeat): New function.
2003 (read_rtl_function_c_tests): Call test_loading_repeat.
2004 * rtl-tests.c (test_dumping_repeat): New function.
2005 (rtl_tests_c_tests): Call test_dumping_repeat.
2007 2018-10-11 Richard Biener <rguenther@suse.de>
2009 * config/i386/x86-tune-costs.h (bdver?_memcpy, bdver?_memset,
2010 bdver?_cost): Unify to ...
2011 (bdver_memcpy, bdver_memset, bdver_cost): ... this.
2012 * config/i386/i386.c (processor_cost_table): Adjust.
2014 2018-10-10 Eric Botcazou <ebotcazou@adacore.com>
2017 * cgraphunit.c (cgraph_node::expand_thunk): Force DECL_IGNORED_P on
2018 the thunk when expanding to GIMPLE.
2020 2018-10-10 Bernd Edlinger <bernd.edlinger@hotmail.de>
2022 * varasm.c (mergeable_string_section): Don't try to move zero-length
2023 strings to the merge section.
2025 2018-10-10 Uros Bizjak <ubizjak@gmail.com>
2028 * config/i386/mmx.md (const_vector 0 -> mem splitter): New splitter.
2030 2018-10-10 Jakub Jelinek <jakub@redhat.com>
2033 * config/i386/i386-builtin.def (IX86_BUILTIN_RDPMC): Move from args set
2034 to special_args set.
2036 2018-10-10 Richard Biener <rguenther@suse.de>
2038 * config/i386/sse.md (reduc_plus_scal_v8df, reduc_plus_scal_v4df,
2039 reduc_plus_scal_v2df, reduc_plus_scal_v16sf, reduc_plus_scal_v8sf,
2040 reduc_plus_scal_v4sf): Merge into pattern reducing to half width
2041 and recursing and pattern terminating the recursion on SSE
2042 vector width using ix86_expand_reduc.
2043 (reduc_sminmax_scal_<mode>): Split into part reducing to half
2044 width and recursing and SSE2 vector variant doing the final
2045 reduction with ix86_expand_reduc.
2046 (reduc_uminmax_scal_<mode>): Likewise for the AVX512 variants
2047 with terminating the recursion at AVX level, splitting that
2050 2018-10-09 David Malcolm <dmalcolm@redhat.com>
2052 * genmatch.c (error_cb): Rename to...
2053 (diagnostic_cb): ...this, converting int params to enums.
2054 (fatal_at): Update for renaming.
2055 (warning_at): Likewise.
2057 * input.c (selftest::ebcdic_execution_charset::apply):
2058 Update for renaming of...
2059 (selftest::ebcdic_execution_charset::on_error): ...this, renaming
2061 (selftest::ebcdic_execution_charset::on_diagnostic): ...this,
2062 converting level and reason to enums.
2063 (class selftest::lexer_error_sink): Rename to...
2064 (class selftest::lexer_test_options): ...this, renaming field
2065 "m_errors" to "m_diagnostics".
2066 (selftest::lexer_test_options::apply): Update for renaming of...
2067 (selftest::lexer_test_options::on_error): ...this, renaming to...
2068 (selftest::lexer_test_options::on_diagnostic): ...this
2069 converting level and reason to enums.
2070 (selftest::test_lexer_string_locations_raw_string_unterminated):
2071 Update for renamings.
2072 * opth-gen.awk (struct cpp_reason_option_codes_t): Use enum for
2075 2018-10-09 Paul A. Clarke <pc@us.ibm.com>
2077 * config.gcc (powerpc*-*-*): Add pmmintrin.h to extra_headers.
2078 * config/rs6000/pmmintrin.h: New file.
2080 2018-10-09 Eric Botcazou <ebotcazou@adacore.com>
2082 PR tree-optimization/86659
2083 * gimple-match.h (gimple_match_op constructors): Initialize reverse.
2085 2018-10-09 Richard Biener <rguenther@suse.de>
2087 PR tree-optimization/63155
2088 * tree-ssa-structalias.c: Include tree-ssa.h.
2089 (get_constraint_for_ssa_var): For undefs return nothing_id.
2090 (find_func_aliases): Cleanup PHI handling.
2092 2018-10-09 Richard Biener <rguenther@suse.de>
2094 * tree-vectorizer.c (dump_stmt_cost): Fix cut&paste missing
2097 2018-10-09 Martin Liska <mliska@suse.cz>
2099 * asan.c (asan_emit_stack_protection): If a stack variable
2100 is located in a same file as current function, then emit
2101 line info into variable definition string.
2103 2018-10-08 Eric Botcazou <ebotcazou@adacore.com>
2105 * print-rtl.c (rtx_writer::print_rtx_operand_code_i): Print column
2108 2018-10-08 Eric Botcazou <ebotcazou@adacore.com>
2110 * cgraphunit.c (cgraph_node::expand_thunk): Do not force DECL_IGNORED_P
2113 2018-10-08 Eric Botcazou <ebotcazou@adacore.com>
2115 PR tree-optimization/86659
2116 * gimple-match.h (struct gimple_match_op): Add reverse field.
2117 (gimple_match_op::set_op): New overloaded method.
2118 * gimple-match-head.c (maybe_build_generic_op) <BIT_FIELD_REF>: Set
2119 the REF_REVERSE_STORAGE_ORDER flag on the value.
2120 (gimple_simplify) <GIMPLE_ASSIGN>: For BIT_FIELD_REF, propagate the
2121 REF_REVERSE_STORAGE_ORDER flag and avoid simplifying if it is set.
2123 2018-10-08 Richard Sandiford <richard.sandiford@arm.com>
2126 * gimple-ssa-backprop.c (backprop::intersect_uses): Use
2127 FOR_EACH_IMM_USE_FAST instead of FOR_EACH_IMM_USE_STMT.
2129 2018-10-08 H.J. Lu <hongjiu.lu@intel.com>
2132 * config/i386/avx512fintrin.h (_mm512_mask_fmaddsub_round_pd):
2133 Defined with __builtin_ia32_vfmaddsubpd512_mask.
2135 2018-10-08 Richard Biener <rguenther@suse.de>
2137 * config/i386/x86-tune-costs.h (znver1_cost): Make AVX256 vector loads
2138 cost the same as AVX128 ones.
2140 2018-10-08 Paul Koning <ni1d@arrl.net>
2142 * config/pdp11/pdp11-protos.h (output_block_move): Remove.
2143 (expand_block_move): New function.
2144 * config/pdp11/pdp11.c (output_block_move): Remove.
2145 (expand_block_move): New function.
2146 * config/pdp11/pdp11.h (MOVE_RATIO): New definition.
2147 * config/pdp11/pdp11.md (movmemhi): Use expand_block_move.
2148 (*movmemhi1): Remove.
2150 2018-10-08 Robin Dapp <rdapp@linux.ibm.com>
2152 * config/s390/2827.md: Increase latencies for some FP instructions.
2154 2018-10-08 Richard Biener <rguenther@suse.de>
2156 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
2158 * tree-vectorizer.c (dump_stmt_cost): Add cost param and dump it.
2159 * tree-vectorizer.h (dump_stmt_cost): Adjust.
2160 (add_stmt_cost): Dump return value of the hook.
2162 2018-10-08 Richard Biener <rguenther@suse.de>
2164 PR tree-optimization/63155
2165 * tree-ssa-propagate.c (add_ssa_edge): Do cheap check first.
2166 (ssa_propagation_engine::ssa_propagate): Remove redundant
2167 bitmap bit clearing.
2169 2018-10-05 Peter Bergner <bergner@linux.ibm.com>
2171 PR rtl-optimization/86939
2172 PR rtl-optimization/87479
2173 * ira.h (non_conflicting_reg_copy_p): New prototype.
2174 * ira-lives.c (ignore_reg_for_conflicts): New static variable.
2175 (make_hard_regno_dead): Don't add conflicts for register
2176 ignore_reg_for_conflicts.
2177 (make_object_dead): Likewise.
2178 (non_conflicting_reg_copy_p): New function.
2179 (process_bb_node_lives): Set ignore_reg_for_conflicts for copies.
2180 Remove special conflict handling of REAL_PIC_OFFSET_TABLE_REGNUM.
2181 * lra-lives.c (ignore_reg_for_conflicts): New static variable.
2182 (make_hard_regno_dead): Don't add conflicts for register
2183 ignore_reg_for_conflicts. Remove special conflict handling of
2184 REAL_PIC_OFFSET_TABLE_REGNUM. Remove now unused argument
2185 check_pic_pseudo_p and update callers.
2186 (mark_pseudo_dead): Don't add conflicts for register
2187 ignore_reg_for_conflicts.
2188 (process_bb_lives): Set ignore_reg_for_conflicts for copies.
2190 2018-10-05 Andrew Waterman <andrew@sifive.com>
2191 Jim Wilson <jimw@sifive.com>
2193 * config/riscv/riscv.md (f<quiet_pattern>_quiet<ANYF:mode><X:mode>4):
2194 Add define_expand. Add ! HONOR_SNANS check to current pattern. Add
2195 new pattern using HONOR_SNANS that emits one extra instruction.
2197 2018-10-05 Segher Boessenkool <segher@kernel.crashing.org>
2199 * config/rs6000/rs6000.md (unnamed mfcr scc_comparison_operator
2200 patterns): Merge SI and DI patterns to a GPR pattern.
2201 (unnamed define_insn and define_split for record form of that): Merge
2202 to a single define_insn_and_split pattern.
2204 2018-10-05 David Malcolm <dmalcolm@redhat.com>
2207 * input.c (expand_location_to_spelling_point): Add param "aspect"
2208 and use rather than hardcoding LOCATION_ASPECT_CARET.
2209 (get_substring_ranges_for_loc): Handle the case of a single token
2210 within a macro expansion.
2211 * input.h (expand_location_to_spelling_point): Add "aspect" param,
2212 defaulting to LOCATION_ASPECT_CARET.
2214 2018-10-05 Paul Koning <ni1d@arrl.net>
2216 * config/pdp11/pdp11.c (TARGET_CXX_GUARD_TYPE): Define.
2217 (TARGET_CXX_CLASS_DATA_ALWAYS_COMDAT): Define.
2218 (TARGET_CXX_LIBRARY_RTTI_COMDAT): Define.
2219 (pdp11_guard_type): New function.
2221 2018-10-05 Paul Koning <ni1d@arrl.net>
2223 * config/pdp11/pdp11.h (FLOAT_TYPE_SIZE): Always 32.
2224 * config/pdp11/pdp11.opt (mfloat32): Remove.
2226 * doc/invoke.texi (pdp11 -mfloat32): Remove:
2227 (pdp11 -mfloat64): Remove.
2229 2018-10-05 Uros Bizjak <ubizjak@gmail.com>
2231 * config/i386/i386.md (*cmpxf_cc_i387): Remove pattern.
2232 (*cmp<mode>_cc_i387): Ditto.
2233 (*cmpu<mode>_cc_i387): Ditto.
2234 (*cmp<X87MODEF:mode>_<SWI24:mode>_cc_i387): Ditto.
2235 * config/i386/i386.c (ix86_expand_fp_compare): Remove
2237 <case IX86_FPCMP_SAHF>: Do not generate pattern with HImode clobber.
2238 Emit x86_sahf_1 pattern.
2239 (ix86_expand_compare): Update call to ix86_expand_fp_compare.
2240 (ix86_expand_carry_flag_compare): Ditto.
2242 2018-10-05 Uros Bizjak <ubizjak@gmail.com>
2244 * config/i386/i386.md (*cmpxf_i387): Change operand 2 predicate
2245 to reg_or_0_operand. Add "C" constraint.
2246 (*cmpxf_cc_i387): Ditto.
2247 (*cmp<mode>_i387): Change operand 2 predicate
2248 to nonimm_or_0_operand. Add "C" constraint.
2249 (*cmp<mode>_cc_i387): Ditto.
2250 (*cmp<mode>_0_i387): Remove insn pattern.
2251 (*cmp<mode>_0_cc_i387): Ditto.
2253 2018-10-05 Uros Bizjak <ubizjak@gmail.com>
2255 * config/i386/constraints.md ("C"): Do not depend on TARGET_SSE.
2256 * config/i386/predicates.md (nonimm_or_0_operand): Rename
2257 from vector_move_operand. Update all uses.
2259 2018-10-05 Martin Sebor <msebor@redhat.com>
2261 PR tree-optimization/87490
2262 * builtins.c (expand_builtin_strnlen): Handle a null data.decl
2265 2018-10-05 Richard Biener <rguenther@suse.de>
2267 PR tree-optimization/63155
2268 * tree-ssa-ccp.c (ccp_propagate::visit_phi): Avoid excess
2269 vertical space in dumpfiles.
2270 * tree-ssa-propagate.h
2271 (ssa_propagation_engine::process_ssa_edge_worklist): Remove.
2272 * tree-ssa-propagate.c (cfg_blocks_back): New global.
2273 (ssa_edge_worklist_back): Likewise.
2274 (curr_order): Likewise.
2275 (cfg_blocks_get): Remove abstraction.
2276 (cfg_blocks_add): Likewise.
2277 (cfg_blocks_empty_p): Likewise.
2278 (add_ssa_edge): Add to current or next worklist based on
2280 (add_control_edge): Likewise.
2281 (ssa_propagation_engine::process_ssa_edge_worklist): Fold
2283 (ssa_propagation_engine::ssa_propagate): ... here. Unify
2284 iteration from CFG and SSA edge worklist so we process
2285 everything in RPO order, prioritizing forward progress
2287 (ssa_prop_init): Allocate new worklists, do not dump
2289 (ssa_prop_fini): Free new worklists.
2291 2018-10-05 Richard Biener <rguenther@suse.de>
2293 * tree-core.h (tree_block::abstract_flag): Remove.
2294 (tree_block::block_num): Make full 32bits.
2295 * tree.def (BLOCK): Remove docs about BLOCK_ABSTRACT.
2296 * tree.h (BLOCK_ABSTRACT): Remove.
2297 * dwarf2out.c (gen_lexical_block_die): Remove dead code
2298 resulting from BLOCK_ABSTRACT being always false.
2299 (gen_inlined_subroutine_die): Likewise.
2300 (gen_block_die): Likewise.
2301 * tree.c (block_ultimate_origin): Likewise.
2302 * tree-pretty-print.c (dump_block_node): Remove code dealing
2303 with BLOCK_ABSTRACT.
2304 * tree-ssa-live.c (dump_scope_block): Likewise.
2305 * tree-streamer-in.c (unpack_ts_block_value_fields): Likewise.
2306 * tree-streamer-out.c (pack_ts_block_value_fields): Likewise.
2308 2018-10-05 Richard Biener <rguenther@suse.de>
2310 * config/i386/i386.c (ix86_add_stmt_cost): When scalar cost
2311 is asked for initialize mode to the component mode of the
2314 2018-10-05 H.J. Lu <hongjiu.lu@intel.com>
2317 * config/i386/gnu-user.h (ASM_SPEC): Don't pass -msse2avx to
2318 assembler for -mavx.
2319 * config/i386/gnu-user64.h (ASM_SPEC): Likewise.
2321 2018-10-05 Segher Boessenkool <segher@kernel.crashing.org>
2324 * config/rs6000/rs6000-builtin.def (RS6000_BUILTIN_SET_FPSCR_DRN): Use
2326 * config/rs6000/rs6000.md (rs6000_set_fpscr_rn): Require the operand
2327 to be DImode. When using mffscrn, force the operand to a register.
2329 2018-10-04 Uros Bizjak <ubizjak@gmail.com>
2331 * config/i386/i386.md (*fop_<X87MODEF:mode>_2_i387): Macroize insn
2332 from *fop_<MODEF:mode>_2_i387 and *fop_xf_2_i387 using
2333 X87MODEF mode iterator.
2334 (*fop_<X87MODEF:mode>_3_i387): Macroize insn from
2335 *fop_<MODEF:mode>_3_i387 and *fop_xf_3_i387 using
2336 X87MODEF mode iterator.
2338 2018-10-04 Vinay Kumar <vinay.kumar@blackfigtech.com>
2340 * doc/invoke.texi (-Wno-prio-ctor-dtor): Document new warning
2341 -Wno-prio-ctor-dtor.
2343 2018-10-04 David Malcolm <dmalcolm@redhat.com>
2345 * Makefile.in (OBJS): Add opt-problem.o.
2346 * dump-context.h: Include "selftest.h.
2347 (selftest::temp_dump_context): New forward decl.
2348 (class dump_context): Make friend of class
2349 selftest::temp_dump_context.
2350 (dump_context::dump_loc_immediate): New decl.
2351 (class dump_pretty_printer): Move here from dumpfile.c.
2352 (class temp_dump_context): Move to namespace selftest.
2353 (temp_dump_context::temp_dump_context): Add param
2354 "forcibly_enable_dumping".
2355 (selftest::verify_dumped_text):
2356 (ASSERT_DUMPED_TEXT_EQ): Move here from dumpfile.c.
2357 (selftest::verify_item):
2358 (ASSERT_IS_TEXT): Move here from dumpfile.c.
2359 (ASSERT_IS_TREE): Likewise.
2360 (ASSERT_IS_GIMPLE): Likewise.
2361 * dumpfile.c (dump_context::dump_loc): Move immediate dumping
2363 (dump_context::dump_loc_immediate): ...this new function.
2364 (class dump_pretty_printer): Move to dump-context.h.
2365 (dump_switch_p_1): Don't enable MSG_PRIORITY_REEMITTED.
2366 (opt_info_switch_p_1): Enable MSG_PRIORITY_REEMITTED.
2367 (temp_dump_context::temp_dump_context): Move to "selftest"
2368 namespace. Add param "forcibly_enable_dumping", and use it to
2369 conditionalize the use of m_pp;
2370 (selftest::verify_dumped_text): Make non-static.
2371 (ASSERT_DUMPED_TEXT_EQ): Move to dump-context.h.
2372 (selftest::verify_item): Make non-static.
2373 (ASSERT_IS_TEXT): Move to dump-context.h.
2374 (ASSERT_IS_TREE): Likewise.
2375 (ASSERT_IS_GIMPLE): Likewise.
2376 (selftest::test_capture_of_dump_calls): Pass "true" for new
2377 param of temp_dump_context.
2378 * dumpfile.h (enum dump_flag): Add MSG_PRIORITY_REEMITTED, adding
2379 it to MSG_ALL_PRIORITIES. Update values of TDF_COMPARE_DEBUG and
2381 * opt-problem.cc: New file.
2382 * opt-problem.h: New file.
2383 * optinfo-emit-json.cc
2384 (selftest::test_building_json_from_dump_calls): Pass "true" for
2385 new param of temp_dump_context.
2386 * optinfo.cc (optinfo_kind_to_dump_flag): New function.
2387 (optinfo::emit_for_opt_problem): New function.
2388 (optinfo::emit): Clarity which emit_item is used.
2389 * optinfo.h (optinfo::get_dump_location): New accessor.
2390 (optinfo::emit_for_opt_problem): New decl.
2391 (optinfo::emit): Make const.
2392 * selftest-run-tests.c (selftest::run_tests): Call
2393 selftest::opt_problem_cc_tests.
2394 * selftest.h (selftest::opt_problem_cc_tests): New decl.
2395 * tree-data-ref.c (dr_analyze_innermost): Convert return type from
2396 bool to opt_result, converting fprintf messages to
2397 opt_result::failure_at calls. Add "stmt" param for use by the
2399 (create_data_ref): Pass "stmt" to the dr_analyze_innermost call.
2400 (runtime_alias_check_p): Convert return type from bool to
2401 opt_result, converting dump_printf calls to
2402 opt_result::failure_at, using the statement DDR_A for their
2404 (find_data_references_in_stmt): Convert return type from bool to
2405 opt_result, converting "return false" to opt_result::failure_at
2407 * tree-data-ref.h: Include "opt-problem.h".
2408 (dr_analyze_innermost): Convert return type from bool to opt_result,
2409 and add a const gimple * param.
2410 (find_data_references_in_stmt): Convert return type from bool to
2412 (runtime_alias_check_p): Likewise.
2413 * tree-predcom.c (find_looparound_phi): Pass "init_stmt" to
2414 dr_analyze_innermost.
2415 * tree-vect-data-refs.c (vect_mark_for_runtime_alias_test):
2416 Convert return type from bool to opt_result, adding a message for
2417 the PARAM_VECT_MAX_VERSION_FOR_ALIAS_CHECKS zero case.
2418 (vect_analyze_data_ref_dependence): Convert return type from bool
2419 to opt_result. Change sense of return type from "false"
2420 effectively meaning "no problems" to "false" meaning a problem,
2421 so that "return false" becomes "return opt_result::success".
2422 Convert "return true" calls to opt_result::failure_at, using
2423 the location of statement A rather than vect_location.
2424 (vect_analyze_data_ref_dependences): Convert return type from bool
2426 (verify_data_ref_alignment): Likewise, converting dump_printf_loc
2427 calls to opt_result::failure_at, using the stmt location rather
2429 (vect_verify_datarefs_alignment): Convert return type from bool
2431 (vect_enhance_data_refs_alignment): Likewise. Split local "stat"
2432 into multiple more-tightly-scoped copies.
2433 (vect_analyze_data_refs_alignment): Convert return type from bool
2435 (vect_analyze_data_ref_accesses): Likewise, converting a
2436 "return false" to a "return opt_result::failure_at", adding a
2438 (vect_prune_runtime_alias_test_list): Convert return type from
2439 bool to opt_result, converting dump_printf_loc to
2440 opt_result::failure_at. Add a %G to show the pertinent statement,
2441 and use the stmt's location rather than vect_location.
2442 (vect_find_stmt_data_reference): Convert return type from
2443 bool to opt_result, converting dump_printf_loc to
2444 opt_result::failure_at, using stmt's location.
2445 (vect_analyze_data_refs): Convert return type from bool to
2446 opt_result. Convert "return false" to "return
2447 opt_result::failure_at", adding messages as needed.
2448 * tree-vect-loop.c (vect_determine_vf_for_stmt_1): Convert return
2449 type from bool to opt_result.
2450 (vect_determine_vf_for_stmt): Likewise.
2451 (vect_determine_vectorization_factor): Likewise, converting
2452 dump_printf_loc to opt_result::failure_at, using location of phi
2453 rather than vect_location.
2454 (vect_analyze_loop_form_1): Convert return type from bool to
2455 opt_result, converting dump_printf_loc calls, retaining the use of
2457 (vect_analyze_loop_form): Convert return type from loop_vec_info
2458 to opt_loop_vec_info.
2459 (vect_analyze_loop_operations): Convert return type from bool to
2460 opt_result, converting dump_printf_loc calls, using the location
2461 of phi/stmt rather than vect_location where available. Convert
2462 various "return false" to "return opt_result::failure_at" with
2463 "unsupported phi" messages.
2464 (vect_get_datarefs_in_loop): Convert return type from bool to
2465 opt_result. Add a message for the
2466 PARAM_LOOP_MAX_DATAREFS_FOR_DATADEPS failure.
2467 (vect_analyze_loop_2): Convert return type from bool to
2468 opt_result. Ensure "ok" is set to a opt_result::failure_at before
2469 each "goto again;", adding new messages where needed.
2470 Add "unsupported grouped {store|load}" messages.
2471 (vect_analyze_loop): Convert return type from loop_vec_info to
2473 * tree-vect-slp.c (vect_analyze_slp): Convert return type from
2475 * tree-vect-stmts.c (process_use): Likewise, converting
2476 dump_printf_loc call and using stmt location, rather than
2478 (vect_mark_stmts_to_be_vectorized): Likeise.
2479 (vect_analyze_stmt): Likewise, adding a %G.
2480 (vect_get_vector_types_for_stmt): Convert return type from bool to
2481 opt_result, converting dump_printf_loc calls and using stmt
2482 location, rather than vect_location.
2483 (vect_get_mask_type_for_stmt): Convert return type from tree to
2484 opt_tree, converting dump_printf_loc calls and using stmt location.
2485 * tree-vectorizer.c: Include "opt-problem.h.
2486 (try_vectorize_loop_1): Flag "Analyzing loop at" dump message as
2487 MSG_PRIORITY_INTERNALS. Convert local "loop_vinfo" from
2488 loop_vec_info to opt_loop_vec_info. If if fails, and dumping is
2489 enabled, use it to report at the top level "couldn't vectorize
2490 loop" followed by the problem.
2491 * tree-vectorizer.h (opt_loop_vec_info): New typedef.
2492 (vect_mark_stmts_to_be_vectorized): Convert return type from bool
2494 (vect_analyze_stmt): Likewise.
2495 (vect_get_vector_types_for_stmt): Likewise.
2496 (tree vect_get_mask_type_for_stmt): Likewise.
2497 (vect_analyze_data_ref_dependences): Likewise.
2498 (vect_enhance_data_refs_alignment): Likewise.
2499 (vect_analyze_data_refs_alignment): Likewise.
2500 (vect_verify_datarefs_alignment): Likewise.
2501 (vect_analyze_data_ref_accesses): Likewise.
2502 (vect_prune_runtime_alias_test_list): Likewise.
2503 (vect_find_stmt_data_reference): Likewise.
2504 (vect_analyze_data_refs): Likewise.
2505 (vect_analyze_loop): Convert return type from loop_vec_info to
2507 (vect_analyze_loop_form): Likewise.
2508 (vect_analyze_slp): Convert return type from bool to opt_result.
2510 2018-10-04 David Malcolm <dmalcolm@redhat.com>
2512 * doc/invoke.texi (-fopt-info): Document new "internals"
2514 * dump-context.h (dump_context::apply_dump_filter_p): New decl.
2515 * dumpfile.c (dump_options): Update for renaming of MSG_ALL to
2517 (optinfo_verbosity_options): Add "internals".
2518 (kind_as_string): Update for renaming of MSG_ALL to MSG_ALL_KINDS.
2519 (dump_context::apply_dump_filter_p): New member function.
2520 (dump_context::dump_loc): Use apply_dump_filter_p rather than
2521 explicitly masking the dump_kind.
2522 (dump_context::begin_scope): Increment the scope depth first. Use
2523 apply_dump_filter_p rather than explicitly masking the dump_kind.
2524 (dump_context::emit_item): Use apply_dump_filter_p rather than
2525 explicitly masking the dump_kind.
2526 (dump_dec): Likewise.
2527 (dump_hex): Likewise.
2528 (dump_switch_p_1): Default to MSG_ALL_PRIORITIES.
2529 (opt_info_switch_p_1): Default to MSG_PRIORITY_USER_FACING.
2530 (opt_info_switch_p): Update handling of default
2531 MSG_OPTIMIZED_LOCATIONS to cope with default of
2532 MSG_PRIORITY_USER_FACING.
2533 (dump_basic_block): Use apply_dump_filter_p rather than explicitly
2534 masking the dump_kind.
2535 (selftest::test_capture_of_dump_calls): Update test_dump_context
2536 instances to use MSG_ALL_KINDS | MSG_PRIORITY_USER_FACING rather
2537 than MSG_ALL. Generalize scope test to be run at all four
2538 combinations of with/without MSG_PRIORITY_USER_FACING and
2539 MSG_PRIORITY_INTERNALS, adding examples of explicit priority
2540 for each of the two values.
2541 * dumpfile.h (enum dump_flag): Add comment about the MSG_* flags.
2542 Rename MSG_ALL to MSG_ALL_KINDS. Add MSG_PRIORITY_USER_FACING,
2543 MSG_PRIORITY_INTERNALS, and MSG_ALL_PRIORITIES, updating the
2544 values for TDF_COMPARE_DEBUG and TDF_ALL_VALUES.
2545 (AUTO_DUMP_SCOPE): Add a note to the comment about the interaction
2546 with MSG_PRIORITY_*.
2547 * tree-vect-loop-manip.c (vect_loop_versioning): Mark versioning
2548 dump messages as MSG_PRIORITY_USER_FACING.
2549 * tree-vectorizer.h (DUMP_VECT_SCOPE): Add a note to the comment
2550 about the interaction with MSG_PRIORITY_*.
2552 2018-10-04 Bernd Edlinger <bernd.edlinger@hotmail.de>
2554 * varasm.c (output_constant): Add new parameter merge_strings.
2555 Make strings properly zero terminated in merge string sections.
2556 (mergeable_string_section): Don't fail if the last char is non-zero.
2557 (assemble_variable_contents): Handle merge string sections.
2558 (assemble_variable): Likewise.
2559 (assemble_constant_contents): Likewise.
2560 (output_constant_def_contents): Likewise.
2561 (output_constructor_array_range,
2562 output_constructor_regular_field): Adjust call to output_constant.
2563 (output_object_block): Adjust call to assemble_constant_contents
2564 and assemble_variable_contents.
2566 2018-10-04 Martin Liska <mliska@suse.cz>
2569 * cgraphunit.c (process_function_and_variable_attributes):
2570 Warn about a function with alias attribute and a body.
2572 2018-10-04 Martin Liska <mliska@suse.cz>
2575 * multiple_target.c (redirect_to_specific_clone): New function.
2576 (ipa_target_clone): Use it.
2577 * tree-inline.c: Fix comment.
2579 2018-10-04 David Malcolm <dmalcolm@redhat.com>
2581 * dumpfile.c (gcc::dump_manager::dump_manager): Initialize new
2583 (gcc::dump_manager::~dump_manager): Free m_optinfo_filename.
2584 (gcc::dump_manager::register_pass): New member function, adapted
2585 from loop body in gcc::pass_manager::register_pass, adding a
2586 call to update_dfi_for_opt_info.
2587 (gcc::dump_manager::opt_info_enable_passes): Store the
2588 -fopt-info options into the new fields. Move the loop
2590 (gcc::dump_manager::update_dfi_for_opt_info): ...this new member
2592 * dumpfile.h (struct opt_pass): New forward decl.
2593 (gcc::dump_manager::register_pass): New decl.
2594 (gcc::dump_manager::update_dfi_for_opt_info): New decl.
2595 (class gcc::dump_manager): Add fields "m_optgroup_flags",
2596 "m_optinfo_flags", and "m_optinfo_filename".
2597 * passes.c (gcc::pass_manager::register_pass): Move all of the
2598 dump-handling code to gcc::dump_manager::register_pass.
2600 2018-10-04 Peter Bergner <bergner@linux.ibm.com>
2602 PR rtl-optimization/87466
2603 * target.def (setjmp_preserves_nonvolatile_regs_p): New target hook.
2604 * doc/tm.texi.in (TARGET_SETJMP_PRESERVES_NONVOLATILE_REGS_P): New hook.
2605 * doc/tm.texi: Regenerate.
2606 * ira-lives.c (process_bb_node_lives): Use the new target hook.
2607 * lra-lives.c (process_bb_lives): Likewise.
2608 * config/rs6000/rs6000.c (TARGET_SETJMP_PRESERVES_NONVOLATILE_REGS_P):
2611 2018-10-04 Tamar Christina <tamar.christina@arm.com>
2613 * params.c (add_params): Fix initialization.
2615 2018-10-04 Martin Liska <mliska@suse.cz>
2617 PR gcov-profile/84107
2618 * tree-profile.c (init_ic_make_global_vars):
2619 Remove ic_void_ptr_var and ic_gcov_type_ptr_var.
2620 Come up with new ic_tuple* variables. Emit
2621 __gcov_indirect_call{,_topn} variables.
2622 (gimple_gen_ic_profiler): Access the variable
2624 (gimple_gen_ic_func_profiler): Access
2625 __gcov_indirect_call.callee field.
2626 (gimple_init_gcov_profiler): Use ptr_type_node.
2627 * value-prof.c (gimple_ic): Use ptr_type_node.
2629 2018-10-04 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2631 PR tree-optimization/85787
2632 * ipa-pure-const.c (malloc_candidate_p_1): Move most of malloc_candidate_p
2633 into this function and add support for detecting multiple phis.
2634 (DUMP_AND_RETURN): Move from malloc_candidate_p into top-level macro.
2636 2018-10-04 Martin Liska <mliska@suse.cz>
2639 * ipa-inline.c (inline_to_all_callers_1):
2640 Call ultimate_alias_target for node being inlined.
2642 2018-10-03 Jeff Law <law@redhat.com>
2644 * gimple-ssa-sprintf.c (format_string): Do not hardcode size of
2646 * tree.c (get_typenode_from_name): Moved from fortran/trans-types.c.
2647 * tree.h (get_typenode_from_name): Prototype.
2649 2018-10-03 Uros Bizjak <ubizjak@gmail.com>
2651 * config/i386/i386.md (*cmp<X87MODEF:mode>_<SWI24:mode>_i387):
2652 Change operand 2 predicate to nonimmediate_operand.
2653 (*cmp<X87MODEF:mode>_<SWI24:mode>_cc_i387): Ditto.
2655 2018-10-03 Martin Sebor <msebor@redhat.com>
2656 Jeff Law <law@redhat.com>
2658 * gimple-ssa-sprintf.c (struct fmtresult): Add new member and
2660 (get_string_length): Detect unterminated arrays.
2661 (format_string): Same.
2662 (format_directive): Warn about unterminated arrays.
2663 (handle_gimple_call): Mark statements with no_warning as needed.
2665 2018-10-03 Jim Wilson <jimw@sifive.com>
2667 * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): For ABI_ILP32E,
2668 also define __riscv_abi_rve. Delete trailing white space.
2670 2018-10-03 Paul Koning <ni1d@arrl.net>
2672 Enable LRA register allocator for PDP11.
2673 * config/pdp11/constraints.md (Q): Use define_memory_constraint.
2676 * config/pdp11/pdp11.c (pdp11_lra_p): New function.
2677 * config/pdp11/pdp11.opt (-mlra): New option.
2678 * doc/invoke.texi (PDP-11 Options): Document -mlra.
2680 2018-10-03 Uros Bizjak <ubizjak@gmail.com>
2682 * config/i386/i386.md (*<absneg:code>extendsfdf2): Remove.
2683 (*<absneg:code>extend<mode>xf2): Ditto.
2685 2018-10-03 Aldy Hernandez <aldyh@redhat.com>
2687 PR tree-optimization/87415
2688 * tree-vrp.c (set_value_range_with_overflow): Special case one bit
2691 2018-10-02 Jeff Law <law@redhat.com>
2693 * gimple-fold.c (get_range_strlen): Only set *nonstr when
2694 an unterminated string is discovered. Bubble up range
2695 even for unterminated strings.
2696 (gimple_fold_builtin_strlen): Do not fold if get_range_strlen
2697 indicates the string was not terminated via NONSTR.
2699 2018-10-03 Aldy Hernandez <aldyh@redhat.com>
2701 * tree-vrp.c (extract_range_from_unary_expr): Special case all
2702 pointer conversions.
2703 Do not do anything special for anti-ranges.
2705 2018-10-03 Jérôme Lambourg <lambourg@adacore.com>
2707 * config/arm/vxworks.h (ARM_TARGET2_DWARF_FORMAT): Adjust to
2708 DW_EH_PE_pcrel | DW_EH_PE_indirect for RTPs.
2710 2018-10-03 Martin Liska <mliska@suse.cz>
2712 PR gcov-profile/86109
2713 * coverage.c (coverage_begin_function): Do not
2714 mark lambdas as artificial.
2715 * tree-core.h (struct GTY): Remove tm_clone_flag
2716 and introduce new lambda_function.
2717 * tree.h (DECL_LAMBDA_FUNCTION): New macro.
2719 2018-10-02 Aaron Sawdey <acsawdey@linux.ibm.com>
2722 * config/rs6000/rs6000-string.c (expand_strn_compare): Check that both
2723 P8_VECTOR and VSX are enabled.
2725 2018-10-02 Andreas Krebbel <krebbel@linux.ibm.com>
2727 * config/s390/driver-native.c (s390_host_detect_local_cpu): Add
2728 0x3907 as CPU model number.
2730 2018-10-02 Andreas Krebbel <krebbel@linux.ibm.com>
2732 * common/config/s390/s390-common.c: Rename PF_ARCH12 to PF_Z14.
2733 * config/s390/s390.h (enum processor_flags): Rename PF_ARCH12 to
2734 PF_Z14. Rename TARGET_CPU_ARCH12 to TARGET_CPU_Z14,
2735 TARGET_CPU_ARCH12_P to TARGET_CPU_Z14_P, TARGET_ARCH12 to
2736 TARGET_Z14, and TARGET_ARCH12_P to TARGET_Z14_P.
2737 * config/s390/s390.md: Likewise. Rename also the cpu attribute
2738 value from arch12 to z14.
2740 2018-10-02 Uros Bizjak <ubizjak@gmail.com>
2742 * config/i386/i386.md (fxam<mode>2_i387_with_temp): Remove.
2744 (isinf<mode>2): Ditto.
2746 2018-10-02 Uros Bizjak <ubizjak@gmail.com>
2748 * config/i386/i386.c (ix86_emit_i387_round): Extend op1 to XFmode
2749 before emitting fxam. Perform calculations in XFmode.
2751 2018-10-02 Marc Glisse <marc.glisse@inria.fr>
2753 * match.pd (((X /[ex] A) +- B) * A): New transformation.
2755 2018-10-02 Marc Glisse <marc.glisse@inria.fr>
2758 * fold-const.c (fold_plusminus_mult_expr): Handle complex and vectors.
2759 * tree.c (signed_or_unsigned_type_for): Handle complex.
2761 2018-10-02 Jeff Law <law@redhat.com>
2763 * gimple-fold.c (get_range_strlen): Remove dead code.
2765 2018-10-02 Martin Sebor <msebor@redhat.com>
2766 Jeff Law <law@redhat.com>
2768 * builtins.c (unterminated_array): Add new arguments.
2769 If argument is not terminated, bubble up size and exact
2771 (expand_builtin_strnlen): Detect, avoid expanding
2772 and diagnose unterminated arrays.
2773 (c_strlen): Fill in offset of start of unterminated strings.
2774 * builtins.h (unterminated_array): Update prototype.
2776 2018-10-02 Richard Biener <rguenther@suse.de>
2778 * config/i386/sse.md (reduc_plus_scal_v4df): Avoid the use
2779 of haddv4df, first reduce to SSE width and exploit the fact
2780 that we only need element zero with the reduction result.
2781 (reduc_plus_scal_v2df): Likewise.
2783 2018-10-02 Eric Botcazou <ebotcazou@adacore.com>
2785 * dojump.h (do_jump): Delete.
2786 (do_jump_1): Likewise.
2787 (split_comparison): Move around.
2788 * dojump.c (do_jump): Make static.
2789 (do_jump_1): Likewise.
2790 (jumpifnot): Move around.
2791 (jumpifnot_1): Likewise.
2793 (jumpif_1): Likewise.
2794 * expr.c (expand_expr_real_1): Call jumpif[not] instead of do_jump.
2796 2018-10-02 Eric Botcazou <ebotcazou@adacore.com>
2798 * reorg.c (make_return_insns): Use emit_copy_of_insn_after for the
2799 insns in the delay slot and add_insn_after for the jump insn.
2801 2018-10-02 Richard Biener <rguenther@suse.de>
2803 * tree-inline.c (expand_call_inline): Use the location of
2804 the callee declaration for the inline-entry marker.
2805 * final.c (notice_source_line): Remove special-casing of
2806 NOTE_INSN_INLINE_ENTRY.
2808 2018-10-01 Carl Love <cel@us.ibm.com>
2811 * config/rs6000/rs6000-builtin.def (__builtin_mffsl): New.
2812 (__builtin_mtfsb0): New.
2813 (__builtin_mtfsb1): New.
2814 ( __builtin_set_fpscr_rn): New.
2815 (__builtin_set_fpscr_drn): New.
2816 * config/rs6000/rs6000.c (rs6000_expand_mtfsb_builtin): Add.
2817 (rs6000_expand_set_fpscr_rn_builtin): Add.
2818 (rs6000_expand_set_fpscr_drn_builtin): Add.
2819 (rs6000_expand_builtin): Add case statement entries for
2820 RS6000_BUILTIN_MTFSB0, RS6000_BUILTIN_MTFSB1,
2821 RS6000_BUILTIN_SET_FPSCR_RN, RS6000_BUILTIN_SET_FPSCR_DRN,
2822 RS6000_BUILTIN_MFFSL.
2823 (rs6000_init_builtins): Add ftype initialization and def_builtin
2824 calls for __builtin_mffsl, __builtin_mtfsb0, __builtin_mtfsb1,
2825 __builtin_set_fpscr_rn, __builtin_set_fpscr_drn.
2826 * config/rs6000.md (rs6000_mtfsb0, rs6000_mtfsb1, rs6000_mffscrn,
2827 rs6000_mffscdrn): Add define_insn.
2828 (rs6000_set_fpscr_rn, rs6000_set_fpscr_drn): Add define_expand.
2829 * doc/extend.texi: Add documentation for the builtins.
2831 2018-10-01 Richard Biener <rguenther@suse.de>
2833 PR tree-optimization/87465
2834 * tree-ssa-loop-ivcanon.c (tree_estimate_loop_size): Fix typo
2835 causing branch miscounts.
2837 2018-10-01 Tamar Christina <tamar.christina@arm.com>
2839 * common/config/aarch64/aarch64-common.c (TARGET_OPTION_DEFAULT_PARAM,
2840 aarch64_option_default_param): New.
2841 (params.h): Include.
2842 (TARGET_OPTION_VALIDATE_PARAM, aarch64_option_validate_param): New.
2843 * config/aarch64/aarch64.c (aarch64_override_options_internal): Simplify
2844 stack-clash protection validation code.
2846 2018-10-01 Tamar Christina <tamar.christina@arm.com>
2848 * params.c (validate_param): New.
2849 (add_params): Use it.
2850 (set_param_value): Refactor param validation into validate_param.
2851 (diagnostic.h): Include.
2852 * diagnostic.h (diagnostic_ready_p): New.
2854 2018-10-01 Tamar Christina <tamar.christina@arm.com>
2856 * params.c (set_param_value):
2857 Add index of parameter being validated.
2858 * common/common-target.def (option_validate_param): New.
2859 * common/common-targhooks.h (default_option_validate_param): New.
2860 * common/common-targhooks.c (default_option_validate_param): New.
2861 * doc/tm.texi.in (TARGET_OPTION_VALIDATE_PARAM): New.
2862 * doc/tm.texi: Regenerate.
2864 2018-10-01 Tamar Christina <tamar.christina@arm.com>
2867 * config/aarch64/aarch64.c (aarch64_override_options_internal):
2868 Add validation for stack-clash parameters and set defaults.
2870 2018-10-01 Tamar Christina <tamar.christina@arm.com>
2873 * configure.ac: Add stack-clash-protection-guard-size.
2874 * doc/install.texi: Document it.
2875 * config.in (DEFAULT_STK_CLASH_GUARD_SIZE): New.
2876 * params.def: Update comment for guard-size.
2877 (PARAM_STACK_CLASH_PROTECTION_GUARD_SIZE,
2878 PARAM_STACK_CLASH_PROTECTION_PROBE_INTERVAL): Update description.
2879 * configure: Regenerate.
2881 2018-10-01 Tamar Christina <tamar.christina@arm.com>
2884 * config/aarch64/aarch64.h (STACK_CLASH_MIN_BYTES_OUTGOING_ARGS,
2885 STACK_DYNAMIC_OFFSET): New.
2886 * config/aarch64/aarch64.c (aarch64_layout_frame):
2887 Update outgoing args size.
2888 (aarch64_stack_clash_protection_alloca_probe_range,
2889 TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE): New.
2891 2018-10-01 Tamar Christina <tamar.christina@arm.com>
2894 * explow.c (anti_adjust_stack_and_probe_stack_clash): Support custom
2896 * target.def (stack_clash_protection_alloca_probe_range): New.
2897 (stack_clash_protection_final_dynamic_probe): Remove.
2898 * targhooks.h (default_stack_clash_protection_alloca_probe_range) New.
2899 (default_stack_clash_protection_final_dynamic_probe): Remove.
2900 * targhooks.c: Likewise.
2901 * doc/tm.texi.in (TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE): New.
2902 (TARGET_STACK_CLASH_PROTECTION_FINAL_DYNAMIC_PROBE): Remove.
2903 * doc/tm.texi: Regenerate.
2905 2018-10-01 Tamar Christina <tamar.christina@arm.com>
2908 * config/aarch64/aarch64-protos.h (aarch64_output_probe_sve_stack_clash): New.
2909 * config/aarch64/aarch64.c (aarch64_output_probe_sve_stack_clash,
2910 aarch64_clamp_to_uimm12_shift): New.
2911 (aarch64_allocate_and_probe_stack_space): Add SVE specific section.
2912 * config/aarch64/aarch64.md (probe_sve_stack_clash): New.
2914 2018-10-01 Tamar Christina <tamar.christina@arm.com>
2917 * config/aarch64/aarch64.c (aarch64_layout_frame): Add assert.
2919 2018-10-01 Jeff Law <law@redhat.com>
2920 Richard Sandiford <richard.sandiford@linaro.org>
2921 Tamar Christina <tamar.christina@arm.com>
2924 * config/aarch64/aarch64.md
2925 (probe_stack_range): Add k (SP) constraint.
2926 * config/aarch64/aarch64.h (STACK_CLASH_CALLER_GUARD,
2927 STACK_CLASH_MAX_UNROLL_PAGES): New.
2928 * config/aarch64/aarch64.c (aarch64_output_probe_stack_range): Emit
2929 stack probes for stack clash.
2930 (aarch64_allocate_and_probe_stack_space): New.
2931 (aarch64_expand_prologue): Use it.
2932 (aarch64_expand_epilogue): Likewise and update IP regs re-use criteria.
2933 (aarch64_sub_sp): Add emit_move_imm optional param.
2935 2018-10-01 MCC CS <deswurstes@users.noreply.github.com>
2937 PR tree-optimization/87261
2938 * match.pd: Remove trailing whitespace.
2939 Add (x & y) | ~(x | y) -> ~(x ^ y),
2940 (~x | y) ^ (x ^ y) -> x | ~y and (x ^ y) | ~(x | y) -> ~(x & y)
2942 2018-10-01 Claudiu Zissulescu <claziss@synopsys.com>
2944 * config/arc/arc.md (*add_n): Clean up pattern, update instruction
2946 (ashlsi3_insn): Update instruction constraints.
2947 (ashrsi3_insn): Likewise.
2948 (rotrsi3): Likewise.
2949 (add_shift): Likewise.
2950 * config/arc/constraints.md (Csz): New 32 bit constraint. It
2951 avoids placing in the limm field small constants which, otherwise,
2952 could end into a small instruction.
2954 2018-10-01 Claudiu Zissulescu <claziss@synopsys.com>
2956 * config/arc/arc.md (maddsidi4_split): Don't use dmac if the
2957 destination register is not odd-even.
2958 (umaddsidi4_split): Likewise.
2960 2018-10-01 Richard Biener <rguenther@suse.de>
2962 * tree-inline.c (expand_call_inline): Store origin of fn
2963 in BLOCK_ABSTRACT_ORIGIN for the inline BLOCK.
2964 * tree.c (block_ultimate_origin): Simplify and do some
2967 2018-09-30 Uros Bizjak <ubizjak@gmail.com>
2969 * config/i386/mmx.md (EMMS): New int iterator.
2970 (emms): New int attribute.
2971 (mmx_<emms>): Macroize insn from *mmx_emms and *mmx_femms using
2972 EMMS int iterator. Explicitly declare clobbers.
2973 (mmx_emms): Remove expander.
2975 * config/i386/predicates.md (emms_operation): Remove predicate.
2976 (vzeroall_pattern): New predicate.
2977 (vzeroupper_pattern): Rename from vzeroupper_operation.
2978 * config/i386/i386.c (ix86_avx_u128_mode_after): Use
2979 vzeroupper_pattern and vzeroall_pattern predicates.
2981 2018-09-30 Peter Bergner <bergner@linux.ibm.com>
2983 PR rtl-optimization/86939
2984 * ira-lives.c (make_hard_regno_born): Rename from this...
2985 (make_hard_regno_live): ... to this. Remove update to conflict
2986 information. Update function comment.
2987 (make_hard_regno_dead): Add conflict information update. Update
2989 (make_object_born): Rename from this...
2990 (make_object_live): ... to this. Remove update to conflict information.
2991 Update function comment.
2992 (make_object_dead): Add conflict information update. Update function
2994 (mark_pseudo_regno_live): Call make_object_live.
2995 (mark_pseudo_regno_subword_live): Likewise.
2996 (mark_hard_reg_dead): Update function comment.
2997 (mark_hard_reg_live): Call make_hard_regno_live.
2998 (process_bb_node_lives): Likewise.
2999 * lra-lives.c (make_hard_regno_born): Rename from this...
3000 (make_hard_regno_live): ... to this. Remove update to conflict
3001 information. Remove now uneeded check_pic_pseudo_p argument.
3002 Update function comment.
3003 (make_hard_regno_dead): Add check_pic_pseudo_p argument and add update
3004 to conflict information. Update function comment.
3005 (mark_pseudo_live): Remove update to conflict information. Update
3007 (mark_pseudo_dead): Add conflict information update.
3008 (mark_regno_live): Call make_hard_regno_live.
3009 (mark_regno_dead): Call make_hard_regno_dead with new arguement.
3010 (process_bb_lives): Call make_hard_regno_live and make_hard_regno_dead.
3012 2018-09-29 H.J. Lu <hongjiu.lu@intel.com>
3015 * config/i386/i386.c (construct_container): Use TImode for
3016 BLKmode values in 2 integer registers.
3018 2018-09-29 Jeff Law <law@redhat.com>
3020 * builtins.c (unterminated_array): Pass in c_strlen_data * to
3021 c_strlen rather than just a tree *.
3022 (c_strlen): Change NONSTR argument to a c_strlen_data pointer.
3023 Update recursive calls appropriately. If caller did not provide a
3024 suitable data pointer, create a local one. When a non-terminated
3025 string is discovered, bubble up information about the string via the
3026 c_strlen_data object.
3027 * builtins.h (c_strlen): Update prototype.
3028 (c_strlen_data): New structure.
3029 * gimple-fold.c (get_range_strlen): Update calls to c_strlen.
3030 For a type 2 call, if c_strlen indicates a non-terminated string
3031 use the length of the non-terminated string.
3032 (gimple_fold_builtin_stpcpy): Update calls to c_strlen.
3034 2018-09-29 Jakub Jelinek <jakub@redhat.com>
3037 * config/i386/avx512fintrin.h (_mm512_abs_pd, _mm512_mask_abs_pd): Use
3038 __m512d type for __A argument rather than __m512.
3040 2018-09-28 John David Anglin <danglin@gcc.gnu.org>
3042 * match.pd (simple_comparison): Don't optimize if either operand is
3043 a function pointer when target needs function pointer canonicalization.
3045 2018-09-28 Segher Boessenkool <segher@kernel.crashing.org>
3047 * config/rs6000/driver-rs6000.c (asm_names): Adjust the entries for
3048 power5 .. power9 to remove indirection.
3049 * config/rs6000/rs6000.h (ASM_CPU_POWER5_SPEC, ASM_CPU_POWER6_SPEC,
3050 ASM_CPU_POWER7_SPEC, ASM_CPU_POWER8_SPEC, ASM_CPU_POWER9_SPEC,
3051 ASM_CPU_476_SPEC): Delete.
3052 (ASM_CPU_SPEC): Adjust.
3053 (EXTRA_SPECS): Delete asm_cpu_power5, asm_cpu_power6, asm_cpu_power7,
3054 asm_cpu_power8, asm_cpu_power9, asm_cpu_476.
3056 2018-09-28 Segher Boessenkool <segher@kernel.crashing.org>
3058 * config.in: Delete HAVE_AS_DCI.
3059 * config/powerpcspe/powerpcspe.h: Treat HAVE_AS_DCI as always true.
3060 * config/rs6000/rs6000.h: Ditto.
3061 * configure.ac: Delete HAVE_AS_DCI.
3062 * configure: Regenerate.
3064 2018-09-28 Segher Boessenkool <segher@kernel.crashing.org>
3066 * config.in (HAVE_AS_LWSYNC): Delete.
3067 * config/powerpcspe/powerpcspe.h (TARGET_LWSYNC_INSTRUCTION): Delete.
3068 * config/powerpcspe/sync.md (*lwsync): Always generate lwsync, never
3070 * config/rs6000/rs6000.h (TARGET_LWSYNC_INSTRUCTION): Delete.
3071 * config/rs6000/sync.md (*lwsync): Always generate lwsync, never do it
3073 * configure.ac: Delete HAVE_AS_LWSYNC.
3074 * configure: Regenerate.
3076 2018-09-28 Eric Botcazou <ebotcazou@adacore.com>
3077 Pierre-Marie de Rodat <derodat@adacore.com>
3079 * calls.c (expand_call): Try to do a tail call for thunks at -O0 too.
3080 * cgraph.h (struct cgraph_thunk_info): Add indirect_offset.
3081 (cgraph_node::create_thunk): Add indirect_offset parameter.
3082 (thunk_adjust): Likewise.
3083 * cgraph.c (cgraph_node::create_thunk): Add indirect_offset parameter
3084 and initialize the corresponding field with it.
3085 (cgraph_node::dump): Dump indirect_offset field.
3086 * cgraphclones.c (duplicate_thunk_for_node): Deal with indirect_offset.
3087 * cgraphunit.c (cgraph_node::analyze): Be prepared for external thunks.
3088 (thunk_adjust): Add indirect_offset parameter and deal with it.
3089 (cgraph_node::expand_thunk): Deal with the indirect_offset field and
3090 pass it to thunk_adjust. Do not call the target hook if it's non-zero
3091 or if the thunk is external or local. Fix formatting. Do not chain
3092 the RESULT_DECL to BLOCK_VARS. Pass the static chain to the target,
3093 if any, in the GIMPLE representation.
3094 * ipa-icf.c (sem_function::equals_wpa): Deal with indirect_offset.
3095 * lto-cgraph.c (lto_output_node): Write indirect_offset field.
3096 (input_node): Read indirect_offset field.
3097 * tree-inline.c (expand_call_inline): Pass indirect_offset field in the
3098 call to thunk_adjust.
3099 * tree-nested.c (struct nesting_info): Add thunk_p field.
3100 (create_nesting_tree): Set it.
3101 (convert_all_function_calls): Copy static chain from targets to thunks.
3102 (finalize_nesting_tree_1): Return early for thunks.
3103 (unnest_nesting_tree_1): Do not finalize thunks.
3104 (gimplify_all_functions): Do not gimplify thunks.
3106 2018-09-28 David Malcolm <dmalcolm@redhat.com>
3108 * opt-suggestions.c (option_proposer::build_option_suggestions):
3109 Release "option_values".
3111 2018-09-28 David Malcolm <dmalcolm@redhat.com>
3113 * coverage.c (get_coverage_counts): Convert problem-reporting dump
3114 messages from MSG_OPTIMIZED_LOCATIONS to MSG_MISSED_OPTIMIZATION.
3115 * dumpfile.c (kind_as_string): New function.
3116 (dump_loc): Rather than a hardcoded prefix of "note: ", use
3117 kind_as_string to vary the prefix based on dump_kind.
3118 (selftest::test_capture_of_dump_calls): Update for above.
3120 2018-09-28 Uros Bizjak <ubizjak@gmail.com>
3122 * config/i386/i386.h (SSE_REGNO): Fix check for FIRST_REX_SSE_REG.
3123 (GET_SSE_REGNO): Rename from SSE_REGNO. Update all uses for rename.
3125 2018-09-28 Uros Bizjak <ubizjak@gmail.com>
3127 * config/i386/i386.h (CC_REGNO): Remove FPSR_REG.
3128 * config/i386/i386.c (ix86_fixed_condition_code_regs): Use
3129 INVALID_REGNUM instead of FPSR_REG.
3130 (ix86_md_asm_adjust): Do not clobber FPSR_REG.
3131 * config/i386/i386.md: Update comment of FP compares.
3132 (fldenv): Do not clobber FPSR_REG.
3134 2018-09-28 Richard Biener <rguenther@suse.de>
3136 * tree.h (BLOCK_ORIGIN): New.
3137 * omp-expand.c (grid_expand_target_grid_body): Assign
3138 BLOCK_ORIGIN to BLOCK_ABSTRACT_ORIGIN.
3139 * tree-inline.c (remap_block): Likewise.
3140 * auto-profile.c (get_function_decl_from_block): Simplify
3141 by eliding the BLOCK_ABSTRACT_ORIGIN chasing.
3142 * langhooks.c (lhd_print_error_function): Likewise.
3143 * optinfo-emit-json.cc (optrecord_json_writer::inlining_chain_to):
3145 * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
3146 * tree.c (block_nonartificial_location): Likewise.
3147 (block_ultimate_origin): Likewise.
3148 * tree-pretty-print.c (percent_K_format): Likewise. Remove
3149 no longer needed LTO case.
3151 2018-09-28 Andrew Stubbs <ams@codesourcery.com>
3152 Jan Hubicka <jh@suse.cz>
3153 Martin Jambor <mjambor@suse.cz>
3155 * simplify-rtx.c (simplify_merge_mask): New function.
3156 (simplify_ternary_operation): Use it, also see if VEC_MERGEs with the
3157 same masks are used in op1 or op2.
3158 (test_vec_merge): New function.
3159 (test_vector_ops): Call test_vec_merge.
3161 2018-09-28 Eric Botcazou <ebotcazou@adacore.com>
3163 * config/sparc/sparc-protos.h (sparc_branch_cost): Declare.
3164 * config/sparc/sparc.h (BRANCH_COST): Call sparc_branch_cost.
3165 * config/sparc/sparc.c (struct processor_costs): Add branch_cost field.
3166 (cypress_costs): Set it.
3167 (supersparc_costs): Likewise.
3168 (hypersparc_costs): Likewise.
3169 (leon_cost): Likewise.
3170 (leon3_costs): Likewise.
3171 (sparclet_costs): Likewise.
3172 (ultrasparc_costs): Likewise.
3173 (ultrasparc_costs): Likewise.
3174 (niagara_costs): Likewise.
3175 (niagara2_costs): Likewise.
3176 (niagara3_costs): Likewise.
3177 (niagara4_costs): Likewise.
3178 (niagara7_costs): Likewise.
3179 (m8_costs): Likewise.
3180 (TARGET_CAN_FOLLOW_JUMP): Define.
3181 (pass_work_around_errata::gate): Minor tweak.
3182 (sparc_option_override): Remove MASK_FSMULD mask for V7 processors.
3183 Do not set both MASK_VIS4 and MASK_VIS4B for M8 processor.
3184 Automaitcally clear MASK_FSMULD mask for V7 processors.
3185 (sparc_can_follow_jump): New static function.
3186 (output_ubranch): Deal with CROSSING_JUMP_P.
3187 (sparc_use_sched_lookahead): Rewrite using switch statement.
3188 (sparc_issue_rate): Reorder.
3189 (sparc_branch_cost): New function.
3191 2018-09-27 Martin Sebor <msebor@redhat.com>
3193 * tree.h (tree_to_shwi): Add attribute nonnull and pure.
3194 (tree_to_poly_int64, tree_to_uhwi, tree_to_poly_uint64): Same.
3195 (int_fits_type_p): Same.
3197 2018-09-27 Uros Bizjak <ubizjak@gmail.com>
3199 * config/i386/i386.md (FPCR_REG): Remove.
3200 (UNSPEC_FLDCW): Remove.
3201 (x86_fnstcw_1): Use (const_int 0) instead of FPCR_REG.
3202 (x86_fldcw_1): Remove insn pattern.
3203 (fnstenv): Do not clobber FPCR_REG.
3205 * config/i386/i386.h (FIXED_REGISTERS) Remove fpsr register.
3206 (CALL_USED_REGISTERS): Ditto.
3207 (REG_ALLOC_ORDER): Ditto.
3208 (REG_CLASS_CONTENTS): Ditto.
3209 (HI_REGISTER_NAMES): Ditto.
3210 (ADDITIONAL_REGISTER_NAMES): Use defines instead
3211 of numerical constants.
3212 * config/i386/i386.c (regclass_map): Remove fpsr register.
3213 (dbx_register_map): Ditto.
3214 (dbx64_register_map): Ditto.
3215 (svr4_dbx_register_map): Ditto.
3216 (print_reg): Do not handle FPCR_REG.
3218 2018-09-27 Segher Boessenkool <segher@kernel.crashing.org>
3221 * config.in (HAVE_AS_CMPB, HAVE_AS_DFP, HAVE_AS_FPRND, HAVE_AS_MFPGPR,
3222 HAVE_AS_POPCNTB, HAVE_AS_POPCNTD, HAVE_AS_POWER8, HAVE_AS_POWER9):
3223 Delete, always treat as true.
3224 * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
3225 Ditto. Simplify remaining code.
3226 * config/powerpcspe/powerpcspe.h: Ditto.
3227 * config/rs6000/rs6000.c (rs6000_option_override_internal): Ditto.
3228 Simplify remaining code.
3229 (rs6000_expand_builtin): Ditto.
3230 * config/rs6000/rs6000.h: Ditto.
3231 * configure.ac: Ditto.
3232 * configure: Regenerate.
3234 2018-09-27 Martin Liska <mliska@suse.cz>
3236 * coverage.c (get_coverage_counts): Revert the formatting
3237 of missing profile opt info.
3239 2018-09-27 Richard Biener <rguenther@suse.de>
3243 * dwarf2out.c (set_block_origin_self): Do not mark outermost
3244 block as we do not output that.
3245 (gen_inlined_subroutine_die): Elide the originally outermost
3246 block, matching what we do for concrete instances.
3247 (decls_for_scope): Add parameter specifying whether to recurse
3250 2018-09-27 Andrew Stubbs <ams@codesourcery.com>
3251 Tom de Vries <tom@codesourcery.com>
3255 * expmed.c (emit_cstore): Fix handling of result_mode == BImode and
3256 STORE_FLAG_VALUE == 1.
3258 2018-09-27 Andreas Krebbel <krebbel@linux.ibm.com>
3260 * config/s390/s390.md (PPA_TX_ABORT, PPA_OOO_BARRIER): New
3261 constant definitions.
3262 ("tx_assist"): Replace magic number with PPA_TX_ABORT.
3263 ("*ppa"): Enable pattern also for -march=zEC12 -mno-htm.
3264 ("speculation_barrier"): New expander definition.
3266 2018-09-26 Indu Bhagat <indu.bhagat@oracle.com>
3268 PR gcov-profile/86957
3269 * common.opt: New warning option -Wmissing-profile.
3270 * coverage.c (get_coverage_counts): Add warning for missing .gcda file.
3271 * doc/invoke.texi: Document -Wmissing-profile.
3273 2018-09-26 Jim Wilson <jimw@sifive.com>
3275 * config/riscv/riscv.md (subsi3_extended2): Add J constraint.
3276 (negdi2, negsi2, negsi2_extended, negsi2_extended2): New.
3278 2018-09-26 Martin Sebor <msebor@redhat.com>
3280 * tree.c (zerop): Change return type to bool.
3281 (integer_zerop, integer_onep, integer_each_onep): Same.
3282 (integer_all_onesp, integer_minus_onep, integer_pow2p): Same.
3283 (integer_nonzerop, integer_truep, tree_ctz, real_zerop): Same.
3284 (real_onep, real_minus_onep, chain_index): Same.
3285 (print_type_hash_statistics, type_list_equal): Same.
3286 * tree.h (zerop): Same.
3287 (zerop, integer_zerop, integer_onep, integer_each_onep): Same.
3288 (integer_all_onesp, integer_minus_onep, integer_pow2p): Same.
3289 (integer_nonzerop, integer_truep, tree_ctz, real_zerop): Same.
3290 (real_onep, real_minus_onep, chain_index): Same.
3291 (print_type_hash_statistics, type_list_equal): Same.
3293 2018-09-26 Jim Wilson <jimw@sifive.com>
3295 * config/riscv/riscv.h (FUNCTION_ARG_REGNO_P): Fix comment.
3297 2018-09-26 Jakub Jelinek <jakub@redhat.com>
3300 * config/i386/i386.c: Include debug.h and dwarf2out.h.
3301 (output_indirect_thunk): Emit DW_CFA_def_cfa_offset after the
3304 2018-09-25 Andrew Stubbs <ams@codesourcery.com>
3306 * builtins.c (get_builtin_sync_mem): Force address mode conversion.
3308 2018-09-26 Uros Bizjak <ubizjak@gmail.com>
3310 * config/i386/i386.h (enum reg_class): Remove FP_TOP_SSE_REGS
3311 and FP_SECOND_SSE_REGS.
3312 (REG_CLASS_NAMES): Ditto.
3313 (REG_CLASS_CONTENTS): Ditto.
3314 * config/i386/i386.c (ix86_preferred_reload_class) Do not handle
3315 FP_TOP_SSE_REGS and FP_SECOND_SSE_REGS classes.
3316 (ix86_preferred_output_reload_class): Ditto.
3317 * config/i386/i386.md (fix_trunc<mode>_i387_fisttp): Change "=&1f"
3318 clobber constraint to "=&f".
3319 (fix_truncdi_i387): Ditto.
3320 (lrintxfdi2): Ditto.
3321 (fistdi2_<rounding>): Ditto.
3322 (fpremxf4_i387): Change "=u" constraint to "=f".
3323 (fprem1xf4_i387): Ditto.
3325 (fptanxf4_i387): Ditto.
3326 (fxtractxf3_i387): Ditto.
3327 (fscalexf4_i387): Ditto.
3328 (atan2xf3): Change "u" constraint to "f".
3329 (fyl2xxf3_i387): Ditto.
3330 (fyl2xp1xf3_i387): Ditto.
3332 2018-09-26 Uros Bizjak <ubizjak@gmail.com>
3335 * config/i386/i386.h (NUM_MODES_FOR_MODE_SWITCHING): Update
3336 for removed I387_MASK_PM entity.
3339 2018-09-26 Jeff Law <law@redhat.com>
3341 2018-09-26 Alexey Neyman <stilor@att.net>
3343 * graphite.h: Include <isl/id.h> and <isl/space.h>; these
3344 headers are no longer pulled in by <isl/val.h>.
3346 2018-09-26 Richard Biener <rguenther@suse.de>
3349 * dwarf2out.c (gen_lexical_block_die): Do not equate inline
3350 or concrete instance DIE to the tree. Create abstract origin
3351 attributes also for concrete instances.
3353 2018-09-26 Alexey Neyman <stilor@att.net>
3355 * graphite.h: Include <isl/id.h> and <isl/space.h>; these
3356 headers are no longer pulled in by <isl/val.h>.
3358 2018-09-26 Matthew Malcomson <matthew.malcomson@arm.com>
3360 * config/arm/arm.c (arm_split_compare_and_swap, arm_split_atomic_op):
3361 Use new helper functions.
3362 * config/arm/sync.md (atomic_load<mode>, atomic_store<mode>):
3363 Use new helper functions.
3364 * config/arm/aarch-common-protos.h (aarch_mm_needs_acquire,
3365 aarch_mm_needs_release): New declarations.
3366 * config/arm/aarch-common.c (aarch_mm_needs_acquire,
3367 aarch_mm_needs_release): New.
3369 2018-09-26 Eric Botcazou <ebotcazou@adacore.com>
3371 * config/arm/arm.c (arm_reorg): Skip Thumb reorg pass for thunks.
3372 (arm32_output_mi_thunk): Deal with long calls.
3374 2018-09-26 Richard Biener <rguenther@suse.de>
3378 * tree-inline.c (expand_call_inline): When the location
3379 of the call is UNKNOWN_LOCATION use DECL_SOURCE_LOCATION
3380 or BUILTINS_LOCATION for the BLOCK_SOURCE_LOCATION of
3381 the inserted BLOCK to make inlined_function_outer_scope_p
3383 * dwarf2out.c (add_call_src_coords_attributes): Do not add
3384 coords for reserved locations.
3386 2018-09-25 Segher Boessenkool <segher@kernel.crashing.org>
3388 * config/rs6000/rs6000.md (*movcc_internal1): Use set_attr_alternative.
3389 (*call_indirect_nonlocal_sysv<mode>): Ditto.
3390 (*call_value_indirect_nonlocal_sysv<mode>): Ditto.
3391 (*sibcall_nonlocal_sysv<mode>): Ditto.
3392 (*sibcall_value_nonlocal_sysv<mode>): Ditto.
3393 (<bd>_<mode>): Ditto.
3394 (<bd>tf_<mode>): Ditto.
3396 2018-09-25 Segher Boessenkool <segher@kernel.crashing.org>
3398 * config/rs6000/altivec.md (*altivec_mov<mode>): Write the output
3399 control string as a list of templates instead of as C code.
3400 (*altivec_movti): Ditto.
3401 * config/rs6000/darwin.md (movdf_low_di): Ditto.
3403 2018-09-25 Jim Wilson <jimw@sifive.com>
3405 * config/riscv/riscv.c (riscv_split_symbol): Mark auipc label as weak
3406 when target symbol is weak.
3408 2018-09-25 Bernd Edlinger <bernd.edlinger@hotmail.de>
3411 * builtins.c (unterminated_array): Simplify.
3412 * expr.c (string_constant): Handle SSA_NAME. Add more exceptions
3413 where pointer arithmetic is safe.
3415 2018-09-25 Segher Boessenkool <segher@kernel.crashing.org>
3418 * config/rs6000/altivec.md (altivec_vspltb): Use
3419 const_0_to_15_operand instead of u5bit_cint_operand.
3420 (*altivec_vspltb_internal): Ditto.
3421 (altivec_vspltb_direct): Ditto.
3422 (altivec_vsplth): Use const_0_to_7_operand instead of
3424 (*altivec_vsplth_internal): Ditto.
3425 (altivec_vsplth_direct): Ditto.
3426 (altivec_vspltw): Use const_0_to_3_operand instead of
3428 (*altivec_vspltw_internal): Ditto.
3429 (altivec_vspltw_direct): Ditto.
3430 (altivec_vspltsf): Ditto.
3431 (*altivec_vspltsf_internal): Ditto.
3432 * config/rs6000/rs6000.c (rs6000_expand_binop_builtin): Handle the
3433 various splats with the proper size immediate. Reorder the various
3434 cases by ascending size of immediate, and put all such together.
3436 2018-09-25 Richard Biener <rguenther@suse.de>
3439 * dwarf2out.c (add_AT_external_die_ref): Remove now redundant
3441 (maybe_create_die_with_external_ref): Do not create
3442 DW_TAG_imported_unit here.
3443 (add_abstract_origin_attribute): Handle external BLOCK refs.
3444 (dwarf2out_abstract_function): Simplify LTO case.
3445 (dwarf2out_early_finish): Create DW_TAG_imported_unit explicitely
3446 rather than using maybe_create_die_with_external_ref.
3448 2018-09-25 Uros Bizjak <ubizjak@gmail.com>
3451 * config/i386/i386.md (frndintxf2_mask_pm): Remove.
3452 (frndintxf2_mask_pm_i387): Ditto.
3453 (nearbyintxf2): Rewrite expander pattern to match rintxf2.
3454 Enable for !flag_trapping_math.
3455 (nearbyint<mode>2): Enable x87 modes for !flag_trapping_math.
3456 Enable SSE modes for TARGET_SSE4_1 and expand them with round insn.
3457 Change operand 1 predicate to nonimmediate_operand.
3458 (attr "i387_cw"): Remove mask_pm.
3459 * config/i386/i386.h (enum ix86_stack_slot): Remove SLOT_CW_MASK_PM.
3460 (enum ix86_entity): Remove I387_MASK_PM.
3461 * config/i386/i386.c (ix86_i387_mode_needed): Do not
3462 handle I387_MASK_PM.
3463 (ix86_mode_needed): Ditto.
3464 (ix86_mode_after): Ditto.
3465 (ix86_mode_entry): Ditto.
3466 (ix86_mode_exit): Ditto.
3467 (emit_i387_cw_initialization): Do not handle I387_CW_MASK_PM.
3469 2018-09-25 Jakub Jelinek <jakub@redhat.com>
3471 * vr-values.c (vr_values::vr_values): Initialize to_remove_edges and
3472 to_update_switch_stmts to vNULL instead of calling create on them
3475 2018-09-25 Richard Biener <rguenther@suse.de>
3477 PR tree-optimization/87402
3478 * tree-ssa-sccvn.c (SSA_VISITED): Remove unused function.
3479 (visit_phi): Re-instantiate handling of supposed to be VARYING
3480 but non-VARYING backedge value.
3482 2018-09-25 Richard Biener <rguenther@suse.de>
3485 * dwarf2out.c (struct sym_off_pair): New.
3486 (external_die_map): New global.
3487 (lookup_decl_die): When in LTO create DIEs lazily from the
3489 (lookup_block_die): New function, create DIEs lazily in LTO.
3490 (equate_block_to_die): New function.
3491 (dwarf2out_die_ref_for_decl): During WPA get the association
3492 from the external DIE map.
3493 (dwarf2out_register_external_die): Record mapping into the
3495 (maybe_create_die_with_external_ref): New function split out from
3496 DIE generation part of old dwarf2out_register_external_die.
3497 (add_abstract_origin_attribute): Do not return the DIE. When
3498 in LTO reference externals directly.
3499 (dwarf2out_abstract_function): When in LTO ignore calls for
3500 decls with external DIEs (already present abstract instances).
3501 (gen_call_site_die): Adjust.
3502 (add_high_low_attributes): Likewise.
3503 (gen_lexical_block_die): Likewise.
3504 (gen_inlined_subroutine_die): Likewie.
3505 (gen_block_die): Likewise.
3506 (dwarf2out_inline_entry): Likewise.
3507 (dwarf2out_early_finish): In LTRANS phase create DW_TAG_imported_unit
3510 2018-09-25 Martin Liska <mliska@suse.cz>
3512 * ipa-fnsummary.c (estimate_node_size_and_time): Scale by two
3513 integers and not by a float value.
3515 2018-09-25 Martin Liska <mliska@suse.cz>
3518 * dbgcnt.c (dbg_cnt_process_single_pair): Return false
3520 * dumpfile.c (dump_enable_all): Remove extra parenthesis.
3521 * gcov-tool.c: Declare the function with ATTRIBUTE_NORETURN.
3522 * godump.c (go_format_type): Remove extra parenthesis.
3524 2018-09-25 Martin Liska <mliska@suse.cz>
3526 * alias.c (set_dest_equal_p): Remove unused function.
3527 * config/i386/i386.c (def_builtin_pure2): Likewise.
3528 * diagnostic-show-locus.c (class layout): Remove
3530 (layout::layout): Likewise here.
3531 * dump-context.h (class temp_dump_context): Likewise.
3532 * dwarf2out.c (add_AT_fde_ref): Remove unused function.
3533 (add_AT_loclistsptr): Likewise.
3534 (add_AT_offset): Likewise.
3535 (get_AT_hi_pc): Likewise.
3536 (is_comdat_die): Likewise.
3537 (type_is_enum): Likewise.
3538 (ceiling): Likewise.
3539 (add_AT_vms_delta): Likewise.
3540 (is_class_die): Likewise.
3541 * edit-context.c (class line_event): Remove unused field.
3542 * graphite-sese-to-poly.c (tree_int_to_gmp): Remove
3544 * ipa-cp.c (ipa_get_vr_lat): Likewise.
3545 * lra-constraints.c (ok_for_index_p_nonstrict): Likewise.
3546 (ok_for_base_p_nonstrict): Likewise.
3547 * tree-chrec.c (is_not_constant_evolution): Likewise.
3548 (chrec_fold_poly_cst): Likewise.
3549 * tree-if-conv.c (has_pred_critical_p): Likewise.
3550 * tree-ssa-coalesce.c (print_exprs): Likewise.
3551 * tree-ssa-pre.c (bitmap_set_contains_expr): Likewise.
3552 * tree-ssa-uninit.c (is_and_or_or_p): Likewise.
3553 * tree-vrp.c (value_ranges_intersect_p): Likewise.
3554 (value_range_nonnegative_p): Likewise.
3556 2018-09-25 Martin Liska <mliska@suse.cz>
3558 * config/powerpcspe/powerpcspe.c (rs6000_output_function_epilogue):
3559 Do not handle "GNU Pascal".
3560 * config/rs6000/rs6000.c (rs6000_output_function_epilogue):
3562 * config/sparc/sparc.c (sparc_pass_by_reference): Remove Pascal
3563 from documentation. Likewise.
3564 * dbxout.c (dbxout_range_type): Likewise.
3565 * doc/cpp.texi: Likewise.
3566 * doc/extend.texi: Likewise.
3567 * doc/frontends.texi: Likewise.
3568 * doc/invoke.texi: Remove Pascal entry.
3569 * tree.def (CLEANUP_POINT_EXPR): Likewise.
3570 * doc/rtl.texi (MODE_FUNCTION): Remove not used entry.
3572 2018-09-25 Martin Liska <mliska@suse.cz>
3575 * doc/invoke.texi: Document all parameters and remove default
3578 2018-09-25 Ilya Leoshkevich <iii@linux.ibm.com>
3581 * rtl.c (rtx_code_size): Take into account that EQ_ATTR_ALT
3582 contains HOST_WIDE_INTs when computing its size.
3584 2018-09-24 Jim Wilson <jimw@sifive.com>
3587 * config/riscv/riscv.h (STACK_BOUNDARY): Test riscv_abi == ABI_ILP32E
3589 (ABI_STACK_BOUNDARY, MAX_ARGS_IN_REGISTERS): Likewise.
3591 2018-09-24 Andrew Pinski <apinski@marvell.com>
3593 * config/aarch64/aarch64.c (aarch_macro_fusion_pair_p): Don't
3594 access prev before checking it for NULLness in the
3595 AARCH64_FUSE_CMP_BRANCH case.
3597 2018-09-24 H.J. Lu <hongjiu.lu@intel.com>
3600 * config/i386/i386.c (rest_of_insert_endbranch): Set
3601 endbr_queued_at_entrance to true and don't insert ENDBR if
3602 x86_function_profiler will be called.
3603 (x86_function_profiler): Insert ENDBR if endbr_queued_at_entrance
3605 * config/i386/i386.h (machine_function): Add
3606 endbr_queued_at_entrance.
3608 2018-09-24 Ilya Leoshkevich <iii@linux.ibm.com>
3610 * genattrtab.c (mk_attr_alt): Use alternative_mask.
3611 (attr_rtx_1): Adjust caching to match the new EQ_ATTR_ALT field
3613 (check_attr_test): Use alternative_mask.
3614 (get_attr_value): Likewise.
3615 (compute_alternative_mask): Use alternative_mask and XWINT.
3616 (make_alternative_compare): Use alternative_mask.
3617 (attr_alt_subset_p): Use XWINT.
3618 (attr_alt_subset_of_compl_p): Likewise.
3619 (attr_alt_intersection): Use alternative_mask and XWINT.
3620 (attr_alt_union): Likewise.
3621 (attr_alt_complement): Use HOST_WIDE_INT and XWINT.
3622 (mk_attr_alt): Use alternative_mask and HOST_WIDE_INT.
3623 (simplify_test_exp): Use alternative_mask and XWINT.
3624 (write_test_expr): Use alternative_mask and XWINT, adjust bit
3625 number calculation to support 64 bits. Generate code that
3626 checks 64-bit masks.
3627 (main): Use alternative_mask.
3628 * rtl.def (EQ_ATTR_ALT): Change field types from ii to ww.
3630 2018-09-24 Ilya Leoshkevich <iii@linux.ibm.com>
3633 * config/s390/s390.c (s390_emit_epilogue): Do not use PARALLEL
3634 RETURN+USE when returning via %r14.
3636 2018-09-24 Martin Liska <mliska@suse.cz>
3638 * gcov.c (output_lines): Print colorization legend
3639 for both flag_use_colors and flag_use_hotness_colors.
3642 2018-09-24 Martin Liska <mliska@suse.cz>
3644 * coverage.c (get_coverage_counts): Use warning_at
3645 with current_function_decl location. Use %qD in warning
3648 2018-09-24 Martin Liska <mliska@suse.cz>
3650 * memory-block.h (memory_block_pool::release): Annotate with
3651 valgrind that the memory is not accessible.
3653 2018-09-24 Martin Liska <mliska@suse.cz>
3656 * asan.c: Make asan_handled_variables extern.
3658 * cfgexpand.c (expand_stack_vars): Make sure
3659 a representative is unpoison if another
3660 variable in the partition is handled by
3661 use-after-scope sanitization.
3663 2018-09-24 Richard Biener <rguenther@suse.de>
3665 PR tree-optimization/63155
3666 * tree-ssa-propagate.c (add_ssa_edge): Avoid adding PHIs to
3667 the worklist when the edge of the respective argument isn't
3670 2018-09-23 Uros Bizjak <ubizjak@gmail.com>
3672 * config/i386/i386.h (enum reg_class): Rename MASK_REGS to
3673 ALL_MASK_REGS and MASK_EVEX_REGS to MASK_REGS.
3674 (MASK_CLASS_P): Update for rename.
3675 (MAYBE_MASK_CLASS_P): Ditto.
3676 (REG_CLASS_NAMES): Update.
3677 (REG_CLASS_CONTENT): Update.
3678 * config/i386/i386.c (regclass_map): Update for MASK_REG
3679 and ALL_MASK_REGS rename.
3680 * config/i386/constraints.md (Yk): Update for rename.
3683 2018-09-23 Uros Bizjak <ubizjak@gmail.com>
3685 * config/i386/i386.h (enum reg_class): Remove
3686 EVEX_SSE_REGS and MOD4_SSE_REGS.
3687 (REG_CLASS_NAMES): Update.
3688 (REG_CLASS_CONTENT): Update.
3689 * config/i386/i386.c (regclass_map): Declare AVX-512 SSE
3690 registers as ALL_SSE_REGS.
3691 (ix86_additional_allocno_class_p): Remove.
3692 (TARGET_ADDITIONAL_ALLOCNO_CLASS_P): Remove.
3693 (ix86_register_priority): Lower priority of EVEX SSE registers.
3694 Use IN_RANGE macro where appropriate.
3695 (ix86_hard_regno_mode_ok): Merge AVX-5124FMAPS and
3696 AVX-5124VNNIW checks.
3697 (ix86_modes_tieable_p): Tie 512-bit SSE modes.
3698 * config/i386/sse.md (avx5124fmaddps_4fmaddps)
3699 (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddps_maskz)
3700 (avx5124fmaddps_4fmaddss, avx5124fmaddps_4fmaddss_mask)
3701 (avx5124fmaddps_4fmaddss_maskz, avx5124fmaddps_4fnmaddps)
3702 (avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddps_maskz)
3703 (avx5124fmaddps_4fnmaddss, avx5124fmaddps_4fnmaddss_mask)
3704 (avx5124fmaddps_4fnmaddss_maskz, avx5124vnniw_vp4dpwssd)
3705 (avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssd_maskz)
3706 (avx5124vnniw_vp4dpwssds, avx5124vnniw_vp4dpwssds_mask)
3707 (avx5124vnniw_vp4dpwssds_maskz): Use "v" instead of "Yh" constraint.
3708 * config/i386/constraints.md (Yh): Remove.
3710 2018-09-23 Uros Bizjak <ubizjak@gmail.com>
3712 * config/i386/i386.c (regclass_map): Declare integer REX registers
3715 2018-09-23 Gerald Pfeifer <gerald@pfeifer.com>
3717 * doc/service.texi (Service): Switch the fsf.org link to https.
3719 2018-09-22 Chung-Ju Wu <jasonwucj@gmail.com>
3722 * config/nds32/nds32.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3723 Define to speculation_safe_value_not_needed.
3725 2018-09-21 Florian Weimer <fweimer@redhat.com>
3728 * doc/extend.texi (Common Function Attributes): Mention that
3729 noreturn suppresses tail call optimization.
3731 2018-09-21 Jeff Law <law@redhat.com>
3733 * gimple-ssa-evrp.c (evrp_dom_walker::cleanup): Call
3734 vr_values::cleanup_edges_and_switches.
3735 * tree-vrp.c (to_remove_edges, to_update_switch_stmts): Moved into
3737 (identify_jump_threads): Remove EDGE_IGNORE handling.
3738 (execute_vrp): Move handling of to_remove_edges and
3739 to_update_switch_stmts into vr_values class member functions.
3740 * tree-vrp.h (switch_update, to_remove_edges): Remove declarations.
3741 (to_update_switch_stmts): Likewise.
3742 * vr-values.c: Include cfghooks.h.
3743 (vr_values::vr_values): Initialize to_remove_edges and
3744 to_update_switch_stmts.
3745 (vr_values::~vr_values): Verify to_remove_edges and
3746 to_update_switch_stmts are empty.
3747 (vr_values::simplify_switch_using_ranges): Set EDGE_IGNORE as needed.
3748 (vr_values::cleanup_edges_and_switches): New member function.
3749 * vr-values.h (vr_values): Add cleanup_edges_and_switches member
3750 function. Add new data members.
3752 2018-09-21 David Malcolm <dmalcolm@redhat.com>
3754 PR tree-optimization/87309
3755 * dumpfile.c (dump_context::begin_scope): Filter the dump_loc
3756 calls with pflags and alt_flags.
3757 (selftest::test_capture_of_dump_calls): Add test of interaction of
3758 MSG_OPTIMIZED_LOCATIONS with AUTO_DUMP_SCOPE.
3760 2018-09-21 Olivier Hainque <hainque@adacore.com>
3762 * config.gcc: Factorize and comment inclusion of vxworks-dummy.h.
3764 2018-09-21 Olivier Hainque <hainque@adacore.com>
3766 * config/vxworks.h (CLEAR_INSN_CACHE): #define to 1.
3768 2018-09-21 Olivier Hainque <hainque@adacore.com>
3770 * config/vxworks.h (VXWORKS_LIBGCC_SPEC): Remove -lc_internal.
3771 Merge block comment with the one ahead of VXWORKS_LIBS_RTP. Then:
3772 (VXWORKS_LIBS_RTP): Minor reordering.
3774 2018-09-21 Olivier Hainque <hainque@adacore.com>
3776 * config/vxworks.h (STARTFILE_PREFIX_SPEC): Define.
3777 (VXWORKS_LIBS_DIR_RTP): Remove definition and use.
3779 2018-09-21 Olivier Hainque <hainque@adacore.com>
3781 * config/vxworks.h (SIZE_TYPE): Account for TARGET_VXWORKS64.
3782 (PTRDIFF_TYPE): Likewise.
3784 2018-09-21 Olivier Hainque <hainque@adacore.com>
3786 * config.gcc: Enforce def of TARGET_VXWORKS64 to 1 from
3787 triplet, similar to support for VxWorks7.
3788 * config/vxworks-dummy.h: Provide a default definition
3789 of TARGET_VXWORKS64 to 0.
3791 2018-09-21 Olivier Hainque <hainque@adacore.com>
3793 * config/vxworks.h (TARGET_VXWORKS7): Move default definition ...
3794 * config/vxworks-dummy.h: here.
3796 2018-09-21 Olivier Hainque <hainque@adacore.com>
3798 * config.gcc: Prepend vxworks-dummy.h to tm_file for powerpc*
3800 2018-09-21 Shaokun Zhang <zhangshaokun@hisilicon.com>
3801 Bo Zhou <zbo.zhou@hisilicon.com>
3803 * config/aarch64/aarch64-cores.def (tsv110): New CPU.
3804 * config/aarch64/aarch64-tune.md: Regenerated.
3805 * doc/invoke.texi (AArch64 Options/-mtune): Add "tsv110".
3806 * config/aarch64/aarch64.c (tsv110_tunings): New tuning table.
3807 * config/aarch64/aarch64-cost-tables.h: Add "tsv110" extra costs.
3809 2018-09-21 Andrew Stubbs <ams@codesourcery.com>
3810 Julian Brown <julian@codesourcery.com>
3812 * builtins.c (get_builtin_sync_mem): Handle address spaces.
3814 2018-09-21 Eric Botcazou <ebotcazou@adacore.com>
3816 * config/rs6000/rs6000.c (rs6000_function_ok_for_sibcall): Return false
3817 if the call takes a static chain.
3819 2018-09-21 Martin Liska <mliska@suse.cz>
3821 * auto-profile.c (autofdo_source_profile::read): Do not
3823 (read_profile): Do not add working sets.
3824 (read_autofdo_file): Remove sum_all.
3825 (afdo_callsite_hot_enough_for_early_inline): Remove const
3827 * coverage.c (struct counts_entry): Remove gcov_summary.
3828 (read_counts_file): Read new GCOV_TAG_OBJECT_SUMMARY,
3829 do not support GCOV_TAG_PROGRAM_SUMMARY.
3830 (get_coverage_counts): Remove summary and expected
3832 * coverage.h (get_coverage_counts): Likewise.
3833 * doc/gcov-dump.texi: Remove -w option.
3834 * gcov-dump.c (dump_working_sets): Remove.
3835 (main): Do not support '-w' option.
3836 (print_usage): Likewise.
3837 (tag_summary): Likewise.
3838 * gcov-io.c (gcov_write_summary): Do not dump
3840 (gcov_read_summary): Likewise.
3841 (gcov_histo_index): Remove.
3842 (gcov_histogram_merge): Likewise.
3843 (compute_working_sets): Likewise.
3844 * gcov-io.h (GCOV_TAG_OBJECT_SUMMARY): Mark
3846 (GCOV_TAG_PROGRAM_SUMMARY): Mark it obsolete.
3847 (GCOV_TAG_SUMMARY_LENGTH): Adjust.
3848 (GCOV_HISTOGRAM_SIZE): Remove.
3849 (GCOV_HISTOGRAM_BITVECTOR_SIZE): Likewise.
3850 (struct gcov_summary): Simplify rapidly just
3851 to runs and sum_max fields.
3852 (gcov_histo_index): Remove.
3853 (NUM_GCOV_WORKING_SETS): Likewise.
3854 (compute_working_sets): Likewise.
3855 * gcov-tool.c (print_overlap_usage_message): Remove
3856 trailing empty line.
3857 * gcov.c (read_count_file): Read GCOV_TAG_OBJECT_SUMMARY.
3858 (output_lines): Remove program related line.
3859 * ipa-profile.c (ipa_profile): Do not consider GCOV histogram.
3860 * lto-cgraph.c (output_profile_summary): Do not stream GCOV
3862 (input_profile_summary): Do not read it.
3863 (merge_profile_summaries): And do not merge it.
3864 (input_symtab): Do not call removed function.
3865 * modulo-sched.c (sms_schedule): Do not print sum_max.
3866 * params.def (HOT_BB_COUNT_FRACTION): Reincarnate param that was
3867 removed when histogram method was invented.
3868 (HOT_BB_COUNT_WS_PERMILLE): Mention that it's used only in LTO
3870 * postreload-gcse.c (eliminate_partially_redundant_load): Fix
3872 * predict.c (get_hot_bb_threshold): Use HOT_BB_COUNT_FRACTION
3873 and dump selected value.
3874 * profile.c (add_working_set): Remove.
3875 (get_working_sets): Likewise.
3876 (find_working_set): Likewise.
3877 (get_exec_counts): Do not work with working sets.
3878 (read_profile_edge_counts): Do not inform as sum_max is removed.
3879 (compute_branch_probabilities): Likewise.
3880 (compute_value_histograms): Remove argument for call of
3881 get_coverage_counts.
3882 * profile.h: Do not make gcov_summary const.
3884 2018-09-21 Monk Chiang <sh.chiang04@gmail.com>
3886 * config.gcc (nds32*-*-*): Set TARGET_DEFAULT_TLSDESC_TRAMPOLINE=0.
3888 2018-09-21 Eric Botcazou <ebotcazou@adacore.com>
3890 PR tree-optimization/86990
3891 * gimple-ssa-store-merging.c (imm_store_chain_info:coalesce_immediate):
3892 Check that the entire merged store group is made of constants only for
3895 2018-09-20 Allan Sandfeld Jensen <allan.jensen@qt.io>
3897 * gcc.c (LINK_COMMAND_SPEC): Handle -r like -nostdlib.
3898 (VTABLE_VERIFICATION_SPEC): Likewise.
3899 (SANITIZER_EARLY_SPEC): Likewise.
3900 (SANITIZER_SPEC): Likewise.
3901 * config/darwin.h (LINK_COMMAND_SPEC): Likewise.
3902 * doc/invoke.texi (Link Options): Document -r.
3904 2018-09-20 Richard Biener <rguenther@suse.de>
3907 * gimplify.c (gimplify_expr): Retain alignment of
3908 addressable lvalue in dereference.
3910 2018-09-20 Alexandre Oliva <aoliva@redhat.com>
3913 * configure.ac: Check for .loc is_stmt support.
3914 * configure, config.in: Rebuilt.
3915 * dwarf2out.c (dwarf2out_source_line): Skip is_stmt
3918 2018-09-20 Segher Boessenkool <segher@kernel.crashing.org>
3920 * config/rs6000/rs6000.opt (misel=no, misel=yes): Delete.
3921 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -misel=yes and
3924 2018-09-20 Segher Boessenkool <segher@kernel.crashing.org>
3926 * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
3928 * config/rs6000/rs6000.c (rs6000_debug_vector_unit): Delete
3931 2018-09-20 Marek Polacek <polacek@redhat.com>
3933 * doc/invoke.texi: Add -Wno-init-list-lifetime to C++ Language Options.
3935 2018-09-20 Richard Sandiford <richard.sandiford@arm.com>
3937 PR tree-optimization/87288
3938 * tree-vect-loop.c (vect_analyze_loop_2): Take PEELING_FOR_GAPS
3939 into account when determining PEELING_FOR_NITERS.
3941 2018-09-20 Richard Sandiford <richard.sandiford@arm.com>
3943 PR tree-optimization/86877
3944 * tree-vect-loop.c (vect_analyze_loop_2): Call
3945 vect_verify_datarefs_alignment.
3947 2018-09-19 Marek Polacek <polacek@redhat.com>
3949 * doc/invoke.texi: Document -Wclass-conversion.
3951 2018-09-19 John David Anglin <danglin@gcc.gnu.org>
3953 * config/pa/pa.c (pa_adjust_priority): Delete.
3954 (TARGET_SCHED_ADJUST_PRIORITY): Delete define.
3956 * config/pa/pa.md (atomic_storeqi): Restore deleted expander.
3957 (atomic_storehi): Likewise.
3958 (atomic_storesi): Likewise.
3959 (atomic_loaddi): Restore compare and swap exchange loop code.
3961 2018-09-19 Segher Boessenkool <segher@kernel.crashing.org>
3963 PR rtl-optimization/86902
3964 * combine.c (try_combine): When changing the CC mode used, don't change
3965 an unrelated mode in other_insn to that new CC mode.
3967 2018-09-19 David Malcolm <dmalcolm@redhat.com>
3969 * tree-data-ref.c (runtime_alias_check_p): Use formatted printing
3970 with %T in place of calls to dump_generic_expr.
3971 (prune_runtime_alias_test_list): Likewise.
3972 (create_runtime_alias_checks): Likewise.
3973 * tree-vect-data-refs.c (vect_check_nonzero_value): Likewise.
3974 (vect_analyze_data_ref_dependence): Likewise.
3975 (vect_slp_analyze_data_ref_dependence): Likewise.
3976 (vect_record_base_alignment): Likewise. Use %G in place of call
3977 to dump_gimple_stmt.
3978 (vect_compute_data_ref_alignment): Likewise.
3979 (verify_data_ref_alignment): Likewise.
3980 (vect_find_same_alignment_drs): Likewise.
3981 (vect_analyze_group_access_1): Likewise.
3982 (vect_analyze_data_ref_accesses): Likewise.
3983 (dependence_distance_ge_vf): Likewise.
3984 (dump_lower_bound): Likewise.
3985 (vect_prune_runtime_alias_test_list): Likewise.
3986 (vect_find_stmt_data_reference): Likewise.
3987 (vect_analyze_data_refs): Likewise.
3988 (vect_create_addr_base_for_vector_ref): Likewise.
3989 (vect_create_data_ref_ptr): Likewise.
3990 * tree-vect-loop-manip.c (vect_set_loop_condition): Likewise.
3991 (vect_can_advance_ivs_p): Likewise.
3992 (vect_update_ivs_after_vectorizer): Likewise.
3993 (vect_gen_prolog_loop_niters): Likewise.
3994 (vect_prepare_for_masked_peels): Likewise.
3995 * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
3996 (vect_determine_vectorization_factor): Likewise.
3997 (vect_is_simple_iv_evolution): Likewise.
3998 (vect_analyze_scalar_cycles_1): Likewise.
3999 (vect_analyze_loop_operations): Likewise.
4000 (report_vect_op): Likewise.
4001 (vect_is_slp_reduction): Likewise.
4002 (check_reduction_path): Likewise.
4003 (vect_is_simple_reduction): Likewise.
4004 (vect_create_epilog_for_reduction): Likewise.
4005 (vect_finalize_reduction:): Likewise.
4006 (vectorizable_induction): Likewise.
4007 (vect_transform_loop_stmt): Likewise.
4008 (vect_transform_loop): Likewise.
4009 (optimize_mask_stores): Likewise.
4010 * tree-vect-patterns.c (vect_pattern_detected): Likewise.
4011 (vect_split_statement): Likewise.
4012 (vect_recog_over_widening_pattern): Likewise.
4013 (vect_recog_average_pattern): Likewise.
4014 (vect_determine_min_output_precision_1): Likewise.
4015 (vect_determine_precisions_from_range): Likewise.
4016 (vect_determine_precisions_from_users): Likewise.
4017 (vect_mark_pattern_stmts): Likewise.
4018 (vect_pattern_recog_1): Likewise.
4019 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
4020 (vect_record_max_nunits): Likewise.
4021 (vect_build_slp_tree_1): Likewise.
4022 (vect_build_slp_tree_2): Likewise.
4023 (vect_print_slp_tree): Likewise.
4024 (vect_analyze_slp_instance): Likewise.
4025 (vect_detect_hybrid_slp_stmts): Likewise.
4026 (vect_detect_hybrid_slp_1): Likewise.
4027 (vect_slp_analyze_operations): Likewise.
4028 (vect_slp_analyze_bb_1): Likewise.
4029 (vect_transform_slp_perm_load): Likewise.
4030 (vect_schedule_slp_instance): Likewise.
4031 * tree-vect-stmts.c (vect_mark_relevant): Likewise.
4032 (vect_mark_stmts_to_be_vectorized): Likewise.
4033 (vect_init_vector_1): Likewise.
4034 (vect_get_vec_def_for_operand): Likewise.
4035 (vect_finish_stmt_generation_1): Likewise.
4036 (vect_check_load_store_mask): Likewise.
4037 (vectorizable_call): Likewise.
4038 (vectorizable_conversion): Likewise.
4039 (vectorizable_operation): Likewise.
4040 (vectorizable_load): Likewise.
4041 (vect_analyze_stmt): Likewise.
4042 (vect_is_simple_use): Likewise.
4043 (vect_get_vector_types_for_stmt): Likewise.
4044 (vect_get_mask_type_for_stmt): Likewise.
4045 * tree-vectorizer.c (increase_alignment): Likewise.
4047 2018-09-19 Andrew Stubbs <ams@codesourcery.com>
4049 * doc/rtl.texi: Adjust vec_select description.
4050 * simplify-rtx.c (simplify_binary_operation_1): Allow VEC_SELECT to use
4051 non-constant selectors.
4053 2018-09-19 Matthew Malcomson <matthew.malcomson@arm.com>
4055 * config/aarch64/aarch64-protos.h
4056 (aarch64_offset_9bit_signed_unscaled_p): New declaration.
4057 * config/aarch64/aarch64.md (arches): New "rcpc8_4" attribute value.
4058 (arch_enabled): Add check for "rcpc8_4" attribute value of "arch".
4059 * config/aarch64/aarch64.h (AARCH64_FL_RCPC8_4): New bitfield.
4060 (AARCH64_FL_FOR_ARCH8_4): Include AARCH64_FL_RCPC8_4.
4061 (AARCH64_FL_PROFILE): Move index so flags are ordered.
4062 (AARCH64_ISA_RCPC8_4): New flag.
4063 * config/aarch64/aarch64.c (offset_9bit_signed_unscaled_p): Renamed
4064 to aarch64_offset_9bit_signed_unscaled_p.
4065 * config/aarch64/atomics.md (atomic_store<mode>): Allow offset
4067 * config/aarch64/constraints.md (Ust): New constraint.
4068 * config/aarch64/predicates.md.
4069 (aarch64_9bit_offset_memory_operand): New predicate.
4070 (aarch64_rcpc_memory_operand): New predicate.
4072 2018-09-19 Eric Botcazou <ebotcazou@adacore.com>
4074 PR rtl-optimization/87361
4075 * rtlanal.c (nonzero_bits1): Revert accidental change.
4077 2018-09-19 Richard Biener <rguenther@suse.de>
4079 PR tree-optimization/87349
4080 PR tree-optimization/87342
4081 * tree-ssa-sccvn.c (do_rpo_vn): Iterate max_rpo computation.
4083 2018-09-18 Marek Polacek <polacek@redhat.com>
4085 P1064R0 - Allowing Virtual Function Calls in Constant Expressions
4086 * gimple-fold.c (gimple_get_virt_method_for_vtable): Adjust assert.
4088 2018-09-18 Segher Boessenkool <segher@kernel.crashing.org>
4090 * config/rs6000/rs6000.md: Remove old "Cygnus sibcall" comment.
4092 2018-09-18 Segher Boessenkool <segher@kernel.crashing.org>
4094 PR rtl-optimization/86882
4095 * rtlanal.c (reg_overlap_mentioned_p): Handle CLOBBER.
4097 2018-09-18 Uros Bizjak <ubizjak@gmail.com>
4099 * config/i386/i386.md (*<code>extend<mode>xf2): Macroize insn from
4100 *<code>extendsfxf2 and *<code>extenddfxf2 using MODEF mode iterator.
4102 2018-09-18 Jonathan Wakely <jwakely@redhat.com>
4105 * doc/invoke.texi (Link Options): Fix formatting and grammar.
4107 2018-09-18 Richard Biener <rguenther@suse.de>
4110 * tree-ssa-coalesce.c (tree_int_map_hasher): Remove.
4111 (compute_samebase_partition_bases): Likewise.
4112 (coalesce_ssa_name): Always use compute_optimized_partition_bases.
4113 (gimple_can_coalesce_p): Simplify.
4115 2018-09-18 Hans-Peter Nilsson <hp@bitrange.com>
4117 Handle a library implementation of ffs calling __builtin_ffs.
4118 * config/mmix/mmix.c (TARGET_INIT_LIBFUNCS): Override with...
4119 (mmix_init_libfuncs): New function: make __builtin_ffs expand
4122 2018-09-17 David Malcolm <dmalcolm@redhat.com>
4124 * diagnostic-show-locus.c (class layout_range): Add field
4126 (layout_range::layout_range): Add "original_idx" param and use it
4127 to initialize new field.
4128 (make_range): Use 0 for original_idx.
4129 (layout::layout): Pass in index to calls to
4130 maybe_add_location_range.
4131 (layout::maybe_add_location_range): Add param "original_idx" and
4132 pass it on to layout_range.
4133 (layout::print_any_labels): Pass on range->m_original_idx to
4135 (gcc_rich_location::add_location_if_nearby): Use 0 for
4137 * gcc-rich-location.h (text_range_label::get_text): Update for new
4139 (range_label_for_type_mismatch::get_text): Likewise.
4141 2018-09-17 Uros Bizjak <ubizjak@gmail.com>
4143 * config/i386/i386.c (ix86_emit_i387_log1p): Emit fldln2 earlier.
4145 2018-09-17 David Malcolm <dmalcolm@redhat.com>
4147 * gimple-ssa-sprintf.c (fmtwarn): Update for introduction of
4148 format_string_diagnostic_t.
4149 (fmtwarn_n): Likewise.
4150 * substring-locations.c
4151 (format_string_diagnostic_t::format_string_diagnostic_t) New ctor.
4152 (format_warning_n_va): Convert to...
4153 (format_string_diagnostic_t::emit_warning_n_va): ...this.
4154 (format_warning_va): Convert to...
4155 (format_string_diagnostic_t::emit_warning_va): ...this.
4156 (format_warning_at_substring): Convert to...
4157 (format_string_diagnostic_t::emit_warning): ...this.
4158 (format_warning_at_substring_n): Convert to...
4159 (format_string_diagnostic_t::emit_warning_n): ...this.
4160 * substring-locations.h (class format_string_diagnostic_t): New
4162 (format_warning_va): Convert to
4163 format_string_diagnostic_t::emit_warning_va.
4164 (format_warning_n_va): Convert to
4165 format_string_diagnostic_t::emit_warning_n_va.
4166 (format_warning_at_substring): Convert to
4167 format_string_diagnostic_t::emit_warning.
4168 (format_warning_at_substring_n): Convert to
4169 format_string_diagnostic_t::emit_warning_n.
4171 2018-09-17 Cesar Philippidis <cesar@codesourcery.com>
4172 Bernd Schmidt <bernds_cb1@t-online.de>
4174 * config/nvptx/nvptx.md (atomic_fetch_<logic><mode>): Enable with
4177 2018-09-17 Uros Bizjak <ubizjak@gmail.com>
4179 * config/i386/i386.md (truncxf<mode>2_i387_noop_unspec): Change
4180 operand 0 predicate to nonimmediate operand.
4181 (rint<mode>2_frndint): Remove insn pattern.
4182 (rint<mode>2): Change operand 1 predicate to general_operand.
4183 Extend operand 1 to XFmode and generate rintxf2 insn.
4184 (frndintxf2_<rounding>): Rename from frndint<mode>2_<rounding>.
4185 Do not use X87MODEF mode macro.
4186 (frndintxf2_<rounding>_i387): Rename from
4187 frndint<mode>2_<rounding>_i387. Do not use X87MODEF mode macro.
4188 (<rounding_insn><mode>2): For non-SSE modes, extend operand 1
4189 to XFmode and generate significandxf3 insn.
4191 2018-09-17 Richard Biener <rguenther@suse.de>
4193 PR tree-optimization/87328
4194 * tree-ssa-sccvn.c (process_bb): Remove assertion about not
4195 visiting unexecutable backedges when not iterating.
4196 (do_rpo_vn): Mark all edges not executable even when not
4199 2018-09-17 Martin Jambor <mjambor@suse.cz>
4202 * doc/invoke.texi (Warning Options): Likewise.
4204 2018-09-17 Richard Biener <rguenther@suse.de>
4206 PR tree-optimization/87301
4207 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_cleanup): Properly
4208 clean EH info from leftover copy assignments.
4210 2018-09-17 Martin Liska <mliska@suse.cz>
4212 PR gcov-profile/85871
4213 * gcov.c (output_intermediate_file): Fix out of bounds
4216 2018-09-17 Vineet Gupta <vgupta@synopsys.com>
4218 * config/arc/arc.c: Object attributes for core4 not reflected
4220 * config/arc/arc.h: Don't restrict DBNZ to core3 (core4 includes
4223 2018-09-17 Alexey Brodkin <abrodkin@synopsys.com>
4225 * config/arc/linux.h (LINK_EH_SPEC): Add missing space.
4227 2018-09-17 Martin Liska <mliska@suse.cz>
4229 * doc/gcov.texi: Document new option --use-hotness-colors.
4230 * gcov.c (struct source_info): Declare new field.
4231 (source_info::source_info): Set default for maximum_count.
4232 (print_usage): Add new -q option.
4233 (process_args): Process it.
4234 (accumulate_line_info): Save src->maximum_count.
4235 (output_line_beginning): Make color line number if
4236 flag_use_hotness_colors is set.
4237 (output_line_details): Pass default argument value.
4238 (output_lines): Pass src->maximum_count.
4240 2018-09-17 Martin Liska <mliska@suse.cz>
4242 * common/config/i386/i386-common.c (ix86_get_valid_option_values):
4243 Use processor_names table.
4244 * config/i386/i386.c (ix86_default_align): Use
4245 processor_cost_table for alignment values.
4246 (ix86_option_override_internal): Use processor_names.
4247 (ix86_function_specific_print): Likewise.
4248 * config/i386/i386.h (struct processor_costs):
4249 Add alignment values.
4250 (struct ptt): Remove and replace with const char *.
4251 * config/i386/x86-tune-costs.h (struct processor_costs):
4252 Declare default alignments for all costs.
4254 2018-09-17 Aldy Hernandez <aldyh@redhat.com>
4256 * tree-vrp.c (extract_range_from_unary_expr): Do not special case
4257 symbolics or VR_VARYING ranges for ABS_EXPR.
4258 * wide-int-range.cc (wide_int_range_abs): Return positive numbers
4259 when range will wrap.
4261 2018-09-15 Eric Botcazou <ebotcazou@adacore.com>
4264 * cfgexpand.c (expand_gimple_basic_block): Be prepared for a BARRIER
4265 before and after a JUMP_TABLE_DATA.
4267 2018-09-14 John David Anglin <danglin@gcc.gnu.org>
4270 * dojump.c (do_compare_and_jump): Canonicalize function pointers
4271 when one operand is a function pointer. Use POINTER_TYPE_P and
4272 FUNC_OR_METHOD_TYPE_P.
4273 * expr.c (do_store_flag): Use POINTER_TYPE_P and FUNC_OR_METHOD_TYPE_P.
4274 * fold-const.c (build_range_check): Likewise.
4275 * match.pd (simple_comparison): Likewise.
4277 2018-09-14 David Malcolm <dmalcolm@redhat.com>
4280 * spellcheck.c (get_edit_distance_cutoff): New function.
4281 (selftest::test_edit_distance_unit_test_oneway): Rename to...
4282 (selftest::test_get_edit_distance_one_way): ...this.
4283 (selftest::test_get_edit_distance_unit): Rename to...
4284 (selftest::test_get_edit_distance_both_ways): ...this.
4285 (selftest::test_edit_distances): Move tests to this new function,
4286 and test some more pairs of strings. Update for above renaming.
4287 (selftest::get_old_cutoff): New function.
4288 (selftest::test_get_edit_distance_cutoff): New function.
4289 (selftest::assert_suggested_for): New function.
4290 (ASSERT_SUGGESTED_FOR): New macro.
4291 (selftest::assert_not_suggested_for): New function.
4292 (ASSERT_NOT_SUGGESTED_FOR): New macro.
4293 (selftest::test_suggestions): New function.
4294 (selftest::spellcheck_c_tests): Move test_get_edit_distance_unit
4295 tests to selftest::test_edit_distances and call it. Add calls to
4296 selftest::test_get_edit_distance_cutoff and
4297 selftest::test_suggestions.
4298 * spellcheck.h (get_edit_distance_cutoff): New function declaration.
4299 (best_match::consider): Replace hard-coded cutoff calculation with
4301 (best_match::get_cutoff): New declaration.
4302 (best_match::get_best_meaningful_candidate): Likewise.
4304 2018-09-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
4306 * builtins.c (fold_builtin_strlen): Remove TODO comment.
4308 2018-09-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
4311 2018-07-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
4313 * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
4314 terminated string literal.
4316 2018-09-14 Martin Sebor <msebor@redhat.com>
4318 * builtins.c (unterminated_array): Handle ARRAY_REF.
4319 (expand_builtin_stpcpy_1): Detect unterminated char arrays.
4320 * builtins.h (unterminated_array): Declare extern.
4321 * gimple-fold.c (gimple_fold_builtin_stpcpy): Detect unterminated
4323 (gimple_fold_builtin_sprintf): Propagate NO_WARNING to transformed
4326 2018-09-14 Martin Sebor <msebor@redhat.com>
4327 Jeff Law <law@redhat.com>
4329 * builtins.c (unterminated_array): New.
4330 (expand_builtin_strcpy): Adjust.
4331 (expand_builtin_strcpy_args): Detect unterminated arrays.
4332 * gimple-fold.c (get_maxval_strlen): Add argument. Detect
4333 unterminated arrays.
4334 * gimple-fold.h (get_maxval_strlen): Add argument.
4335 (gimple_fold_builtin_strcpy): Detec unterminated arrays.
4337 * gimple-fold.c (get_range_strlen): Add argument.
4338 (get_maxval_strlen): Adjust.
4339 * gimple-fold.h (get_range_strlen): Add argument.
4341 2018-09-14 Wei Xiao <wei3.xiao@intel.com>
4343 * config/i386/movdirintrin.h: Fix copyright year.
4345 2018-09-14 Uros Bizjak <ubizjak@gmail.com>
4347 * reg-stack.c: Include regs.h.
4348 (replace_reg): Assert that mode is MODE_FLOAT or MODE_COMPLEX_FLOAT.
4349 (emit_pop_insn): Default pop insn mode to the reg_raw_mode of
4350 FIRST_STACK_REG, not DFmode.
4351 (emit_swap_insn): Default swap insn mode to the reg_raw_mode of
4352 FIRST_STACK_REG, not XFmode. Explicitly construct swap RTX.
4353 (change stack): Default register mode to the reg_raw_mode of
4354 FIRST_STACK_REG, not DFmode.
4355 * config/i386/i386.md (*swap<mode>): Remove insn pattern.
4356 (*swapxf): Rename from swapxf.
4358 2018-09-14 Carl Love <cel@us.ibm.com>
4360 * config/rs6000/emmintrin.h: Add _MM_SHUFFLE2.
4361 * config/rs6000/xmmintrin.h: Add _MM_SHUFFLE.
4363 2018-09-14 Segher Boessenkool <segher@kernel.crashing.org>
4366 * config/rs6000/rs6000.md (*mov<mode>_hardfloat64): Add Z to the Y
4369 2018-09-14 Sam Tebbs <sam.tebbs@arm.com>
4372 * config/aarch64/aarch64.md (*aarch64_bfxilsi_uxtw): Define.
4374 2018-09-14 Jason Merrill <jason@redhat.com>
4376 Fix --enable-gather-detailed-mem-stats.
4377 * hash-table.c (hash_table_usage): Change from variable to function.
4378 * hash-table.h: Adjust.
4379 * Makefile.in: Add missing dependencies on hash-table.h.
4381 2018-09-14 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
4383 PR tree-optimization/87259
4385 (pass_cse_reciprocals::execute): Run optimize_recip_sqrt after
4386 execute_cse_reciprocals_1 has tried transforming.
4388 2018-09-14 Aldy Hernandez <aldyh@redhat.com>
4390 * tree-vrp.c (extract_range_from_binary_expr_1): Normalize
4391 VR_VARYING for PLUS/MINUS_EXPR.
4393 2018-09-14 Ilya Leoshkevich <iii@linux.ibm.com>
4395 * config/s390/s390-passes.def (INSERT_PASS_BEFORE): Improve
4398 2018-09-14 Richard Biener <rguenther@suse.de>
4401 * tree-ssa-coalesce.c (ssa_conflicts_merge): Remove conflict
4402 bits for the merged partition.
4404 2018-09-13 Martin Sebor <msebor@redhat.com>
4405 Bernd Edlinger <bernd.edlinger@hotmail.de>
4407 * builtins.h (c_srlen): Add argument.
4408 * builtins.c (warn_string_no_nul): New function.
4409 (c_strlen): Add argument and use it. Update recursive calls.
4410 Pass DECL argument to string_constant to get info on non
4411 terminated strings. Update *NONSTR as needed.
4412 (fold_builtin_strlen): Add argument to calls to c_strlen.
4413 Warn for unterminated arrays.
4414 (warn_string_no_null): Add prototype.
4415 * expr.c (string_constant): Update arguments. Update recursive
4416 calls appropriately. Detect missing NUL terminator and outermost
4417 declaration its missing in.
4418 Improve checks for arrays with nonzero lower bound or elements
4419 that are not a single byte. Simplify offset computation.
4420 Simplify checks for non-NUL terminated strings.
4421 * gimple-fold.c (get_range_strlen): Add argument to c_strlen call.
4422 * gimple-ssa-sprintf.c (get_string_length): Remove unnecessary code.
4424 2018-09-13 Bernd Edlinger <bernd.edlinger@hotmail.de>
4426 * builtins.c (c_strlen): Handle not zero terminated STRING_CSTs
4428 * fold-const.c (c_getstr): Fix function comment. Remove unused third
4429 argument. Fix range checks.
4430 * fold-const.h (c_getstr): Adjust protoype.
4431 * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid folding when
4432 string is constant but contains no NUL byte.
4434 * expr.c (string_constant): Adjust function comment.
4435 Remove bogus check for zero termination.
4437 * fold-const.c (c_getstr): Clamp STRING_LENGTH to STRING_SIZE.
4439 * varasm.c (compare_constant): Compare type size of STRING_CSTs.
4440 (get_constant_size): Don't make STRING_CSTs larger than they are.
4441 (check_string_literal): New check function for STRING_CSTs.
4442 (output_constant): Use it.
4444 2018-09-13 Eric Botcazou <ebotcazou@adacore.com>
4447 * config/visium/visium.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define.
4449 2018-09-13 Richard Biener <rguenther@suse.de>
4451 PR tree-optimization/87263
4452 * tree-ssa-sccvn.c (visit_phi): Revert some earlier changes.
4453 (struct unwind_state): Add max_rpo field.
4454 (do_rpo_vn): Allow up-to-date loop state to be used when not iterating.
4455 Compute max_rpo, the max RPO number a block can be backwards reached
4456 from. Re-write non-iterating mode to a RPO ordered worklist approach,
4457 separating it from the iterating mode.
4459 2018-09-13 Vlad Lazar <vlad.lazar@arm.com>
4461 * haifa-sched.c (rank_for_schedule): Schedule by INSN_COST.
4462 (rfs_decision): New scheduling decision.
4464 2018-09-13 Richard Biener <rguenther@suse.de>
4467 * tree-ssa-sccvn.c (vn_nary_op_insert_into): Fix assert.
4468 (vn_nary_op_insert_pieces_predicated): Do not write useless
4469 valid_dominated_by_p entry outside of the allocated storage.
4471 2018-09-13 Omar Sandoval <osandov@osandov.com>
4472 Tom de Vries <tdevries@suse.de>
4475 * dwarf2out.c (is_c): New function.
4476 (add_subscript_info): Add DW_AT_count of 0 for C zero-length arrays.
4478 2018-09-13 Sam Tebbs <sam.tebbs@arm.com>
4481 * config/aarch64/aarch64.md (*aarch64_bfxil):
4483 * config/aarch64/constraints.md (Ulc): Define.
4484 * config/aarch64/aarch64-protos.h (aarch64_high_bits_all_ones_p):
4486 * config/aarch64/aarch64.c (aarch64_high_bits_all_ones_p):
4489 2018-09-13 Vlad Lazar <vlad.lazar@arm.com>
4491 * config/aarch64/aarch64.h (TARGET_COMPUTE_FRAME_LAYOUT): Define.
4492 * config/aarch64/aarch64.c (aarch64_expand_prologue): Remove
4493 aarch64_layout_frame call.
4494 (aarch64_expand_epilogue): Likewise.
4495 (aarch64_initial_elimination_offset): Likewise.
4496 (aarch64_get_separate_components): Likewise.
4497 (aarch64_use_return_insn_p): Likewise.
4498 (aarch64_layout_frame): Remove unneeded check.
4500 2018-09-13 Jakub Jelinek <jakub@redhat.com>
4502 * configure.ac: Only append
4503 " : (reconfigured) $TOPLEVEL_CONFIGURE_ARGUMENTS" to
4504 gcc_config_arguments if it was never reconfigured or last reconfigure
4505 was with different arguments.
4506 * configure: Regenerated.
4508 2018-09-13 Jakub Jelinek <jakub@redhat.com>
4509 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
4512 * expr.c (maybe_optimize_pow2p_mod_cmp): New function.
4513 (maybe_optimize_mod_cmp): Use it if integer_pow2p treeop1.
4515 2018-09-13 Jakub Jelinek <jakub@redhat.com>
4517 PR tree-optimization/87287
4518 * fold-const.c (fold_binary_loc) <case EQ_EXPR>: Move signed modulo
4519 X % C == 0 to X % (unsigned) C == 0 optimization to ...
4520 * match.pd (X % C == 0): ... here. New optimization.
4522 2018-09-12 Jakub Jelinek <jakub@redhat.com>
4525 * expr.h (maybe_optimize_mod_cmp): Declare.
4526 * expr.c (mod_inv): New function.
4527 (maybe_optimize_mod_cmp): New function.
4528 (do_store_flag): Use it.
4529 * cfgexpand.c (expand_gimple_cond): Likewise.
4531 2018-09-09 Cesar Philippidis <cesar@codesourcery.com>
4532 Julian Brown <julian@codesourcery.com>
4535 * gimplify.c (gimplify_scan_omp_clauses): Set
4536 target_firstprivatize_array_bases in OpenACC parallel and kernels
4537 region contexts. Remove GOMP_MAP_FIRSTPRIVATE_REFERENCE clauses from
4538 OpenACC data regions.
4540 2018-09-12 Uros Bizjak <ubizjak@gmail.com>
4542 * config/i386/i386.md (sqrt_extend<mode>xf3_i387): Remove.
4543 (sqrt<mode>2): Extend operand 1 to XFmode and generate sqrtxf3 insn.
4545 2018-09-12 Richard Biener <rguenther@suse.de>
4547 PR tree-optimization/87280
4548 * tree-ssa-sccvn.c (process_bb): Handle the case of executable
4549 edge but unreachable target.
4550 (do_rpo_vn): For conservatively handling a PHI only mark
4551 the backedge executable but not the block reachable.
4553 2018-09-12 Richard Biener <rguenther@suse.de>
4555 PR tree-optimization/87266
4556 * tree-ssa-sccvn.c (do_rpo_vn): Always iterate to not yet
4559 2018-09-12 Andreas Krebbel <krebbel@linux.ibm.com>
4561 * config/s390/s390.md (PFPO_RND_MODE_DFP, PFPO_RND_MODE_BFP): New
4563 ("trunc<BFP:mode><DFP_ALL:mode>2")
4564 ("trunc<DFP_ALL:mode><BFP:mode>2")
4565 ("extend<BFP:mode><DFP_ALL:mode>2")
4566 ("extend<DFP_ALL:mode><BFP:mode>2"): Set proper rounding mode
4567 according to the target operand type.
4569 2018-09-12 Jakub Jelinek <jakub@redhat.com>
4570 Andreas Krebbel <krebbel@linux.ibm.com>
4572 PR tree-optimization/86844
4573 * gimple-ssa-store-merging.c
4574 (imm_store_chain_info::coalesce_immediate): For overlapping stores, if
4575 there are any overlapping stores in between them, make sure they are
4576 also coalesced or we give up completely.
4578 2018-09-12 Jakub Jelinek <jakub@redhat.com>
4581 * fold-const.c (fold_ternary_loc) <case COND_EXPR>: Verify also that
4582 BIT_AND_EXPR's second operand is a power of two. Formatting fix.
4584 2018-09-12 Tom de Vries <tdevries@suse.de>
4586 * common.opt (gdescribe-dies): Add option.
4587 * dwarf2out.c (add_name_and_src_coords_attributes): Add description
4588 attribute for artifical and nameless decls.
4589 (dwarf2out_register_external_die): Add description attribute to
4590 external reference die.
4591 (add_desc_attribute): New functions.
4592 (gen_subprogram_die): Add description attribute to
4593 DW_TAG_call_site_parameter.
4594 * tree-pretty-print.c (print_generic_expr_to_str): New function.
4595 * tree-pretty-print.h (print_generic_expr_to_str): Declare.
4596 * doc/invoke.texi (@item Debugging Options): Add -gdescribe-dies and
4598 (@item -gdescribe-dies): Add.
4600 2018-09-12 Aldy Hernandez <aldyh@redhat.com>
4602 * tree-vrp.c (vrp_shift_undefined_p): Remove.
4603 (extract_range_from_binary_expr_1: Call
4604 wide_int_range_shift_undefined_p instead of vrp_shift_undefined_p.
4605 * wide-int-range.h (wide_int_range_shift_undefined_p): Do not
4608 2018-09-12 Aldy Hernandez <aldyh@redhat.com>
4610 * gimple-ssa-warn-alloca.c
4611 (alloca_type_and_limit::alloca_type_and_limit): Initialize limit
4612 field for ALLOCA_BOUND_*_LARGE.
4614 2018-09-11 Nathan Sidwell <nathan@acm.org>
4616 * gcc.c (load_specs, execute, run_attempt): Use %qs not '%s'.
4618 2018-09-11 Uros Bizjak <ubizjak@gmail.com>
4620 * reg-stack.c (subst_asm_stack_regs): Call replace_reg also
4621 for clobbers. Remove obsolete comment.
4623 2018-09-11 Uros Bizjak <ubizjak@gmail.com>
4625 * config/i386/i386.md (define_attr "type"): Remove mpxmov, mpxmk,
4626 mpxchk, mpxld and mpxst types.
4627 (define_attr length_immediate): Remove all processing of mpx types.
4628 (define_attr prefix_0f): Ditto.
4629 (define_attr memory): Ditto.
4631 2018-09-11 Uros Bizjak <ubizjak@gmail.com>
4633 * config/i386/i386.md (fyl2x_extend<mode>xf3_i387): Remove.
4634 (log<mode>2): Change operand 1 predicate to general_operand.
4635 Extend operand 1 to XFmode and generate logxf3 insn.
4636 (log10<mode>2): Change operand 1 predicate to general_operand.
4637 Extend operand 1 to XFmode and generate log10xf3 insn.
4638 (log2<mode>2): Change operand 1 predicate to general_operand.
4639 Extend operand 1 to XFmode and generate log2xf3 insn.
4640 (fyl2xp1_extend<mode>xf3_i387): Remove.
4641 (log1p<mode>2): Change operand 1 predicate to general_operand.
4642 Extend operand 1 to XFmode and generate log1pxf3 insn.
4643 (fxtract_extend<mode>xf3_i387): Remove.
4644 (logb<mode>2): Change operand 1 predicate to general_operand.
4645 Extend operand 1 to XFmode and generate logbxf3 insn.
4646 (ilogb<mode>2): Change operand 1 predicate to general_operand.
4647 Extend operand 1 to XFmode and generate fxtractxf3_i387 insn.
4648 (significand<mode>2): Change operand 1 predicate to general_operand.
4649 Extend operand 1 to XFmode and generate significandxf3 insn.
4651 2018-09-11 Nathan Sidwell <nathan@acm.org>
4653 * gcc.c (perror_with_name, pfatal_with_name): Delete.
4654 (load_specs): Use fatal_error.
4655 (DELETE_IF_ORDINARY, process_command): Use error.
4656 (execute, run_attempt): Use fatal_error.
4658 2018-09-11 Andrew Stubbs <ams@codesourcery.com>
4660 * diagnostic-core.h (sorry_at): New prototype.
4661 * diagnostic.c (sorry_at): New function.
4663 2018-09-11 Aldy Hernandez <aldyh@redhat.com>
4665 * tree-vrp.c (extract_range_from_binary_expr_1): Treat all divisions
4666 by zero as VR_UNDEFINED.
4668 2018-09-10 Uros Bizjak <ubizjak@gmail.com>
4670 * config/i386/i386.md (<sincos>xf2): Rename from *<sincos>xf2_i387.
4671 (*<sincos>_extend<mode>xf2_i387): Remove insn pattern.
4672 (<sincos>mode2): New expander.
4673 (sincos_extend<mode>xf3_i387): Remove insn pattern.
4674 (sincos -> sin, cos splitters): Remove splitter patterns.
4675 (sincos<mode>3): Change operand 2 predicate to general_operand.
4676 Extend operand 2 to XFmode and generate sincosxf3 insn.
4677 (fptanxf4_i387): Change mode of operands 0 and 3 to SFmode.
4678 Change operand 3 predicate to const1_operand.
4679 (fptan_extend<mode>xf4_i387): Remove insn pattern.
4680 (tanxf2): Update operands in the call to fptanxf4_i387.
4681 (tan<mode>2): Change operand 1 predicate to general_operand.
4682 Extend operand 1 to XFmode and generate tanxf3 insn.
4683 (atan2xf3): Rename from *fpatanxf3_i387.
4684 (fpatan_extend<mode>xf3_i387): Remove insn pattern.
4685 (atan2xf3): Remove expander.
4686 (atan2<mode<3): Change operand 1 and 2 predicates to general_operand.
4687 Extend operands 1 and 2 to XFmode and generate atan2xf3 insn.
4688 (atan<mode>2): Change operand 1 predicate to general_operand.
4689 Extend operand 1 to XFmode and generate atanxf3 insn.
4691 2018-09-10 Uros Bizjak <ubizjak@gmail.com>
4693 * config/i386/i386.md (x87/SSE constant load splitter): Use
4694 memory_operand instead of nonimmediate_operand for input operand
4697 2018-09-09 Uros Bizjak <ubizjak@gmail.com>
4699 * config/i386/i386.md (float partial SSE register stall splitter): Move
4700 splitter near its instruction pattern.
4701 (float_extend partial SSE register stall splitter): Ditto.
4702 (float_truncate partial SSE register stall splitter): Ditto.
4704 2018-09-09 Hans-Peter Nilsson <hp@bitrange.com>
4707 * config/mmix/mmix.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
4708 to speculation_safe_value_not_needed.
4711 * config/mmix/mmix.c (mmix_assemble_integer): Handle byte-size
4712 non-CONST_INT rtx:es using assemble_integer_with_op ".byte".
4713 (MMIX_CFUN_NEEDS_SAVED_EH_RETURN_ADDRESS): Don't call
4714 leaf_function_p, instead use has_hard_reg_initial_val.
4716 2018-09-09 Nathan Sidwell <nathan@acm.org>
4718 * gcc.h (pfatal_with_name): Don't declare here.
4719 * gcc.c (pfatal_with_name): Make static.
4721 2018-09-09 Xianmiao Qu <xianmiao_qu@c-sky.com>
4723 * config/csky/csky.md (*cskyv2_adddi3, *cskyv2_subdi3): Add
4726 2018-09-08 John David Anglin <danglin@gcc.gnu.org>
4728 PR rtl-optimization/85458
4729 * sel-sched.c (sel_target_adjust_priority): Allow backend adjust
4730 priority hook to reduce the priority of EXPR.
4732 2018-09-07 Uros Bizjak <ubizjak@gmail.com>
4734 * config/i386/i386.md (float<SWI48x:mode><MODEF:mode>2) Enable
4735 DImode for x87 on 32bit targets. Conditionally disable x87 modes
4736 with X87_ENABLE_FLOAT. Remove preparation code.
4737 (*float<SWI48:mode><MODEF:mode>2): Rename from
4738 *float<SWI48:mode><MODEF:mode>2_mixed. Handle x87, SSE and mixed
4739 math using "enabled" attribute.
4740 (*floatdi<MODEF:mode>2_i387): Rename from
4741 *float<SWI48x:mode><MODEF:mode>2_i387. Handle only DImode and
4742 enable for 32bit targets only.
4743 (floatdi<X87MODEF:mode>2_i387_with_xmm pre-reload splitter): New
4745 (floatdi<X87MODEF:mode>2_i387_with_xmm): Use register_operand
4746 as operand 1 predicate. Rewrite as define_insn_and_split.
4747 (floatdi<X87MODEF:mode>2_i387_with_xmm memory input splitter): Remove.
4749 2018-09-06 Uros Bizjak <ubizjak@gmail.com>
4751 * reg-stack.c (get_true_reg) <case FLOAT_TRUNCATE>: Reorder
4752 to fallthru to FLOAT case.
4754 2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
4757 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Update logic
4758 around folding of vec_sl to handle out of range shift values.
4760 2018-09-06 Uros Bizjak <ubizjak@gmail.com>
4762 * config/i386/i386.md (fix_trunc<mode>_fisttp_i387_1): Remove.
4763 Update callers to gen_fix_trunc<mode>_i387_fisttp
4764 (fix_trunc<mode>_i387_fisttp): Change operand 0 predicate to
4765 nonimmediate_operand.
4766 (fix_trunc<mode>_i387_fisttp_with_temp): Remove insn pattern
4767 and corresponding splitters.
4768 (*fix_trunc<mode>_i387_1): Always expand with fix_trunc<mode>_i387.
4769 (fix_truncdi_i387): Change operand 0 predicate to nonimmediate_operand.
4770 (fix_truncdi_i387_with_temp): Remove insn pattern
4771 and corresponding splitters.
4772 (fix_trunc<mode>_i387): Change operand 0 predicate to
4773 nonimmediate_operand.
4774 (fix_trunc<mode>_i387_with_temp): Remove insn pattern
4775 and corresponding splitters.
4776 (*fistdi2_1): Remove.
4778 (fistdi2_with_temp): Remove insn pattern and corresponding splitters.
4779 (lrintxfdi2): Remove expander. Reimplement as define_insn.
4780 (*fist<mode>2_1): Remove.
4781 (fist<mode>2): Ditto.
4782 (fist<mode>2_with_temp): Remove insn pattern and corresponding
4784 (lrintxf<mode>2): Remove expander. Reimplement as define_insn.
4785 (*fist<mode>2_<rounding>_1): Always expand with fist<mode>2_<rounding>.
4786 (fistdi2_<rounding>): Change operand 0 predicate to
4787 nonimmediate_operand.
4788 (fistdi2_<rounding>_with_temp): Remove insn pattern
4789 and corresponding splitters.
4790 (fist<mode>2_<rounding>): Change operand 0 predicate to
4791 nonimmediate_operand.
4792 (fist<mode>2_<rounding>_with_temp): Remove insn pattern
4793 and corresponding splitters.
4795 (*fixuns_trunc<mode>si2_avx512f_zext): Depend on TARGET_SSE_MATH.
4797 2018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
4799 * varasm.c (output_constructor_regular_field): Check TYPE_SIZE_UNIT of
4802 2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
4804 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support for
4805 early gimple folding of vec_splat().
4806 * tree-vect-generic.c: Remove static from tree_vec_extract() definition.
4807 * gimple-fold.h: Add an extern define for tree_vec_extract().
4809 2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
4811 * config/rs6000/rs6000.c (fold_mergehl_helper): Add types_compatible_p
4812 wrappers around TREE_TYPE comparisons.
4814 2018-09-06 Ilya Leoshkevich <iii@linux.ibm.com>
4817 * config/s390/predicates.md: Add nonsym_memory_operand.
4818 * config/s390/s390.c (s390_legitimize_cs_operand): If operand
4819 contains a SYMBOL_REF, load it into an intermediate pseudo.
4820 (s390_emit_compare_and_swap): Legitimize operand.
4821 * config/s390/s390.md: Use the new nonsym_memory_operand
4822 with UNSPECV_CAS patterns.
4824 2018-09-06 Ilya Leoshkevich <iii@linux.ibm.com>
4827 * config/s390/s390-passes.def: New file.
4828 * config/s390/s390-protos.h (class rtl_opt_pass): Add forward
4830 (make_pass_s390_early_mach): Add declaration.
4831 * config/s390/s390.c (make_pass_s390_early_mach):
4832 (s390_option_override): Remove dynamic registration.
4833 * config/s390/t-s390: Add s390-passes.def.
4835 2018-09-06 Ilya Leoshkevich <iii@linux.ibm.com>
4837 * config/s390/s390.c (s390_decompose_constant_pool_ref):
4838 Remove UNSPEC_LTREL_BASE check.
4839 (annotate_constant_pool_refs): Likewise.
4840 (find_constant_pool_ref): Likewise.
4841 (find_ltrel_base): Removed.
4842 (replace_ltrel_base): Removed.
4843 (s390_mainpool_finish): Remove replace_ltrel_base call.
4844 (s390_chunkify_start): Remove pending LTREL_BASE logic.
4845 (s390_chunkify_finish): Remove replace_ltrel_base call.
4846 * config/s390/s390.md: Remove UNSPEC_LTREL_BASE.
4848 2018-09-06 Hans-Peter Nilsson <hp@axis.com>
4851 * config/cris/cris.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
4852 to speculation_safe_value_not_needed.
4854 2018-09-05 Cesar Philippidis <cesar@codesourcery.com>
4855 Bernd Schmidt <bernds_cb1@t-online.de>
4857 * config/nvptx/nvptx-opts.h: New file.
4858 * config/nvptx/nvptx.c (nvptx_file_start): Print the correct .target.
4859 * config/nvptx/nvptx.h: Include "nvptx-opts.h".
4861 (TARGET_SM35): New macro.
4862 * config/nvptx/nvptx.md (atomic_fetch_<logic><mode>): Enable with the
4864 * config/nvptx/nvptx.opt (ptx_isa, sm_30, sm_35): New enum and its
4866 (misa=): New option.
4867 * doc/invoke.texi (Nvidia PTX Options): Document -misa.
4869 2018-09-05 Uros Bizjak <ubizjak@gmail.com>
4871 * config/i386/i386.md (truncdfsf2): Remove expander.
4872 (truncdfsf2_with_temp): Ditto.
4873 (truncxf<mode>2): Ditto.
4874 (*truncdfsf_fast_mixed): Remove insn pattern.
4875 (*truncdfsf_fast_i387): Ditto.
4876 (*truncdfsf_mixed): Ditto.
4877 (*truncdfsf_i387): Ditto.
4878 (*truncdfsf2_i387_1): Ditto.
4879 (*truncxfsf2_mixed): Ditto.
4880 (*truncxfdf2_mixed): Ditto.
4881 (*truncxf<mode>2_i387_noop): Ditto. Update callers
4882 to call gen_truncxf<mode>2 instead.
4883 (*truncxf<mode>2_i387): Remove.
4884 (reg->reg splitters): Remove splitter pattern.
4885 (reg->mem splitters): Ditto.
4887 (truncdfsf2): New insn pattern.
4888 (truncxf<mode>2): Ditto.
4890 2018-09-05 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
4892 * tree-ssa-math-opts.c (is_mult_by): New function.
4893 (is_square_of): Use the above.
4894 (optimize_recip_sqrt): New function.
4895 (pass_cse_reciprocals::execute): Use the above.
4897 2018-09-05 Richard Biener <rguenther@suse.de>
4900 * tree-ssa-sccvn.c (rpo_elim::eliminate_push_avail): Make sure
4901 to zero-init the emplaced vec.
4903 2018-09-05 Martin Liska <mliska@suse.cz>
4905 PR tree-optimization/87205
4906 * tree-switch-conversion.c (pass_lower_switch::execute):
4907 Group cases for switch statements.
4909 2018-09-05 Richard Biener <rguenther@suse.de>
4911 PR tree-optimization/87217
4912 * tree-ssa-sccvn.c (vuse_valueize): New.
4913 (vn_reference_lookup_pieces): Use it.
4914 (vn_reference_lookup): Likewise.
4916 2018-09-05 Nathan Sidwell <nathan@acm.org>
4919 * stor-layout.c (place_field): Scan forwards to check last
4920 bitfield when ms_bitfield_placement is in effect.
4922 2018-09-05 Richard Biener <rguenther@suse.de>
4925 * tree-vect-stmts.c (vectorizable_simd_clone_call): Fix bogus
4928 2018-09-05 Siddhesh Poyarekar <siddhesh@sourceware.org>
4929 Kugan Vivekanandarajah <kugan.vivekanandarajah@linaro.org>
4931 * config/aarch64/falkor-tag-collision-avoidance.c: New file.
4932 * config.gcc (extra_objs): Build it.
4933 * config/aarch64/t-aarch64 (falkor-tag-collision-avoidance.o):
4935 * config/aarch64/aarch64-passes.def
4936 (pass_tag_collision_avoidance): New pass.
4937 * config/aarch64/aarch64.c (qdf24xx_tunings): Add
4938 AARCH64_EXTRA_TUNE_RENAME_LOAD_REGS to tuning_flags.
4939 (aarch64_classify_address): Remove static qualifier.
4940 (aarch64_address_info, aarch64_address_type): Move to...
4941 * config/aarch64/aarch64-protos.h: ... here.
4942 (make_pass_tag_collision_avoidance): New function.
4943 * config/aarch64/aarch64-tuning-flags.def (rename_load_regs):
4946 2018-09-05 Martin Liska <mliska@suse.cz>
4948 * doc/gcov.texi: Update documentation of humar
4950 * gcov.c (format_count): Print one decimal place, it provides
4951 more fine number of situations like '1G' vs. '1.4G'.
4953 2018-09-05 Martin Liska <mliska@suse.cz>
4956 * config/rs6000/rs6000.opt: Mark the option as Deprecated.
4957 * optc-gen.awk: Allow 'Var' for Deprecated options in order
4958 to generate a MASK value.
4960 2018-09-04 H.J. Lu <hongjiu.lu@intel.com>
4963 * dwarf2out.c (based_loc_descr): Allow hard frame pointer even
4964 if frame pointer isn't used.
4965 (compute_frame_pointer_to_fb_displacement): Likewise.
4967 2018-09-04 Jakub Jelinek <jakub@redhat.com>
4970 * common/config/i386/i386-common.c (OPTION_MASK_ISA_XSAVEOPT_SET,
4971 OPTION_MASK_ISA_XSAVES_SET, OPTION_MASK_ISA_XSAVEC_SET): Use
4972 OPTION_MASK_ISA_XSAVE_SET instead of OPTION_MASK_ISA_XSAVE.
4973 (OPTION_MASK_ISA_XSAVE_UNSET): Add OPTION_MASK_ISA_XSAVES_UNSET
4974 and OPTION_MASK_ISA_XSAVEC_UNSET.
4976 2018-09-04 Max Filippov <jcmvbkbc@gmail.com>
4978 * config/xtensa/xtensa.c (xtensa_expand_atomic): Reorder AND and
4979 XOR operations in NAND case.
4981 2018-09-04 Aldy Hernandez <aldyh@redhat.com>
4983 * wide-int-range.cc (wide_int_range_convert): New.
4984 * wide-int-range.h (wide_int_range_convert): New.
4985 * tree-vrp.c (extract_range_from_unary_expr): Abstract wide int
4986 code into wide_int_range_convert.
4987 (extract_range_into_wide_ints): Do not munge anti range constants
4988 into the entire domain. Just return the range back.
4990 2018-09-04 Martin Liska <mliska@suse.cz>
4992 * genmatch.c (output_line_directive): Add new argument
4994 (dt_simplify::gen_1): Encapsulate dump within __builtin_expect.
4996 2018-09-04 Jonathan Wakely <jwakely@redhat.com>
4998 * doc/invoke.texi (Option Summary): Add whitespace.
5000 * doc/invoke.texi (Option Summary): Add -Waligned-new.
5002 2018-09-04 Richard Biener <rguenther@suse.de>
5004 PR tree-optimization/87211
5005 * tree-ssa-sccvn.c (visit_phi): When value-numbering to a
5006 backedge value we're supposed to treat as VARYING also number
5007 the PHI to VARYING in case it got a different value-number already.
5009 2018-09-04 Aldy Hernandez <aldyh@redhat.com>
5011 * tree-vrp.c (vrp_can_optimize_bit_op): Remove.
5012 (extract_range_from_binary_expr_1): Do not call
5013 vrp_can_optimize_bit_op.
5014 * wide-int-range.cc (wide_int_range_can_optimize_bit_op): Make
5016 (wide_int_range_get_mask_and_bounds): New.
5017 (wide_int_range_optimize_bit_op): New.
5018 (wide_int_range_bit_ior): Call wide_int_range_optimize_bit_op.
5019 (wide_int_range_bit_and): Same.
5020 * wide-int-range.h (wide_int_range_can_optimize_bit_op): Remove.
5021 (wide_int_range_optimize_bit_op): New.
5022 (wide_int_range_get_mask_and_bounds): New.
5024 2018-09-04 Richard Biener <rguenther@suse.de>
5026 PR tree-optimization/87176
5027 * tree-ssa-sccvn.c (visit_phi): Remove redundant allsame
5028 variable. When value-numbering a virtual PHI node make sure
5029 to not value-number to the backedge value.
5031 2018-09-04 Jonathan Wakely <jwakely@redhat.com>
5033 * doc/extend.texi (Long Long, Hex Floats): Document support for
5034 long long and hex floats in more recent versions of ISO C++.
5036 2018-09-03 Richard Biener <rguenther@suse.de>
5038 PR tree-optimization/87177
5039 * tree-ssa-sccvn.c (vuse_ssa_val): Revert previous change, keep
5042 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
5044 * bb-reorder.c (edge_order): Convert to C-qsort-style
5045 tri-state comparator.
5046 (reorder_basic_blocks_simple): Change std::stable_sort to
5049 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
5051 * tree-loop-distribution.c (offset_cmp): Convert to C-qsort-style
5052 tri-state comparator.
5053 (fuse_memset_builtins): Change std::stable_sort to gcc_stablesort.
5055 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
5057 * sort.cc (struct sort_ctx): New field 'nlim'. Use it...
5058 (mergesort): ... here as maximum count for using netsort.
5059 (gcc_qsort): Set nlim to 3 if stable sort is requested.
5060 (gcc_stablesort): New.
5061 * system.h (gcc_stablesort): Declare.
5063 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
5065 * sort.cc (gcc_qsort) [CHECKING_P]: Call qsort_chk.
5066 * system.h (qsort): Always redirect to gcc_qsort. Update comment.
5067 * vec.c (qsort_chk): Do not call gcc_qsort. Update comment.
5069 2018-09-03 Segher Boessenkool <segher@kernel.crashing.org>
5071 * config/rs6000/rs6000.md (*mov<mode>_hardfloat32): Remove %U from the
5072 lxsdx and stxsdx alternatives.
5073 (*mov<mode>_hardfloat64): Ditto.
5074 * config/rs6000/vsx.md (*vsx_extract_<mode>_store): Ditto.
5076 2018-09-03 Richard Biener <rguenther@suse.de>
5078 PR tree-optimization/87200
5079 * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Valueize a
5082 2018-09-03 Martin Liska <mliska@suse.cz>
5084 PR tree-optimization/87201
5085 * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
5086 Fix parenthesis in an expression.
5088 2018-09-03 Richard Biener <rguenther@suse.de>
5090 PR tree-optimization/87197
5091 * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Mark the new def
5092 visited. CSE the VN_INFO hashtable lookup.
5094 PR tree-optimization/87169
5095 * tree-ssa-sccvn.c (do_rpo_vn): When marking loops for not
5096 iterating make sure there's no extra backedges from irreducible
5097 regions feeding the header. Mark the destination block
5100 2018-09-03 Martin Liska <mliska@suse.cz>
5103 * common/common-target.def: Add TARGET_GET_VALID_OPTION_VALUES.
5104 * common/common-targhooks.c (default_get_valid_option_values):
5106 * common/common-targhooks.h (default_get_valid_option_values):
5108 * common/config/i386/i386-common.c: Move processor_target_table
5110 (ix86_get_valid_option_values): New function.
5111 (TARGET_GET_VALID_OPTION_VALUES): New macro.
5112 * config/i386/i386.c (struct ptt): Move to i386-common.c.
5113 (PTA_*): Move all defined masks into i386-common.c.
5114 (ix86_function_specific_restore): Use new processor_cost_table.
5115 * config/i386/i386.h (struct ptt): Moved from i386.c.
5116 (struct pta): Likewise.
5117 * doc/tm.texi: Document new TARGET_GET_VALID_OPTION_VALUES.
5118 * doc/tm.texi.in: Likewise.
5119 * opt-suggestions.c (option_proposer::suggest_option):
5120 Pass prefix to build_option_suggestions.
5121 (option_proposer::get_completions): Likewise.
5122 (option_proposer::build_option_suggestions): Use the new target
5124 * opts.c (struct option_help_tuple): New struct.
5125 (print_filtered_help): Use the new target hook.
5127 2018-09-03 Martin Liska <mliska@suse.cz>
5130 * predict.c (set_even_probabilities): Add likely_edges
5131 argument and handle cases where we have precisely one
5133 (combine_predictions_for_bb): Catch also likely_edges.
5134 (tree_predict_by_opcode): Handle gswitch statements.
5135 * tree-cfg.h (find_case_label_for_value): New declaration.
5136 (find_taken_edge_switch_expr): Likewise.
5137 * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
5138 Find pivot in decision tree based on probabily, not by number of
5141 2018-09-02 Gerald Pfeifer <gerald@pfeifer.com>
5143 * doc/standards.texi (Standards): Update Objective-C reference.
5145 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
5147 * doc/install.texi (Prerequisites): Update link for MPC.
5149 2018-09-01 Michael Matz <matz@suse.de>
5151 PR tree-optimization/87074
5152 * gimple-loop-jam.c (unroll_jam_possible_p): Check loop exit
5153 PHIs for outer-loop uses.
5155 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
5157 * doc/generic.texi (OpenMP): Adjust link to openmp.org.
5158 * doc/invoke.texi (C Dialect Options): Ditto.
5160 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
5162 * doc/install.texi (Prerequisites): Adjust link mpfr.org.
5164 2018-08-31 Richard Biener <rguenther@suse.de>
5166 PR tree-optimization/87168
5167 * tree-ssa-sccvn.c (SSA_VAL): Add visited output parameter.
5168 (rpo_elim::eliminate_avail): When OP was not visited it must
5171 2018-08-31 David Malcolm <dmalcolm@redhat.com>
5173 * tree-vrp.c (copy_value_range): Convert param "from" from
5174 "value_range *" to "const value_range *".
5175 (range_is_null): Likewise for param "vr".
5176 (range_int_cst_p): Likewise.
5177 (range_int_cst_singleton_p): Likewise.
5178 (symbolic_range_p): Likewise.
5179 (value_ranges_intersect_p): Likewise for both params.
5180 (value_range_nonnegative_p): Likewise for param "vr".
5181 (value_range_constant_singleton): Likewise.
5182 (vrp_set_zero_nonzero_bits): Likewise for param "ar".
5183 (extract_range_into_wide_ints): Likewise for param "vr".
5184 (extract_range_from_multiplicative_op): Likewise for params "vr0"
5186 (vrp_can_optimize_bit_op): Likewise.
5187 (extract_range_from_binary_expr_1): Likewise for params "vr0_" and
5189 (extract_range_from_unary_expr): Likewise.
5190 (debug_value_range): Likewise for param "vr".
5191 (value_range::dump): Add "const" qualifier.
5192 (vrp_prop::check_array_ref): Convert local "vr" from
5193 "value_range *" to "const value_range *".
5194 (vrp_prop::check_mem_ref): Likewise.
5195 (vrp_prop::visit_stmt): Likewise for local "old_vr".
5196 (vrp_intersect_ranges_1): Likewise for param "vr_1".
5197 (vrp_intersect_ranges): Likewise.
5198 (simplify_stmt_for_jump_threading): Likewise for local "vr".
5199 (vrp_prop::vrp_finalize): Likewise.
5200 * tree-vrp.h (value_range::dump): Add "const" qualifier.
5201 (vrp_intersect_ranges): Add "const" qualifier to params as above.
5202 (extract_range_from_unary_expr): Likewise.
5203 (value_range_constant_singleton): Likewise.
5204 (symbolic_range_p): Likewise.
5205 (copy_value_range): Likewise.
5206 (extract_range_from_binary_expr_1): Likewise.
5207 (range_int_cst_p): Likewise.
5208 (vrp_set_zero_nonzero_bits): Likewise.
5209 (range_int_cst_singleton_p): Likewise.
5211 2018-08-31 Vlad Lazar <vlad.lazar@arm.com>
5213 * config/aarch64/arm_neon.h (vabsd_s64): New.
5214 (vnegd_s64): Likewise.
5216 2018-08-31 Martin Jambor <mjambor@suse.cz>
5218 * ipa-cp.c (estimate_local_effects): Replace wrong MAX with MIN.
5220 2018-08-31 Martin Liska <mliska@suse.cz>
5222 * ipa-icf.c (sem_item::add_type): Use
5223 sem_item::m_type_hash_cache.
5224 * ipa-icf.h: Move the cache from sem_item_optimizer
5227 2018-08-31 Nathan Sidwell <nathan@acm.org>
5229 * doc/extend.texi (Backwards Compatibility): Remove implicit
5230 extern C leeway of () being (...).
5232 2018-08-31 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
5234 * ipa-inline.c (can_inline_edge_by_limits_p): Fix typos in comment.
5236 2018-08-31 Segher Boessenkool <segher@kernel.crashing.org>
5240 * config/rs6000/rs6000.md (lround<mode>di2): Gate on TARGET_FPRND.
5242 2018-08-31 Jakub Jelinek <jakub@redhat.com>
5245 * expmed.c (expand_mult_const): Use immed_wide_int_const instead of
5246 gen_int_mode. Formatting fixes.
5248 2018-08-30 Sandra Loosemore <sandra@codesourcery.com>
5250 * target.def (custom_function_descriptors): Improve documentation.
5251 * doc/tm.texi.in (Trampolines): Expand discussion of function
5252 descriptors and move TARGET_CUSTOM_FUNCTION_DESCRIPTORS to the
5253 beginning of the section.
5254 * doc/tm.texi: Regenerated.
5256 2018-08-30 Jose E. Marchesi <jose.marchesi@oracle.com>
5258 * cfg.h (class auto_edge_flag): Spell out the template-id of the
5259 base class in the initializer list. This is a workaround for
5260 building with older GCC.
5261 (class auto_bb_flag): Likewise.
5263 2018-08-30 Aaron Sawdey <acsawdey@linux.ibm.com>
5265 * config/rs6000/altivec.md (altivec_eq<mode>): Remove star.
5266 (altivec_vcmpequ<VI_char>_p): Remove star.
5267 * config/rs6000/rs6000-string.c (do_load_for_compare): Support
5269 (expand_strncmp_vec_sequence): New function.
5270 (emit_final_str_compare_vec): New function.
5271 (expand_strn_compare): Add support for vector strncmp.
5272 * config/rs6000/rs6000.opt (-mstring-compare-inline-limit): Change
5273 length specification to bytes.
5274 * config/rs6000/vsx.md (vsx_ld_elemrev_v16qi_internal): Remove star.
5275 (vcmpnezb_p): New pattern.
5276 * doc/invoke.texi (RS/6000 and PowerPC Options): Update documentation
5277 for option -mstring-compare-inline-limit.
5279 2018-08-30 Thiago Macieira <thiago.macieira@intel.com>
5281 * config/i386/i386.c (PTA_WESTMERE): Remove PTA_AES.
5282 (PTA_SKYLAKE): Add PTA_AES.
5283 (PTA_GOLDMONT): Likewise.
5285 2018-08-29 Jan Hubicka <jh@suse.cz>
5288 * lto-opts.c (lto_write_options): Always stream PIC/PIE mode.
5289 * lto-wrapper.c (merge_and_complain): Fix merging of PIC/PIE.
5291 2018-08-29 Jan Hubicka <jh@suse.cz>
5293 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not follow
5295 (hash_tree): Do not visit TYPE_STUB_DECL.
5296 * tree-streamer-out.c (write_ts_type_common_tree_pointers): Do not
5297 stream TYPE_STUB_DECL.
5298 * tree-streamer-in.c (lto_input_ts_type_common_tree_pointers): Likewise.
5299 * ipa-utils.h (type_with_linkage_p): Do not rely on TYPE_STUB_DECL
5300 after free_lang_data.
5301 (type_in_anonymous_namespace_p): Likewise.
5303 2018-08-29 Jan Hubicka <jh@suse.cz>
5305 * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
5306 comment that it has to be even number.
5307 (class sreal): Change m_sig type to int32_t.
5308 * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
5309 int64_t for temporary calculations.
5310 (sreal_verify_basics): Drop one bit from minimum and maximum.
5312 2018-08-30 Richard Biener <rguenther@suse.de>
5314 PR tree-optimization/87147
5315 * tree-ssa-sccvn.c (SSA_VISITED): New function.
5316 (visit_phi): When the degenerate result is from the backedge and
5317 we didn't visit its definition yet drop to VARYING.
5318 (do_rpo_vn): Properly mark blocks with incoming backedges as executable.
5320 2018-08-29 Jan Hubicka <jh@suse.cz>
5322 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not walk
5324 (hash_tree): Likewise.
5326 2018-08-29 Jan Hubicka <jh@suse.cz>
5328 * tree.c (find_decls_types_r): Walk also TYPE_NEXT_PTR_TO
5329 and TYPE_NEXT_REF_TO.
5331 2018-08-29 Jan Hubicka <jh@suse.cz>
5333 * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
5334 comment that it has to be even number.
5335 (class sreal): Change m_sig type to int32_t.
5336 * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
5337 int64_t for temporary calculations.
5338 (sreal_verify_basics): Drop one bit from minimum and maximum.
5340 2018-08-30 Tamar Christina <tamar.christina@arm.com>
5342 * config/aarch64/aarch64.c (aarch64_expand_movmem): Set TImode max.
5344 2018-08-30 Vlad Lazar <vlad.lazar@arm.com>
5347 * expmed.c (canonicalize_comparison): Use wi::sub instead of wi::add
5348 if to_add is negative.
5350 2018-08-29 Bernd Edlinger <bernd.edlinger@hotmail.de>
5353 * builtins.c (c_strlen): Improve range checks.
5355 2018-08-29 Martin Sebor <msebor@redhat.com>
5356 Jeff Law <law@redhat.com>
5358 PR tree-optimization/86714
5359 PR tree-optimization/86711
5360 * builtins.c (c_strlen): Add arguments to call to string_constant.
5361 * expr.c (string_constant): Add argument. Detect missing nul
5362 terminator and outermost declaration it's missing in.
5363 * expr.h (string_constant): Add argument.
5364 * fold-const.c (read_from_constant_string): Add arguments to call to
5366 (c_getstr): Likewise.
5367 * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
5369 * tree-ssa-strlen.c (get_stridx): Likewise.
5371 2018-08-29 Jan Hubicka <jh@suse.cz>
5373 * tree-streamer-in.c (lto_input_ts_function_decl_tree_pointers):
5374 Do not stream DECL_VINDEX.
5375 * tree-streamer-out.c (write_ts_function_decl_tree_pointers): Likewise.
5376 * tree.c (free_lang_data_in_decl): Clear DECL_VINDEX.
5377 (decl_function_context): Use DECL_VIRTUAL_P rather than DECL_VINDEX.
5379 2018-08-29 Richard Biener <rguenther@suse.de>
5381 * tree-ssa-sccvn.c (vuse_ssa_val): Return NULL for unvisited
5382 virtual operands that are not default defs to honor region
5384 (rpo_vn_valueize): Remove ineffective code here.
5386 2018-08-29 Richard Biener <rguenther@suse.de>
5388 PR tree-optimization/87132
5389 * tree-ssa-alias.c (get_continuation_for_phi): Do not translate
5390 when skipping defs reachable over backedges.
5392 2018-08-29 Richard Biener <rguenther@suse.de>
5394 * tree-core.h: Document use of deprecated_flag in SSA_NAME.
5395 * tree.h (SSA_NAME_POINTS_TO_READONLY_MEMORY): Define.
5396 * tree-into-ssa.c (pass_build_ssa::execute): Initialize
5397 function parameters SSA_NAME_POINTS_TO_READONLY_MEMORY from fnspec.
5398 * tree-ssa-sccvn.c (const_parms, init_const_parms): Remove.
5399 (vn_reference_lookup_3): Remove use of const_parms.
5400 (free_rpo_vn): Do not free const_parms.
5401 (do_rpo_vn): Do not call init_const_parms.
5402 * tree-ssa-alias.c (refs_may_alias_p_1): Honor
5403 SSA_NAME_POINTS_TO_READONLY_MEMORY.
5404 (call_may_clobber_ref_p_1): Likewise.
5406 2018-08-29 Alexander Monakov <amonakov@ispras.ru>
5409 * invoke.texi (Optimization Options): List -ftree-scev-cprop.
5411 (-ftree-scev-cprop): Document.
5413 2018-08-29 Jan Hubicka <jh@suse.cz>
5415 * sreal.h (normalize, normalize_up, normalize_down): Add new_sig/new_exp
5417 (sreal constructor): Update.
5418 * sreal.c (sreal:operator+, sreal:operator-, sreal:operator*,
5419 sreal:operator/): Update.
5421 2018-08-29 Martin Liska <mliska@suse.cz>
5423 * tree-switch-conversion.c (switch_conversion::expand):
5424 Strenghten assumption about gswitch statements.
5426 2018-08-29 Richard Biener <rguenther@suse.de>
5428 PR tree-optimization/87117
5429 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_stmt): Only
5430 re-value-number released SSA VDEFs.
5432 2018-08-29 Richard Biener <rguenther@suse.de>
5434 PR tree-optimization/87126
5435 * tree-ssa-sccvn.c (vn_reference_insert): Remove assert.
5437 2018-08-28 Jim Wilson <jimw@sifive.com>
5439 * config/riscv/pic.md: Rewrite.
5440 * config/riscv/riscv.c (riscv_address_insns): Return cost of 3 for
5442 * config/riscv/riscv.md (ZERO_EXTEND_LOAD): Delete.
5443 (SOFTF, default_load, softload, softstore): New.
5445 2018-08-28 Jeff Law <law@redhat.com>
5447 * fold-const.c (fold_binary_loc): Remove recently added assert.
5449 2018-08-28 Joern Rennecke <joern.rennecke@riscy-ip.com>
5451 * genpreds.c (write_predicate_subfunction): Also add ATTRIBUTE_UNUSED
5452 to OP parmeter of generated function.
5454 2018-08-28 MCC CS <deswurstes@users.noreply.github.com>
5456 PR tree-optimization/87009
5457 * match.pd: Add boolean optimizations.
5459 2018-08-28 Martin Sebor <msebor@redhat.com>
5462 * calls.c (alloc_max_size): Treat HOST_WIDE_INT special.
5463 * gimple-ssa-warn-alloca.c (adjusted_warn_limit): New function.
5464 (pass_walloca::gate): Use it.
5465 (alloca_call_type): Same.
5466 (pass_walloca::execute): Same.
5467 * stor-layout.c (layout_decl): Treat HOST_WIDE_INT special.
5469 2018-08-28 David Malcolm <dmalcolm@redhat.com>
5471 * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): Change version check on
5472 GCC_VERSION for usage of "__gcc_dump_printf__" format from
5475 2018-08-28 Richard Biener <rguenther@suse.de>
5477 PR tree-optimization/87124
5478 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Guard against
5479 constants before looking up avail.
5481 2018-08-28 Jakub Jelinek <jakub@redhat.com>
5484 * calls.c (maybe_warn_nonstring_arg): Punt early if
5485 warn_stringop_overflow is zero. Don't call get_range_strlen
5486 on 3rd argument, keep iterating until lenrng[1] is INTEGER_CST.
5487 Swap comparison operands to have constants on rhs. Only use
5488 lenrng[1] if non-NULL and INTEGER_CST. Don't uselessly
5489 increment lenrng[0].
5491 2018-08-28 Richard Sandiford <richard.sandiford@arm.com>
5493 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Fix unguarded
5494 use of tree_to_shwi. Remove duplicated test for the size being
5495 a whole number of bytes.
5497 2018-08-28 Richard Biener <rguenther@suse.de>
5499 PR tree-optimization/87117
5500 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_cleanup):
5501 Handle removed stmt without LHS (GIMPLE_NOP).
5503 2018-08-28 Richard Biener <rguenther@suse.de>
5505 PR tree-optimization/87117
5506 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Exclude
5507 void which is is_gimple_reg_type by checking for COMPLETE_TYPE_P.
5509 2018-08-28 Richard Biener <rguenther@suse.de>
5511 PR tree-optimization/87117
5512 * tree-ssa-pre.c (compute_avail): Do not make expressions
5513 with predicated values available.
5514 (get_expr_value_id): Assert we do not run into predicated value
5517 2018-08-28 Richard Biener <rguenther@suse.de>
5519 PR tree-optimization/87117
5520 * tree-ssa-operands.c (add_stmt_operand): STRING_CST may
5521 get virtual operands.
5522 (get_expr_operands): Handle STRING_CST like other decls.
5524 2018-08-28 Martin Liska <mliska@suse.cz>
5526 * tree.h: Update documentation of fndecl_built_in_p
5530 2018-08-27 Jeff Law <law@redhat.com>
5531 PR tree-optimization/87110
5532 * tree-ssa-dse.c (compute_trims): Handle non-constant
5535 2018-08-27 Martin Sebor <msebor@redhat.com>
5537 PR tree-optimization/86914
5538 * tree-ssa-strlen.c (maybe_set_strlen_range): Avoid MEM_REF.
5540 2018-08-27 Martin Sebor <msebor@redhat.com>
5542 PR tree-optimization/87112
5543 * builtins.c (expand_builtin_strnlen): Convert c_strlen result to
5544 the type of the bound argument.
5546 2018-08-27 Jeff Law <law@redhat.com>
5548 * tree-ssa-dse.c (compute_trims): Handle case where the reference's
5549 type does not have a TYPE_SIZE_UNIT.
5551 2018-08-27 Steve Ellcey <sellcey@cavium.com>
5553 * config/aarch64/aarch64-speculation.cc: Replace include of cfg.h
5554 with include of backend.h.
5556 2018-08-27 Richard Biener <rguenther@suse.de>
5558 PR tree-optimization/86927
5559 * tree-vect-loop.c (vect_create_epilog_for_reduction): Properly
5560 use const cond reduction code.
5562 2018-08-27 Alexander Monakov <amonakov@ispras.ru>
5564 PR tree-optimization/85758
5565 * match.pd ((X & Y) ^ Y): Add :s qualifier to inner expression.
5567 2018-08-27 David Malcolm <dmalcolm@redhat.com>
5570 * diagnostic-show-locus.c (class layout_range): Update for
5571 conversion of show_caret_p to a tri-state.
5572 (layout_range::layout_range): Likewise.
5573 (make_range): Likewise.
5574 (layout::maybe_add_location_range): Likewise.
5575 (layout::should_print_annotation_line_p): Don't show annotation
5576 lines for ranges that are SHOW_LINES_WITHOUT_RANGE.
5577 (layout::get_state_at_point): Update for conversion of
5578 show_caret_p to a tri-state. Bail out early for
5579 SHOW_LINES_WITHOUT_RANGE, so that such ranges don't affect
5580 underlining or source colorization.
5581 (gcc_rich_location::add_location_if_nearby): Update for conversion
5582 of show_caret_p to a tri-state.
5583 (selftest::test_one_liner_multiple_carets_and_ranges): Likewise.
5584 (selftest::test_one_liner_fixit_replace_equal_secondary_range):
5586 (selftest::test_one_liner_labels): Likewise.
5587 * gcc-rich-location.c (gcc_rich_location::add_expr): Update for
5588 conversion of show_caret_p to a tri-state.
5589 * pretty-print.c (text_info::set_location): Likewise.
5590 * pretty-print.h (text_info::set_location): Likewise.
5591 * substring-locations.c (format_warning_n_va): Likewise.
5592 * tree-diagnostic.c (default_tree_printer): Likewise.
5593 * tree-pretty-print.c (newline_and_indent): Likewise.
5595 2018-08-27 David Malcolm <dmalcolm@redhat.com>
5598 * diagnostic-show-locus.c (get_line_span_for_fixit_hint): Show the
5599 line above for line-insertion fix-it hints.
5600 (selftest::test_fixit_insert_containing_newline): Update the
5601 expected results, and add a test with line-numbering enabled.
5603 2018-08-27 Martin Liska <mliska@suse.cz>
5606 * sanopt.c (sanitize_rewrite_addressable_params): Ignore
5607 params with DECL_HAS_VALUE_EXPR_P.
5609 2018-08-27 Martin Liska <mliska@suse.cz>
5611 * config/i386/i386.c (ix86_expand_set_or_movmem): Dump
5612 selected expansion strategy.
5614 2018-08-27 Martin Liska <mliska@suse.cz>
5616 * builtins.h (is_builtin_fn): Remove and fndecl_built_in_p.
5617 * builtins.c (is_builtin_fn): Likewise.
5618 * attribs.c (diag_attr_exclusions): Use new function
5619 fndecl_built_in_p and remove check for FUNCTION_DECL if
5621 (builtin_mathfn_code): Likewise.
5622 (fold_builtin_expect): Likewise.
5623 (fold_call_expr): Likewise.
5624 (fold_builtin_call_array): Likewise.
5625 (fold_call_stmt): Likewise.
5626 (set_builtin_user_assembler_name): Likewise.
5627 (is_simple_builtin): Likewise.
5628 * calls.c (gimple_alloca_call_p): Likewise.
5629 (maybe_warn_nonstring_arg): Likewise.
5630 * cfgexpand.c (expand_call_stmt): Likewise.
5631 * cgraph.c (cgraph_update_edges_for_call_stmt_node): Likewise.
5632 (cgraph_edge::verify_corresponds_to_fndecl): Likewise.
5633 (cgraph_node::verify_node): Likewise.
5634 * cgraphclones.c (build_function_decl_skip_args): Likewise.
5635 (cgraph_node::create_clone): Likewise.
5636 * config/arm/arm.c (arm_insert_attributes): Likewise.
5637 * config/i386/i386.c (ix86_gimple_fold_builtin): Likewise.
5638 * dse.c (scan_insn): Likewise.
5639 * expr.c (expand_expr_real_1): Likewise.
5640 * fold-const.c (operand_equal_p): Likewise.
5641 (fold_binary_loc): Likewise.
5642 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Likewise.
5643 * gimple-low.c (lower_stmt): Likewise.
5644 * gimple-pretty-print.c (dump_gimple_call): Likewise.
5645 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
5647 * gimple.c (gimple_build_call_from_tree): Likewise.
5648 (gimple_call_builtin_p): Likewise.
5649 (gimple_call_combined_fn): Likewise.
5650 * gimplify.c (gimplify_call_expr): Likewise.
5651 (gimple_boolify): Likewise.
5652 (gimplify_modify_expr): Likewise.
5653 (gimplify_addr_expr): Likewise.
5654 * hsa-gen.c (gen_hsa_insns_for_call): Likewise.
5655 * ipa-cp.c (determine_versionability): Likewise.
5656 * ipa-fnsummary.c (compute_fn_summary): Likewise.
5657 * ipa-param-manipulation.c (ipa_modify_formal_parameters): Likewise.
5658 * ipa-split.c (visit_bb): Likewise.
5659 (split_function): Likewise.
5660 * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
5661 * lto-cgraph.c (input_node): Likewise.
5662 * lto-streamer-out.c (write_symbol): Likewise.
5663 * omp-low.c (setjmp_or_longjmp_p): Likewise.
5664 (lower_omp_1): Likewise.
5665 * predict.c (strip_predict_hints): Likewise.
5666 * print-tree.c (print_node): Likewise.
5667 * symtab.c (symtab_node::output_to_lto_symbol_table_p): Likewise.
5668 * trans-mem.c (is_tm_irrevocable): Likewise.
5669 (is_tm_load): Likewise.
5670 (is_tm_simple_load): Likewise.
5671 (is_tm_store): Likewise.
5672 (is_tm_simple_store): Likewise.
5673 (is_tm_abort): Likewise.
5674 (tm_region_init_1): Likewise.
5675 * tree-call-cdce.c (gen_shrink_wrap_conditions): Likewise.
5676 * tree-cfg.c (verify_gimple_call): Likewise.
5677 (move_stmt_r): Likewise.
5678 (stmt_can_terminate_bb_p): Likewise.
5679 * tree-eh.c (lower_eh_constructs_2): Likewise.
5680 * tree-if-conv.c (if_convertible_stmt_p): Likewise.
5681 * tree-inline.c (remap_gimple_stmt): Likewise.
5682 (copy_bb): Likewise.
5683 (estimate_num_insns): Likewise.
5684 (fold_marked_statements): Likewise.
5685 * tree-sra.c (scan_function): Likewise.
5686 * tree-ssa-ccp.c (surely_varying_stmt_p): Likewise.
5687 (optimize_stack_restore): Likewise.
5688 (pass_fold_builtins::execute): Likewise.
5689 * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Likewise.
5690 (mark_all_reaching_defs_necessary_1): Likewise.
5691 * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Likewise.
5692 * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
5693 (pass_forwprop::execute): Likewise.
5694 * tree-ssa-loop-im.c (stmt_cost): Likewise.
5695 * tree-ssa-math-opts.c (pass_cse_reciprocals::execute): Likewise.
5696 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Likewise.
5697 * tree-ssa-strlen.c (get_string_length): Likewise.
5698 * tree-ssa-structalias.c (handle_lhs_call): Likewise.
5699 (find_func_aliases_for_call): Likewise.
5700 * tree-ssa-ter.c (find_replaceable_in_bb): Likewise.
5701 * tree-stdarg.c (optimize_va_list_gpr_fpr_size): Likewise.
5702 * tree-tailcall.c (find_tail_calls): Likewise.
5703 * tree.c (need_assembler_name_p): Likewise.
5704 (free_lang_data_in_decl): Likewise.
5705 (get_call_combined_fn): Likewise.
5706 * ubsan.c (is_ubsan_builtin_p): Likewise.
5707 * varasm.c (incorporeal_function_p): Likewise.
5708 * tree.h (DECL_BUILT_IN): Remove and replace with
5710 (DECL_BUILT_IN_P): Transfort to fndecl_built_in_p.
5711 (fndecl_built_in_p): New.
5713 2018-08-27 Martin Liska <mliska@suse.cz>
5715 PR tree-optimization/86847
5716 * tree-switch-conversion.c (switch_decision_tree::dump_case_nodes):
5717 Dump also subtree probability.
5718 (switch_decision_tree::do_jump_if_equal): New function.
5719 (switch_decision_tree::emit_case_nodes): Handle special
5720 situations in balanced tree that can be emitted much simpler.
5721 Fix calculation of probabilities that happen in tree expansion.
5722 * tree-switch-conversion.h (struct cluster): Add
5724 (struct simple_cluster): Likewise.
5725 (struct case_tree_node): Add new function has_child.
5726 (do_jump_if_equal): New.
5728 2018-08-27 Martin Liska <mliska@suse.cz>
5730 * tree-switch-conversion.c (bit_test_cluster::find_bit_tests):
5731 Add new argument to bit_test_cluster constructor.
5732 (bit_test_cluster::emit): Set bits really number of values
5734 (bit_test_cluster::hoist_edge_and_branch_if_true): Add
5735 probability argument.
5736 * tree-switch-conversion.h (struct bit_test_cluster):
5737 Add m_handles_entire_switch.
5739 2018-08-27 Martin Liska <mliska@suse.cz>
5741 PR tree-optimization/86702
5742 * tree-switch-conversion.c (jump_table_cluster::emit):
5743 Make probabilities even for values in jump table
5744 according to number of cases handled.
5745 (switch_decision_tree::compute_cases_per_edge): Pass
5746 argument to reset_out_edges_aux function.
5747 (switch_decision_tree::analyze_switch_statement): Likewise.
5748 * tree-switch-conversion.h (switch_decision_tree::reset_out_edges_aux):
5751 2018-08-27 Martin Liska <mliska@suse.cz>
5753 * cfgexpand.c (expand_asm_stmt): Use label_to_block and pass
5754 cfun argument explicitly.
5755 * gimple-pretty-print.c (dump_gimple_switch): Likewise.
5756 * hsa-gen.c (gen_hsa_insns_for_switch_stmt): Use new
5757 function gimple_switch_default_bb.
5758 (convert_switch_statements):
5760 * ipa-fnsummary.c (set_switch_stmt_execution_predicate):
5761 * stmt.c (label_to_block_fn): Use label_to_block and pass
5762 cfun argument explicitly and use gimple_switch_label_bb.
5763 (expand_case): Likewise.
5764 * tree-cfg.c (lower_phi_internal_fn): Use label_to_block and pass
5765 cfun argument explicitly. Likewise.
5766 (make_edges_bb): Likewise.
5767 (make_cond_expr_edges): Likewise.
5768 (get_cases_for_edge): Likewise.
5769 (make_gimple_switch_edges): Likewise.
5770 (label_to_block_fn): Likewise.
5771 (label_to_block): Likewise.
5772 (make_goto_expr_edges): Likewise.
5773 (make_gimple_asm_edges): Likewise.
5774 (main_block_label): Likewise.
5775 (group_case_labels_stmt): Likewise.
5776 (find_taken_edge_computed_goto): Likewise.
5777 (find_taken_edge_switch_expr): Likewise.
5778 (gimple_verify_flow_info): Likewise.
5779 (gimple_redirect_edge_and_branch): Likewise.
5780 (gimple_switch_label_bb): New function.
5781 (gimple_switch_default_bb): Likewise.
5782 (gimple_switch_edge): Likewise.
5783 (gimple_switch_default_edge): Likewise.
5784 * tree-cfg.h (label_to_block_fn): Remove and replace ...
5785 (label_to_block): ... with this.
5786 (gimple_switch_label_bb): New.
5787 (gimple_switch_default_bb): Likewise.
5788 (gimple_switch_edge): Likewise.
5789 (gimple_switch_default_edge): Likewise.
5790 * tree-cfgcleanup.c (convert_single_case_switch): Use
5791 new gimple functions and pass new argument to label_to_block.
5792 (cleanup_control_flow_bb):
5793 * tree-eh.c (make_eh_dispatch_edges): Use label_to_block and pass
5794 cfun argument explicitly.
5795 (make_eh_edges): Likewise.
5796 (redirect_eh_dispatch_edge): Likewise.
5797 (lower_resx): Likewise.
5798 (lower_eh_dispatch): Likewise.
5799 (maybe_remove_unreachable_handlers): Likewise.
5800 (unsplit_eh): Likewise.
5801 (cleanup_empty_eh): Likewise.
5802 (verify_eh_edges): Likewise.
5803 (verify_eh_dispatch_edge): Likewise.
5804 * tree-ssa-dom.c (record_edge_info): Likewise.
5805 * tree-ssa-forwprop.c (simplify_gimple_switch_label_vec): Likewise.
5806 * tree-ssa-threadedge.c (thread_around_empty_blocks): Likewise.
5807 (thread_through_normal_block): Likewise.
5808 * tree-ssa-uncprop.c (associate_equivalences_with_edges): Likewise.
5809 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds):
5810 * tree-switch-conversion.c (switch_conversion::collect): Use new
5812 (switch_conversion::check_final_bb): Likewise.
5813 (switch_conversion::gather_default_values): Pass new argument
5815 (switch_conversion::build_constructors): Likewise.
5816 (switch_decision_tree::compute_cases_per_edge): Use new
5817 gimple_switch_edge function.
5818 (switch_decision_tree::analyze_switch_statement): Pass new argument
5820 (switch_decision_tree::try_switch_expansion): Use
5821 gimple_switch_default_edge.
5822 * tree-vrp.c (find_switch_asserts): Pass new argument
5824 * vr-values.c (vr_values::vrp_visit_switch_stmt): Likewise.
5825 (vr_values::simplify_switch_using_ranges): Likewise.
5827 2018-08-27 Richard Biener <rguenther@suse.de>
5829 * cfganal.h (rev_post_order_and_mark_dfs_back_seme): Declare.
5830 * cfganal.c (rev_post_order_and_mark_dfs_back_seme): New function.
5832 * tree-ssa-sccvn.h (struct vn_pval): New structure.
5833 (struct vn_nary_op_s): Add unwind_to member. Add
5834 predicated_values flag and put result into a union together
5835 with a linked list of vn_pval.
5836 (struct vn_ssa_aux): Add name member to make maintaining
5837 a map of SSA name to vn_ssa_aux possible. Remove no longer
5838 needed info, dfsnum, low, visited, on_sccstack, use_processed
5839 and range_info_anti_range_p members.
5840 (run_scc_vn, vn_eliminate, free_scc_vn, vn_valueize): Remove.
5841 (do_rpo_vn, run_rpo_vn, eliminate_with_rpo_vn, free_rpo_vn):
5843 (vn_valueize): New global.
5844 (vn_context_bb): Likewise.
5845 (VN_INFO_RANGE_INFO, VN_INFO_ANTI_RANGE_P, VN_INFO_RANGE_TYPE,
5846 VN_INFO_PTR_INFO): Remove.
5847 * tree-ssa-sccvn.c: ... (rewrite)
5848 (pass_fre::execute): For -O2+ initialize loops and run
5849 RPO VN in optimistic mode (iterating). For -O1 and -Og
5850 run RPO VN in non-optimistic mode.
5851 * params.def (PARAM_SCCVN_MAX_SCC_SIZE): Remove.
5852 (PARAM_RPO_VN_MAX_LOOP_DEPTH): Add.
5853 * doc/invoke.texi (sccvn-max-scc-size): Remove.
5854 (rpo-vn-max-loop-depth): Document.
5855 * tree-ssa-alias.c (walk_non_aliased_vuses): Stop walking
5856 when valuezing the VUSE signals we walked out of the region.
5857 * tree-ssa-pre.c (phi_translate_1): Ignore predicated values.
5858 (phi_translate): Set VN context block to use for availability
5860 (compute_avail): Likewise.
5861 (pre_valueize): New function.
5862 (pass_pre::execute): Adjust to the RPO VN API.
5864 * tree-ssa-loop-ivcanon.c: Include tree-ssa-sccvn.h.
5865 (propagate_constants_for_unrolling): Remove.
5866 (tree_unroll_loops_completely): Perform value-numbering
5867 on the unrolled bodies loop parent.
5869 2018-08-27 Richard Biener <rguenther@suse.de>
5871 * tree-ssa-pre.c (compute_antic): Re-use inverted postorder
5872 for partial antic compute.
5874 2018-08-27 Jakub Jelinek <jakub@redhat.com>
5876 PR rtl-optimization/87065
5877 * combine.c (simplify_if_then_else): Formatting fix.
5878 (if_then_else_cond): Guard MULT optimization with SCALAR_INT_MODE_P
5880 (known_cond): Don't return const_true_rtx for vector modes. Use
5881 CONST0_RTX instead of const0_rtx. Formatting fixes.
5883 2018-08-27 Martin Liska <mliska@suse.cz>
5885 PR gcov-profile/87069
5886 * gcov.c (process_file): Record files already processed
5887 and warn about a file being processed multiple times.
5889 2018-08-27 Martin Liska <mliska@suse.cz>
5892 * config/aarch64/aarch64.c (aarch64_override_options_internal):
5893 Set default values for x_aarch64_*_string strings.
5894 * config/aarch64/aarch64.opt: Remove --{march,mcpu,mtune}==
5895 prefix. For -mabi do not print '=ABI' in help and use
5896 <option_value> format for -msve-vector-bits and -moverride
5899 2018-08-26 Jeff Law <law@redhat.com>
5901 * config/mips/frame-header-opt.c: Include "backend.h" rather than
5904 2018-08-26 Marek Polacek <polacek@redhat.com>
5906 PR c++/87029, Implement -Wredundant-move.
5907 * doc/invoke.texi: Document -Wredundant-move.
5909 2018-08-25 Martin Sebor <msebor@redhat.com>
5911 PR tree-optimization/87059
5912 * builtins.c (expand_builtin_strncmp): Convert MIN_EXPR operand
5913 to the same type as the other.
5914 * fold-const.c (fold_binary_loc): Assert expectation.
5916 2018-08-25 Iain Sandoe <iain@sandoe.co.uk>
5918 * config/darwin.c (machopic_legitimize_pic_address): Clean up
5919 extraneous parentheses, dead code section and formatting.
5921 2018-08-24 David Malcolm <dmalcolm@redhat.com>
5924 * diagnostic-show-locus.c (layout::layout): Ensure the margin is
5925 wide enough for jumps in the line-numbering to be visible.
5926 (layout::print_gap_in_line_numbering): New member function.
5927 (layout::calculate_line_spans): When using line numbering, merge
5928 line spans that are only 1 line apart.
5929 (diagnostic_show_locus): When printing line numbers, show gaps in
5930 line numbering directly, rather than printing headers.
5931 (selftest::test_diagnostic_show_locus_fixit_lines): Add test of
5932 line-numbering with multiple line spans.
5933 (selftest::test_fixit_insert_containing_newline_2): Add test of
5934 line-numbering, in which the spans are close enough to be merged.
5936 2018-08-24 Aldy Hernandez <aldyh@redhat.com>
5938 * gimple-ssa-evrp-analyze.c (set_ssa_range_info): Pass value_range
5939 to range_includes_zero_p. Do not special case VR_ANTI_RANGE.
5940 * tree-vrp.c (range_is_nonnull): Remove.
5941 (range_includes_zero_p): Accept value_range instead of min/max.
5942 (extract_range_from_binary_expr_1): Do not early bail on
5944 Use range_includes_zero_p instead of range_is_nonnull.
5945 (extract_range_from_unary_expr): Use range_includes_zero_p instead
5946 of range_is_nonnull.
5947 (vrp_meet_1): Pass value_range to range_includes_zero_p. Do not
5948 special case VR_ANTI_RANGE.
5949 (vrp_finalize): Same.
5950 * tree-vrp.h (range_includes_zero_p): Pass value_range as argument
5952 (range_is_nonnull): Remove.
5953 * vr-values.c (vrp_stmt_computes_nonzero): Use
5954 range_includes_zero_p instead of range_is_nonnull.
5955 (extract_range_basic): Pass value_range to range_includes_zero_p
5956 instead of range_is_nonnull.
5958 2018-08-24 Uros Bizjak <ubizjak@gmail.com>
5960 * emit-rtl.c (init_emit_once): Do not emit MODE_POINTER_BOUNDS RTXes.
5961 * emit-rtl.h (rtl_data): Remove return_bnd.
5962 * explow.c (trunc_int_for_mode): Do not handle POINTER_BOUNDS_MODE_P.
5963 * function.c (diddle_return_value): Do not handle crtl->return_bnd.
5964 * genmodes.c (complete_mode): Do not handle MODE_POINTER_BOUNDS.
5965 (POINTER_BOUNDS_MODE): Remove definition.
5966 (make_pointer_bounds_mode): Remove.
5967 (get_mode_class): Do not handle MODE_POINTER_BOUNDS.
5968 * machmode.h (POINTER_BOUNDS_MODE_P): Remove definition.
5969 (scalare_mode::includes_p): Do not handle MODE_POINTER_BOUNDS.
5970 * mode-classes.def: Do not define MODE_POINTER_BOUNDS.
5971 * stor-layout.c (int_mode_for_mode): Do not handle MODE_POINTER_BOUNDS.
5972 * tree-core.h (enum tree_index): Remove TI_POINTER_BOUNDS_TYPE.
5973 * varasm.c (output_constant_pool_2): Do not handle MODE_POINTER_BOUNDS.
5975 * config/i386/i386-modes.def (BND32, BND64): Remove.
5976 * config/i386/i386.c (dbx_register_map): Remove bound registers.
5977 (dbx64_register_map): Ditto.
5978 (svr4_dbx_register_map): Ditto.
5979 (indirect_thunk_bnd_needed): Remove.
5980 (indirect_thunks_bnd_used): Ditto.
5981 (indirect_return_bnd_needed): Ditto.
5982 (indirect_return_via_cx_bnd): Ditto.
5983 (enum indirect_thunk_prefix): Remove indirect_thunk_prefix_bnd.
5984 (indirect_thunk_name): Remove handling of indirect_thunk_prefix_bnd.
5985 (output_indirect_thunk): Ditto. Remove need_prefix argument.
5986 (output_indirect_thunk_function): Remove handling of
5987 indirect_return_bnd_needed, indirect_return_via_cx_bnd,
5988 indirect_thunk_bnd_needed and indirect_thunks_bnd_used variables.
5989 (ix86_save_reg): Remove handling of crtl->return_bnd.
5990 (ix86_legitimate_constant_p): Remove handling of POINTER_BOUNDS_MODE_P.
5991 (ix86_print_operand_address_as): Remove handling of UNSPEC_BNDMK_ADDR
5992 and UNSPEC_BNDLX_ADDR.
5993 (ix86_output_indirect_branch_via_reg): Remove handling of
5994 indirect_thunk_prefix_bnd.
5995 (ix86_output_indirect_branch_via_push): Ditto.
5996 (ix86_output_function_return): Ditto.
5997 (ix86_output_indirect_function_return): Ditto.
5998 (avoid_func_arg_motion): Do not handle UNSPEC_BNDSTX.
5999 * config/i386/i386.h (FIXED_REGISTERS): Remove bound registers.
6000 (CALL_USED_REGISTERS): Ditto.
6001 (REG_ALLOC_ORDER): Update for removal of bound registers.
6002 (HI_REGISTER_NAMES): Ditto.
6003 * config/i386/i386.md (UNSPEC_BNDMK, UNSPEC_BNDMK_ADDR, UNSPEC_BNDSTX)
6004 (UNSPEC_BNDLDX, UNSPEC_BNDLDX_ADDR, UNSPEC_BNDCL, UNSPEC_BNDCU)
6005 (UNSPEC_BNDCN, UNSPEC_MPX_FENCE): Remove.
6006 (BND0_REG, BND1_REG, BND2_REG, BND3_REG): Remove
6007 (FIRST_PSEUDO_REG): Update.
6008 (BND): Remove mode iterator.
6009 * config/i386/predicates.md (bnd_mem_operator): Remove.
6011 2018-08-24 Richard Sandiford <richard.sandiford@arm.com>
6013 * tree-vect-stmts.c (vectorizable_bswap): Handle variable-length
6016 2018-08-24 Richard Sandiford <richard.sandiford@arm.com>
6018 * tree-vect-slp.c (vect_transform_slp_perm_load): Separate out
6019 the case in which the permute needs only a single element and
6020 repeats for every vector of the result. Extend that case to
6021 handle variable-length vectors.
6022 * tree-vect-stmts.c (vectorizable_load): Update accordingly.
6024 2018-08-24 H.J. Lu <hongjiu.lu@intel.com>
6027 * dwarf2out.c (save_macinfo_strings): Call set_indirect_string
6028 on DW_MACINFO_start_file for -gsplit-dwarf -g3.
6030 2018-08-24 Richard Biener <rguenther@suse.de>
6032 * cfg.h (struct control_flow_graph): Add edge_flags_allocated and
6033 bb_flags_allocated members.
6034 (auto_flag): New RAII class for allocating flags.
6035 (auto_edge_flag): New RAII class for allocating edge flags.
6036 (auto_bb_flag): New RAII class for allocating bb flags.
6037 * cfgloop.c (verify_loop_structure): Allocate temporary edge
6039 * cfganal.c (dfs_enumerate_from): Remove use of visited sbitmap
6040 in favor of temporarily allocated BB flag.
6041 * hsa-brig.c: Re-order includes.
6042 * hsa-dump.c: Likewise.
6043 * hsa-regalloc.c: Likewise.
6044 * print-rtl.c: Likewise.
6045 * profile-count.c: Likewise.
6047 2018-08-24 Segher Boessenkool <segher@kernel.crashing.org>
6050 * config/rs6000/rs6000.c (toc_relative_expr_p): Check that the base is
6053 2018-08-24 Aldy Hernandez <aldyh@redhat.com>
6056 * wide-int-range.cc (wide_int_range_div): Do not ignore result
6057 from wide_int_range_multiplicative_op.
6059 2018-08-23 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
6061 * tree-vect-data-refs.c (vect_grouped_store_supported): Fix typo
6064 2018-08-23 Giuliano Belinassi <giuliano.belinassi@usp.br>
6066 * genmatch.c (parser::parse_operation): Fix typo 'exapnded'
6069 2018-08-23 Alexander Monakov <amonakov@ispras.ru>
6071 * tree-scalar-evolution.c (final_value_replacement_loop): Dump
6072 full GENERIC expression used for replacement.
6074 2018-08-23 Aldy Hernandez <aldyh@redhat.com>
6076 * tree-vrp.c (abs_extent_range): Remove.
6077 (extract_range_into_wide_ints): Pass wide ints by reference.
6078 (extract_range_from_binary_expr_1): Rewrite the *DIV_EXPR code.
6079 Pass wide ints by reference in all calls to
6080 extract_range_into_wide_ints.
6081 * wide-int-range.cc (wide_int_range_div): New.
6082 * wide-int-range.h (wide_int_range_div): New.
6083 (wide_int_range_includes_zero_p): New.
6084 (wide_int_range_zero_p): New.
6086 2018-08-23 Matthew Malcomson <matthew.malcomson@arm.com>
6088 * config/aarch64/aarch64.md (arches): New enum.
6089 (arch): New enum attr.
6090 (arch_enabled): New attr.
6091 (enabled): Now uses arch_enabled only.
6092 (simd, sve, fp16): Removed attribute.
6093 (fp): Attr now defined in terms of 'arch'.
6094 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64, *movti_aarch64,
6095 *movhf_aarch64, <optab><fcvt_target><GPF:mode>2,
6096 <FCVT_F2FIXED:fcvt_fixed_insn><GPF:mode>3,
6097 <FCVT_FIXED2F:fcvt_fixed_insn><GPI:mode>3): Merge 'fp' and 'simd'
6098 attributes into 'arch'.
6099 (*movsf_aarch64, *movdf_aarch64, *movtf_aarch64, *add<mode>3_aarch64,
6100 subdi3, neg<mode>2, <optab><mode>3, one_cmpl<mode>2,
6101 *<NLOGICAL:optab>_one_cmpl<mode>3, *xor_one_cmpl<mode>3,
6102 *aarch64_ashl_sisd_or_int_<mode>3, *aarch64_lshr_sisd_or_int_<mode>3,
6103 *aarch64_ashr_sisd_or_int_<mode>3, *aarch64_sisd_ushl): Convert use of
6104 'simd' attribute into 'arch'.
6105 (load_pair_sw_<SX:mode><SX2:mode>, load_pair_dw_<DX:mode><DX2:mode>,
6106 store_pair_sw_<SX:mode><SX2:mode>, store_pair_dw_<DX:mode><DX2:mode>):
6107 Convert use of 'fp' attribute to 'arch'.
6108 * config/aarch64/aarch64-simd.md (move_lo_quad_internal_<mode>,
6109 move_lo_quad_internal_<mode>): (different modes) Merge 'fp' and 'simd'
6111 (move_lo_quad_internal_be_<mode>, move_lo_quad_internal_be_<mode>):
6112 (different modes) Merge 'fp' and 'simd' into 'arch'.
6113 (*aarch64_combinez<mode>, *aarch64_combinez_be<mode>): Merge 'fp' and
6116 2018-08-23 Segher Boessenkool <segher@kernel.crashing.org>
6118 PR rtl-optimization/87026
6119 * expmed.c (canonicalize_comparison): If we can no longer create
6120 pseudoregisters, don't.
6122 2018-08-23 Richard Earnshaw <rearnsha@arm.com>
6125 * config/arm/arm-protos.h (arm_emit_speculation_barrier): New
6127 * config/arm/arm.c (speculation_barrier_libfunc): New static
6129 (arm_init_libfuncs): Initialize it.
6130 (arm_emit_speculation_barrier): New function.
6131 * config/arm/arm.md (speculation_barrier): Call
6132 arm_emit_speculation_barrier for architectures that do not have
6134 (speculation_barrier_insn): Only match on Armv7 or later.
6136 2018-08-23 Richard Biener <rguenther@suse.de>
6139 * tree-inline.c (copy_bb): Drop unused __builtin_va_arg_pack_len
6142 2018-08-23 Richard Sandiford <richard.sandiford@arm.com>
6144 * config/aarch64/aarch64.c (aarch64_evpc_sve_tbl): Fix handling
6145 of single-vector TBLs.
6146 (aarch64_vectorize_vec_perm_const): Set one_vector_p when only
6149 2018-08-23 Richard Sandiford <richard.sandiford@arm.com>
6152 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const_1): Fix
6153 aarch64_evpc_tbl guard.
6155 2018-08-22 Bernd Edlinger <bernd.edlinger@hotmail.de>
6157 * tree-ssa-dse.c (compute_trims): Avoid folding away undefined
6160 2018-08-22 Martin Sebor <msebor@redhat.com>
6163 * tree-pretty-print.c (pretty_print_string): Add argument.
6164 (dump_generic_node): Call to pretty_print_string with string size.
6166 2018-08-22 Segher Boessenkool <segher@kernel.crashing.org>
6168 PR rtl-optimization/86771
6169 * combine.c (try_combine): Do not allow splitting a resulting PARALLEL
6170 of two SETs into those two SETs, one to be placed at i2, if that SETs
6171 destination is modified between i2 and i3.
6173 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
6175 PR tree-optimization/86725
6176 * tree-vect-loop.c (vect_inner_phi_in_double_reduction_p): New
6178 (vect_analyze_scalar_cycles_1): Check it.
6180 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
6182 PR tree-optimization/86725
6183 * tree-vect-loop.c (vect_is_simple_reduction): When treating
6184 an outer loop phi as a double reduction, make sure that the
6185 single user of the phi result is an inner loop phi.
6187 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
6189 * tree-vect-data-refs.c (vect_analyze_group_access_1): Convert
6190 grouped stores with gaps to a strided group.
6192 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
6194 * tree-vect-stmts.c (get_group_load_store_type)
6195 (get_load_store_type): Only test STMT_VINFO_STRIDED_P for the
6196 first statement in a group.
6198 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
6200 * config/darwin.h (LINK_COMMAND_SPEC_A): Sync LTO options with
6201 the sequence used in gcc/gcc.c.
6203 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
6206 * gcc-ar.c (main): Don’t try to invoke the plug-in if we’re not
6209 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
6211 * config/darwin10.h (LINK_GCC_C_SEQUENCE_SPEC): Adjust to use the
6212 Darwin10-specific unwinder-shim.
6213 * config/darwin12.h (LINK_GCC_C_SEQUENCE_SPEC): Remove.
6214 * config/rs6000/darwin.h (DARWIN_CRT1_SPEC, DARWIN_DYLIB1_SPEC):
6215 New to cater for Darwin10 Rosetta.
6217 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
6219 * config/i386/i386.c (ix86_output_addr_diff_elt): Move the MACH-O
6220 specific test before the one for HAVE_AS_GOTOFF_IN_DATA.
6222 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
6227 * gcc/dwarf2out.c (FUNC_SECOND_SECT_LABEL): New.
6228 (dwarf2out_switch_text_section): Generate a local label for the
6229 second function sub-section and apply it as the second FDE start
6231 * gcc/final.c (final_scan_insn_1): Emit second FDE label after the
6232 second sub-section start.
6234 2018-08-22 Richard Biener <rguenther@suse.de>
6236 PR tree-optimization/86988
6237 * tree-vrp.c (vrp_prop::check_mem_ref): Bail out on VLAs.
6239 2018-08-22 Richard Biener <rguenther@suse.de>
6241 PR tree-optimization/86945
6242 * tree-cfg.c (generate_range_test): Use unsigned arithmetic.
6244 2018-08-22 Alexandre Oliva <oliva@adacore.com>
6246 * config/rs6000/rs6000.c (SMALL_DATA_RELOC, SMALL_DATA_REG): Add
6247 a comment about how uses of r2 for .sdata2 come about.
6249 2018-08-22 Alexandre Oliva <aoliva@redhat.com>
6251 * tree-ssa-reassoc.c (is_reassociable_op): Fix cut&pasto.
6253 2018-08-21 Marek Polacek <polacek@redhat.com>
6255 PR c++/86981, Implement -Wpessimizing-move.
6256 * doc/invoke.texi: Document -Wpessimizing-move.
6258 2018-08-21 Jan Hubicka <jh@suse.cz>
6260 * tree.c (find_decls_types_r): Do not check for redundant typedefs.
6261 * tree.h (is_redundant_typedef): Remove.
6262 * dwarf2out.c (is_redundant_typedef): Turn into static function.
6264 2018-08-21 Jan Hubicka <jh@suse.cz>
6266 * tree.c (free_lang_data_in_decl): Remove types from DECL_CONTEXT
6269 2018-08-21 Tamar Christina <tamar.christina@arm.com>
6271 * expmed.c (extract_low_bits): Reject invalid subregs early.
6273 2018-08-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
6276 * tree-ssa-strlen.c (adjust_last_stmt): Avoid folding away undefined
6279 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
6281 * config/vxworks.h: Guard vxworks_asm_out_constructor and
6282 vxworks_asm_out_destructor by !HAVE_INITFINI_ARRAY_SUPPORT
6283 * config/vxworks.c: Likewise.
6285 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
6287 * config/vxworks.c: Set targetm.have_ctors_dtors
6288 if HAVE_INITFINI_ARRAY_SUPPORT.
6289 * config/vxworks.h: Set SUPPORTS_INIT_PRIORITY
6290 if HAVE_INITFINI_ARRAY_SUPPORT.
6292 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
6294 * config/vxworks.h: Add $(WIND_BASE)/target/h/wrn/coreip to
6295 default search path for VxWorks < 7.
6297 2018-08-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
6299 * gimple-ssa-sprintf.c (decl_constant_value): Remove.
6300 (get_format_string): Refer to c_getstr.
6302 2018-08-21 Tom de Vries <tdevries@suse.de>
6304 * cgraph.h (debuginfo_early_init, debuginfo_init, debuginfo_fini)
6305 (debuginfo_start, debuginfo_stop, debuginfo_early_start)
6306 (debuginfo_early_stop): Declare.
6307 * cgraphunit.c (debuginfo_early_init, debuginfo_init, debuginfo_fini)
6308 (debuginfo_start, debuginfo_stop, debuginfo_early_start)
6309 (debuginfo_early_stop): New function.
6310 (symbol_table::finalize_compilation_unit): Call debuginfo_early_start
6311 and debuginfo_early_stop.
6312 * dwarf2out.c (dwarf2out_finish, dwarf2out_early_finish): Dump dwarf.
6313 * toplev.c (compile_file): Call debuginfo_start and debuginfo_stop.
6314 (general_init): Call debuginfo_early_init.
6315 (finalize): Call debuginfo_fini.
6316 (do_compile): Call debuginfo_init.
6317 * doc/invoke.texi (@gccoptlist): Add -fdump-debug and
6319 (@item -fdump-debug, @item -fdump-earlydebug): Add.
6321 2018-08-21 Tom de Vries <tdevries@suse.de>
6323 * dwarf2out.c (print_dw_val, print_loc_descr, print_die): Handle
6324 flag_dump_noaddr and flag_dump_unnumbered.
6326 2018-08-21 Aldy Hernandez <aldyh@redhat.com>
6328 * wide-int-range.cc (wide_int_range_abs): New.
6329 (wide_int_range_order_set): Rename from wide_int_range_min_max.
6330 * wide-int-range.h (wide_int_range_abs): New.
6331 (wide_int_range_min_max): New.
6332 * tree-vrp.c (extract_range_from_unary_expr): Rewrite ABS_EXPR
6333 case to call wide_int_range_abs.
6334 Rewrite MIN/MAX_EXPR to call wide_int_range_min_max.
6335 (extract_range_from_abs_expr): Delete.
6337 2018-08-20 Michael Meissner <meissner@linux.ibm.com>
6340 * config/rs6000/rs6000.md (extendsi<mode>2): Change constraints
6341 from 'Y' to 'YZ' to enable the LWAX instruction to be generated
6344 2018-08-20 Nathan Sidwell <nathan@acm.org>
6345 Jeff Law <law@redhat.com>
6347 * config/s390/s390-c (s390_macro_to_expand): Use cpp_macro_p.
6348 * config/spu/spu-c.c (spu_macro_to_expand): Likewise.
6350 2018-08-20 David Malcolm <dmalcolm@redhat.com>
6353 * attribs.c (diag_attr_exclusions): Add auto_diagnostic_group instance.
6354 (decl_attributes): Likewise.
6355 * calls.c (maybe_warn_nonstring_arg): Add auto_diagnostic_group
6357 * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
6358 * diagnostic-core.h (class auto_diagnostic_group): New class.
6359 * diagnostic.c (diagnostic_initialize): Initialize the new fields.
6360 (diagnostic_report_diagnostic): Handle the first diagnostics within
6362 (emit_diagnostic): Add auto_diagnostic_group instance.
6364 (inform_n): Likewise.
6365 (warning): Likewise.
6366 (warning_at): Likewise.
6367 (warning_n): Likewise.
6368 (pedwarn): Likewise.
6369 (permerror): Likewise.
6371 (error_n): Likewise.
6372 (error_at): Likewise.
6374 (fatal_error): Likewise.
6375 (internal_error): Likewise.
6376 (internal_error_no_backtrace): Likewise.
6377 (auto_diagnostic_group::auto_diagnostic_group): New ctor.
6378 (auto_diagnostic_group::~auto_diagnostic_group): New dtor.
6379 * diagnostic.h (struct diagnostic_context): Add fields
6380 "diagnostic_group_nesting_depth",
6381 "diagnostic_group_emission_count", "begin_group_cb",
6383 * gimple-ssa-isolate-paths.c (find_implicit_erroneous_behavior):
6384 Add auto_diagnostic_group instance(s).
6385 (find_explicit_erroneous_behavior): Likewise.
6386 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Likewise.
6387 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Likewise.
6388 * gimplify.c (warn_implicit_fallthrough_r): Likewise.
6389 (gimplify_va_arg_expr): Likewise.
6390 * hsa-gen.c (HSA_SORRY_ATV): Likewise.
6391 (HSA_SORRY_AT): Likewise.
6392 * ipa-devirt.c (compare_virtual_tables): Likewise.
6393 (warn_odr): Likewise.
6394 * multiple_target.c (expand_target_clones): Likewise.
6395 * opts-common.c (cmdline_handle_error): Likewise.
6396 * reginfo.c (globalize_reg): Likewise.
6397 * substring-locations.c (format_warning_n_va): Likewise.
6398 * tree-inline.c (expand_call_inline): Likewise.
6399 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Likewise.
6400 * tree-ssa-loop-niter.c
6401 (do_warn_aggressive_loop_optimizations): Likewise.
6402 * tree-ssa-uninit.c (warn_uninit): Likewise.
6403 * tree.c (warn_deprecated_use): Likewise.
6405 2018-08-20 H.J. Lu <hongjiu.lu@intel.com>
6408 * config/i386/i386.md (eh_return): Always update EH return
6409 address in word_mode.
6411 2018-08-20 Chung-Lin Tang <cltang@codesourcery.com>
6413 * targhooks.c (std_gimplify_va_arg_expr): Properly handle case of when
6414 TARGET_SPLIT_COMPLEX_ARG is defined.
6416 2018-08-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
6418 * expr.c (store_field): Change gcc_assert to gcc_checking_assert.
6420 2018-08-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
6423 * expr.c (expand_assignment): Assert that bitpos is positive.
6424 (store_field): Likewise
6425 (expand_expr_real_1): Make sure that bitpos is positive.
6426 * config/alpha/alpha.h (CONSTANT_ADDRESS_P): Avoid signed
6429 2018-08-20 Nathan Sidwell <nathan@acm.org>
6431 * Makefile.in (CPP_ID_DATA_H): Delete.
6432 (CPP_INTERNAL_H): Don't add it.
6433 (GTFILES): Replace CPP_ID_DATA_H with CPPLIB_H.
6434 * gengtype.c (open_base_files): Replace cpp-id-data.h with cpplib.h
6436 2018-08-20 Richard Biener <rguenther@suse.de>
6438 PR tree-optimization/78655
6439 * tree-vrp.c (extract_range_from_binary_expr_1): Make
6440 pointer + offset nonnull if either operand is nonnull work.
6442 2018-08-20 Tom de Vries <tdevries@suse.de>
6444 * dwarf2out.c (add_scalar_info): Don't add reference to existing die
6445 unless the referenced die describes the added property using
6446 DW_AT_location or DW_AT_const_value. Fall back to exprloc case.
6447 Otherwise, add a DW_AT_location to the referenced die.
6449 2018-08-19 Uros Bizjak <ubizjak@gmail.com>
6452 * config/i386/i386.c (ix86_rtx_costs) [case SET]: Check source for
6453 register_operand when calling ix86_set_reg_reg_cost.
6454 [case CONST_INT, case CONST, case LABEL_REF, case SYMBOL_REF]:
6455 Set *total to 0 for operands that satisfy x86_64_immediate_operand
6456 predicate and to 1 otherwise.
6458 2018-08-18 Iain Sandoe <iain@sandoe.co.uk>
6460 * config/darwin.c (darwin_override_options): If -gsplit-dwarf is set,
6461 emit a diagnostic that it is not supported and reset the option.
6462 * config/darwin.h (DRIVER_SELF_SPECS): Note that gsplit-dwarf is not
6463 supported and consume the option. (ASM_FINAL_SPEC): New.
6465 2018-08-17 Segher Boessenkool <segher@kernel.crashing.org>
6467 * doc/md.texi (Patterns): Use @ref instead of @xref in the middle of
6470 2018-08-17 Sandra Loosemore <sandra@codesourcery.com>
6472 C-SKY port: Documentation
6474 * doc/extend.texi (C-SKY Function Attributes): New section.
6475 * doc/invoke.texi (Option Summary): Add C-SKY options.
6476 (C-SKY Options): New section.
6477 * doc/md.texi (Machine Constraints): Document C-SKY constraints.
6479 2018-08-17 Jojo <jijie_rong@c-sky.com>
6480 Huibin Wang <huibin_wang@c-sky.com>
6481 Sandra Loosemore <sandra@codesourcery.com>
6482 Chung-Lin Tang <cltang@codesourcery.com>
6484 C-SKY port: Backend implementation
6486 * config/csky/*: New.
6487 * common/config/csky/*: New.
6489 2018-08-17 Jojo <jijie_rong@c-sky.com>
6490 Huibin Wang <huibin_wang@c-sky.com>
6491 Sandra Loosemore <sandra@codesourcery.com>
6492 Chung-Lin Tang <cltang@codesourcery.com>
6493 Andrew Jenner <andrew@codesourcery.com>
6495 C-SKY port: Configury
6497 * config.gcc (csky-*-*): New.
6498 * configure.ac: Add csky to targets for dwarf2 debug_line support.
6499 * configure: Regenerated.
6501 2018-08-17 David Malcolm <dmalcolm@redhat.com>
6503 * dump-context.h: Include "dumpfile.h".
6504 (dump_context::dump_printf_va): Convert final param from va_list
6505 to va_list *. Convert from ATTRIBUTE_PRINTF to
6506 ATTRIBUTE_GCC_DUMP_PRINTF.
6507 (dump_context::dump_printf_loc_va): Likewise.
6508 * dumpfile.c: Include "stringpool.h".
6509 (make_item_for_dump_printf_va): Delete.
6510 (make_item_for_dump_printf): Delete.
6511 (class dump_pretty_printer): New class.
6512 (dump_pretty_printer::dump_pretty_printer): New ctor.
6513 (dump_pretty_printer::emit_items): New member function.
6514 (dump_pretty_printer::emit_any_pending_textual_chunks): New member
6516 (dump_pretty_printer::emit_item): New member function.
6517 (dump_pretty_printer::stash_item): New member function.
6518 (dump_pretty_printer::format_decoder_cb): New member function.
6519 (dump_pretty_printer::decode_format): New member function.
6520 (dump_context::dump_printf_va): Reimplement in terms of
6521 dump_pretty_printer.
6522 (dump_context::dump_printf_loc_va): Convert final param from va_list
6524 (dump_context::begin_scope): Reimplement call to
6525 make_item_for_dump_printf.
6526 (dump_printf): Update for change to dump_printf_va.
6527 (dump_printf_loc): Likewise.
6528 (selftest::test_capture_of_dump_calls): Convert "stmt" from
6529 greturn * to gimple *. Add a test_decl. Add tests of dump_printf
6530 with %T, %E, and %G.
6531 * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): New macro.
6532 (dump_printf): Replace ATTRIBUTE_PRINTF_2 with
6533 ATTRIBUTE_GCC_DUMP_PRINTF (2, 3).
6534 (dump_printf_loc): Replace ATTRIBUTE_PRINTF_3 with
6535 ATTRIBUTE_GCC_DUMP_PRINTF (3, 0).
6536 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Convert
6537 use of HOST_WIDE_INT_PRINT_DEC on unsigned HOST_WIDE_INT "count"
6538 within a dump_printf_loc call to "%wu".
6539 (vector_alignment_reachable_p): Merge two dump_printf[_loc] calls,
6540 converting a use of HOST_WIDE_INT_PRINT_DEC to "%wd". Add a
6541 missing space after "=".
6542 * tree-vect-loop.c (vect_analyze_loop_2) Within a dump_printf
6543 call, convert use of HOST_WIDE_INT_PRINT_DEC to "%wd".
6544 * tree-vect-slp.c (vect_slp_bb): Within a dump_printf_loc call,
6545 convert use of HOST_WIDE_INT_PRINT_UNSIGNED to "%wu".
6546 * tree-vectorizer.c (try_vectorize_loop_1): Likewise. Remove
6547 duplicate "vectorized" from message.
6549 2018-08-17 Szabolcs Nagy <szabolcs.nagy@arm.com>
6551 * config/arm/arm-builtins.c (arm_init_simd_builtin_types): Clear
6552 polyNxK_t element's TYPE_STRING_FLAG.
6554 2018-08-17 Segher Boessenkool <segher@kernel.crashing.org>
6556 * config/rs6000/rs6000.md (*cbranch, *creturn): Name these patterns
6557 (they were unnamed before). Fix comments.
6559 2018-08-17 Nathan Sidwell <nathan@acm.org>
6561 * cppbuiltin.c: Include "cpplib.h", not "cpp-id-data.h".
6563 2018-08-17 Richard Biener <rguenther@suse.de>
6565 PR tree-optimization/86841
6566 * wide-int-range.cc (wide_int_range_lshift): Use to_uhwi.
6568 2018-08-17 Martin Liska <mliska@suse.cz>
6570 * common.opt: Remove Warn, Init and Report for options with
6571 Ignore/Deprecated flag. Warning is done automatically for
6573 * config/i386/i386.opt: Likewise.
6574 * config/ia64/ia64.opt: Likewise.
6575 * config/rs6000/rs6000.opt: Likewise.
6576 * cppbuiltin.c (define_builtin_macros_for_compilation_flags):
6577 Remove usage of flag_check_pointer_bounds.
6578 * lto-wrapper.c (merge_and_complain): Do not handle
6579 OPT_fcheck_pointer_bounds.
6580 (append_compiler_options): Likewise.
6581 * opt-functions.awk: Do not handle Deprecated.
6582 * optc-gen.awk: Check that Var, Report and Init are not
6583 used for an option with Ignore/Deprecated flag.
6584 * opts-common.c (decode_cmdline_option): Do not report
6586 (read_cmdline_option): Report warning for OPT_SPECIAL_deprecated
6588 * opts.h (struct cl_option): Remove cl_deprecated flag.
6589 (CL_ERR_DEPRECATED): Remove error enum value.
6591 2018-08-17 Richard Biener <rguenther@suse.de>
6594 * tree-inline.c (copy_bb): When inlining __builtin_va_arg_pack_len ()
6595 across a va-arg-pack using call adjust its return value accordingly.
6597 2018-08-16 Martin Sebor <msebor@redhat.com>
6599 PR tree-optimization/86853
6600 * gimple-ssa-sprintf.c (struct format_result): Rename member.
6601 (struct fmtresult): Add member and initialize it in ctors.
6602 (format_character): Handle %C. Extend range to NUL. Set MAYFAIL.
6603 (format_string): Handle %S the same as %ls. Set MAYFAIL.
6604 (format_directive): Set POSUNDER4K when MAYFAIL is set.
6605 (parse_directive): Handle %C same as %c.
6606 (sprintf_dom_walker::compute_format_length): Adjust.
6607 (is_call_safe): Adjust.
6609 2018-08-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
6611 * builtins.c (c_strlen): Add new parameter eltsize. Use it
6612 for determining how to count the elements.
6613 * builtins.h (c_strlen): Adjust prototype.
6614 * expr.c (string_constant): Add new parameter mem_size.
6615 Set *mem_size appropriately.
6616 * expr.h (string_constant): Adjust protoype.
6617 * gimple-fold.c (get_range_strlen): Add new parameter eltsize.
6618 * gimple-fold.h (get_range_strlen): Adjust prototype.
6619 * gimple-ssa-sprintf.c (get_string_length): Add new parameter eltsize.
6620 (format_string): Call get_string_length with eltsize.
6622 2018-08-16 David Malcolm <dmalcolm@redhat.com>
6624 * diagnostic.c (default_diagnostic_start_span_fn): Call pp_string
6625 to emit the span, rather than setting it as the prefix.
6627 2018-08-16 David Malcolm <dmalcolm@redhat.com>
6629 * diagnostic-show-locus.c (layout::start_annotation_line): Add
6630 "margin_char" parameter, defaulting to space. Use it in place
6631 of pp_space for the initial part of the margin.
6632 (layout::print_leading_fixits): Use '+' when filling the margin
6633 of line-insertion fix-it hints.
6635 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
6637 * config/rs6000/rs6000.md (two unnamed define_insn and define_split):
6640 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
6642 * config/rs6000/altivec.md: Don't set length attribute to the default
6644 * config/rs6000/darwin.md: Ditto.
6645 * config/rs6000/dfp.md: Ditto.
6646 * config/rs6000/htm.md: Ditto.
6647 * config/rs6000/rs6000.md: Ditto.
6648 * config/rs6000/sync.md: Ditto.
6649 * config/rs6000/vsx.md: Ditto.
6651 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
6653 * config/rs6000/altivec.md: Don't set length attribute to the default
6654 value, for branch instructions.
6655 * config/rs6000/darwin.md: Ditto.
6656 * config/rs6000/rs6000.md: Ditto.
6658 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
6660 * config/rs6000/rs6000.md (length): Always define as const_int 4.
6661 (unnamed conditional branch define_insn): Set length to 4 or 8
6662 depending on offset.
6663 (<bd>_<mode>): Similar, for alternative 0.
6664 (<bd>tf_<mode>): Ditto.
6666 2018-08-16 Tamar Christina <tamar.christina@arm.com>
6668 * expr.c (copy_blkmode_to_reg): Perform larger copies when safe.
6670 2018-08-16 Matthew Malcomson <matthew.malcomson@arm.com>
6672 * doc/rtl.texi: Replace old RTX class names with new names.
6675 2018-08-16 Vlad Lazar <vlad.lazar@arm.com>
6677 * expmed.h (canonicalize_comparison): New declaration.
6678 * expmed.c (canonicalize_comparison, equivalent_cmp_code): New function.
6679 * expmed.c (emit_store_flag_1): Add call to canonicalize_comparison.
6680 * optabs.c (prepare_cmp_insn): Likewise.
6681 * rtl.h (unsigned_condition_p): New function which checks if a
6682 comparison operator is unsigned.
6684 2018-08-16 Nathan Sidwell <nathan@acm.org>
6686 * config/rs6000/rs6000-c.c (rs6000_macro_to_expend): Use cpp_macro_p.
6687 * config/powerpcspc/powerpcspe-c.c (rs6000_macro_to_expend): Likewise.
6689 2018-08-16 Tamar Christina <tamar.christina@arm.com>
6692 * config/arm/arm.c (arm_can_change_mode_class): Disallow subreg.
6693 * config/arm/neon.md (movv4hf, movv8hf): Refactored to..
6694 (mov<mov>): ..this and enable unconditionally.
6696 2018-08-16 Tamar Christina <tamar.christina@arm.com>
6698 * config/arm/neon.md (*neon_mov<mode>): Remove reg-to-reg alternative.
6700 2018-08-16 Sam Tebbs <sam.tebbs@arm.com>
6702 * config/aarch64/aarch64.opt (mlow-precision-recip-sqrt)
6703 (mlow-precision-sqrt, mlow-precision-div, mverbose-cost-dump): Replace
6704 "Common" with "Target".
6706 2018-08-15 Uros Bizjak <ubizjak@gmail.com>
6708 * config/i386/i386.opt (mmitigate-rop): Mark as deprecated.
6709 * doc/invoke.texi (mmitigate-rop): Remove.
6710 * config/i386/i386.c: Do not include "regrename.h".
6711 (ix86_rop_should_change_byte_p, reg_encoded_number)
6712 (ix86_get_modrm_for_rop, set_rop_modrm_reg_bits, ix86_mitigate_rop):
6714 (ix86_reorg): Remove call to ix86_mitigate_rop.
6715 * config/i386/i386.md (attr "modrm_class"): Remove.
6716 (cmp<mode>_ccno_1, mov<mode>_xor, movstrict<mode>_xor)
6717 (x86_mov<mode>cc_0_m1. x86_mov<mode>cc_0_m1_se)
6718 (x86_mov<mode>cc_0_m1_neg): Remove modrm_class attribute override.
6720 2018-08-15 Will Schmidt <will_schmidt@vnet.ibm.com>
6722 * config/rs6000/rs600.c (rs6000_gimple_fold_builtin): Add entries to
6723 allow folding of mergeh() and mergel() for the float and double types.
6724 (fold_mergehl_helper): Rework to handle building a permute tree
6727 2018-08-15 Uros Bizjak <ubizjak@gmail.com>
6729 * config/i386/i386.c (expand_vec_perm_movs): Enable V4SFmode
6732 2018-08-15 David Malcolm <dmalcolm@redhat.com>
6734 * common.opt (fdiagnostics-show-labels): New option.
6735 * diagnostic-show-locus.c (class layout_range): Add field
6737 (class layout): Add field "m_show_labels_p".
6738 (layout_range::layout_range): Add param "label" and use it to
6740 (make_range): Pass in NULL for new "label" param of layout_range's
6742 (layout::layout): Initialize m_show_labels_p.
6743 (layout::maybe_add_location_range): Pass in loc_range->m_label
6744 when constructing layout_range instances.
6745 (struct line_label): New struct.
6746 (layout::print_any_labels): New member function.
6747 (layout::print_line): Call it if label-printing is enabled.
6748 (selftest::test_one_liner_labels): New test.
6749 (selftest::test_diagnostic_show_locus_one_liner): Call it.
6750 * diagnostic.c (diagnostic_initialize): Initialize
6751 context->show_labels_p.
6752 * diagnostic.h (struct diagnostic_context): Add field
6754 * doc/invoke.texi (Diagnostic Message Formatting Options): Add
6755 -fno-diagnostics-show-labels.
6756 * dwarf2out.c (gen_producer_string): Add
6757 OPT_fdiagnostics_show_labels to the ignored options.
6758 * gcc-rich-location.c (gcc_rich_location::add_expr): Add "label"
6760 (gcc_rich_location::maybe_add_expr): Likewise.
6761 * gcc-rich-location.h (gcc_rich_location::gcc_rich_location): Add
6762 label" param, defaulting to NULL.
6763 (gcc_rich_location::add_expr): Add "label" param.
6764 (gcc_rich_location::maybe_add_expr): Likewise.
6765 (class text_range_label): New class.
6766 (class range_label_for_type_mismatch): New class.
6767 * gimple-ssa-sprintf.c (fmtwarn): Pass NULL for new label params
6768 of format_warning_va.
6769 (fmtwarn_n): Likewise for new params of format_warning_n_va.
6770 * lto-wrapper.c (merge_and_complain): Add
6771 OPT_fdiagnostics_show_labels to the "pick one setting" options.
6772 (append_compiler_options): Likewise to the dropped options.
6773 (append_diag_options): Likewise to the passed-on options.
6774 * opts.c (common_handle_option): Handle the new option.
6775 * selftest-diagnostic.c
6776 (test_diagnostic_context::test_diagnostic_context): Enable
6778 * substring-locations.c: Include "gcc-rich-location.h".
6779 (format_warning_n_va): Add "fmt_label" and "param_label" params
6780 and use them as appropriate.
6781 (format_warning_va): Add "fmt_label" and "param_label" params,
6782 passing them on to format_warning_n_va.
6783 (format_warning_at_substring): Likewise.
6784 (format_warning_at_substring_n): Likewise.
6785 * substring-locations.h (format_warning_va): Add "fmt_label" and
6786 "param_label" params.
6787 (format_warning_n_va): Likewise.
6788 (format_warning_at_substring): Likewise.
6789 (format_warning_at_substring_n): Likewise.
6790 * toplev.c (general_init): Initialize global_dc->show_labels_p.
6792 2018-08-15 Qing Zhao <qing.zhao@oracle.com>
6795 * builtins.c (expand_builtin_memcmp): Do not expand the call
6796 when overflow is detected.
6798 2018-08-15 Martin Sebor <msebor@redhat.com>
6800 PR tree-optimization/71625
6801 * config/aarch64/aarch64-builtins.c
6802 (aarch64_init_simd_builtin_types): Clear Poly8_t's TYPE_STRING_FLAG.
6804 2018-08-15 Ilya Leoshkevich <iii@linux.ibm.com>
6806 * config/s390/s390.c (s390_reorg): Remove loop.
6808 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
6811 (darwin_function_switched_text_sections): Delete.
6812 * gcc/config/darwin.h
6813 (TARGET_ASM_FUNCTION_SWITCHED_TEXT_SECTIONS): Likewise.
6815 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
6818 * config/darwin.h: (DEBUG_STR_OFFSETS_SECTION, DEBUG_LOCLISTS_SECTION,
6819 DEBUG_RNGLISTS_SECTION) new macros. (DEBUG_PUBNAMES_SECTION,
6820 DEBUG_PUBTYPES_SECTION) update to include GNU variant.
6822 2018-08-15 Martin Liska <mliska@suse.cz>
6824 PR tree-optimization/86925
6825 * predict.c (expr_expected_value_1): When taking
6826 later predictor, assign also probability.
6827 Use fold_build2_initializer_loc in order to fold
6828 the expression in -frounding-math.
6830 2018-08-14 Allan Sandfeld Jensen <allan.jensen@qt.io>
6832 * config/i386/i386.c (expand_vec_perm_movs): New method matching movs
6834 (expand_vec_perm_1): Try the new method.
6836 2018-08-14 Ilya Leoshkevich <iii@linux.ibm.com>
6839 * lra-lives.c (remove_some_program_points_and_update_live_ranges):
6840 Check whether lra_live_max_point is 0 before dividing.
6842 2018-08-14 Martin Sebor <msebor@redhat.com>
6844 PR tree-optimization/86650
6845 * tree-vrp.c (vrp_prop::check_array_ref): Print an inform message.
6846 (vrp_prop::check_mem_ref): Same.
6848 2018-08-13 Liu Hao <lh_mouse@126.com>
6850 * pretty-print.c (eat_esc_sequence): Swap the foreground and
6851 background colors if the COMMON_LVB_REVERSE_VIDEO flag is set,
6852 and clear it thereafter, as it only works for DBCS.
6854 2018-08-13 Liu Hao <lh_mouse@126.com>
6856 * pretty-print.c (mingw_ansi_fputs): Do not call _close() on the
6857 handle returned by _get_osf_handle().
6859 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
6861 * gcc/config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support
6862 for folding vec_perm.
6864 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
6866 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin):
6867 Add support for gimple-folding of vec_pack() and vec_unpack()
6870 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
6872 * config/rs6000/rs6000.c (rs6000_builtin_valid_without_lhs): Add
6873 vec_xst variants to the list.
6874 (rs6000_gimple_fold_builtin): Add support for folding unaligned
6875 vector loads and stores.
6877 2018-08-13 David Edelsohn <dje.gcc@gmail.com>
6879 * config.gcc (rs6000-ibm-aix4.x): Delete.
6880 (rs6000-ibm-aix5.1): Delete.
6881 (rs6000-ibm-aix5.2): Delete.
6882 (rs6000-ibm-aix5.3): Delete.
6883 * config/rs6000/aix43.h: Delete.
6884 * config/rs6000/aix51.h: Delete.
6885 * config/rs6000/aix52.h: Delete.
6886 * config/rs6000/t-aix43: Delete.
6888 2018-08-13 Ilya Leoshkevich <iii@linux.ibm.com>
6890 * config/s390/s390.c (s390_decompose_constant_pool_ref):
6892 (s390_decompose_address): Factor out constant pool ref
6895 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
6897 * config/nds32/nds32-predicates.c
6898 (nds32_can_use_bclr_p): Change return type as bool.
6899 (nds32_can_use_bset_p): Ditto.
6900 (nds32_can_use_btgl_p): Ditto.
6901 (nds32_can_use_bitci_p): Ditto.
6902 * config/nds32/nds32-protos.h
6903 (nds32_can_use_bclr_p): Change declaration.
6904 (nds32_can_use_bset_p): Ditto.
6905 (nds32_can_use_btgl_p): Ditto.
6906 (nds32_can_use_bitci_p): Ditto.
6908 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
6910 * config/nds32/nds32.c (nds32_expand_prologue, nds32_expand_epilogue):
6911 Support -msched-prolog-epilog option.
6912 * config/nds32/nds32.opt (msched-prolog-epilog): New option.
6914 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
6916 * common/config/nds32/nds32-common.c
6917 (nds32_option_optimization_table): Enalbe -malways-align.
6919 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
6921 * config.gcc (nds32*): Add nds32_isr.h and nds32_init.inc in
6923 * common/config/nds32/nds32-common.c (nds32_handle_option): Handle
6924 OPT_misr_secure_ case.
6925 * config/nds32/nds32-isr.c: Implementation of backward compatibility.
6926 * config/nds32/nds32-protos.h (nds32_isr_function_critical_p): New.
6927 * config/nds32/nds32.c (nds32_attribute_table): Add critical and
6929 * config/nds32/nds32.h (nds32_isr_nested_type): Add NDS32_CRITICAL.
6930 (nds32_isr_info): New field security_level.
6931 (TARGET_ISR_VECTOR_SIZE_4_BYTE): New macro.
6932 * config/nds32/nds32.md (return_internal): Consider critical attribute.
6933 * config/nds32/nds32.opt (misr-secure): New option.
6934 * config/nds32/nds32_init.inc: New file.
6935 * config/nds32/nds32_isr.h: New file.
6937 2018-08-11 John David Anglin <danglin@gcc.gnu.org>
6939 * config/pa/pa.md (UNSPEC_MEMORY_BARRIER): New unspec enum.
6940 Update comment for atomic instructions.
6941 (atomic_storeqi, atomic_storehi, atomic_storesi, atomic_storesf,
6942 atomic_loaddf, atomic_loaddf_1, atomic_storedf, atomic_storedf_1):
6944 (atomic_loaddi): Revise fence expansion to only emit fence prior to
6945 load for __ATOMIC_SEQ_CST model.
6946 (atomic_loaddi_1): Remove float register target.
6947 (atomic_storedi): Handle CONST_INT values.
6948 (atomic_storedi_1): Remove float register source. Add special case
6950 (memory_barrier): New expander and insn.
6952 2018-08-11 Jakub Jelinek <jakub@redhat.com>
6954 PR tree-optimization/86835
6955 * tree-ssa-math-opts.c (insert_reciprocals): Even when inserting
6956 new_stmt after def_gsi, make sure to insert new_square_stmt after
6957 that stmt, not 2 stmts before it.
6959 2018-08-10 Alexander Monakov <amonakov@ispras.ru>
6962 * config/i386/i386.md (<s>mul<mode>3_highpart): Use DWIH mode iterator
6965 2018-08-10 Martin Liska <mliska@suse.cz>
6968 * builtin-types.def (BT_FN_LONG_LONG_LONG_DOUBLE): Add new
6970 * builtins.c (expand_builtin_expect_with_probability):
6972 (expand_builtin_expect_with_probability): New function.
6973 (build_builtin_expect_predicate): Add new argumnet probability
6974 for BUILT_IN_EXPECT_WITH_PROBABILITY.
6975 (fold_builtin_expect):
6978 * builtins.def (BUILT_IN_EXPECT_WITH_PROBABILITY):
6979 * builtins.h (fold_builtin_expect): Set new argument.
6980 * doc/extend.texi: Document __builtin_expect_with_probability.
6981 * doc/invoke.texi: Likewise.
6982 * gimple-fold.c (gimple_fold_call): Pass new argument.
6983 * ipa-fnsummary.c (find_foldable_builtin_expect): Handle
6984 also BUILT_IN_EXPECT_WITH_PROBABILITY.
6985 * predict.c (get_predictor_value): New function.
6986 (expr_expected_value): Add new argument probability. Assume
6987 that predictor and probability are always non-null.
6988 (expr_expected_value_1): Likewise. For __builtin_expect and
6989 __builtin_expect_with_probability set probability. Handle
6990 combination in binary expressions.
6991 (tree_predict_by_opcode): Simplify code by simply calling
6992 get_predictor_value.
6993 (pass_strip_predict_hints::execute): Add handling of
6994 BUILT_IN_EXPECT_WITH_PROBABILITY.
6995 * predict.def (PRED_BUILTIN_EXPECT_WITH_PROBABILITY): Add
6997 * tree.h (DECL_BUILT_IN_P): New function.
6999 2018-08-10 Martin Liska <mliska@suse.cz>
7001 PR tree-optimization/85799
7002 * passes.def: Add argument for pass_strip_predict_hints.
7003 * predict.c (class pass_strip_predict_hints): Add new argument
7005 (strip_predictor_early): New function.
7006 (pass_strip_predict_hints::execute): Call the function to
7008 (strip_predict_hints): New function.
7009 * predict.def: Fix comment.
7011 2018-08-10 Thomas Preud'homme <thomas.preudhomme@linaro.org>
7013 * Makefile.in: Clarify which tm.texi to copy over to assert the
7014 right to grant a GFDL license for all.
7016 2018-08-09 Jeff Law <law@redhat.com>
7018 * config/m68k/m68k.c (m68k_adjust_decorated_operand): Remove
7021 2018-08-09 Andreas Schwab <schwab@linux-m68k.org>
7023 * config/m68k/m68k-protos.h (m68k_final_prescan_insn): Remove
7026 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
7028 * tree-vect-loop.c (vectorizable_reduction): Allow inner-loop
7029 reductions for variable-length vectors.
7031 2018-08-09 David Malcolm <dmalcolm@redhat.com>
7034 * common.opt (fdiagnostics-show-line-numbers): New option.
7035 * diagnostic-show-locus.c (class layout): Add fields
7036 "m_show_line_numbers_p" and "m_linenum_width";
7037 (num_digits): New function.
7038 (test_num_digits): New function.
7039 (layout::layout): Initialize new fields. Update m_x_offset
7040 logic to handle any left margin.
7041 (layout::print_source_line): Print line number when requested.
7042 (layout::start_annotation_line): New member function.
7043 (layout::print_annotation_line): Call it.
7044 (layout::print_leading_fixits): Likewise.
7045 (layout::print_trailing_fixits): Likewise. Update calls to
7046 move_to_column for new parameter.
7047 (layout::get_x_bound_for_row): Add "add_left_margin" param and use
7048 it to potentially call start_annotation_line.
7049 (layout::show_ruler): Call start_annotation_line.
7050 (selftest::test_line_numbers_multiline_range): New selftest.
7051 (selftest::diagnostic_show_locus_c_tests): Call test_num_digits
7052 and selftest::test_line_numbers_multiline_range.
7053 * diagnostic.c (diagnostic_initialize): Initialize
7054 show_line_numbers_p.
7055 * diagnostic.h (struct diagnostic_context): Add field
7056 "show_line_numbers_p".
7057 * doc/invoke.texi (Diagnostic Message Formatting Options): Add
7058 -fno-diagnostics-show-line-numbers.
7059 * dwarf2out.c (gen_producer_string): Add
7060 OPT_fdiagnostics_show_line_numbers to the ignored options.
7061 * lto-wrapper.c (merge_and_complain): Likewise to the "pick
7062 one setting" options.
7063 (append_compiler_options): Likewise to the dropped options.
7064 (append_diag_options): Likewise to the passed-on options.
7065 * opts.c (common_handle_option): Handle the new option.
7066 * toplev.c (general_init): Set up global_dc->show_line_numbers_p.
7068 2018-08-09 Kelvin Nilsen <kelvin@gcc.gnu.org>
7070 * doc/extend.texi (PowerPC AltiVec Built-in Functions Available on
7071 ISA 2.07): Correct spelling of bcdsub to be __builtin_bcdsub. Add
7072 third argument of type "const signed char" to descriptions of
7073 __builtin_bcdadd, __builtin_bcdadd_lt, __builtin_bcdadd_eq,
7074 __builtin_bcdadd_gt, __builtin_bcdadd_ov, __builtin_bcdsub,
7075 __builtin_bcdsub_lt, __builtin_bcdsub_eq, __builtin_bcdsub_gt,
7076 __builtin_bcdsub_ov functions.
7078 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
7080 PR tree-optimization/86858
7081 * tree-vect-loop.c (vect_is_simple_reduction): Restore
7082 flow_bb_inside_loop_p calls.
7084 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
7086 PR tree-optimization/86871
7087 * tree-vect-stmts.c (vect_transform_stmt): Use gimple_get_lhs
7088 instead of gimple_assign_lhs.
7090 2018-08-09 Richard Earnshaw <rearnsha@arm.com>
7093 * config/aarch64/aarch64.md (add<mode>3_carryinC_zero): Add missing
7094 register constraint to operand 0.
7095 (add<mode>3_carryinC): Likewise.
7096 (add<mode>3_carryinV_zero, add<mode>3_carryinV): Likewise.
7098 2018-08-09 Martin Liska <mliska@suse.cz>
7101 * common.opt: Remove extra line.
7103 2018-08-09 Martin Liska <mliska@suse.cz>
7105 * params.def (PARAM_ALIGN_LOOP_ITERATIONS): Remove double dots
7106 at the end of a line, make first letter capital and end up
7107 a sentence with a dot.
7108 (PARAM_LOOP_INTERCHANGE_STRIDE_RATIO): Likewise.
7109 (PARAM_LOOP_BLOCK_TILE_SIZE): Likewise.
7110 (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Likewise.
7111 (PARAM_GRAPHITE_MAX_ARRAYS_PER_SCOP): Likewise.
7112 (PARAM_MAX_ISL_OPERATIONS): Likewise.
7113 (PARAM_GRAPHITE_ALLOW_CODEGEN_ERRORS): Likewise.
7114 (PARAM_PROFILE_FUNC_INTERNAL_ID): Likewise.
7115 (PARAM_INDIR_CALL_TOPN_PROFILE): Likewise.
7116 (PARAM_SLP_MAX_INSNS_IN_BB): Likewise.
7117 (PARAM_IPA_CP_EVAL_THRESHOLD): Likewise.
7118 (PARAM_IPA_CP_RECURSION_PENALTY): Likewise.
7119 (PARAM_IPA_CP_SINGLE_CALL_PENALTY): Likewise.
7120 (PARAM_IPA_CP_LOOP_HINT_BONUS): Likewise.
7121 (PARAM_IPA_CP_ARRAY_INDEX_HINT_BONUS): Likewise.
7122 (PARAM_TREE_REASSOC_WIDTH): Likewise.
7123 (PARAM_HSA_GEN_DEBUG_STORES): Likewise.
7124 (PARAM_MAX_SPECULATIVE_DEVIRT_MAYDEFS): Likewise.
7125 (PARAM_MAX_VRP_SWITCH_ASSERTIONS): Likewise.
7127 2018-08-09 Andreas Krebbel <krebbel@linux.ibm.com>
7130 * config/s390/s390.c (s390_option_override_internal): Reduce the
7131 stack-clash-protection-probe-interval param if it would be too big
7134 2018-08-08 Andreas Schwab <schwab@linux-m68k.org>
7137 * config/m68k/m68k.h (FINAL_PRESCAN_INSN): Don't define.
7138 * config/m68k/m68k.c (handle_move_double): Don't call
7139 m68k_final_prescan_insn.
7140 (m68k_adjust_decorated_operand): Renamed from
7141 m68k_final_prescan_insn, remove first and third operand and
7143 (print_operand): Call it.
7144 (print_operand_address): Call it.
7146 2018-08-08 Nathan Sidwell <nathan@acm.org>
7148 * diagnostic.c (diagnostic_report_current_module): Use
7149 linemap_included_from & linemap_included_from_linemap.
7151 2018-08-08 Hongbo Zhang <hongbo.zhang@linaro.org>
7153 * config/aarch64/aarch64-cores.def: Add phecda core.
7154 * config/aarch64/aarch64-tune.md: Regenerate.
7155 * doc/invoke.texi: Add phecda core.
7157 2018-08-08 Andreas Krebbel <krebbel@linux.ibm.com>
7160 * config/s390/constraints.md ("NxHD0", "NxSD0"): New constraint
7162 * config/s390/s390.md ("movti"): Add more alternatives for
7163 constant to GPR copies.
7165 2018-08-08 Andreas Krebbel <krebbel@linux.ibm.com>
7167 * config/s390/s390.c: Fix whitespace damage throughout the file.
7168 * config/s390/s390.h: Likewise.
7169 * config/s390/tpf.h: Likewise.
7171 2018-08-08 Ilya Leoshkevich <iii@linux.ibm.com>
7173 * config/s390/s390.c (s390_loadrelative_operand_p):
7174 Remove TARGET_CPU_ZARCH usages.
7175 (s390_rtx_costs): Likewise.
7176 (s390_legitimate_constant_p): Likewise.
7177 (s390_cannot_force_const_mem): Likewise.
7178 (legitimate_reload_constant_p): Likewise.
7179 (s390_preferred_reload_class): Likewise.
7180 (legitimize_pic_address): Likewise.
7181 (legitimize_tls_address): Likewise.
7182 (s390_split_branches): Removed.
7183 (s390_add_execute): Removed.
7184 (s390_dump_pool): Remove TARGET_CPU_ZARCH usages.
7185 (s390_mainpool_start): Likewise.
7186 (s390_mainpool_finish): Likewise.
7187 (s390_mainpool_cancel): Removed.
7188 (s390_chunkify_start): Remove TARGET_CPU_ZARCH usages.
7189 (s390_chunkify_cancel): Likewise.
7190 (s390_return_addr_rtx): Likewise.
7191 (s390_register_info): Remove split_branches_pending_p uages.
7192 (s390_optimize_register_info): Likewise.
7193 (s390_init_frame_layout): Remove TARGET_CPU_ZARCH and
7194 split_branches_pending_p usages.
7195 (s390_can_eliminate): Remove TARGET_CPU_ZARCH usages.
7196 (s390_load_got): Likewise.
7197 (s390_expand_split_stack_prologue): Likewise.
7198 (output_asm_nops): Likewise.
7199 (s390_function_profiler): Likewise.
7200 (s390_emit_call): Likewise.
7201 (s390_conditional_register_usage): Likewise.
7202 (s390_optimize_prologue): Likewise.
7203 (s390_reorg): Remove TARGET_CPU_ZARCH and
7204 split_branches_pending_p usages.
7205 (s390_option_override_internal): Remove TARGET_CPU_ZARCH
7207 (s390_output_indirect_thunk_function): Likewise.
7208 * config/s390/s390.h (TARGET_CPU_ZARCH): Removed.
7209 (TARGET_CPU_ZARCH_P): Removed.
7210 (struct machine_function): Remove split_branches_pending_p.
7211 * config/s390/s390.md: Remove TARGET_CPU_ZARCH usages.
7213 2018-08-08 Ilya Leoshkevich <iii@linux.ibm.com>
7215 * common/config/s390/s390-common.c (processor_flags_table):
7217 * config.gcc: Remove with_arch/with_tune support.
7218 * config/s390/2064.md: Remove cpu attribute comparisons.
7219 * config/s390/driver-native.c (s390_host_detect_local_cpu):
7221 * config/s390/linux.h (ASM_SPEC):
7222 Remove -march support.
7223 * config/s390/s390-c.c (s390_cpu_cpp_builtins_internal):
7224 Use a table to get an arch level.
7225 * config/s390/s390-opts.h (enum processor_type):
7227 * config/s390/s390.c
7228 (processor_table): Remove entries, add arch_level values.
7229 (s390_issue_rate): Remove cases.
7230 (s390_option_override): Adjust
7231 s390_option_override_internal() call.
7232 (s390_option_override_internal): Remove deprecation warning.
7233 (s390_valid_target_attribute_tree): Adjust
7234 s390_option_override_internal() call.
7235 * config/s390/s390.h (struct s390_processor):
7236 Share with s390-c.c, add arch_level field.
7237 * config/s390/s390.md:
7238 Remove occurrences in cpu attribute.
7239 * config/s390/s390.opt: Remove -march/-mtune support.
7240 * config/s390/tpf.h (ASM_SPEC): Remove -march support.
7241 * doc/invoke.texi: Remove deprecation warning.
7243 2018-08-08 Luis Machado <luis.machado@linaro.org>
7245 * config/aarch64/aarch64.c (qdf24xx_vector_cost): New static
7247 (qdf24xx_tunings): Set vector cost structure to
7248 qdf24xx_vector_cost.
7250 * config/aarch64/aarch64.c (qdf24xx_addrcost_table)
7251 <register_sextend>: Set to 3.
7253 2018-08-07 Richard Sandiford <richard.sandiford@arm.com>
7256 * config/aarch64/iterators.md (FRECP, frecp_suffix): Delete.
7257 * config/aarch64/aarch64-simd.md
7258 (aarch64_frecp<FRECP:frecp_suffix><mode>): Fold FRECPE into...
7259 (@aarch64_frecpe<mode>): ...here and the move FRECPX to...
7260 (aarch64_frecpx<mode>): ...this new pattern.
7261 * config/aarch64/aarch64-simd-builtins.def: Remove comment
7262 about aarch64_frecp<FRECP:frecp_suffix><mode>.
7264 2018-08-07 Martin Liska <mliska@suse.cz>
7267 * predict.c (expr_expected_value_1): Handle DECL_IS_MALLOC,
7268 BUILT_IN_REALLOC and DECL_IS_OPERATOR_NEW.
7269 * predict.def (PRED_MALLOC_NONNULL): New predictor.
7270 * doc/extend.texi: Document that malloc attribute adds
7273 2018-08-06 John David Anglin <danglin@gcc.gnu.org>
7276 * config/pa/pa.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7277 Define to speculation_safe_value_not_needed.
7279 2018-08-06 Jeff Law <law@redhat.com>
7281 * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Pass down
7282 the vr_values instance to cprop_into_stmt.
7283 (cprop_into_stmt): Pass vr_values instance down to cprop_operand.
7284 (cprop_operand): Also query EVRP to determine if OP is a constant.
7286 2018-08-06 Nathan Sidwell <nathan@acm.org>
7288 * diagnostic.c (diagnostic_report_current_module): Reroll
7289 included-at loop. Translate text.
7291 2018-08-06 David Malcolm <dmalcolm@redhat.com>
7293 * function-tests.c (selftest::test_expansion_to_rtl): Call
7294 free_after_compilation.
7296 2018-08-06 Alan Hayward <alan.hayward@arm.com>
7298 * config/aarch64/aarch64.md: Add clobber highs to tls_desc.
7300 2018-08-06 Andreas Krebbel <krebbel@linux.ibm.com>
7302 * config/s390/s390.c (s390_loop_unroll_adjust): Prevent small
7303 loops with memory block operations from getting unrolled.
7305 2018-08-06 Ulrich Weigand <uweigand@de.ibm.com>
7308 * config/spu/spu.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7309 Define to speculation_safe_value_not_needed.
7311 2018-08-06 Jeff Law <law@redhat.com>
7313 * reload1.c (forget_old_reloads_1): Adjust CLOBBER_HIGH
7316 2018-08-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
7319 * gcc/tree.c (build_common_tree_nodes): Initialize integer_types array
7320 with all enabled __intN types.
7322 * gcc/testsuite/gcc.target/msp430/pr86662.c: New test.
7324 2018-08-06 Alan Hayward <alan.hayward@arm.com>
7326 * alias.c (record_set): Check for clobber high.
7327 * cfgexpand.c (expand_gimple_stmt): Likewise.
7328 * combine-stack-adj.c (single_set_for_csa): Likewise.
7329 * combine.c (find_single_use_1): Likewise.
7330 (set_nonzero_bits_and_sign_copies): Likewise.
7331 (get_combine_src_dest): Likewise.
7332 (is_parallel_of_n_reg_sets): Likewise.
7333 (try_combine): Likewise.
7334 (record_dead_and_set_regs_1): Likewise.
7335 (reg_dead_at_p_1): Likewise.
7336 (reg_dead_at_p): Likewise.
7337 * dce.c (deletable_insn_p): Likewise.
7338 (mark_nonreg_stores_1): Likewise.
7339 (mark_nonreg_stores_2): Likewise.
7340 * df-scan.c (df_find_hard_reg_defs): Likewise.
7341 (df_uses_record): Likewise.
7342 (df_get_call_refs): Likewise.
7343 * dwarf2out.c (mem_loc_descriptor): Likewise.
7344 * haifa-sched.c (haifa_classify_rtx): Likewise.
7345 * ira-build.c (create_insn_allocnos): Likewise.
7346 * ira-costs.c (scan_one_insn): Likewise.
7347 * ira.c (equiv_init_movable_p): Likewise.
7348 (rtx_moveable_p): Likewise.
7349 (interesting_dest_for_shprep): Likewise.
7350 * jump.c (mark_jump_label_1): Likewise.
7351 * postreload-gcse.c (record_opr_changes): Likewise.
7352 * postreload.c (reload_cse_simplify): Likewise.
7353 (struct reg_use): Add source expr.
7354 (reload_combine): Check for clobber high.
7355 (reload_combine_note_use): Likewise.
7356 (reload_cse_move2add): Likewise.
7357 (move2add_note_store): Likewise.
7358 * print-rtl.c (print_pattern): Likewise.
7359 * recog.c (decode_asm_operands): Likewise.
7360 (store_data_bypass_p): Likewise.
7361 (if_test_bypass_p): Likewise.
7362 * regcprop.c (kill_clobbered_value): Likewise.
7363 (kill_set_value): Likewise.
7364 * reginfo.c (reg_scan_mark_refs): Likewise.
7365 * reload1.c (maybe_fix_stack_asms): Likewise.
7366 (eliminate_regs_1): Likewise.
7367 (elimination_effects): Likewise.
7368 (mark_not_eliminable): Likewise.
7369 (scan_paradoxical_subregs): Likewise.
7370 (forget_old_reloads_1): Likewise.
7371 * reorg.c (find_end_label): Likewise.
7372 (try_merge_delay_insns): Likewise.
7373 (redundant_insn): Likewise.
7374 (own_thread_p): Likewise.
7375 (fill_simple_delay_slots): Likewise.
7376 (fill_slots_from_thread): Likewise.
7377 (dbr_schedule): Likewise.
7378 * resource.c (update_live_status): Likewise.
7379 (mark_referenced_resources): Likewise.
7380 (mark_set_resources): Likewise.
7381 * rtl.c (copy_rtx): Likewise.
7382 * rtlanal.c (reg_referenced_p): Likewise.
7383 (single_set_2): Likewise.
7384 (noop_move_p): Likewise.
7385 (note_stores): Likewise.
7386 * sched-deps.c (sched_analyze_reg): Likewise.
7387 (sched_analyze_insn): Likewise.
7389 2018-08-06 Alan Hayward <alan.hayward@arm.com>
7391 * cse.c (invalidate_reg): New function extracted from...
7392 (invalidate): ...here.
7393 (canonicalize_insn): Check for clobber high.
7394 (invalidate_from_clobbers): invalidate clobber highs.
7395 (invalidate_from_sets_and_clobbers): Likewise.
7396 (count_reg_usage): Check for clobber high.
7397 (insn_live_p): Likewise.
7398 * cselib.c (cselib_expand_value_rtx_1):Likewise.
7399 (cselib_invalidate_regno): Check for clobber in setter.
7400 (cselib_invalidate_rtx): Pass through setter.
7401 (cselib_invalidate_rtx_note_stores):
7402 (cselib_process_insn): Check for clobber high.
7403 * cselib.h (cselib_invalidate_rtx): Add operand.
7405 2018-08-06 Alan Hayward <alan.hayward@arm.com>
7407 * lra-eliminations.c (lra_eliminate_regs_1): Check for clobber high.
7408 (mark_not_eliminable): Likewise.
7409 * lra-int.h (struct lra_insn_reg): Add clobber high marker.
7410 * lra-lives.c (process_bb_lives): Check for clobber high.
7411 * lra.c (new_insn_reg): Remember clobber highs.
7412 (collect_non_operand_hard_regs): Check for clobber high.
7413 (lra_set_insn_recog_data): Likewise.
7414 (add_regs_to_insn_regno_info): Likewise.
7415 (lra_update_insn_regno_info): Likewise.
7417 2018-08-06 Alan Hayward <alan.hayward@arm.com>
7419 * rtl.h (reg_is_clobbered_by_clobber_high): Add declarations.
7420 * rtlanal.c (reg_is_clobbered_by_clobber_high): Add function.
7422 2018-08-06 Alan Hayward <alan.hayward@arm.com>
7424 * emit-rtl.c (verify_rtx_sharing): Check for CLOBBER_HIGH.
7425 (copy_insn_1): Likewise.
7426 (gen_hard_reg_clobber_high): New gen function.
7427 * genconfig.c (walk_insn_part): Check for CLOBBER_HIGH.
7428 * genemit.c (gen_exp): Likewise.
7429 (gen_emit_seq): Pass through info.
7430 (gen_insn): Check for CLOBBER_HIGH.
7431 (gen_expand): Pass through info.
7432 (gen_split): Likewise.
7433 (output_add_clobbers): Likewise.
7434 * genrecog.c (validate_pattern): Check for CLOBBER_HIGH.
7435 (remove_clobbers): Likewise.
7436 * rtl.h (gen_hard_reg_clobber_high): New declaration.
7438 2018-08-06 Alan Hayward <alan.hayward@arm.com>
7440 * doc/rtl.texi (clobber_high): Add.
7441 (parallel): Add in clobber high
7442 * rtl.c (rtl_check_failed_code3): Add function.
7443 * rtl.def (CLOBBER_HIGH): Add expression.
7444 * rtl.h (RTL_CHECKC3): Add macro.
7445 (rtl_check_failed_code3): Add declaration.
7446 (XC3EXP): Add macro.
7448 2018-08-05 H.J. Lu <hongjiu.lu@intel.com>
7451 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Set
7452 cfun->machine->max_used_stack_alignment if needed.
7454 2018-08-04 Martin Sebor <msebor@redhat.com>
7456 PR tree-optimization/86571
7457 * gimple-ssa-sprintf.c (format_floating): Extend upper bound of
7460 2018-08-03 Sandra Loosemore <sandra@codesourcery.com>
7463 * config/nios2/nios2.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7466 2018-08-03 Jeff Law <law@redhat.com>
7469 * config/mn10300/mn10300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7470 Define to speculation_safe_value_not_needed.
7472 2018-08-03 David Malcolm <dmalcolm@redhat.com>
7474 * doc/gcov.texi (-x): Remove duplicate "to".
7475 * doc/invoke.texi (-Wnoexcept-type): Remove duplicate "calls".
7476 (-Wif-not-aligned): Remove duplicate "is".
7477 (-flto): Remove duplicate "the".
7478 (MicroBlaze Options): In examples of "-mcpu=cpu-type", remove
7479 duplicate "v5.00.b".
7480 (MSP430 Options): Remove duplicate "and" from the description
7481 of "-mgprel-sec=regexp".
7482 (x86 Options): Remove duplicate copies of "vmldLog102" and
7483 vmlsLog104 from description of "-mveclibabi=type".
7485 2018-08-03 Richard Sandiford <richard.sandiford@arm.com>
7487 * internal-fn.h (first_commutative_argument): Declare.
7488 * internal-fn.c (first_commutative_argument): New function.
7489 * tree-vect-slp.c (vect_get_and_check_slp_defs): Remove extra
7490 restrictions for pattern statements. Use first_commutative_argument
7491 to look for commutative operands in calls to internal functions.
7493 2018-08-03 Aldy Hernandez <aldyh@redhat.com>
7495 * Makefile.in (wide-int-range.o): New.
7496 * tree-vrp.c: Move all the wide_int_* functions to...
7497 * wide-int-range.cc: ...here.
7498 * tree-vrp.h: Move all the wide_int_* prototypes to...
7499 * wide-int-range.h: ...here.
7501 2018-08-03 Tom de Vries <tdevries@suse.de>
7503 * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): Return
7505 * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Remove define.
7506 * except.c (output_function_exception_table): Do early exit if
7507 targetm_common.except_unwind_info (&global_options) == UI_NONE.
7509 2018-08-03 Martin Liska <mliska@suse.cz>
7511 * predict.c (dump_prediction): Change to 2 digits
7514 2018-08-03 Siddhesh Poyarekar <siddhesh@sourceware.org>
7516 * config/aarch64/falkor.md (falkor_am_1_vxvy_vxvy): Move
7518 (falkor_am_1_gtov_gtov): ... a new insn reservation.
7520 2018-07-19 Ilya Leoshkevich <iii@linux.ibm.com>
7522 * config/nds32/nds32.c (nds32_hard_regno_mode_ok): Replace > with >=.
7523 * df-problems.c (df_remove_dead_eq_notes): Replace > with >=.
7524 * dwarf2out.c (mem_loc_descriptor): Replace > with >=.
7525 * lra-constraints.c (spill_hard_reg_in_range): Replace <= with <.
7526 * lra-remat.c (call_used_input_regno_present_p): Replace <= with <.
7528 2018-08-02 David Malcolm <dmalcolm@redhat.com>
7530 * diagnostic-show-locus.c (diagnostic_show_locus): Use
7531 pp_take_prefix when saving the existing prefix.
7532 * diagnostic.c (diagnostic_append_note): Likewise.
7533 * langhooks.c (lhd_print_error_function): Likewise.
7534 * pretty-print.c (pp_set_prefix): Drop the "const" from "prefix"
7535 param's type. Free the existing prefix.
7536 (pp_take_prefix): New function.
7537 (pretty_printer::pretty_printer): Drop the prefix parameter.
7538 Rename the length parameter to match the comment.
7539 (pretty_printer::~pretty_printer): Free the prefix.
7540 * pretty-print.h (pretty_printer::pretty_printer): Drop the prefix
7542 (struct pretty_printer): Drop the "const" from "prefix" field's
7543 type and clarify memory management.
7544 (pp_set_prefix): Drop the "const" from the 2nd param.
7545 (pp_take_prefix): New decl.
7547 2018-08-02 Aaron Sawdey <acsawdey@linux.ibm.com>
7549 * config/rs6000/rs6000-string.c (select_block_compare_mode): Move test
7550 for word_mode_ok here instead of passing as argument.
7551 (expand_block_compare): Change select_block_compare_mode() call.
7552 (expand_strncmp_gpr_sequence): New function.
7553 (expand_strn_compare): Make use of expand_strncmp_gpr_sequence.
7555 2018-08-02 Jeff Law <law@redhat.com>
7558 * config/m68k/m68k.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7559 Define to speculation_safe_value_not_needed.
7562 * config/h8300/h8300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7563 Define to speculation_safe_value_not_needed.
7565 2018-08-02 Tom de Vries <tdevries@suse.de>
7568 * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): New
7569 function. Return UI_TARGET unconditionally.
7570 (TARGET_EXCEPT_UNWIND_INFO): Redefine to nvptx_except_unwind_info.
7571 * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Emit commented out '.byte'.
7573 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
7575 * genemit.c (print_overload_test): Fix typo.
7577 2018-08-02 Richard Biener <rguenther@suse.de>
7579 PR tree-optimization/86816
7580 * tree-ssa-tail-merge.c (tail_merge_valueize): New function
7581 which checks for value availability before querying it.
7582 (gvn_uses_equal): Use it.
7583 (same_succ_hash): Likewise.
7584 (gimple_equal_p): Likewise.
7586 2018-08-02 Nick Clifton <nickc@redhat.com>
7589 * config/stormy16/stormy16.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7590 Define to speculation_safe_value_not_needed.
7593 * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7594 Define to speculation_safe_value_not_needed.
7597 * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7598 Define to speculation_safe_value_not_needed.
7601 * config/rx/rx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7602 Define to speculation_safe_value_not_needed.
7605 * config/msp430/msp430.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7606 Define to speculation_safe_value_not_needed.
7609 * config/mcore/mcore.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7610 Define to speculation_safe_value_not_needed.
7613 * config/m32r/m32r.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7614 Define to speculation_safe_value_not_needed.
7617 * config/iq2000/iq2000.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7618 Define to speculation_safe_value_not_needed.
7621 * config/frv/frv.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
7622 speculation_safe_value_not_needed.
7625 * config/fr30/fr30.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define
7626 to speculation_safe_value_not_needed.
7628 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
7630 * doc/md.texi: Expand the documentation of instruction names
7631 to mention port-local uses. Document '@' in pattern names.
7632 * read-md.h (overloaded_instance, overloaded_name): New structs.
7634 (md_reader::handle_overloaded_name): New member function.
7635 (md_reader::get_overloads): Likewise.
7636 (md_reader::m_first_overload): New member variable.
7637 (md_reader::m_next_overload_ptr): Likewise.
7638 (md_reader::m_overloads_htab): Likewise.
7639 * read-md.c (md_reader::md_reader): Initialize m_first_overload,
7640 m_next_overload_ptr and m_overloads_htab.
7641 * read-rtl.c (iterator_group): Add "type" and "get_c_token" fields.
7642 (get_mode_token, get_code_token, get_int_token): New functions.
7643 (map_attr_string): Add an optional argument that passes back
7644 the associated iterator.
7645 (overloaded_name_hash, overloaded_name_eq_p, named_rtx_p):
7646 (md_reader::handle_overloaded_name, add_overload_instance): New
7648 (apply_iterators): Handle '@' names. Report an error if '@'
7649 is used without iterators.
7650 (initialize_iterators): Initialize the new iterator_group fields.
7651 * genopinit.c (handle_overloaded_code_for)
7652 (handle_overloaded_gen): New functions.
7653 (main): Use them to print declarations of maybe_code_for_* and
7654 maybe_gen_* functions, and inline definitions of code_for_* and gen_*.
7655 * genemit.c (print_overload_arguments, print_overload_test)
7656 (handle_overloaded_code_for, handle_overloaded_gen): New functions.
7657 (main): Use it to print definitions of maybe_code_for_* and
7658 maybe_gen_* functions.
7659 * config/aarch64/aarch64.c (aarch64_split_128bit_move): Use
7660 gen_aarch64_mov{low,high}_di and gen_aarch64_movdi_{low,high}
7661 instead of explicit mode checks.
7662 (aarch64_split_simd_combine): Likewise gen_aarch64_simd_combine.
7663 (aarch64_split_simd_move): Likewise gen_aarch64_split_simd_mov.
7664 (aarch64_emit_load_exclusive): Likewise gen_aarch64_load_exclusive.
7665 (aarch64_emit_store_exclusive): Likewise gen_aarch64_store_exclusive.
7666 (aarch64_expand_compare_and_swap): Likewise
7667 gen_aarch64_compare_and_swap and gen_aarch64_compare_and_swap_lse
7668 (aarch64_gen_atomic_cas): Likewise gen_aarch64_atomic_cas.
7669 (aarch64_emit_atomic_swap): Likewise gen_aarch64_atomic_swp.
7670 (aarch64_constant_pool_reload_icode): Delete.
7671 (aarch64_secondary_reload): Use code_for_aarch64_reload_movcp
7672 instead of aarch64_constant_pool_reload_icode. Use
7673 code_for_aarch64_reload_mov instead of explicit mode checks.
7674 (rsqrte_type, get_rsqrte_type, rsqrts_type, get_rsqrts_type): Delete.
7675 (aarch64_emit_approx_sqrt): Use gen_aarch64_rsqrte instead of
7676 get_rsqrte_type and gen_aarch64_rsqrts instead of gen_rqrts_type.
7677 (recpe_type, get_recpe_type, recps_type, get_recps_type): Delete.
7678 (aarch64_emit_approx_div): Use gen_aarch64_frecpe instead of
7679 get_recpe_type and gen_aarch64_frecps instead of get_recps_type.
7680 (aarch64_atomic_load_op_code): Delete.
7681 (aarch64_emit_atomic_load_op): Likewise.
7682 (aarch64_gen_atomic_ldop): Use UNSPECV_ATOMIC_* instead of
7683 aarch64_atomic_load_op_code. Use gen_aarch64_atomic_load
7684 instead of aarch64_emit_atomic_load_op.
7685 * config/aarch64/aarch64.md (aarch64_reload_movcp<GPF_TF:mode><P:mode>)
7686 (aarch64_reload_movcp<VALL:mode><P:mode>, aarch64_reload_mov<mode>)
7687 (aarch64_movdi_<mode>low, aarch64_movdi_<mode>high)
7688 (aarch64_mov<mode>high_di, aarch64_mov<mode>low_di): Add a '@'
7689 character before the pattern name.
7690 * config/aarch64/aarch64-simd.md (aarch64_split_simd_mov<mode>)
7691 (aarch64_rsqrte<mode>, aarch64_rsqrts<mode>)
7692 (aarch64_simd_combine<mode>, aarch64_frecpe<mode>)
7693 (aarch64_frecps<mode>): Likewise.
7694 * config/aarch64/atomics.md (atomic_compare_and_swap<mode>)
7695 (aarch64_compare_and_swap<mode>, aarch64_compare_and_swap<mode>_lse)
7696 (aarch64_load_exclusive<mode>, aarch64_store_exclusive<mode>)
7697 (aarch64_atomic_swp<mode>, aarch64_atomic_cas<mode>)
7698 (aarch64_atomic_load<atomic_ldop><mode>): Likewise.
7700 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
7702 * config/aarch64/aarch64.c (aarch64_float_const_representable_p):
7703 Allow HFmode constants if TARGET_FP_F16INST.
7705 2018-08-02 Jackson Woodruff <jackson.woodruff@arm.com>
7708 * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp):
7709 No longer check last store for clobber of address register.
7711 2018-08-02 Martin Liska <mliska@suse.cz>
7713 PR gcov-profile/86817
7714 * gcov.c (process_all_functions): New function.
7716 (process_file): Move functions processing to
7717 process_all_functions.
7719 2018-08-02 David Malcolm <dmalcolm@redhat.com>
7721 * dumpfile.c (dump_user_location_t::dump_user_location_t): Add
7722 "const" to the "gimple *" and "rtx_insn *" parameters.
7723 * dumpfile.h (dump_user_location_t::dump_user_location_t):
7725 (dump_location_t::dump_location_t): Likewise.
7727 2018-08-01 Martin Sebor <msebor@redhat.com>
7729 PR tree-optimization/86650
7730 * gimple-pretty-print.c (percent_G_format): Accept a "gimple *"
7731 rather than a "gcall *". Directly pass the data of interest
7732 to percent_K_format, rather than building a temporary CALL_EXPR
7734 * gimple-fold.c (gimple_fold_builtin_strncpy): Adjust.
7735 (gimple_fold_builtin_strncat): Adjust.
7736 * gimple-ssa-warn-restrict.h (check_bounds_or_overlap): Replace
7737 gcall* argument with gimple*.
7738 * gimple-ssa-warn-restrict.c (check_call): Same.
7739 (wrestrict_dom_walker::before_dom_children): Same.
7740 (builtin_access::builtin_access): Same.
7741 (check_bounds_or_overlap): Same
7742 (maybe_diag_overlap): Same.
7743 (maybe_diag_offset_bounds): Same.
7744 * tree-diagnostic.c (default_tree_printer): Move usage of
7745 EXPR_LOCATION (t) and TREE_BLOCK (t) from within percent_K_format
7747 * tree-pretty-print.c (percent_K_format): Add argument.
7748 * tree-pretty-print.h: Add argument.
7749 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Adjust.
7750 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Adjust.
7751 (maybe_diag_stxncpy_trunc): Same.
7752 (handle_builtin_stxncpy): Same.
7753 (handle_builtin_strcat): Same.
7755 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
7757 * match.pd: Optimise pointer range checks.
7759 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
7761 PR tree-optimization/86758
7762 * tree-vect-stmts.c (vectorizable_simd_clone_call): Don't try
7763 to remove pattern statements.
7765 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
7767 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Use the
7768 result of dfs_enumerate_from when constructing stmt_vec_infos,
7769 instead of additionally calling get_loop_body.
7771 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
7773 * tree-vectorizer.h (vect_create_data_ref_ptr): Remove inv_p
7775 * tree-vect-data-refs.c (vect_create_data_ref_ptr): Likewise.
7776 When creating an iv, assert that the step is not known to be zero.
7777 (vect_setup_realignment): Update call accordingly.
7778 * tree-vect-stmts.c (vectorizable_store): Likewise.
7779 (vectorizable_load): Likewise. Handle VMAT_INVARIANT separately.
7781 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
7783 * tree-vectorizer.h (vect_stmt_to_vectorize): New function.
7784 * tree-vect-loop.c (vect_update_vf_for_slp): Use it.
7785 (vectorizable_reduction): Likewise.
7786 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
7787 (vect_detect_hybrid_slp_stmts): Likewise.
7788 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
7790 2018-08-01 Aldy Hernandez <aldyh@redhat.com>
7792 * tree-vrp (zero_nonzero_bits_from_bounds): Rename to...
7793 (wide_int_set_zero_nonzero_bits): ...this.
7794 (zero_nonzero_bits_from_vr): Rename to...
7795 (vrp_set_zero_nonzero_bits): ...this.
7796 (extract_range_from_multiplicative_op_1): Abstract wide int
7798 (wide_int_range_multiplicative_op): ...here.
7799 (extract_range_from_binary_expr_1): Extract wide int binary
7800 operations into their own functions.
7801 (wide_int_range_lshift): New.
7802 (wide_int_range_can_optimize_bit_op): New.
7803 (wide_int_range_shift_undefined_p): New.
7804 (wide_int_range_bit_xor): New.
7805 (wide_int_range_bit_ior): New.
7806 (wide_int_range_bit_and): New.
7807 (wide_int_range_trunc_mod): New.
7808 (extract_range_into_wide_ints): New.
7809 (vrp_shift_undefined_p): New.
7810 (extract_range_from_multiplicative_op): New.
7811 (vrp_can_optimize_bit_op): New.
7812 * tree-vrp.h (value_range::dump): New.
7813 (wide_int_range_multiplicative_op): New.
7814 (wide_int_range_lshift):New.
7815 (wide_int_range_shift_undefined_p): New.
7816 (wide_int_range_bit_xor): New.
7817 (wide_int_range_bit_ior): New.
7818 (wide_int_range_bit_and): New.
7819 (wide_int_range_trunc_mod): New.
7820 (zero_nonzero_bits_from_bounds): Rename to...
7821 (wide_int_set_zero_nonzero_bits): ...this.
7822 (zero_nonzero_bits_from_vr): Rename to...
7823 (vrp_set_zero_nonzero_bits): ...this.
7824 (range_easy_mask_min_max): Rename to...
7825 (wide_int_range_can_optimize_bit_op): this.
7826 * vr-values.c (simplify_bit_ops_using_ranges): Rename
7827 zero_nonzero_bits_from_vr into vrp_set_zero_nonzero_bits.
7829 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
7831 * tree-vectorizer.h (vect_orig_stmt): New function.
7832 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Use it.
7833 * tree-vect-loop.c (vect_model_reduction_cost): Likewise.
7834 (vect_create_epilog_for_reduction): Likewise.
7835 (vectorizable_live_operation): Likewise.
7836 * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
7837 (vect_detect_hybrid_slp_stmts, vect_schedule_slp): Likewise.
7838 * tree-vect-stmts.c (vectorizable_call): Likewise.
7839 (vectorizable_simd_clone_call, vect_remove_stores): Likewise.
7841 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
7843 * tree-vectorizer.h (vect_transform_stmt): Remove grouped_store
7845 * tree-vect-stmts.c (vect_transform_stmt): Likewise.
7846 * tree-vect-loop.c (vect_transform_loop_stmt): Update call accordingly.
7847 (vect_transform_loop): Likewise.
7848 * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
7850 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
7852 * tree-vectorizer.h (vect_schedule_slp): Return void.
7853 * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
7854 (vect_schedule_slp): Likewise.
7856 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
7858 * tree-vect-loop.c (vect_transform_loop_stmt): Remove slp_scheduled
7860 (vect_transform_loop): Update calls accordingly. Schedule SLP
7861 instances before the main loop, if any exist.
7863 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
7865 PR tree-optimization/86749
7866 * tree-vect-patterns.c (vect_determine_min_output_precision_1):
7867 If the lhs is used in a COND_EXPR, check that it is being used
7868 as the "then" or "else" value.
7870 2018-08-01 Tom de Vries <tdevries@suse.de>
7873 * config/nvptx/nvptx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
7874 speculation_safe_value_not_needed.
7876 2018-08-01 Richard Biener <rguenther@suse.de>
7878 * tree-ssa-sccvn.c (visit_phi): Compare invariant addresses
7881 2018-08-01 Martin Liska <mliska@suse.cz>
7883 * value-prof.c (gimple_divmod_fixed_value_transform): Unify
7884 format how successful transformation is dumped.
7885 (gimple_mod_pow2_value_transform): Likewise.
7886 (gimple_mod_subtract_transform): Likewise.
7887 (gimple_stringops_transform): Likewise.
7889 2018-08-01 Martin Liska <mliska@suse.cz>
7892 * value-prof.c (interesting_stringop_to_profile_p):
7893 Simplify the code and add BUILT_IN_MEMMOVE.
7894 (gimple_stringops_transform): Likewise.
7896 2018-08-01 Sam Tebbs <sam.tebbs@arm.com>
7898 * config/aarch64/aarch64-simd.md
7899 (*aarch64_get_lane_zero_extendsi<mode>): Rename to...
7900 (*aarch64_get_lane_zero_extend<GPI:mode><VDQQH:mode>): ... This and
7901 use GPI iterator instead of SI mode.
7903 2018-08-01 Richard Earnshaw <rearnsha@arm.com>
7905 * config/rs6000/rs6000.md (speculation_barrier): Renamed from
7906 rs6000_speculation_barrier.
7907 * config/rs6000/rs6000.c (rs6000_expand_builtin): Adjust for
7908 new barrier pattern name.
7910 2018-08-01 Richard Earnshaw <rearnsha@arm.com>
7912 * config/i386/i386.md (unspecv): Add UNSPECV_SPECULATION_BARRIER.
7913 (speculation_barrier): New insn.
7915 2018-08-01 Richard Biener <rguenther@suse.de>
7918 * graphite.h: Include isl/id.h and isl/space.h to allow build
7921 2018-08-01 Jan Willem Jagersma <jwjagersma@gmail.com>
7924 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
7925 mode for COFF targets.
7926 * defaults.h (TARGET_COFF): Define.
7927 * config/i386/djgpp.h (TARGET_ASM_LTO_START, TARGET_ASM_LTO_END,
7928 TARGET_COFF): Define.
7929 (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): Declare.
7930 * config/i386/djgpp.c (saved_debug_info_level): New static variable.
7931 (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): New functions.
7933 2018-07-31 Alexandre Oliva <oliva@adacore.com>
7935 * gimple-streamer-in.c (input_bb): Restore BB discriminator.
7936 * gimple-streamer-out.c (output_bb): Save it.
7937 * lto-streamer-in.c (input_struct_function_base): Restore
7938 instance discriminator if available. Create map on demand.
7939 * lto-streamer-out.c (output_struct_function_base): Save it if
7941 * final.c (decl_to_instance_map): Document LTO strategy.
7943 2018-07-31 Alexandre Oliva <oliva@adacore.com>
7944 Olivier Hainque <hainque@adacore.com>
7946 * debug.h (decl_to_instance_map_t): New type.
7947 (decl_to_instance_map): Declare.
7948 (maybe_create_decl_to_instance_map): New inline function.
7949 * final.c (bb_discriminator, last_bb_discriminator): New statics,
7950 to track basic block discriminators.
7951 (final_start_function_1): Initialize them.
7952 (final_scan_insn_1): On NOTE_INSN_BASIC_BLOCK, track
7954 (decl_to_instance_map): New variable.
7955 (map_decl_to_instance, maybe_set_discriminator): New functions.
7956 (notice_source_line): Set discriminator.
7958 2018-07-31 Ian Lance Taylor <iant@golang.org>
7960 * targhooks.c (default_have_speculation_safe_value): Add
7963 2018-07-31 David Malcolm <dmalcolm@redhat.com>
7965 * dump-context.h: Include "pretty-print.h".
7966 (dump_context::refresh_dumps_are_enabled): New decl.
7967 (dump_context::emit_item): New decl.
7968 (class dump_context): Add fields "m_test_pp" and
7970 (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
7971 (temp_dump_context::get_dumped_text): New decl.
7972 (class temp_dump_context): Add field "m_pp".
7973 * dumpfile.c (refresh_dumps_are_enabled): Convert to...
7974 (dump_context::refresh_dumps_are_enabled): ...and add a test for
7976 (set_dump_file): Update for above change.
7977 (set_alt_dump_file): Likewise.
7978 (dump_loc): New overload, taking a pretty_printer *.
7979 (dump_context::dump_loc): Call end_any_optinfo. Dump the location
7980 to any test pretty-printer.
7981 (make_item_for_dump_gimple_stmt): New function, adapted from
7982 optinfo::add_gimple_stmt.
7983 (dump_context::dump_gimple_stmt): Call it, and use the result,
7984 eliminating the direct usage of dump_file and alt_dump_file in
7985 favor of indirectly using them via emit_item.
7986 (make_item_for_dump_gimple_expr): New function, adapted from
7987 optinfo::add_gimple_expr.
7988 (dump_context::dump_gimple_expr): Call it, and use the result,
7989 eliminating the direct usage of dump_file and alt_dump_file in
7990 favor of indirectly using them via emit_item.
7991 (make_item_for_dump_generic_expr): New function, adapted from
7993 (dump_context::dump_generic_expr): Call it, and use the result,
7994 eliminating the direct usage of dump_file and alt_dump_file in
7995 favor of indirectly using them via emit_item.
7996 (make_item_for_dump_printf_va): New function, adapted from
7997 optinfo::add_printf_va.
7998 (make_item_for_dump_printf): New function.
7999 (dump_context::dump_printf_va): Call make_item_for_dump_printf_va,
8000 and use the result, eliminating the direct usage of dump_file and
8001 alt_dump_file in favor of indirectly using them via emit_item.
8002 (make_item_for_dump_dec): New function.
8003 (dump_context::dump_dec): Call it, and use the result,
8004 eliminating the direct usage of dump_file and alt_dump_file in
8005 favor of indirectly using them via emit_item.
8006 (make_item_for_dump_symtab_node): New function, adapted from
8007 optinfo::add_symtab_node.
8008 (dump_context::dump_symtab_node): Call it, and use the result,
8009 eliminating the direct usage of dump_file and alt_dump_file in
8010 favor of indirectly using them via emit_item.
8011 (dump_context::begin_scope): Reimplement, avoiding direct usage
8012 of dump_file and alt_dump_file in favor of indirectly using them
8014 (dump_context::emit_item): New member function.
8015 (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
8016 Set up test pretty-printer on the underlying context. Call
8017 refresh_dumps_are_enabled.
8018 (temp_dump_context::~temp_dump_context): Call
8019 refresh_dumps_are_enabled.
8020 (temp_dump_context::get_dumped_text): New member function.
8021 (selftest::verify_dumped_text): New function.
8022 (ASSERT_DUMPED_TEXT_EQ): New macro.
8023 (selftest::test_capture_of_dump_calls): Run all tests twice, with
8024 and then without optinfo enabled. Add uses of
8025 ASSERT_DUMPED_TEXT_EQ to all tests. Add test of nested scopes.
8026 * dumpfile.h: Update comment for the dump_* API.
8027 * optinfo-emit-json.cc
8028 (selftest::test_building_json_from_dump_calls): Update for new
8029 param for temp_dump_context ctor.
8030 * optinfo.cc (optinfo_item::optinfo_item): Remove "owned" param
8031 and "m_owned" field.
8032 (optinfo_item::~optinfo_item): Likewise.
8033 (optinfo::add_item): New member function.
8034 (optinfo::emit): Update comment.
8035 (optinfo::add_string): Delete.
8036 (optinfo::add_printf): Delete.
8037 (optinfo::add_printf_va): Delete.
8038 (optinfo::add_gimple_stmt): Delete.
8039 (optinfo::add_gimple_expr): Delete.
8040 (optinfo::add_tree): Delete.
8041 (optinfo::add_symtab_node): Delete.
8042 (optinfo::add_dec): Delete.
8043 * optinfo.h (class dump_context): New forward decl.
8044 (optinfo::add_item): New decl.
8045 (optinfo::add_string): Delete.
8046 (optinfo::add_printf): Delete.
8047 (optinfo::add_printf_va): Delete.
8048 (optinfo::add_gimple_stmt): Delete.
8049 (optinfo::add_gimple_expr): Delete.
8050 (optinfo::add_tree): Delete.
8051 (optinfo::add_symtab_node): Delete.
8052 (optinfo::add_dec): Delete.
8053 (optinfo::add_poly_int): Delete.
8054 (optinfo_item::optinfo_item): Remove "owned" param.
8055 (class optinfo_item): Remove field "m_owned".
8057 2018-07-31 Jozef Lawrynowicz <jozef.l@mittosystems.com>
8060 * gcc/cfgexpand.c (set_parm_rtl): Use the alignment of Pmode when
8061 MAX_SUPPORTED_STACK_ALIGNMENT would otherwise be exceeded by the
8062 requested variable alignment.
8063 (expand_one_ssa_partition): Likewise.
8064 (expand_one_var): Likewise.
8066 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
8068 * config/pdp11/pdp11.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
8069 to speculation_safe_value_not_needed.
8071 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
8073 * targhooks.h (speculation_safe_value_not_needed): New prototype.
8074 * targhooks.c (speculation_safe_value_not_needed): New function.
8075 * target.def (have_speculation_safe_value): Update documentation.
8076 * doc/tm.texi: Regenerated.
8078 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
8080 * config/aarch64/iterators.md (ALLI_TI): New iterator.
8081 * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>): New
8083 (despeculate_copy<ALLI:mode>_insn): New insn.
8084 (despeculate_copyti_insn): New insn.
8085 (despeculate_simple<ALLI:mode>): New insn
8086 (despeculate_simpleti): New insn.
8087 * config/aarch64/aarch64.c (aarch64_speculation_safe_value): New
8089 (TARGET_SPECULATION_SAFE_VALUE): Redefine to
8090 aarch64_speculation_safe_value.
8091 (aarch64_print_operand): Handle const0_rtx in modifier 'H'.
8093 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
8095 * config/aarch64/aarch64-speculation.cc: New file.
8096 * config/aarch64/aarch64-passes.def (pass_track_speculation): Add
8097 before pass_reorder_blocks.
8098 * config/aarch64/aarch64-protos.h (make_pass_track_speculation): Add
8100 * config/aarch64/aarch64.c (aarch64_conditional_register_usage): Fix
8101 X14 and X15 when tracking speculation.
8102 * config/aarch64/aarch64.md (register name constants): Add
8103 SPECULATION_TRACKER_REGNUM and SPECULATION_SCRATCH_REGNUM.
8104 (unspec): Add UNSPEC_SPECULATION_TRACKER.
8105 (speculation_barrier): New insn attribute.
8106 (cmp<mode>): Allow SP in comparisons.
8107 (speculation_tracker): New insn.
8108 (speculation_barrier): Add speculation_barrier attribute.
8109 * config/aarch64/t-aarch64: Add make rule for aarch64-speculation.o.
8110 * config.gcc (aarch64*-*-*): Add aarch64-speculation.o to extra_objs.
8111 * doc/invoke.texi (AArch64 Options): Document -mtrack-speculation.
8113 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
8115 * config/aarch64/aarch64.md (cb<optab><mode>1): Disable when
8116 aarch64_track_speculation is true.
8117 (tb<optab><mode>1): Likewise.
8118 * config/aarch64/aarch64.c (aarch64_split_compare_regs): Do not
8119 generate CB[N]Z when tracking speculation.
8120 (aarch64_split_compare_and_swap): Likewise.
8121 (aarch64_split_atomic_op): Likewise.
8123 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
8125 * config/aarch64/aarch64.opt (mtrack-speculation): New target option.
8127 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
8129 * config/aarch64.md (unspecv): Add UNSPECV_SPECULAION_BARRIER.
8130 (speculation_barrier): New insn.
8132 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
8134 * config/arm/unspecs.md (unspecv): Add VUNSPEC_SPECULATION_BARRIER.
8135 * config/arm/arm.md (speculation_barrier): New expand.
8136 (speculation_barrier_insn): New pattern.
8138 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
8140 * builtin-types.def (BT_FN_PTR_PTR_VAR): New function type.
8141 (BT_FN_I1_I1_VAR, BT_FN_I2_I2_VAR, BT_FN_I4_I4_VAR): Likewise.
8142 (BT_FN_I8_I8_VAR, BT_FN_I16_I16_VAR): Likewise.
8143 * builtin-attrs.def (ATTR_NOVOPS_NOTHROW_LEAF_LIST): New attribute
8145 * builtins.def (BUILT_IN_SPECULATION_SAFE_VALUE_N): New builtin.
8146 (BUILT_IN_SPECULATION_SAFE_VALUE_PTR): New internal builtin.
8147 (BUILT_IN_SPECULATION_SAFE_VALUE_1): Likewise.
8148 (BUILT_IN_SPECULATION_SAFE_VALUE_2): Likewise.
8149 (BUILT_IN_SPECULATION_SAFE_VALUE_4): Likewise.
8150 (BUILT_IN_SPECULATION_SAFE_VALUE_8): Likewise.
8151 (BUILT_IN_SPECULATION_SAFE_VALUE_16): Likewise.
8152 * builtins.c (expand_speculation_safe_value): New function.
8153 (expand_builtin): Call it.
8154 * doc/cpp.texi: Document predefine __HAVE_SPECULATION_SAFE_VALUE.
8155 * doc/extend.texi: Document __builtin_speculation_safe_value.
8156 * doc/md.texi: Document "speculation_barrier" pattern.
8157 * doc/tm.texi.in: Pull in TARGET_SPECULATION_SAFE_VALUE and
8158 TARGET_HAVE_SPECULATION_SAFE_VALUE.
8159 * doc/tm.texi: Regenerated.
8160 * target.def (have_speculation_safe_value, speculation_safe_value): New
8162 * targhooks.c (default_have_speculation_safe_value): New function.
8163 (default_speculation_safe_value): New function.
8164 * targhooks.h (default_have_speculation_safe_value): Add prototype.
8165 (default_speculation_safe_value): Add prototype.
8167 2018-07-31 David Malcolm <dmalcolm@redhat.com>
8169 * dump-context.h (dump_context::dump_loc): New decl.
8170 * dumpfile.c (dump_context::dump_loc): New member function.
8171 (dump_context::dump_gimple_stmt_loc): Reimplement using dump_loc
8172 and dump_gimple_stmt.
8173 (dump_context::dump_gimple_expr_loc): Likewise, using
8175 (dump_context::dump_generic_expr_loc): Likewise, using
8177 (dump_context::dump_printf_loc_va): Likewise, using
8179 (dump_context::begin_scope): Explicitly using the global function
8180 "dump_loc", rather than the member function.
8182 2018-07-31 Martin Sebor <msebor@redhat.com>
8184 PR tree-optimization/86741
8185 * tree-vrp.c (vrp_prop::check_mem_ref): Avoid incomplete types.
8187 2018-07-31 Andreas Krebbel <krebbel@linux.ibm.com>
8189 * config/s390/s390.c (s390_expand_setmem): Make the unrolling to
8190 depend on whether prefetch instructions will be emitted or not.
8191 Use TARGET_SETMEM_PFD for checking whether prefetch instructions
8192 will be emitted or not.
8193 * config/s390/s390.h (TARGET_SETMEM_PREFETCH_DISTANCE)
8194 (TARGET_SETMEM_PFD): New macros.
8196 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8198 * tree-vectorizer.h (stmt_vec_info): Turn back into a typedef.
8199 (NULL_STMT_VEC_INFO): Delete.
8200 (stmt_vec_info::operator*): Likewise.
8201 (stmt_vec_info::operator gimple *): Likewise.
8202 * tree-vect-loop.c (vectorizable_reduction): Use NULL instead
8203 of NULL_STMT_VEC_INFO.
8204 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
8205 (vect_reassociating_reduction_p): Likewise.
8206 * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
8207 (vectorizable_store): Likewise.
8208 * tree-vectorizer.c (vec_info::set_vinfo_for_stmt): Likewise.
8209 (vec_info::free_stmt_vec_infos): Likewise.
8211 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8213 * tree-vectorizer.h (vect_stmt_in_region_p): Delete.
8214 * tree-vectorizer.c (vect_stmt_in_region_p): Likewise.
8216 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8218 * tree-vectorizer.h (vec_info::new_vinfo_for_stmt)
8219 (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
8220 (vec_info::free_stmt_vec_info): New private member functions.
8221 (set_stmt_vec_info_vec, free_stmt_vec_infos, vinfo_for_stmt)
8222 (set_vinfo_for_stmt, new_stmt_vec_info, free_stmt_vec_info): Delete.
8223 * tree-parloops.c (gather_scalar_reductions): Remove calls to
8224 set_stmt_vec_info_vec and free_stmt_vec_infos.
8225 * tree-vect-loop.c (_loop_vec_info): Remove call to
8226 set_stmt_vec_info_vec.
8227 * tree-vect-stmts.c (new_stmt_vec_info, set_stmt_vec_info_vec)
8228 (free_stmt_vec_infos, free_stmt_vec_info): Delete in favor of...
8229 * tree-vectorizer.c (vec_info::new_stmt_vec_info)
8230 (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
8231 (vec_info::free_stmt_vec_info): ...these new functions. Remove
8232 assignments in {vec_info::,}new_stmt_vec_info that are redundant
8233 with the clearing in the xcalloc.
8234 (stmt_vec_info_vec): Delete.
8235 (vec_info::vec_info): Don't call set_stmt_vec_info_vec.
8236 (vectorize_loops): Likewise.
8237 (vec_info::~vec_info): Remove argument from call to
8238 free_stmt_vec_infos.
8239 (vec_info::add_stmt): Remove vinfo argument from call to
8242 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8244 * tree-vectorizer.h (free_stmt_vec_info): Take a stmt_vec_info
8245 rather than a gimple stmt.
8246 * tree-vect-stmts.c (free_stmt_vec_info): Likewise. Don't free
8247 information for pattern statements when passed the original
8248 statement; instead wait to be passed the pattern statement itself.
8249 Don't call set_vinfo_for_stmt here.
8250 (free_stmt_vec_infos): Update call to free_stmt_vec_info.
8251 * tree-vect-loop.c (_loop_vec_info::~loop_vec_info): Don't free
8252 stmt_vec_infos here.
8253 * tree-vect-slp.c (_bb_vec_info::~bb_vec_info): Likewise.
8254 * tree-vectorizer.c (vec_info::remove_stmt): Nullify the statement's
8255 stmt_vec_infos entry.
8257 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8259 * tree-vectorizer.h (vec_info::replace_stmt): Declare.
8260 * tree-vectorizer.c (vec_info::replace_stmt): New function.
8261 * tree-vect-slp.c (vect_remove_slp_scalar_calls): Use it.
8262 * tree-vect-stmts.c (vectorizable_call): Likewise.
8263 (vectorizable_simd_clone_call): Likewise.
8265 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8267 * tree-vectorizer.h (vec_info::remove_stmt): Declare.
8268 * tree-vectorizer.c (vec_info::remove_stmt): New function.
8269 * tree-vect-loop-manip.c (vect_set_loop_condition): Use it.
8270 * tree-vect-loop.c (vect_transform_loop): Likewise.
8271 * tree-vect-slp.c (vect_schedule_slp): Likewise.
8272 * tree-vect-stmts.c (vect_remove_stores): Likewise.
8274 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8276 * tree-vectorizer.h (vec_info::lookup_dr): New member function.
8277 (vect_dr_stmt): Delete.
8278 * tree-vectorizer.c (vec_info::lookup_dr): New function.
8279 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Use it instead
8281 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
8282 (vect_analyze_data_ref_dependence, vect_record_base_alignments)
8283 (vect_verify_datarefs_alignment, vect_peeling_supportable)
8284 (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
8285 (vect_analyze_data_refs): Likewise.
8286 (vect_slp_analyze_data_ref_dependence): Likewise. Take a vec_info
8288 (vect_find_same_alignment_drs): Likewise.
8289 (vect_slp_analyze_node_dependences): Update calls accordingly.
8290 (vect_analyze_data_refs_alignment): Likewise. Use vec_info::lookup_dr
8291 instead of DR_VECT_AUX.
8292 (vect_get_peeling_costs_all_drs): Take a loop_vec_info instead
8293 of a vector data references. Use vec_info::lookup_dr instead of
8295 (vect_peeling_hash_get_lowest_cost): Update calls accordingly.
8296 (vect_enhance_data_refs_alignment): Likewise. Use vec_info::lookup_dr
8297 instead of DR_VECT_AUX.
8299 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8301 * tree-vectorizer.h (_loop_vec_info::unaligned_dr): Change to
8303 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
8305 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
8306 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
8307 (vect_gen_prolog_loop_niters): Likewise.
8309 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8311 * tree-vectorizer.h (set_dr_misalignment, dr_misalignment)
8312 (DR_TARGET_ALIGNMENT, aligned_access_p, known_alignment_for_access_p)
8313 (vect_known_alignment_in_bytes, vect_dr_behavior)
8314 (vect_get_scalar_dr_size): Take references as dr_vec_infos
8315 instead of data_references. Update calls to other routines for
8316 which the same change has been made.
8317 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Take
8318 dr_vec_infos instead of stmt_vec_infos.
8319 (vect_analyze_data_ref_dependence): Update call accordingly.
8320 (vect_slp_analyze_data_ref_dependence)
8321 (vect_record_base_alignments): Use DR_VECT_AUX.
8322 (vect_calculate_target_alignment, vect_compute_data_ref_alignment)
8323 (vect_update_misalignment_for_peel, verify_data_ref_alignment)
8324 (vector_alignment_reachable_p, vect_get_data_access_cost)
8325 (vect_peeling_supportable, vect_analyze_group_access_1)
8326 (vect_analyze_group_access, vect_analyze_data_ref_access)
8327 (vect_vfa_segment_size, vect_vfa_access_size, vect_vfa_align)
8328 (vect_compile_time_alias, vect_small_gap_p)
8329 (vectorizable_with_step_bound_p, vect_duplicate_ssa_name_ptr_info):
8330 (vect_supportable_dr_alignment): Take references as dr_vec_infos
8331 instead of data_references. Update calls to other routines for
8332 which the same change has been made.
8333 (vect_verify_datarefs_alignment, vect_get_peeling_costs_all_drs)
8334 (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
8335 (vect_slp_analyze_and_verify_node_alignment)
8336 (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
8337 (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
8338 (vect_setup_realignment): Use dr_vec_infos. Update calls after
8340 (_vect_peel_info::dr): Replace with...
8341 (_vect_peel_info::dr_info): ...this new field.
8342 (vect_peeling_hash_get_most_frequent)
8343 (vect_peeling_hash_choose_best_peeling): Update accordingly.
8344 (vect_peeling_hash_get_lowest_cost):
8345 (vect_enhance_data_refs_alignment): Likewise. Update calls to other
8346 routines for which the same change has been made.
8347 (vect_peeling_hash_insert): Likewise. Take a dr_vec_info instead of a
8349 * tree-vect-loop-manip.c (get_misalign_in_elems)
8350 (vect_gen_prolog_loop_niters): Use dr_vec_infos. Update calls after
8352 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
8353 * tree-vect-stmts.c (vect_get_store_cost, vect_get_load_cost)
8354 (vect_truncate_gather_scatter_offset, compare_step_with_zero)
8355 (get_group_load_store_type, get_negative_load_store_type)
8356 (vect_get_data_ptr_increment, vectorizable_store)
8357 (vectorizable_load): Likewise.
8358 (ensure_base_align): Take a dr_vec_info instead of a data_reference.
8359 Update calls to other routines for which the same change has been made.
8361 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8363 * tree-vectorizer.h (vec_info::move_dr): New member function.
8364 (dataref_aux): Rename to...
8365 (dr_vec_info): ...this and add "dr" and "stmt" fields.
8366 (_stmt_vec_info::dr_aux): Update accordingly.
8367 (_stmt_vec_info::data_ref_info): Delete.
8368 (STMT_VINFO_GROUPED_ACCESS, DR_GROUP_FIRST_ELEMENT)
8369 (DR_GROUP_NEXT_ELEMENT, DR_GROUP_SIZE, DR_GROUP_STORE_COUNT)
8370 (DR_GROUP_GAP, DR_GROUP_SAME_DR_STMT, REDUC_GROUP_FIRST_ELEMENT):
8371 (REDUC_GROUP_NEXT_ELEMENT, REDUC_GROUP_SIZE): Use dr_aux.dr instead
8373 (STMT_VINFO_DATA_REF): Likewise. Turn into an lvalue.
8374 (STMT_VINFO_DR_INFO): New macro.
8375 (DR_VECT_AUX): Use STMT_VINFO_DR_INKFO and vect_dr_stmt.
8376 (set_dr_misalignment): Update after rename of dataref_aux.
8377 (vect_dr_stmt): Move earlier in file. Return dr_aux.stmt.
8378 * tree-vect-stmts.c (new_stmt_vec_info): Remove redundant
8379 initialization of STMT_VINFO_DATA_REF.
8380 * tree-vectorizer.c (vec_info::move_dr): New function.
8381 * tree-vect-patterns.c (vect_recog_bool_pattern)
8382 (vect_recog_mask_conversion_pattern)
8383 (vect_recog_gather_scatter_pattern): Use it.
8384 * tree-vect-data-refs.c (vect_analyze_data_refs): Initialize
8385 the "dr" and "stmt" fields of dr_vec_info instead of
8386 STMT_VINFO_DATA_REF.
8388 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8390 * tree-vectorizer.h (_stmt_vec_info::pattern_stmt_p): New field.
8391 (is_pattern_stmt_p): Use it.
8392 * tree-vect-patterns.c (vect_init_pattern_stmt): Set pattern_stmt_p
8393 on pattern statements.
8395 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8397 * tree-vect-patterns.c (vect_mark_pattern_stmts): Take the
8398 original stmt as a stmt_vec_info rather than a gimple stmt.
8399 (vect_pattern_recog_1): Take the statement directly as a
8400 stmt_vec_info, rather than via a gimple_stmt_iterator.
8401 Update call to vect_mark_pattern_stmts.
8402 (vect_pattern_recog): Update calls accordingly.
8404 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8406 * tree-vectorizer.h (vect_get_vec_defs_for_stmt_copy)
8407 (vect_get_vec_def_for_stmt_copy): Take a vec_info rather than
8408 a vect_def_type for the first argument.
8409 * tree-vect-stmts.c (vect_get_vec_defs_for_stmt_copy): Likewise.
8410 (vect_get_vec_def_for_stmt_copy): Likewise. Return the original
8411 operand if it isn't defined by a vectorized statement.
8412 (vect_build_gather_load_calls): Remove the mask_dt argument and
8413 update calls to vect_get_vec_def_for_stmt_copy.
8414 (vectorizable_bswap): Likewise the dt argument.
8415 (vectorizable_call): Update calls to vectorizable_bswap and
8416 vect_get_vec_def_for_stmt_copy.
8417 (vectorizable_simd_clone_call, vectorizable_assignment)
8418 (vectorizable_shift, vectorizable_operation, vectorizable_condition)
8419 (vectorizable_comparison): Update calls to
8420 vect_get_vec_def_for_stmt_copy.
8421 (vectorizable_store): Likewise. Remove now-unnecessary calls to
8423 (vect_get_loop_based_defs): Remove dt argument and update call
8424 to vect_get_vec_def_for_stmt_copy.
8425 (vectorizable_conversion): Update calls to vect_get_loop_based_defs
8426 and vect_get_vec_def_for_stmt_copy.
8427 (vectorizable_load): Update calls to vect_build_gather_load_calls
8428 and vect_get_vec_def_for_stmt_copy.
8429 * tree-vect-loop.c (vect_create_epilog_for_reduction)
8430 (vectorizable_reduction, vectorizable_live_operation): Update calls
8431 to vect_get_vec_def_for_stmt_copy.
8433 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8435 * tree-vect-data-refs.c (vect_record_base_alignment): Replace vec_info
8436 and gimple stmt arguments with a stmt_vec_info.
8437 (vect_record_base_alignments): Update calls accordingly.
8438 * tree-vect-slp.c (vect_record_max_nunits): Replace vec_info
8439 and gimple stmt arguments with a stmt_vec_info.
8440 (vect_build_slp_tree_1): Remove vinfo argument and update call
8441 to vect_record_max_nunits.
8442 (vect_build_slp_tree_2): Update calls to vect_build_slp_tree_1
8443 and vect_record_max_nunits.
8445 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8447 * tree-vectorizer.h (nested_in_vect_loop_p): Move further down
8448 file and take a stmt_vec_info instead of a gimple stmt.
8449 (supportable_widening_operation, vect_finish_replace_stmt)
8450 (vect_finish_stmt_generation, vect_get_store_rhs)
8451 (vect_get_vec_def_for_operand_1, vect_get_vec_def_for_operand)
8452 (vect_get_vec_defs, vect_init_vector, vect_transform_stmt)
8453 (vect_remove_stores, vect_analyze_stmt, vectorizable_condition)
8454 (vect_get_smallest_scalar_type, vect_check_gather_scatter)
8455 (vect_create_data_ref_ptr, bump_vector_ptr)
8456 (vect_permute_store_chain, vect_setup_realignment)
8457 (vect_transform_grouped_load, vect_record_grouped_load_vectors)
8458 (vect_create_addr_base_for_vector_ref, vectorizable_live_operation)
8459 (vectorizable_reduction, vectorizable_induction)
8460 (get_initial_def_for_reduction, is_simple_and_all_uses_invariant)
8461 (vect_get_place_in_interleaving_chain): Take stmt_vec_infos rather
8462 than gimple stmts as arguments.
8463 * tree-vect-data-refs.c (vect_get_smallest_scalar_type)
8464 (vect_preserves_scalar_order_p, vect_slp_analyze_node_dependences)
8465 (can_group_stmts_p, vect_check_gather_scatter)
8466 (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
8467 (bump_vector_ptr, vect_permute_store_chain, vect_setup_realignment)
8468 (vect_permute_load_chain, vect_shift_permute_load_chain)
8469 (vect_transform_grouped_load)
8470 (vect_record_grouped_load_vectors): Likewise.
8471 * tree-vect-loop.c (vect_fixup_reduc_chain)
8472 (get_initial_def_for_reduction, vect_create_epilog_for_reduction)
8473 (vectorize_fold_left_reduction, is_nonwrapping_integer_induction)
8474 (vectorizable_reduction, vectorizable_induction)
8475 (vectorizable_live_operation, vect_loop_kill_debug_uses): Likewise.
8476 * tree-vect-patterns.c (type_conversion_p, adjust_bool_stmts)
8477 (vect_get_load_store_mask): Likewise.
8478 * tree-vect-slp.c (vect_get_place_in_interleaving_chain)
8479 (vect_analyze_slp_instance, vect_mask_constant_operand_p): Likewise.
8480 * tree-vect-stmts.c (vect_mark_relevant)
8481 (is_simple_and_all_uses_invariant)
8482 (exist_non_indexing_operands_for_use_p, process_use)
8483 (vect_init_vector_1, vect_init_vector, vect_get_vec_def_for_operand_1)
8484 (vect_get_vec_def_for_operand, vect_get_vec_defs)
8485 (vect_finish_stmt_generation_1, vect_finish_replace_stmt)
8486 (vect_finish_stmt_generation, vect_truncate_gather_scatter_offset)
8487 (compare_step_with_zero, vect_get_store_rhs, get_group_load_store_type)
8488 (get_negative_load_store_type, get_load_store_type)
8489 (vect_check_load_store_mask, vect_check_store_rhs)
8490 (vect_build_gather_load_calls, vect_get_strided_load_store_ops)
8491 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
8492 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
8493 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
8494 (get_group_alias_ptr_type, vectorizable_store, hoist_defs_of_uses)
8495 (vectorizable_load, vectorizable_condition, vectorizable_comparison)
8496 (vect_analyze_stmt, vect_transform_stmt, vect_remove_stores)
8497 (supportable_widening_operation): Likewise.
8499 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8501 * tree-vect-data-refs.c (vect_describe_gather_scatter_call): Take
8502 a stmt_vec_info instead of a gcall.
8503 (vect_check_gather_scatter): Update call accordingly.
8504 * tree-vect-loop-manip.c (iv_phi_p): Take a stmt_vec_info instead
8506 (vect_can_advance_ivs_p, vect_update_ivs_after_vectorizer)
8507 (slpeel_update_phi_nodes_for_loops):): Update calls accordingly.
8508 * tree-vect-loop.c (vect_transform_loop_stmt): Take a stmt_vec_info
8509 instead of a gimple stmt.
8510 (vect_transform_loop): Update calls accordingly.
8511 * tree-vect-slp.c (vect_split_slp_store_group): Take and return
8512 stmt_vec_infos instead of gimple stmts.
8513 (vect_analyze_slp_instance): Update use accordingly.
8514 * tree-vect-stmts.c (read_vector_array, write_vector_array)
8515 (vect_clobber_variable, vect_stmt_relevant_p, permute_vec_elements)
8516 (vect_use_strided_gather_scatters_p, vect_build_all_ones_mask)
8517 (vect_build_zero_merge_argument, vect_get_gather_scatter_ops)
8518 (vect_gen_widened_results_half, vect_get_loop_based_defs)
8519 (vect_create_vectorized_promotion_stmts, can_vectorize_live_stmts):
8520 Take a stmt_vec_info instead of a gimple stmt and pass stmt_vec_infos
8521 down to subroutines.
8523 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8525 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Change the type
8526 of the worklist from a vector of gimple stmts to a vector of
8528 * tree-vect-stmts.c (vect_mark_relevant, process_use)
8529 (vect_mark_stmts_to_be_vectorized): Likewise
8531 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8533 * tree-vect-loop.c (vect_analyze_loop_operations): Look up the
8534 statement before passing it to vect_analyze_stmt.
8535 (vect_create_epilog_for_reduction): Use a stmt_vec_info to walk
8536 the chain of phi vector definitions. Track the exit phi via its
8538 (vectorizable_reduction): Set cond_stmt_vinfo directly from the
8539 STMT_VINFO_REDUC_DEF.
8540 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Use
8541 stmt_vec_infos to handle the statement chains.
8542 (vect_get_slp_defs): Record the first statement in the node
8543 using a stmt_vec_info.
8544 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Look up
8545 statements here and pass their stmt_vec_info down to subroutines.
8546 (vect_init_vector_1): Hoist call to vinfo_for_stmt and pass it
8547 down to vect_finish_stmt_generation.
8548 (vect_init_vector, vect_get_vec_defs, vect_finish_replace_stmt)
8549 (vect_finish_stmt_generation): Call vinfo_for_stmt and pass
8550 stmt_vec_infos to subroutines.
8551 (vect_remove_stores): Use stmt_vec_infos to handle the statement
8554 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8556 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences):
8557 (vect_check_gather_scatter, vect_create_data_ref_ptr, bump_vector_ptr)
8558 (vect_permute_store_chain, vect_setup_realignment)
8559 (vect_permute_load_chain, vect_shift_permute_load_chain)
8560 (vect_transform_grouped_load): Use stmt_vec_info rather than gimple
8561 stmts internally, and when passing values to other vectorizer routines.
8562 * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
8563 * tree-vect-loop.c (vect_analyze_scalar_cycles_1)
8564 (vect_analyze_loop_operations, get_initial_def_for_reduction)
8565 (vect_create_epilog_for_reduction, vectorize_fold_left_reduction)
8566 (vectorizable_reduction, vectorizable_induction)
8567 (vectorizable_live_operation, vect_transform_loop_stmt)
8568 (vect_transform_loop): Likewise.
8569 * tree-vect-patterns.c (vect_reassociating_reduction_p)
8570 (vect_recog_widen_op_pattern, vect_recog_mixed_size_cond_pattern)
8571 (vect_recog_bool_pattern, vect_recog_gather_scatter_pattern): Likewise.
8572 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
8573 (vect_slp_analyze_node_operations_1): Likewise.
8574 * tree-vect-stmts.c (vect_mark_relevant, process_use)
8575 (exist_non_indexing_operands_for_use_p, vect_init_vector_1)
8576 (vect_mark_stmts_to_be_vectorized, vect_get_vec_def_for_operand)
8577 (vect_finish_stmt_generation_1, get_group_load_store_type)
8578 (get_load_store_type, vect_build_gather_load_calls)
8579 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
8580 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
8581 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
8582 (vectorizable_store, vectorizable_load, vectorizable_condition)
8583 (vectorizable_comparison, vect_analyze_stmt, vect_transform_stmt)
8584 (supportable_widening_operation): Likewise.
8585 (vect_get_vector_types_for_stmt): Likewise.
8586 * tree-vectorizer.h (vect_dr_behavior): Likewise.
8588 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8590 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
8591 (vect_slp_analyze_node_dependences, vect_analyze_data_ref_accesses)
8592 (vect_permute_store_chain, vect_permute_load_chain)
8593 (vect_shift_permute_load_chain, vect_transform_grouped_load): Avoid
8594 repeated stmt_vec_info lookups.
8595 * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
8596 (vect_update_ivs_after_vectorizer): Likewise.
8597 * tree-vect-loop.c (vect_is_simple_reduction): Likewise.
8598 (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
8599 * tree-vect-patterns.c (adjust_bool_stmts): Likewise.
8600 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
8601 (vect_bb_slp_scalar_cost): Likewise.
8602 * tree-vect-stmts.c (get_group_alias_ptr_type): Likewise.
8604 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8606 * tree-vect-data-refs.c (vect_check_gather_scatter): Pass the
8607 gcall rather than the generic gimple stmt to gimple_call_internal_fn.
8608 (vect_get_smallest_scalar_type, can_group_stmts_p): Use dyn_cast
8609 to get gassigns and gcalls, rather than operating on generc gimple
8611 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p)
8612 (vect_mark_stmts_to_be_vectorized, vectorizable_store)
8613 (vectorizable_load, vect_analyze_stmt): Likewise.
8614 * tree-vect-loop.c (vectorizable_reduction): Likewise gphi.
8616 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8618 * tree-vectorizer.h (get_earlier_stmt, get_later_stmt): Take and
8619 return stmt_vec_infos rather than gimple stmts. Do not accept
8621 (vect_find_last_scalar_stmt_in_slp): Return a stmt_vec_info instead
8623 * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
8624 Update use of get_later_stmt.
8625 (vect_get_constant_vectors): Update call accordingly.
8626 (vect_schedule_slp_instance): Likewise
8627 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Likewise.
8628 (vect_slp_analyze_instance_dependence): Likewise.
8629 (vect_preserves_scalar_order_p): Update use of get_earlier_stmt.
8631 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8633 * tree-vectorizer.h (stmt_info_for_cost::stmt): Replace with...
8634 (stmt_info_for_cost::stmt_info): ...this new field.
8635 (add_stmt_costs): Update accordingly.
8636 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
8637 (vect_get_known_peeling_cost): Likewise.
8638 (vect_estimate_min_profitable_iters): Likewise.
8639 * tree-vect-stmts.c (record_stmt_cost): Likewise.
8641 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8643 * tree-vectorizer.h (_loop_vec_info::may_misalign_stmts): Change
8644 from an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
8645 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
8647 * tree-vect-loop-manip.c (vect_create_cond_for_align_checks): Likewise.
8649 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8651 * tree-vectorizer.h (_stmt_vec_info::same_dr_stmt): Change from
8652 a gimple stmt to a stmt_vec_info.
8653 * tree-vect-stmts.c (vectorizable_load): Update accordingly.
8655 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8657 * tree-vectorizer.h (vec_info::grouped_stores): Change from
8658 an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
8659 (_loop_vec_info::reduction_chains): Likewise.
8660 * tree-vect-loop.c (vect_fixup_scalar_cycles_with_patterns): Update
8662 * tree-vect-slp.c (vect_analyze_slp): Likewise.
8664 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8666 * tree-vectorizer.h (_stmt_vec_info::first_element): Change from
8667 a gimple stmt to a stmt_vec_info.
8668 (_stmt_vec_info::next_element): Likewise.
8669 * tree-vect-data-refs.c (vect_update_misalignment_for_peel)
8670 (vect_slp_analyze_and_verify_node_alignment)
8671 (vect_analyze_group_access_1, vect_analyze_group_access)
8672 (vect_small_gap_p, vect_prune_runtime_alias_test_list)
8673 (vect_create_data_ref_ptr, vect_record_grouped_load_vectors)
8674 (vect_supportable_dr_alignment): Update accordingly.
8675 * tree-vect-loop.c (vect_fixup_reduc_chain): Likewise.
8676 (vect_fixup_scalar_cycles_with_patterns, vect_is_slp_reduction)
8677 (vect_is_simple_reduction, vectorizable_reduction): Likewise.
8678 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
8679 * tree-vect-slp.c (vect_build_slp_tree_1)
8680 (vect_attempt_slp_rearrange_stmts, vect_supported_load_permutation_p)
8681 (vect_split_slp_store_group, vect_analyze_slp_instance)
8682 (vect_analyze_slp, vect_transform_slp_perm_load): Likewise.
8683 * tree-vect-stmts.c (vect_model_store_cost, vect_model_load_cost)
8684 (get_group_load_store_type, get_load_store_type)
8685 (get_group_alias_ptr_type, vectorizable_store, vectorizable_load)
8686 (vect_transform_stmt, vect_remove_stores): Likewise.
8688 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8690 * tree-vectorizer.h (vect_dr_stmt): Return a stmt_vec_info rather
8692 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
8693 (vect_slp_analyze_data_ref_dependence, vect_record_base_alignments)
8694 (vect_calculate_target_alignmentm, vect_compute_data_ref_alignment)
8695 (vect_update_misalignment_for_peel, vect_verify_datarefs_alignment)
8696 (vector_alignment_reachable_p, vect_get_data_access_cost)
8697 (vect_get_peeling_costs_all_drs, vect_peeling_hash_get_lowest_cost)
8698 (vect_peeling_supportable, vect_enhance_data_refs_alignment)
8699 (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
8700 (vect_analyze_group_access_1, vect_analyze_group_access)
8701 (vect_analyze_data_ref_access, vect_analyze_data_ref_accesses)
8702 (vect_vfa_access_size, vect_small_gap_p, vect_analyze_data_refs)
8703 (vect_supportable_dr_alignment): Remove vinfo_for_stmt from the
8704 result of vect_dr_stmt and use the stmt_vec_info instead of
8705 the associated gimple stmt.
8706 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
8707 (vect_gen_prolog_loop_niters): Likewise.
8708 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
8710 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8712 * tree-vectorizer.h (_slp_tree::stmts): Change from a vec<gimple *>
8713 to a vec<stmt_vec_info>.
8714 * tree-vect-slp.c (vect_free_slp_tree): Update accordingly.
8715 (vect_create_new_slp_node): Take a vec<gimple *> instead of a
8717 (_slp_oprnd_info::def_stmts): Change from a vec<gimple *>
8718 to a vec<stmt_vec_info>.
8719 (bst_traits::value_type, bst_traits::value_type): Likewise.
8720 (bst_traits::hash): Update accordingly.
8721 (vect_get_and_check_slp_defs): Change the stmts parameter from
8722 a vec<gimple *> to a vec<stmt_vec_info>.
8723 (vect_two_operations_perm_ok_p, vect_build_slp_tree_1): Likewise.
8724 (vect_build_slp_tree): Likewise.
8725 (vect_build_slp_tree_2): Likewise. Update uses of
8726 SLP_TREE_SCALAR_STMTS.
8727 (vect_print_slp_tree): Update uses of SLP_TREE_SCALAR_STMTS.
8728 (vect_mark_slp_stmts, vect_mark_slp_stmts_relevant)
8729 (vect_slp_rearrange_stmts, vect_attempt_slp_rearrange_stmts)
8730 (vect_supported_load_permutation_p, vect_find_last_scalar_stmt_in_slp)
8731 (vect_detect_hybrid_slp_stmts, vect_slp_analyze_node_operations_1)
8732 (vect_slp_analyze_node_operations, vect_slp_analyze_operations)
8733 (vect_bb_slp_scalar_cost, vect_slp_analyze_bb_1)
8734 (vect_get_constant_vectors, vect_get_slp_defs)
8735 (vect_transform_slp_perm_load, vect_schedule_slp_instance)
8736 (vect_remove_slp_scalar_calls, vect_schedule_slp): Likewise.
8737 (vect_analyze_slp_instance): Build up a vec of stmt_vec_infos
8738 instead of gimple stmts.
8739 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Change
8740 the stores parameter for a vec<gimple *> to a vec<stmt_vec_info>.
8741 (vect_slp_analyze_instance_dependence): Update uses of
8742 SLP_TREE_SCALAR_STMTS.
8743 (vect_slp_analyze_and_verify_node_alignment): Likewise.
8744 (vect_slp_analyze_and_verify_instance_alignment): Likewise.
8745 * tree-vect-loop.c (neutral_op_for_slp_reduction): Likewise.
8746 (get_initial_defs_for_reduction): Likewise.
8747 (vect_create_epilog_for_reduction): Likewise.
8748 (vectorize_fold_left_reduction): Likewise.
8749 * tree-vect-stmts.c (vect_prologue_cost_for_slp_op): Likewise.
8750 (vect_model_simple_cost, vectorizable_shift, vectorizable_load)
8751 (can_vectorize_live_stmts): Likewise.
8753 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8755 * tree-vectorizer.h (_loop_vec_info::reductions): Change from an
8756 auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
8757 (vect_force_simple_reduction): Take and return stmt_vec_infos rather
8759 * tree-parloops.c (valid_reduction_p): Take a stmt_vec_info instead
8761 (gather_scalar_reductions): Update after above interface changes.
8762 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Likewise.
8763 (vect_is_simple_reduction): Take and return stmt_vec_infos rather
8765 (vect_force_simple_reduction): Likewise.
8766 * tree-vect-patterns.c (vect_pattern_recog_1): Update use of
8767 LOOP_VINFO_REDUCTIONS.
8768 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
8770 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8772 * tree-vectorizer.h (_stmt_vec_info::reduc_def): Change from
8773 a gimple stmt to a stmt_vec_info.
8774 * tree-vect-loop.c (vect_active_double_reduction_p)
8775 (vect_force_simple_reduction, vectorizable_reduction): Update
8778 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8780 * tree-vectorizer.h (_slp_tree::vec_stmts): Change from a
8781 vec<gimple *> to a vec<stmt_vec_info>.
8782 * tree-vect-loop.c (vect_create_epilog_for_reduction): Change
8783 the reduction_phis argument from a vec<gimple *> to a
8785 (vectorizable_reduction): Likewise the phis local variable that
8786 is passed to vect_create_epilog_for_reduction. Update for new type
8787 of SLP_TREE_VEC_STMTS.
8788 (vectorizable_induction): Update for new type of SLP_TREE_VEC_STMTS.
8789 (vectorizable_live_operation): Likewise.
8790 * tree-vect-slp.c (vect_get_slp_vect_defs): Likewise.
8791 (vect_transform_slp_perm_load, vect_schedule_slp_instance): Likewise.
8793 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8795 * tree-vectorizer.h (_stmt_vec_info::vectorized_stmt): Change from
8796 a gimple stmt to a stmt_vec_info.
8797 (vectorizable_condition, vectorizable_live_operation)
8798 (vectorizable_reduction, vectorizable_induction): Pass back the
8799 vectorized statement as a stmt_vec_info.
8800 * tree-vect-data-refs.c (vect_record_grouped_load_vectors): Update
8801 use of STMT_VINFO_VEC_STMT.
8802 * tree-vect-loop.c (vect_create_epilog_for_reduction): Likewise,
8803 accumulating the inner phis that feed the STMT_VINFO_VEC_STMT
8804 as stmt_vec_infos rather than gimple stmts.
8805 (vectorize_fold_left_reduction): Change vec_stmt from a gimple stmt
8807 (vectorizable_live_operation): Likewise.
8808 (vectorizable_reduction, vectorizable_induction): Likewise,
8809 updating use of STMT_VINFO_VEC_STMT.
8810 * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Update use
8811 of STMT_VINFO_VEC_STMT.
8812 (vect_build_gather_load_calls, vectorizable_bswap, vectorizable_call)
8813 (vectorizable_simd_clone_call, vectorizable_conversion)
8814 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
8815 (vectorizable_store, vectorizable_load, vectorizable_condition)
8816 (vectorizable_comparison, can_vectorize_live_stmts): Change vec_stmt
8817 from a gimple stmt to a stmt_vec_info.
8818 (vect_transform_stmt): Update use of STMT_VINFO_VEC_STMT. Pass a
8819 pointer to a stmt_vec_info to the vectorizable_* routines.
8821 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8823 * tree-vectorizer.h (_stmt_vec_info::related_stmt): Change from
8824 a gimple stmt to a stmt_vec_info.
8825 (is_pattern_stmt_p): Update accordingly.
8826 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Likewise.
8827 (vect_record_grouped_load_vectors): Likewise.
8828 * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
8829 (vect_fixup_reduc_chain, vect_update_vf_for_slp): Likewise.
8830 (vect_model_reduction_cost): Likewise.
8831 (vect_create_epilog_for_reduction): Likewise.
8832 (vectorizable_reduction, vectorizable_induction): Likewise.
8833 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
8834 Return the stmt_vec_info for the pattern statement.
8835 (vect_set_pattern_stmt): Update use of STMT_VINFO_RELATED_STMT.
8836 (vect_split_statement, vect_mark_pattern_stmts): Likewise.
8837 * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
8838 (vect_detect_hybrid_slp, vect_get_slp_defs): Likewise.
8839 * tree-vect-stmts.c (vect_mark_relevant): Likewise.
8840 (vect_get_vec_def_for_operand_1, vectorizable_call): Likewise.
8841 (vectorizable_simd_clone_call, vect_analyze_stmt, new_stmt_vec_info)
8842 (free_stmt_vec_info, vect_is_simple_use): Likewise.
8844 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8846 * tree-vectorizer.h (vect_finish_replace_stmt): Return a stmt_vec_info
8847 (vect_finish_stmt_generation): Likewise.
8848 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
8849 (vect_finish_replace_stmt, vect_finish_stmt_generation): Likewise.
8850 (vect_build_gather_load_calls): Use the return value of the above
8851 functions instead of a separate call to vinfo_for_stmt. Use narrow
8852 scopes for the input gimple stmt and wider scopes for the associated
8853 stmt_vec_info. Use vec_info::lookup_def when setting these
8854 stmt_vec_infos from an SSA_NAME definition.
8855 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
8856 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
8857 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
8858 (vectorizable_store, vectorizable_load, vectorizable_condition)
8859 (vectorizable_comparison): Likewise.
8860 * tree-vect-loop.c (vectorize_fold_left_reduction): Likewise.
8861 (vectorizable_reduction): Likewise.
8863 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8865 * tree-vectorizer.h (vect_is_simple_use): Add an optional
8866 stmt_vec_info * parameter before the optional gimple **.
8867 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
8868 (process_use, vect_get_vec_def_for_operand_1): Update callers.
8869 (vect_get_vec_def_for_operand, vectorizable_shift): Likewise.
8870 * tree-vect-loop.c (vectorizable_reduction): Likewise.
8871 (vectorizable_live_operation): Likewise.
8872 * tree-vect-patterns.c (type_conversion_p): Likewise.
8873 (vect_look_through_possible_promotion): Likewise.
8874 (vect_recog_rotate_pattern): Likewise.
8875 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
8877 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8879 * tree-vectorizer.h (stmt_vec_info): Temporarily change from
8880 a typedef to a wrapper class.
8881 (NULL_STMT_VEC_INFO): New macro.
8882 (vec_info::stmt_infos): Change to vec<stmt_vec_info>.
8883 (stmt_vec_info::operator*): New function.
8884 (stmt_vec_info::operator gimple *): Likewise.
8885 (set_vinfo_for_stmt): Use NULL_STMT_VEC_INFO.
8886 (add_stmt_costs): Likewise.
8887 * tree-vect-loop-manip.c (iv_phi_p): Likewise.
8888 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
8889 (vect_get_known_peeling_cost): Likewise.
8890 (vect_estimate_min_profitable_iters): Likewise.
8891 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
8892 * tree-vect-slp.c (vect_remove_slp_scalar_calls): Likewise.
8893 * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
8894 (vectorizable_store, free_stmt_vec_infos): Likewise.
8895 (new_stmt_vec_info): Change return type of xcalloc to
8898 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8900 * tree-vectorizer.h (vec_info::lookup_single_use): Declare.
8901 * tree-vectorizer.c (vec_info::lookup_single_use): New function.
8902 * tree-vect-loop.c (vectorizable_reduction): Use it instead of
8903 a single_imm_use-based sequence.
8904 * tree-vect-stmts.c (supportable_widening_operation): Likewise.
8906 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8908 * tree-vectorizer.h (vec_info::lookup_def): Declare.
8909 * tree-vectorizer.c (vec_info::lookup_def): New function.
8910 * tree-vect-patterns.c (vect_get_internal_def): Use it.
8911 (vect_widened_op_tree): Likewise.
8912 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
8913 * tree-vect-loop.c (vect_analyze_loop_operations): Likewise.
8914 (vectorizable_reduction): Likewise.
8915 (vect_valid_reduction_input_p): Take a stmt_vec_info instead
8917 (vect_is_slp_reduction): Update calls accordingly. Use
8918 vec_info::lookup_def.
8919 (vect_is_simple_reduction): Likewise
8920 * tree-vect-slp.c (vect_detect_hybrid_slp_1): Use vec_info::lookup_def.
8922 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8924 * tree-vectorizer.h (vec_info::lookup_stmt): Declare.
8925 * tree-vectorizer.c (vec_info::lookup_stmt): New function.
8926 * tree-vect-loop.c (vect_determine_vf_for_stmt): Use it instead
8928 (vect_determine_vectorization_factor, vect_analyze_scalar_cycles_1)
8929 (vect_compute_single_scalar_iteration_cost, vect_analyze_loop_form)
8930 (vect_update_vf_for_slp, vect_analyze_loop_operations)
8931 (vect_is_slp_reduction, vectorizable_induction)
8932 (vect_transform_loop_stmt, vect_transform_loop): Likewise.
8933 * tree-vect-patterns.c (vect_init_pattern_stmt):
8934 (vect_determine_min_output_precision_1, vect_determine_precisions)
8935 (vect_pattern_recog): Likewise.
8936 * tree-vect-stmts.c (vect_analyze_stmt, vect_transform_stmt): Likewise.
8937 * config/powerpcspe/powerpcspe.c (rs6000_density_test): Likewise.
8938 * config/rs6000/rs6000.c (rs6000_density_test): Likewise.
8939 * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
8940 (vect_detect_hybrid_slp_1, vect_detect_hybrid_slp_2)
8941 (vect_detect_hybrid_slp): Likewise. Change the walk_stmt_info
8942 info field from a loop to a loop_vec_info.
8944 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8946 * tree-vectorizer.h (stmt_vec_info): Move typedef earlier in file.
8947 (vec_info::add_stmt): Declare.
8948 * tree-vectorizer.c (vec_info::add_stmt): New function.
8949 * tree-vect-data-refs.c (vect_create_data_ref_ptr): Use it.
8950 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Likewise.
8951 (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
8952 (vectorizable_induction): Likewise.
8953 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Likewise.
8954 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
8955 (vectorizable_simd_clone_call, vectorizable_store): Likewise.
8956 (vectorizable_load): Likewise.
8957 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
8958 (vect_recog_bool_pattern, vect_recog_mask_conversion_pattern)
8959 (vect_recog_gather_scatter_pattern): Likewise.
8960 (append_pattern_def_seq): Likewise. Remove a check that is
8961 performed by add_stmt itself.
8963 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8965 * tree-vect-loop.c (vectorizable_reduction): Fix an instance in
8966 which make_ssa_name was called with new_stmt before new_stmt
8969 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8971 * tree-vect-loop.c (vect_valid_reduction_input_p): New function,
8973 (vect_is_slp_reduction): ...here...
8974 (vect_is_simple_reduction): ...and here. Remove repetition of tests
8975 that are already known to be false.
8977 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8979 * tree-vectorizer.h (vect_free_slp_instance): Add a final_p parameter.
8980 * tree-vect-slp.c (vect_free_slp_tree): Likewise. Don't update
8981 STMT_VINFO_NUM_SLP_USES when it's true.
8982 (vect_free_slp_instance): Add a final_p parameter and pass it to
8984 (vect_build_slp_tree_2): Update call to vect_free_slp_instance.
8985 (vect_analyze_slp_instance): Likewise.
8986 (vect_slp_analyze_operations): Likewise.
8987 (vect_slp_analyze_bb_1): Likewise.
8988 * tree-vectorizer.c (vec_info): Likewise.
8989 * tree-vect-loop.c (vect_transform_loop): Likewise.
8991 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8993 * tree-vect-loop.c (vectorizable_reduction): Assert that the
8994 function is not called for second and subsequent members of
8997 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8999 * tree-vect-loop.c (get_initial_def_for_reduction): Move special
9000 cases for nested loops from here to ...
9001 (vect_create_epilog_for_reduction): ...here. Only call
9002 vect_is_simple_use for inner-loop reductions.
9004 2018-07-31 Martin Liska <mliska@suse.cz>
9006 PR gcov-profile/85338
9007 PR gcov-profile/85350
9008 PR gcov-profile/85372
9009 * profile.c (struct location_triplet): New.
9010 (struct location_triplet_hash): Likewise.
9011 (output_location): Do not output a BB that
9012 is already recorded for a line.
9013 (branch_prob): Use streamed_locations.
9015 2018-07-31 Martin Liska <mliska@suse.cz>
9017 PR gcov-profile/85370
9018 * coverage.c (coverage_begin_function): Do not mark target
9019 clones as artificial functions.
9021 2018-07-31 Martin Liska <mliska@suse.cz>
9023 PR gcov-profile/83813
9024 PR gcov-profile/84758
9025 PR gcov-profile/85217
9026 PR gcov-profile/85332
9027 * profile.c (branch_prob): Do not record GOTO expressions
9028 for GIMPLE statements which locations are already streamed.
9030 2018-07-31 Olivier Hainque <hainque@adacore.com>
9032 * gcc.c (handle_spec_function): Accept a soft_matched_part
9033 argument, as do_spec_1. Pass it down to ...
9034 (eval_spec_function): Accept a soft_matched_part argument,
9035 and pass it down to ...
9036 (do_spec_2): Accept a soft_matched_part argument, and pass
9037 it down to do_spec_1.
9038 (do_spec_1): Pass soft_matched_part to handle_spec_function.
9039 (handle_braces): Update call to handle_spec_function.
9040 (driver::set_up_specs): Update calls to do_spec_2.
9041 (compare_debug_dump_opt_spec_function): Likewise.
9042 (compare_debug_self_opt_spec_function): Likewise.
9044 2018-07-31 Olivier Hainque <hainque@adacore.com>
9046 * common.opt (nolibc): New option.
9047 * doc/invoke.texi (Link Options): Document it.
9048 * gcc.c (LINK_GCC_C_SEQUENCE_SPEC): Honor nolibc.
9049 * config/alpha/linux.h: Likewise.
9050 * config/arc/elf.h: Likewise.
9051 * config/arm/uclinux-elf.h: Likewise.
9052 * config/arm/unknown-elf.h: Likewise.
9053 * config/avr/avrlibc.h: Likewise.
9054 * config/bfin/bfin.h: Likewise.
9055 * config/bfin/linux.h: Likewise.
9056 * config/bfin/uclinux.h: Likewise.
9057 * config/darwin.h: Likewise.
9058 * config/darwin10.h: Likewise.
9059 * config/darwin12.h: Likewise.
9060 * config/gnu-user.h: Likewise.
9061 * config/lm32/uclinux-elf.h: Likewise.
9062 * config/pa/pa-hpux11.h: Likewise.
9063 * config/pa/pa64-hpux.h: Likewise.
9064 * config/sparc/sparc.h: Likewise.
9066 2018-07-31 Olivier Hainque <hainque@adacore.com>
9068 * gcc.c (getenv_spec_function): Prepend '/' to value for allowed
9069 undefined variables.
9071 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
9074 * config/arm/arm.c (arm_block_set_aligned_vect): Use gen_int_mode
9077 2018-07-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
9079 * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
9080 terminated string literal.
9082 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
9084 PR rtl-optimization/85160
9085 * combine.c (is_just_move): New function.
9086 (try_combine): Allow combining two instructions into two if neither of
9087 the original instructions was a move.
9089 2018-07-30 Alexander Monakov <amonakov@ispras.ru>
9092 * doc/extend.texi (Global Register Variables): Discourage use of type
9094 (Local Register Variables): Likewise.
9096 2018-07-30 Richard Sandiford <richard.sandiford@arm.com>
9098 PR tree-optimization/86506
9099 * hwint.h (ceil_log2): Resync with hwint.c implementation.
9101 2018-07-30 Ilya Leoshkevich <iii@linux.ibm.com>
9104 * lra-constraints.c (spill_hard_reg_in_range): When selecting the
9105 hard_regno, make sure no insn between `from` and `to` clobbers it.
9107 2018-07-30 Cesar Philippidis <cesar@codesourcery.com>
9108 Tom de Vries <tdevries@suse.de>
9110 * config/nvptx/nvptx.c (PTX_GANG_DEFAULT): Rename to ...
9111 (PTX_DEFAULT_RUNTIME_DIM): ... this.
9112 (nvptx_goacc_validate_dims): Set default worker and gang dims to
9113 PTX_DEFAULT_RUNTIME_DIM.
9114 (nvptx_dim_limit): Ignore GOMP_DIM_WORKER.
9116 2018-07-29 John David Anglin <danglin@gcc.gnu.org>
9118 * config/pa/pa.c (pa_output_addr_vec): Align address table.
9119 * config/pa/pa.h (JUMP_TABLES_IN_TEXT_SECTION): Revise comment.
9120 * config/pa/pa32-linux.h (JUMP_TABLES_IN_TEXT_SECTION): Define.
9122 2018-07-27 Michael Meissner <meissner@linux.ibm.com>
9124 * config/rs6000/constraints.md (wG constraint): Delete, no longer
9126 * config/rs6000/predicates.md (p9_fusion_reg_operand): Rename
9127 predicate to reflect toc fusion has been deleted.
9128 (toc_fusion_mem_raw): Delete, no longer used.
9129 (toc_fusion_mem_wrapped): Likewise.
9130 * config/rs6000/rs6000-cpus.def (POWERPC_MASKS): Delete toc
9132 * config/rs6000/rs6000-protos.h (fusion_wrap_memory_address):
9133 Delete, no longer used.
9134 * config/rs6000/rs6000.c (struct rs6000_reg_addr): Delete fields
9135 meant to be used for toc fusion.
9136 (rs6000_debug_print_mode): Delete toc fusion debugging.
9137 (rs6000_debug_reg_global): Likewise.
9138 (rs6000_init_hard_regno_mode_ok): Delete setting up fields for toc
9139 fusion and secondary reload support that were never used.
9140 (rs6000_option_override_internal): Delete TOC fusion, that was only
9141 partially defined, and it did not work unless you also used the
9143 (rs6000_legitimate_address_p): Delete TOC fusion support.
9144 (rs6000_opt_masks): Likewise.
9145 (fusion_wrap_memory_address): Delete function, no longer used.
9146 (fusion_split_address); Delete TOC fusion support.
9147 * config/rs6000/rs6000.h (TARGET_TOC_FUSION_INT): Delete, no
9148 longer used with toc fusion being deleted.
9149 (TARGET_TOC_FUSION_FP): Likewise.
9150 * config/rs6000/rs6000.md (UNSPEC_FUSION_ADDIS): Delete TOC fusion
9152 (toc fusion spliter): Delete TOC fusion support.
9153 (toc_fusionload_<mode>): Likewise.
9154 (toc_fusionload_di): Likewise.
9155 (fusion_gpr_load_<mode>): Delete generator function, this insn no
9156 longer needs to be named. Rename predicate to delete TOC fusion.
9157 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
9158 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
9159 (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
9160 (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
9161 (p9 fusion peephole2s): Rename predicate to delete TOC fusion.
9163 2018-07-27 Kelvin Nilsen <kelvin@gcc.gnu.org>
9165 * doc/extend.texi (Basic PowerPC Built-in Functions Available on
9166 ISA 2.05): Replace __uint128_t with __uint128 and __int128_t with
9167 __int128 in built-in function prototypes.
9168 (PowerPC AltiVec Built-in Functions on ISA 2.07): Likewise.
9169 (PowerPC AltiVec Built-in Functions on ISA 3.0): Likewise.
9171 2018-07-27 Martin Sebor <msebor@redhat.com>
9173 PR tree-optimization/86696
9174 * tree-ssa-strlen.c (get_min_string_length): Handle all integer
9175 types, including enums.
9176 (handle_char_store): Be prepared for the above function to fail.
9178 2018-07-26 Qing Zhao <qing.zhao@oracle.com>
9180 * builtins.c (inline_expand_builtin_string_cmp): Disable inlining
9181 when optimization level is lower than 2 or optimize for size.
9183 2018-07-26 Martin Sebor <msebor@redhat.com>
9185 PR tree-optimization/86043
9186 PR tree-optimization/86042
9187 * tree-ssa-strlen.c (handle_builtin_memcpy): Handle strict overlaps.
9188 (get_string_cst_length): Rename...
9189 (get_min_string_length): ...to this. Add argument.
9190 (handle_char_store): Extend to handle multi-character stores by
9192 * tree.c (initializer_zerop): Use new argument. Handle MEM_REF.
9193 * tree.h (initializer_zerop): Add argument.
9195 2018-07-26 Jakub Jelinek <jakub@redhat.com>
9198 * omp-low.c (scan_sharing_clauses): Don't ignore map clauses for
9199 declare target to variables if they have always,{to,from,tofrom} map
9202 2018-07-26 Martin Liska <mliska@suse.cz>
9205 * lto-wrapper.c: Add linker_output as prefix
9206 for ltrans_output_file.
9208 2018-07-26 Segher Boessenkool <segher@kernel.crashing.org>
9210 PR rtl-optimization/85805
9211 * combine.c (reg_nonzero_bits_for_combine): Only use the last set
9212 value for hard registers if that was written in the same mode.
9214 2018-07-26 Martin Liska <mliska@suse.cz>
9216 PR gcov-profile/86536
9217 * gcov.c (format_gcov): Use printf format %.*f directly
9218 and do not handle special values.
9220 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
9222 * common/config/arc/arc-common.c (arc_option_optimization_table):
9223 Update default optimizations for size.
9225 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
9227 * config/arc/arc.md (movsf_insn): Add short instruction selection.
9228 * config/arc/constraints.md (CfZ): New constraint.
9229 * config/arc/fpu.md (addssf3_fpu): Use CfZ constraint.
9230 (subsf3_fpu): Likewise.
9231 (cmpsf_fpu): Likewise.
9232 (cmpsf_fpu_uneq): Likewise.
9234 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
9236 * config/arc/arc.c (compact_memory_operand_p): Check for uncached
9238 (arc_is_uncached_mem_p): uncached applies to both the variable and
9241 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
9243 * config/arc/arc.h (ADDITIONAL_REGISTER_NAMES): Add additional
9246 2018-07-25 David Malcolm <dmalcolm@redhat.com>
9248 * optinfo-emit-json.cc (class optrecord_json_writer): Convert
9249 field "m_scopes" from vec to auto_vec.
9251 2018-07-25 Martin Liska <mliska@suse.cz>
9253 * config/powerpcspe/powerpcspe-protos.h (rs6000_loop_align): Fix
9256 2018-07-25 Richard Biener <rguenther@suse.de>
9259 * dwarf2out.c (dwarf2out_decl): Do not handle nested functions
9260 special wrt context_die late.
9261 (gen_subprogram_die): Re-use DIEs in local scope.
9263 2018-07-25 Richard Sandiford <richard.sandiford@arm.com>
9265 PR tree-optimization/86644
9266 * hwint.c (ceil_log2): Fix comment. Return 0 for 0.
9268 2018-07-25 Martin Liska <mliska@suse.cz>
9271 * dumpfile.c: And excluded values with TDF_ALL_VALUES.
9272 * dumpfile.h (enum dump_flag): Defince TDF_ALL_VALUES.
9274 2018-07-25 Martin Liska <mliska@suse.cz>
9277 * params.def: Explain ASan abbreviation and provide
9278 a documentation link.
9280 2018-07-24 Martin Sebor <msebor@redhat.com>
9282 PR tree-optimization/86622
9283 PR tree-optimization/86532
9284 * builtins.h (string_length): Declare.
9285 * builtins.c (c_strlen): Correct handling of non-constant offsets.
9286 (check_access): Be prepared for non-constant length ranges.
9287 (string_length): Make extern.
9288 * expr.c (string_constant): Only handle the minor non-constant
9289 array index. Use string_constant to compute the length of
9290 a generic string constant.
9292 2018-07-24 Richard Sandiford <richard.sandiford@arm.com>
9294 PR tree-optimization/86618
9295 * tree-vect-stmts.c (vectorizable_call): Don't take the address
9296 of LOOP_VINFO_MASKS (loop_vinfo) when loop_vinfo is null.
9298 2018-07-24 David Malcolm <dmalcolm@redhat.com>
9300 PR tree-optimization/86636
9301 * json.cc (json::object::set): Fix comment. Add assertions.
9302 (json::array::append): Move here from json.h. Add comment and an
9304 (json::string::string): Likewise.
9305 * json.h (json::array::append): Move to json.cc.
9306 (json::string::string): Likewise.
9307 * optinfo-emit-json.cc
9308 (optrecord_json_writer::impl_location_to_json): Assert that we
9309 aren't attempting to write out UNKNOWN_LOCATION, or an ad-hoc
9310 wrapper around it. Expand the location once, rather than three
9312 (optrecord_json_writer::inlining_chain_to_json): Fix the check for
9313 UNKNOWN_LOCATION, to use LOCATION_LOCUS to look through ad-hoc
9315 (optrecord_json_writer::optinfo_to_json): Likewise, in four
9316 places. Fix some overlong lines.
9318 2018-07-24 Matthew Malcomson <matthew.malcomson@arm.com>
9320 * config/aarch64/aarch64-simd.md
9321 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>): Split into...
9322 (aarch64_<ANY_EXTEND:su>subw<mode>): ... This...
9323 (aarch64_<ANY_EXTEND:su>addw<mode>): ... And this.
9324 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>_internal): Split into...
9325 (aarch64_<ANY_EXTEND:su>subw<mode>_internal): ... This...
9326 (aarch64_<ANY_EXTEND:su>addw<mode>_internal): ... And this.
9327 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w2<mode>_internal): Split into...
9328 (aarch64_<ANY_EXTEND:su>subw2<mode>_internal): ... This...
9329 (aarch64_<ANY_EXTEND:su>addw2<mode>_internal): ... And this.
9331 2018-07-24 Jakub Jelinek <jakub@redhat.com>
9334 * expmed.c (expand_divmod): Punt if d == HOST_WIDE_INT_MIN
9335 and size > HOST_BITS_PER_WIDE_INT. For size > HOST_BITS_PER_WIDE_INT
9336 and abs_d == d, do the power of two handling if profitable.
9338 2018-07-24 Richard Biener <rguenther@suse.de>
9340 * match.pd: Add BIT_FIELD_REF canonicalizations.
9342 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
9345 * genmatch.c (dt_operand::gen_match_op): Avoid folding volatile values.
9347 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
9349 * gimple-fold.c (gimple_fold_builtin_printf): Don't create a not NUL
9350 terminated STRING_CST object.
9352 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
9354 hsa-dump.c (dump_hsa_symbol): Avoid out of scope access to buf.
9356 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
9358 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Adjust.
9359 * config/rs6000/rs6000-protos.h (rs6000_split_v4si_init): Delete.
9360 * config/rs6000/rs6000.c (rs6000_expand_vector_init): Always force
9361 the elements into a register.
9362 (rs6000_split_v4si_init_di_reg): Delete.
9363 (rs6000_split_v4si_init): Delete.
9364 * config/rs6000/vsx.md (unspec): Delete UNSPEC_VSX_VEC_INIT.
9365 (vsx_init_v4si): Rewrite as a define_expand.
9367 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
9369 * config/rs6000/rs6000.md (splitters for rldimi and rlwimi with the
9370 zero_extend argument from memory): New.
9372 2018-07-22 Martin Sebor <msebor@redhat.com>
9375 * gimple-ssa-warn-alloca.c (alloca_call_type_by_arg): Avoid
9376 diagnosing calls with unknown arguments unless -Walloca-larger-than
9377 is restricted to less than PTRDIFF_MAX bytes.
9379 2018-07-22 Gerald Pfeifer <gerald@pfeifer.com>
9381 * doc/gcov.texi (Invoking Gcov): Editorial changes.
9383 2018-07-20 David Malcolm <dmalcolm@redhat.com>
9385 * pretty-print.c (text_info::set_location): Remove redundant
9386 "line_table" parameter from call to rich_location::set_range.
9388 2018-07-20 Martin Sebor <msebor@redhat.com>
9391 * builtins.c (expand_builtin_alloca): Adjust.
9392 * calls.c (alloc_max_size): Simplify.
9393 * cgraphunit.c (cgraph_node::expand): Adjust.
9394 * common.opt (larger_than_size, warn_frame_larger_than): Remove
9396 (frame_larger_than_size): Same.
9397 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Change options
9398 to take a HOST_WIDE_INT argument and accept a byte-size suffix.
9400 * doc/invoke.texi (GCC Command Options): Document option arguments.
9401 Explain byte-size arguments and suffixes.
9402 (-Wvla-larger-than, -Wno-alloc-size-larger-than): Update.
9403 (-Wno-alloca-larger-than, -Wno-vla-larger-than): Same.
9404 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Same.
9405 * doc/options.texi (UInteger): Expand.
9406 (Host_Wide_Int, ByteSize): Document new properties.
9407 * final.c (final_start_function_1): Include sizes in an error message.
9408 * function.c (frame_offset_overflow): Same.
9409 * gimple-ssa-warn-alloca.c (pass_walloca::gate): Adjust.
9410 (alloca_call_type_by_arg): Change function argument to HOST_WIDE_INT.
9411 Diagnose unbounded alloca calls only for limits of less than
9413 (alloca_call_type): Adjust. Diagnose possibly out-of-bounds alloca
9414 calls and VLA size only for limits of less than PTRDIFF_MAX. Same
9416 (pass_walloca::execute): Adjust. Diagnose alloca calls in loops
9417 only for limits of less than PTRDIFF_MAX.
9418 * langhooks-def.h (lhd_handle_option): Change function argument
9420 * langhooks.c (lhd_handle_option): Same.
9421 * langhooks.h (handle_option): Same.
9422 * opt-functions.awk (switch_bit_fields): Handle Host_Wide_Int and
9424 (var_type, var_type_struct): Same.
9425 (var_set): Handle ByteSize flag.
9426 * optc-gen.awk: Add comments to output to ease debugging. Make
9427 use of HOST_WIDE_INT where appropriate.
9428 * opts-gen-save.awk: Use %lx to format unsigned long.
9429 * opth-gen.awk: Change function argument to HOST_WIDE_INT.
9430 * opts-common.c (integral_argument): Return HOST_WIDE_INT and add
9431 arguments. Parse bytes-size suffixes.
9432 (enum_arg_to_value): Change function argument to HOST_WIDE_INT.
9433 (enum_value_to_arg): Same.
9434 (decode_cmdline_option): Handle cl_host_wide_int. Adjust.
9435 (handle_option): Adjust.
9436 (generate_option): Change function argument to HOST_WIDE_INT.
9437 (cmdline_handle_error): Adjust.
9438 (read_cmdline_option): Change function argument to HOST_WIDE_INT.
9439 (set_option): Change function argument to HOST_WIDE_INT.
9440 (option_enabled): Handle cl_host_wide_int.
9441 (get_option_state): Handle CLVC_SIZE.
9442 (control_warning_option): Same.
9443 * opts.c (common_handle_option): Change function argument to
9444 HOST_WIDE_INT. Remove handling of OPT_Walloca_larger_than_ and
9445 OPT_Wvla_larger_than_.
9446 * opts.h (enum cl_var_type): Add an enumerator.
9447 * stor-layout.c (layout_decl): Print a more meaningful warning.
9448 * toplev.c (output_stack_usage): Adjust.
9450 2018-07-20 Qing Zhao <qing.zhao@oracle.com>
9452 * builtins.c (expand_builtin_memcmp): Delete the last parameter for
9453 call to inline_expand_builtin_string_cmp.
9454 (expand_builtin_strcmp): Likewise.
9455 (expand_builtin_strncmp): Likewise.
9456 (inline_string_cmp): Delete the last parameter, change char_type_node
9457 to unsigned_char_type_node for strcmp/strncmp, add conversions to the
9459 (inline_expand_builtin_string_cmp): Delete the last parameter, give up
9460 the inlining expansion on target where the type of the call has same or
9461 narrower precision than unsigned char.
9463 2018-07-20 David Malcolm <dmalcolm@redhat.com>
9465 * Makefile.in (OBJS): Add json.o and optinfo-emit-json.o.
9466 (CFLAGS-optinfo-emit-json.o): Define TARGET_NAME.
9467 * common.opt (fsave-optimization-record): New option.
9468 * coretypes.h (struct kv_pair): Move here from dumpfile.c.
9469 * doc/invoke.texi (-fsave-optimization-record): New option.
9470 * dumpfile.c: Include "optinfo-emit-json.h".
9471 (struct kv_pair): Move to coretypes.h.
9472 (optgroup_options): Make non-static.
9473 (dump_context::end_scope): Call
9474 optimization_records_maybe_pop_dump_scope.
9475 * dumpfile.h (optgroup_options): New decl.
9476 * json.cc: New file.
9478 * optinfo-emit-json.cc: New file.
9479 * optinfo-emit-json.h: New file.
9480 * optinfo.cc: Include "optinfo-emit-json.h".
9481 (optinfo::emit): Call optimization_records_maybe_record_optinfo.
9482 (optinfo_enabled_p): Check optimization_records_enabled_p.
9483 (optinfo_wants_inlining_info_p): Likewise.
9484 * optinfo.h: Update comment.
9485 * profile-count.c (profile_quality_as_string): New function.
9486 * profile-count.h (profile_quality_as_string): New decl.
9487 (profile_count::quality): New accessor.
9488 * selftest-run-tests.c (selftest::run_tests): Call json_cc_tests
9489 and optinfo_emit_json_cc_tests.
9490 * selftest.h (selftest::json_cc_tests): New decl.
9491 (selftest::optinfo_emit_json_cc_tests): New decl.
9492 * toplev.c: Include "optinfo-emit-json.h".
9493 (compile_file): Call optimization_records_finish.
9494 (do_compile): Call optimization_records_start.
9495 * tree-ssa-live.c: Include optinfo.h.
9496 (remove_unused_scope_block_p): Retain inlining information if
9497 optinfo_wants_inlining_info_p returns true.
9499 2018-07-20 Richard Biener <rguenther@suse.de>
9502 * dwarf2out.c (dwarf2out_die_ref_for_decl): Test in_lto_p
9503 to cover -flto-partition=none.
9505 2018-07-20 Martin Liska <mliska@suse.cz>
9507 * tree.h (DECL_LOCATION_RANGE): Remove unused macro.
9508 (get_decl_source_range): Remove unused function.
9510 2018-07-20 Richard Biener <rguenther@suse.de>
9512 * tree-ssa-sccvn.h (struct vn_nary_op_s): Add next member.
9513 (struct vn_phi_s): Likewise.
9514 (struct vn_reference_s): Likewise.
9515 * tree-ssa-sccvn.c (vn_nary_op_hasher::equal): Add shortcut
9516 for searching the slot of an entry known to be in the hash itself.
9517 (vn_phi_hasher::equal): Likewise.
9518 (vn_reference_hasher::equal): Likewise.
9519 (last_inserted_ref, last_inserted_phi, last_inserted_nary): New
9521 (optimistic_info, current_info): Remove, keeping only valid_info.
9522 (vn_reference_lookup_1): Remove fallback lookup.
9523 (vn_reference_lookup_2): Likewise.
9524 (vn_nary_op_lookup_1): Likewise.
9525 (vn_phi_lookup): Likewise.
9526 (vn_nary_build_or_lookup_1): Make sure to not chain the built
9528 (vn_reference_insert): Adjust, chain the inserted hash element
9529 at last_inserted_ref.
9530 (vn_reference_insert_pieces): Likewise.
9531 (visit_reference_op_call): Likewise.
9532 (vn_nary_op_insert_into): Chain the inserted hash element at
9534 (vn_nary_op_insert_pieces): Adjust.
9535 (vn_nary_op_insert): Likewise.
9536 (vn_nary_op_insert_stmt): Likewise.
9537 (vn_phi_insert): Adjust, chain the inserted hash element at
9539 (process_scc): Remove clearing and copying the optimistic
9540 table. Instead remove elements inserted during an optimistic
9541 iteration from the single table we maintain.
9542 (init_scc_vn): Adjust.
9543 (free_scc_vn): Likewise.
9544 (sccvn_dom_walker::record_cond): Likewise.
9545 (sccvn_dom_walker::after_dom_children): Likewise.
9547 2018-07-19 Martin Sebor <msebor@redhat.com>
9549 PR tree-optimization/84047
9550 PR tree-optimization/83776
9551 * tree-vrp.c (vrp_prop::check_mem_ref): New function.
9552 (check_array_bounds): Call it.
9554 2018-07-19 Martin Sebor <msebor@redhat.com>
9556 * align.h (align_flags): Use member initialization.
9558 2018-07-19 David Malcolm <dmalcolm@redhat.com>
9560 * Makefile.in (OBJS): Add optinfo.o.
9561 * coretypes.h (class symtab_node): New forward decl.
9562 (struct cgraph_node): New forward decl.
9563 (class varpool_node): New forward decl.
9564 * dump-context.h: New file.
9565 * dumpfile.c: Include "optinfo.h", "dump-context.h", "cgraph.h",
9567 (refresh_dumps_are_enabled): Use optinfo_enabled_p.
9568 (set_dump_file): Call dumpfile_ensure_any_optinfo_are_flushed.
9569 (set_alt_dump_file): Likewise.
9570 (dump_context::~dump_context): New dtor.
9571 (dump_gimple_stmt): Move implementation to...
9572 (dump_context::dump_gimple_stmt): ...this new member function.
9573 Add the stmt to any pending optinfo, creating one if need be.
9574 (dump_gimple_stmt_loc): Move implementation to...
9575 (dump_context::dump_gimple_stmt_loc): ...this new member function.
9576 Start a new optinfo and add the stmt to it.
9577 (dump_gimple_expr): Move implementation to...
9578 (dump_context::dump_gimple_expr): ...this new member function.
9579 Add the stmt to any pending optinfo, creating one if need be.
9580 (dump_gimple_expr_loc): Move implementation to...
9581 (dump_context::dump_gimple_expr_loc): ...this new member function.
9582 Start a new optinfo and add the stmt to it.
9583 (dump_generic_expr): Move implementation to...
9584 (dump_context::dump_generic_expr): ...this new member function.
9585 Add the tree to any pending optinfo, creating one if need be.
9586 (dump_generic_expr_loc): Move implementation to...
9587 (dump_context::dump_generic_expr_loc): ...this new member
9588 function. Add the tree to any pending optinfo, creating one if
9590 (dump_printf): Move implementation to...
9591 (dump_context::dump_printf_va): ...this new member function. Add
9592 the text to any pending optinfo, creating one if need be.
9593 (dump_printf_loc): Move implementation to...
9594 (dump_context::dump_printf_loc_va): ...this new member function.
9595 Start a new optinfo and add the stmt to it.
9596 (dump_dec): Move implementation to...
9597 (dump_context::dump_dec): ...this new member function. Add the
9598 value to any pending optinfo, creating one if need be.
9599 (dump_context::dump_symtab_node): New member function.
9600 (dump_context::get_scope_depth): New member function.
9601 (dump_context::begin_scope): New member function.
9602 (dump_context::end_scope): New member function.
9603 (dump_context::ensure_pending_optinfo): New member function.
9604 (dump_context::begin_next_optinfo): New member function.
9605 (dump_context::end_any_optinfo): New member function.
9606 (dump_context::s_current): New global.
9607 (dump_context::s_default): New global.
9608 (dump_scope_depth): Delete global.
9609 (dumpfile_ensure_any_optinfo_are_flushed): New function.
9610 (dump_symtab_node): New function.
9611 (get_dump_scope_depth): Reimplement in terms of dump_context.
9612 (dump_begin_scope): Likewise.
9613 (dump_end_scope): Likewise.
9614 (selftest::temp_dump_context::temp_dump_context): New ctor.
9615 (selftest::temp_dump_context::~temp_dump_context): New dtor.
9616 (selftest::verify_item): New function.
9617 (ASSERT_IS_TEXT): New macro.
9618 (ASSERT_IS_TREE): New macro.
9619 (ASSERT_IS_GIMPLE): New macro.
9620 (selftest::test_capture_of_dump_calls): New test.
9621 (selftest::dumpfile_c_tests): Call it.
9622 * dumpfile.h (dump_printf, dump_printf_loc, dump_basic_block)
9623 (dump_generic_expr_loc, dump_generic_expr, dump_gimple_stmt_loc)
9624 (dump_gimple_stmt, dump_dec): Gather these related decls and add a
9625 descriptive comment.
9626 (dump_function, print_combine_total_stats, enable_rtl_dump_file)
9627 (dump_node, dump_bb): Move these unrelated decls.
9628 (class dump_manager): Add leading comment.
9629 * optinfo.cc: New file.
9630 * optinfo.h: New file.
9632 2018-07-19 Michael Collison <michael.collison@arm.com>
9633 Richard Henderson <rth@redhat.com>
9635 * config/aarch64/aarch64.md (subv<GPI>4, usubv<GPI>4): New patterns.
9636 (subti): Handle op1 zero.
9637 (subvti4, usub4ti4): New.
9638 (*sub<GPI>3_compare1_imm): New.
9639 (sub<GPI>3_carryinCV): New.
9640 (*sub<GPI>3_carryinCV_z1_z2, *sub<GPI>3_carryinCV_z1): New.
9641 (*sub<GPI>3_carryinCV_z2, *sub<GPI>3_carryinCV): New.
9643 2018-07-19 Michael Collison <michael.collison@arm.com>
9644 Richard Henderson <rth@redhat.com>
9646 * config/aarch64/aarch64.md: (addv<GPI>4, uaddv<GPI>4): New.
9647 (addti3): Create simpler code if low part is already known to be 0.
9648 (addvti4, uaddvti4): New.
9649 (*add<GPI>3_compareC_cconly_imm): New.
9650 (*add<GPI>3_compareC_cconly): New.
9651 (*add<GPI>3_compareC_imm): New.
9652 (*add<GPI>3_compareC): Rename from add<GPI>3_compare1; do not
9653 handle constants within this pattern..
9654 (*add<GPI>3_compareV_cconly_imm): New.
9655 (*add<GPI>3_compareV_cconly): New.
9656 (*add<GPI>3_compareV_imm): New.
9657 (add<GPI>3_compareV): New.
9658 (add<GPI>3_carryinC, add<GPI>3_carryinV): New.
9659 (*add<GPI>3_carryinC_zero, *add<GPI>3_carryinV_zero): New.
9660 (*add<GPI>3_carryinC, *add<GPI>3_carryinV): New.
9661 ((*add<GPI>3_compareC_cconly_imm): Replace 'ne' operator
9662 with 'comparison' operator.
9663 (*add<GPI>3_compareV_cconly_imm): Ditto.
9664 (*add<GPI>3_compareV_cconly): Ditto.
9665 (*add<GPI>3_compareV_imm): Ditto.
9666 (add<GPI>3_compareV): Ditto.
9667 (add<mode>3_carryinC): Ditto.
9668 (*add<mode>3_carryinC_zero): Ditto.
9669 (*add<mode>3_carryinC): Ditto.
9670 (add<mode>3_carryinV): Ditto.
9671 (*add<mode>3_carryinV_zero): Ditto.
9672 (*add<mode>3_carryinV): Ditto.
9674 2018-07-19 Michael Collison <michael.collison@arm.com>
9675 Richard Henderson <rth@redhat.com>
9677 * config/aarch64/aarch64-modes.def (CC_V): New.
9678 * config/aarch64/aarch64-protos.h
9679 (aarch64_addti_scratch_regs): Declare
9680 (aarch64_subvti_scratch_regs): Declare.
9681 (aarch64_expand_subvti): Declare.
9682 (aarch64_gen_unlikely_cbranch): Declare
9683 * config/aarch64/aarch64.c (aarch64_select_cc_mode): Test
9684 for signed overflow using CC_Vmode.
9685 (aarch64_get_condition_code_1): Handle CC_Vmode.
9686 (aarch64_gen_unlikely_cbranch): New function.
9687 (aarch64_addti_scratch_regs): New function.
9688 (aarch64_subvti_scratch_regs): New function.
9689 (aarch64_expand_subvti): New function.
9691 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
9693 * config/aarch64/aarch64-option-extensions.def: New entry for profile
9695 * config/aarch64/aarch64.h (AARCH64_FL_PROFILE): New.
9696 * doc/invoke.texi (aarch64-feature-modifiers): New entry for profile
9699 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
9702 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
9703 address check not strict.
9705 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
9707 * config/aarch64/aarch64-simd.md (aarch64_simd_mov<VQ:mode>): Replace
9709 (store_pair_lanes<mode>): Likewise.
9710 * config/aarch64/aarch64-protos.h (aarch64_addr_query_type): Add new
9711 enum value 'ADDR_QUERY_LDP_STP_N'.
9712 * config/aarch64/aarch64.c (aarch64_addr_query_type): Likewise.
9713 (aarch64_print_address_internal): Add declaration.
9714 (aarch64_print_ldpstp_address): Remove.
9715 (aarch64_classify_address): Adapt mode for 'ADDR_QUERY_LDP_STP_N'.
9716 (aarch64_print_operand): Change printing of 'y'.
9717 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Use
9718 new enum value 'ADDR_QUERY_LDP_STP_N', don't hardcode mode and use
9719 'true' rather than '1'.
9720 * config/aarch64/constraints.md (Uml): Likewise.
9721 (Uml): Rename to Umn.
9724 2018-07-19 Richard Biener <rguenther@suse.de>
9726 * tree-ssa-sccvn.h (struct vn_phi_s): Make phiargs member
9728 * tree-ssa-sccvn.c: Remove alloc-pool.h use.
9729 (vn_phi_hasher): Derive from nofree_ptr_hash and remove remove method.
9730 (vn_reference_hasher): Likewise.
9731 (struct vn_tables_s): Remove obstack and alloc-pool members.
9732 (vn_tables_obstack, vn_tables_insert_obstack): New global obstacks.
9733 (vn_nary_build_or_lookup_1): Manually build in vn_tables_insert_obstack.
9734 (vn_reference_insert): Allocate from obstack instead of from alloc-pool.
9735 (vn_reference_insert_pieces): Likewise.
9736 (alloc_vn_nary_op_noinit): Adjust.
9737 (vn_nary_op_insert_stmt): Allocate phiargs in-place.
9738 (vn_phi_eq): Adjust.
9739 (shared_lookup_phiargs): Remove.
9740 (vn_phi_lookup): Allocate temporary vn_phi_s on the stack.
9741 (vn_phi_insert): Allocate from obstack instead of from alloc-pool.
9742 (visit_reference_op_call): Likewise.
9743 (copy_nary, copy_phi, copy_reference): Remove.
9744 (process_scc): Rewind the obstack when iterating. Do not
9745 copy the elements to valid_info but just move them from one
9746 hashtable to the other.
9747 (allocate_vn_table): Adjust.
9748 (free_vn_table): Likewise.
9749 (init_scc_vn): Likewise.
9750 (free_scc_vn): Likewise.
9752 2018-07-19 H.J. Lu <hongjiu.lu@intel.com>
9755 * config/i386/i386.c (rest_of_insert_endbranch): Lookup
9756 indirect_return as function type attribute.
9757 (ix86_attribute_table): Change indirect_return to function
9759 * doc/extend.texi: Update indirect_return attribute.
9761 2018-07-19 Aldy Hernandez <aldyh@redhat.com>
9763 * wide-int.h (widest2_int): New.
9764 * gimple-fold.c (arith_overflowed_p): Use it.
9765 * tree.h (widest2_int_cst): New.
9766 * tree-vrp.c (wide_int_binop_overflow): Rename from
9767 vrp_int_const_binop.
9768 Rewrite to work on trees.
9769 (extract_range_from_multiplicative_op_1): Abstract code to...
9770 (wide_int_range_min_max): ...here.
9771 (wide_int_range_cross_product): ...and here.
9772 (extract_range_from_binary_expr_1): Abstract overflow code to...
9773 (wide_int_range_mult_wrapping): ...here.
9774 * tree-vrp.h (wide_int_range_cross_product): New.
9775 (wide_int_range_mult_wrapping): New.
9777 2018-07-19 Andrew Senkevich <andrew.senkevich@intel.com>
9778 Julia Koval <julia.koval@intel.com>
9780 * config/i386/x86-tune-costs.h (skylake_memcpy,
9781 skylake_memset): Replace rep_prefix with unrolling for size 512.
9783 2018-07-18 Kugan Vivekanandarajah <kuganv@linaro.org>
9786 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): Handle
9787 comparision with EQ_EXPR in last stmt.
9789 2018-07-18 Kelvin Nilsen <kelvin@gcc.gnu.org>
9791 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Rename
9792 this subsection to "PowerPC AltiVec/VSX Built-in Functions".
9793 (PowerPC AltiVec/VSX Built-in Functions): New name for subsection
9794 previously known as "PowerPC AltiVec Built-in Functions". Move
9795 some material to new subsubsections "PowerPC AltiVec Built-in
9796 Functions on ISA 2.06" and "PowerPC AltiVec Built-in Functions on
9798 (PowerPC Altivec Built-in Functions on ISA 2.05): New subsubsection.
9799 (PowerPC Altivec Built-in Functions on ISA 2.06): Likewise.
9800 (PowerPC Altivec Built-in Functions on ISA 2.07): Likewise.
9801 (PowerPC Altivec Built-in Functions on ISA 3.0): Likewise.
9803 2018-07-18 Richard Biener <rguenther@suse.de>
9805 PR tree-optimization/86557
9806 * tree-vect-patterns.c (vect_recog_divmod_pattern): Also handle
9809 2018-07-18 Ilya Leoshkevich <iii@linux.ibm.com>
9811 * config/s390/s390.c (s390_function_profiler): Generate CFI.
9813 2018-07-17 Jeff Law <law@redhat.com>
9815 * config/arm/arm.c (get_label_padding): Update for recent
9816 changes to label_to_alignment.
9818 PR tree-optimization/86010
9819 * tree-ssa-dse.c (compute_trims): Fix typo/thinko.
9821 * config/mips/mips.c (vr4130_align_insns): Update for recent
9822 changes to label_to_alignment.
9824 * config/frv/frv.c (frv_label_align): Update for recent changes
9825 to label_to_alignment.
9827 * config/nios2/nios2.c (nios2_label_align): Update for recent
9828 changes which dropped ALIGN_LABELS_LOG.
9830 2018-07-17 Andreas Schwab <schwab@linux-m68k.org>
9832 * config/m68k/m68k.md (umulsi3_highpart+1, const_umulsi3_highpart)
9833 (smulsi3_highpart+1, const_smulsi3_highpart): Add CC_STATUS_INIT.
9835 2018-07-17 Claudiu Zissulescu <claziss@synopsys.com>
9837 * config/arc/arc.c (arc_label_align): Use align_labels instead of
9838 deprecated align_labels_log.
9840 2018-07-17 Richard Biener <rguenther@suse.de>
9843 * dwarf2out.c (init_sections_and_labels): Always generate
9844 a debug_line_str_section for early LTO debug.
9845 (dwarf2out_finish): Reset debug_line_str_hash output early.
9846 Bump counter for extra dwarf5 .debug_loc labels to not conflict
9848 (dwarf2out_early_finish): Output debug_line_str.
9850 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
9852 * config/s390/s390.c (preferred_la_operand_p): Do not use LA with
9853 index register on z196 or later.
9855 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
9857 * config/s390/s390.c (s390_default_align): Set default function
9859 (s390_override_options_after_change): Call s390_default align.
9860 (s390_option_override_internal): Call s390_default_align.
9861 (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Define.
9863 2018-07-17 Jakub Jelinek <jakub@redhat.com>
9866 * omp-low.c (create_task_copyfn): Copy over also fields corresponding
9867 to _looptemp_ clauses, other than the first two.
9869 2018-07-17 Martin Liska <mliska@suse.cz>
9871 * opts.c: Do not enable OPT_falign_* for -Os.
9873 2018-07-17 Martin Liska <mliska@suse.cz>
9875 * align.h (MAX_CODE_ALIGN): New.
9876 (MAX_CODE_ALIGN_VALUE): New.
9877 * common/config/i386/i386-common.c (ix86_handle_option):
9878 (MAX_CODE_ALIGN): Moved to align.h.
9879 * final.c (MAX_CODE_ALIGN): Likewise.
9880 * opts.c (parse_and_check_align_values):
9881 (MAX_CODE_ALIGN): Likewise.
9882 (MAX_CODE_ALIGN_VALUE): Likewise.
9884 2018-07-17 Martin Liska <mliska@suse.cz>
9886 * config/i386/att.h (ASM_OUTPUT_ALIGN): Fix spacing
9887 in order to fulfil coding style.
9888 * config/i386/cygming.h (ASM_OUTPUT_ALIGN): Likewise.
9889 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
9890 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
9891 * config/iq2000/iq2000.h (ASM_OUTPUT_ALIGN): Likewise.
9892 * config/pa/pa.h (ASM_OUTPUT_ALIGN): Likewise.
9893 * config/sparc/sol2.h (ASM_OUTPUT_ALIGN_WITH_NOP): Likewise.
9894 * config/sparc/sparc.h (ASM_OUTPUT_ALIGN): Likewise.
9895 * config/visium/visium.h (ASM_OUTPUT_ALIGN): Likewise.
9896 (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
9898 2018-07-17 Martin Liska <mliska@suse.cz>
9900 * align.h: New file.
9901 * config/alpha/alpha.c (alpha_align_insns_1): Use align_functions
9903 * config/i386/i386.c (ix86_avoid_jump_mispredicts): Use new return type
9904 align_flags of label_to_alignment.
9905 * config/m32r/m32r.h (LOOP_ALIGN): Wrap returned values into
9907 * config/m68k/m68k.c: Do not use removed align_labels_value and
9909 * config/nds32/nds32.h (JUMP_ALIGN): Wrap result into align_flags class.
9910 (LOOP_ALIGN): Likewise.
9911 (LABEL_ALIGN): Likewise.
9912 * config/powerpcspe/powerpcspe.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
9913 Remove not used macro.
9914 (rs6000_loop_align): Change return type to align_flags.
9915 (rs6000_loop_align_max_skip): Remove.
9916 * config/rs6000/rs6000-protos.h (rs6000_loop_align):
9917 Change return type to align_flags.
9918 * config/rs6000/rs6000.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
9919 Remove not used macro.
9920 (rs6000_loop_align): Change return type to align_flags.
9921 (rs6000_loop_align_max_skip): Remove.
9922 * config/rx/rx.h (JUMP_ALIGN): Wrap integer values
9923 * config/rx/rx-protos.h (rx_align_for_label): Make it
9925 * config/rx/rx.c (rx_align_for_label): Change return type
9927 (rx_max_skip_for_label): Remove TARGET_ASM_*_ALIGN_MAX_SKIP
9929 into align_flags class.
9930 (LABEL_ALIGN): Likewise.
9931 (LOOP_ALIGN): Likewise.
9932 * config/s390/s390.c (s390_label_align): Use align_flags
9934 (s390_asm_output_function_label): Likewise.
9935 * config/sh/sh.c (sh_override_options_after_change):
9936 Use align_flags class directly without macros.
9937 (find_barrier): Likewise.
9938 (barrier_align): Likewise.
9939 (sh_loop_align): Likewise.
9940 * config/spu/spu.c (spu_option_override):
9941 Use align_flags_tuple::get_value instead of removed macros.
9942 (spu_sched_init): Likewise.
9943 * config/spu/spu.h (GTY): Likewise.
9944 * config/visium/visium.c (visium_option_override):
9945 Set "8" as default secondary alignment.
9946 * config/visium/visium.h (SUBALIGN_LOG): Define to 3
9947 in order to guarantee secondary alignment of 8.
9948 * coretypes.h: Include align.h header file.
9949 * doc/tm.texi: Remove TARGET_ASM_JUMP_ALIGN_MAX_SKIP,
9950 TARGET_ASM_LOOP_ALIGN_MAX_SKIP, TARGET_ASM_LABEL_ALIGN_MAX_SKIP
9951 and TARGET_ASM_LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP macros.
9952 * doc/tm.texi.in: Likewise.
9953 * final.c (struct label_alignment): Remove not used structure.
9954 (LABEL_ALIGN): Change type to align_flags.
9955 (LOOP_ALIGN): Likewise.
9956 (JUMP_ALIGN): Likewise.
9957 (default_loop_align_max_skip): Remove.
9958 (default_label_align_max_skip): Likewise.
9959 (default_jump_align_max_skip): Likewise.
9960 (default_label_align_after_barrier_max_skip):
9961 (LABEL_TO_ALIGNMENT): Change to access label_align vector.
9962 (LABEL_TO_MAX_SKIP): Remove.
9963 (label_to_alignment): Return align_flags type instead of integer.
9964 (label_to_max_skip): Remove.
9965 (align_fuzz): Use align_flags type.
9966 (compute_alignments): Use align_flags type and use align_flags::max
9967 to combine multiple alignments.
9968 (grow_label_align): Grow vec instead of C array.
9969 (update_alignments): Assign just LABEL_TO_ALIGNMENT.
9970 (shorten_branches): Use align_flags type and use align_flags::max
9971 to combine multiple alignments.
9972 (final_scan_insn_1): Remove usage of secondary alignment that comes
9973 from label alignment, but instead use proper secondary alignment
9974 which is computed in grow_label_align.
9975 * flags.h (struct align_flags_tuple): Move to align.h.
9976 (struct align_flags): Likewise.
9977 (state_align_loops): Rename to align_loops.
9978 (state_align_jumps): Rename to align_jumps.
9979 (state_align_labels): Rename to align_labels.
9980 (state_align_functions): Rename to align_functions.
9981 (align_loops_log): Remove.
9982 (align_jumps_log): Remove.
9983 (align_labels_log): Remove.
9984 (align_functions_log): Remove.
9985 (align_loops_max_skip): Remove.
9986 (align_jumps_max_skip): Remove.
9987 (align_labels_max_skip): Remove.
9988 (align_functions_max_skip): Remove.
9989 (align_loops_value): Remove.
9990 (align_jumps_value): Remove.
9991 (align_labels_value): Remove.
9992 (align_functions_value): Remove.
9993 * output.h (label_to_alignment): Change return type to align_flags.
9994 (label_to_max_skip): Remove.
9995 * target.def: Remove loop_align_max_skip, label_align_max_skip,
9996 jump_align_max_skip macros.
9997 * targhooks.h (default_loop_align_max_skip): Remove.
9998 (default_label_align_max_skip): Likewise.
9999 (default_jump_align_max_skip): Likewise.
10000 (default_label_align_after_barrier_max_skip): Remove.
10001 * toplev.c (read_log_maxskip): Use ::normalize function.
10002 (parse_N_M): Remove not used argument and also call ::normalize.
10003 (parse_alignment_opts): Do not pass unused arguments.
10004 * varasm.c (assemble_start_function): Use directly align_functions
10005 instead of removed macros.
10006 * system.h: Do not poison removed macros.
10008 2018-07-17 Jakub Jelinek <jakub@redhat.com>
10010 PR middle-end/86539
10011 * gimplify.c (gimplify_omp_for): Ensure taskloop firstprivatized init
10012 and cond temporaries don't have reference type if iterator has
10013 pointer type. For init use &for_pre_body instead of pre_p if
10014 for_pre_body is non-empty.
10016 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
10018 * config/rs6000/rs6000.md (trunc<mode>sf2): Expand truncates of
10019 double-double modes to SFmode directly directly.
10020 (trunc<mode>sf2_fprs): Delete.
10022 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
10024 * config/rs6000/rs6000.c (init_float128_ibm): Use the correct names
10025 for conversions between IFmode and the decimal floating point modes.
10026 (init_float128_ieee): Use the correct names for conversions between
10027 KFmode and the decimal floating point modes.
10029 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
10031 * config/rs6000/rs6000.c (init_float128_ibm): Use more correct names
10032 for the conversions between TDmode and IFmode.
10033 (init_float128_ieee): Use more correct names for the conversions
10034 between TDmode and KFmode.
10036 2018-07-16 Jakub Jelinek <jakub@redhat.com>
10038 PR tree-optimization/86526
10039 * builtins.c (expand_builtin_memcmp): Formatting fixes.
10040 (inline_expand_builtin_string_cmp): Likewise.
10041 (inline_string_cmp): Likewise. Use c_readstr instead of
10042 builtin_memcpy_read_str. Add unit_mode temporary.
10044 2018-07-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
10046 PR middle-end/86528
10047 * builtins.c (check_access): Bail out if range[0] is no INTEGER_CST.
10048 * expr.c (string_constant): Fix the element size of ARRAY_TYPE.
10050 2018-07-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
10052 * doc/extend.texi (PowerPC AltiVec Built-in Functions):
10053 Alphabetize prototypes of built-in functions, separating out
10054 built-in functions that are listed in this section but should be
10055 described elsewhere.
10057 2018-07-16 Uros Bizjak <ubizjak@gmail.com>
10060 * expmed.c (emit_store_flag): Do not emit setcc followed by a
10061 conditional move when trapping comparison was split to a
10062 non-trapping one (and vice versa).
10064 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
10066 * config/s390/s390.c (s390_function_profiler): Generate nops
10067 instead of profiler call sequences.
10068 * config/s390/s390.opt: Add the new option.
10070 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
10072 * config/s390/s390.c (s390_function_profiler): Generate
10073 __mcount_loc section.
10074 * config/s390/s390.opt: Add the new option.
10076 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
10078 * common.opt: Add the new warning.
10079 * config/s390/s390.c (s390_function_profiler): Emit "brasl
10080 %r0,__fentry__" when -mfentry is specified.
10081 (s390_option_override_internal): Disallow -mfentry for 31-bit
10083 * config/s390/s390.opt: Add the new option.
10085 2018-07-16 Richard Biener <rguenther@suse.de>
10088 * dwarf2out.c (dwarf2out_register_external_die): Assign DIE parents
10089 for function-local FUNCTION_DECL and RESULT_DECL immediately.
10091 2018-07-16 Martin Liska <mliska@suse.cz>
10094 * ipa-pure-const.c (malloc_candidate_p): Revert ::get
10097 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
10099 * config/arc/arcHS.md: Update ARCHS scheduling rules.
10101 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
10103 * config/arc/arc-arch.h (arc_tune_attr): Add new tune parameters
10105 * config/arc/arc-cpus.def (hs4x): New cpu.
10107 * config/arc/arc-tables.opt: Regenerate.
10108 * config/arc/arc.c (arc_sched_issue_rate): New function.
10109 (TARGET_SCHED_ISSUE_RATE): Define.
10110 (TARGET_SCHED_EXPOSED_PIPELINE): Likewise.
10111 * config/arc/arc.md (attr type): Add fpu_fuse, fpu_sdiv, fpu_ddiv,
10113 (attr tune): Add ARCHS4x tune values.
10114 (attr tune_dspmpy): Define.
10115 (*tst): Correct instruction type.
10116 * config/arc/arcHS.md: Don't use this automaton for ARCHS4x cpus.
10117 * config/arc/arcHS4x.md: New file.
10118 * config/arc/fpu.md: Update instruction type attributes.
10119 * config/arc/t-multilib: Regenerate.
10121 2018-07-16 Tom de Vries <tdevries@suse.de>
10124 * var-tracking.c (vt_initialize): Fix pre_dec handling.
10126 2018-07-16 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
10128 * config/aarch64/atomics.md (aarch64_store_execlusive<mode>): Add
10131 2018-07-16 Eric Botcazou <ebotcazou@adacore.com>
10133 PR tree-optimization/86514
10134 * tree-ssa-reassoc.c (init_range_entry) <CASE_CONVERT>: Return for a
10135 conversion to a boolean type from a type with greater precision.
10137 2018-07-16 Tom de Vries <tdevries@suse.de>
10139 * var-tracking.c (vt_initialize): Print adjusted insn slim if
10140 dump_flags request TDF_SLIM.
10142 2018-07-16 Aldy Hernandez <aldyh@redhat.com>
10144 * fold-const.c (int_const_binop_1): Abstract...
10145 (wide_int_binop): ...wide int code here.
10146 (poly_int_binop): ...poly int code here.
10147 Abstract the rest of int_const_binop_1 into int_const_binop.
10148 * fold-const.h (wide_int_binop): New.
10149 * tree-vrp.c (vrp_int_const_binop): Call wide_int_binop.
10150 Remove useless PLUS/MINUS_EXPR case.
10151 (zero_nonzero_bits_from_vr): Move wide int code...
10152 (zero_nonzero_bits_from_bounds): ...here.
10153 (extract_range_from_binary_expr_1): Move mask optimization code...
10154 (range_easy_mask_min_max): ...here.
10155 * tree-vrp.h (zero_nonzero_bits_from_bounds): New.
10156 (range_easy_mask_min_max): New.
10158 2018-07-15 Jeff Law <law@redhat.com>
10161 * config/sh/sh.c (output_mi_thunk): Remove dead conditional
10164 2018-07-14 Jim Wilson <jimw@sifive.com>
10166 * config/riscv/linux.h (TARGET_ASM_FILE_END): New.
10168 2018-07-14 Paul Koning <ni1d@arrl.net>
10170 * config/pdp11/pdp11.c (pdp11_rtx_costs): Bugfixes.
10172 2018-07-13 Jan Hubicka <hubicka@ucw.cz>
10174 * lto-streamer-out.c (copy_function_or_variable): Dump info about
10177 2018-07-13 Bill Schmidt <wschmidt@linux.ibm.com>
10178 Steve Munroe <munroesj52@gmail.com>
10180 * config/rs6000/emmintrin.h (_mm_and_si128): New function.
10181 (_mm_andnot_si128): Likewise.
10182 (_mm_or_si128): Likewise.
10183 (_mm_xor_si128): Likewise.
10185 2018-07-13 Qing Zhao <qing.zhao@oracle.com>
10187 PR middle-end/78809
10188 * builtins.c (expand_builtin_memcmp): Inline the calls first
10189 when result_eq is false.
10190 (expand_builtin_strcmp): Inline the calls first.
10191 (expand_builtin_strncmp): Likewise.
10192 (inline_string_cmp): New routine. Expand a string compare
10193 call by using a sequence of char comparison.
10194 (inline_expand_builtin_string_cmp): New routine. Inline expansion
10195 a call to str(n)cmp/memcmp.
10196 * doc/invoke.texi (--param builtin-string-cmp-inline-length):
10198 * params.def (BUILTIN_STRING_CMP_INLINE_LENGTH): New.
10200 2018-07-13 Richard Earnshaw <rearnsha@arm.com>
10202 * config/arm/driver-arm.c: Include arm-native.h.
10203 (host_detect_local_cpu): Use auto-generated data tables.
10204 (vendors, arm_cpu_table): Delete. Move part information to ...
10205 * config/arm/arm-cpus.in: ... here.
10206 * config/arm/parsecpu.awk (gen_native): New function.
10207 (vendor, part): New CPU fields.
10208 (END): Add support for building the native CPU detection tables.
10209 * config/arm/t-arm (arm-native.h): Add build rule.
10210 (driver-arm.o): Add dependency on arm-native.h.
10212 2018-07-13 Richard Biener <rguenther@suse.de>
10214 PR middle-end/85974
10215 * match.pd (addr1 - addr2): Allow either of the operand to
10218 2018-07-13 Tom de Vries <tdevries@suse.de>
10220 * tree-inline.c (remap_ssa_name): Save and reuse debug exprs generated
10223 2018-07-13 Jackson Woodruff <jackson.woodruff@arm.com>
10225 * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp): Use
10226 arrays instead of numbered variables.
10228 2018-07-13 Eric Botcazou <ebotcazou@adacore.com>
10230 * config/sparc/sparc-protos.h (sparc_compute_frame_size): Delete.
10231 * config/sparc/sparc.c (sparc_compute_frame_size): Make static.
10233 2018-07-13 Richard Biener <rguenther@suse.de>
10236 * dwarf2out.c (gen_type_die_with_usage): Use scope_die_for
10237 instead of get_context_die.
10239 2018-07-13 Kugan Vivekanandarajah <kuganv@linaro.org>
10240 Richard Biener <rguenther@suse.de>
10242 PR middle-end/86489
10243 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Check
10244 that the loop latch destination where phi is defined.
10246 2018-07-12 Kito Cheng <kito.cheng@gmail.com>
10248 * config/riscv/riscv.c (enum riscv_privilege_levels): Add UNKNOWN_MODE.
10249 (riscv_expand_epilogue): Add assertion to check interrupt mode.
10250 (riscv_set_current_function): Extract getting interrupt type to new
10252 (riscv_get_interrupt_type): New function.
10253 (riscv_merge_decl_attributes): New function, checking interrupt type is
10255 (TARGET_MERGE_DECL_ATTRIBUTES): Define.
10257 2018-07-12 Paul Koning <ni1d@arrl.net>
10259 * config/pdp11/pdp11.c (pdp11_output_def): Fix typo in .set
10262 2018-07-12 Paul Koning <ni1d@arrl.net>
10264 * doc/rtl.texi (REG_NONNEG): Remove decrement and branch until
10265 zero reference, add doloop_end instead.
10266 * doc/md.texi (decrement_and_branch_until_zero): Remove.
10267 (Looping patterns): Remove decrement_and_branch_until_zero. Add
10268 detail for doloop_end.
10270 2018-07-12 Martin Sebor <msebor@redhat.com>
10273 * attribs.c (decl_attributes): Reject conflicting attributes before
10274 calling attribute handlers.
10276 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
10278 * dumpfile.c (gcc::dump_manager::get_dump_file_name): Add PART
10280 (gcc::dump_manager::get_dump_file_name): likewise.
10281 (dump_begin): Likewise.
10282 * dumpfile.h (dump_begin): Update prototype.
10283 (gcc::dump_manager::get_dump_file_name,
10284 gcc::dump_manager::get_dump_file_name): Update prototype.
10286 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
10288 * internal-fn.h (vectorizable_internal_fn_p): New function.
10289 * tree-vect-slp.c (compatible_calls_p): Likewise.
10290 (vect_build_slp_tree_1): Remove nops argument. Handle calls
10291 to internal functions.
10292 (vect_build_slp_tree_2): Update call to vect_build_slp_tree_1.
10294 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
10296 * fold-const.h (inverse_conditions_p): Declare.
10297 * fold-const.c (inverse_conditions_p): New function.
10298 * match.pd: Use inverse_conditions_p. Add folds of view_converts
10299 that test the inverse condition of a conditional internal function.
10300 * internal-fn.h (vectorized_internal_fn_supported_p): Declare.
10301 * internal-fn.c (internal_fn_mask_index): Handle conditional
10302 internal functions.
10303 (vectorized_internal_fn_supported_p): New function.
10304 * tree-if-conv.c: Include internal-fn.h and fold-const.h.
10305 (any_pred_load_store): Replace with...
10306 (need_to_predicate): ...this new variable.
10307 (redundant_ssa_names): New variable.
10308 (ifcvt_can_use_mask_load_store): Move initial checks to...
10309 (ifcvt_can_predicate): ...this new function. Handle tree codes
10310 for which a conditional internal function exists.
10311 (if_convertible_gimple_assign_stmt_p): Use ifcvt_can_predicate
10312 instead of ifcvt_can_use_mask_load_store. Update after variable
10314 (predicate_load_or_store): New function, split out from
10315 predicate_mem_writes.
10316 (check_redundant_cond_expr): New function.
10317 (value_available_p): Likewise.
10318 (predicate_rhs_code): Likewise.
10319 (predicate_mem_writes): Rename to...
10320 (predicate_statements): ...this. Use predicate_load_or_store
10321 and predicate_rhs_code.
10322 (combine_blocks, tree_if_conversion): Update after above name changes.
10323 (ifcvt_local_dce): Handle redundant_ssa_names.
10324 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): Handle
10325 general conditional functions.
10326 * tree-vect-stmts.c (vectorizable_call): Likewise.
10328 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
10329 Alan Hayward <alan.hayward@arm.com>
10330 David Sherwood <david.sherwood@arm.com>
10332 * internal-fn.h (can_interpret_as_conditional_op_p): Declare.
10333 * internal-fn.c (can_interpret_as_conditional_op_p): New function.
10334 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Handle conditional
10335 plus and minus and convert them into IFN_COND_FMA-based sequences.
10336 (convert_mult_to_fma): Handle conditional plus and minus.
10338 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
10340 * doc/md.texi (cond_fma, cond_fms, cond_fnma, cond_fnms): Document.
10341 * optabs.def (cond_fma_optab, cond_fms_optab, cond_fnma_optab)
10342 (cond_fnms_optab): New optabs.
10343 * internal-fn.def (COND_FMA, COND_FMS, COND_FNMA, COND_FNMS): New
10344 internal functions.
10345 (FMA): Use DEF_INTERNAL_FLT_FN rather than DEF_INTERNAL_FLT_FLOATN_FN.
10346 * internal-fn.h (get_conditional_internal_fn): Declare.
10347 (get_unconditional_internal_fn): Likewise.
10348 * internal-fn.c (cond_ternary_direct): New macro.
10349 (expand_cond_ternary_optab_fn): Likewise.
10350 (direct_cond_ternary_optab_supported_p): Likewise.
10351 (FOR_EACH_COND_FN_PAIR): Likewise.
10352 (get_conditional_internal_fn): New function.
10353 (get_unconditional_internal_fn): Likewise.
10354 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 5.
10355 (gimple_match_op::gimple_match_op): Add a new overload for 5
10357 (gimple_match_op::set_op): Likewise.
10358 (gimple_resimplify5): Declare.
10359 * genmatch.c (decision_tree::gen): Generate simplifications for
10361 * gimple-match-head.c (gimple_simplify): Define an overload for
10362 5 operands. Handle calls with 5 arguments in the top-level overload.
10363 (convert_conditional_op): Handle conversions from unconditional
10364 internal functions to conditional ones.
10365 (gimple_resimplify5): New function.
10366 (build_call_internal): Pass a fifth operand.
10367 (maybe_push_res_to_seq): Likewise.
10368 (try_conditional_simplification): Try converting conditional
10369 internal functions to unconditional internal functions.
10370 Handle 3-operand unconditional forms.
10371 * match.pd (UNCOND_TERNARY, COND_TERNARY): Operator lists.
10372 Define ternary equivalents of the current rules for binary conditional
10373 internal functions.
10374 * config/aarch64/aarch64.c (aarch64_preferred_else_value): Handle
10375 ternary operations.
10376 * config/aarch64/iterators.md (UNSPEC_COND_FMLA, UNSPEC_COND_FMLS)
10377 (UNSPEC_COND_FNMLA, UNSPEC_COND_FNMLS): New unspecs.
10378 (optab): Handle them.
10379 (SVE_COND_FP_TERNARY): New int iterator.
10380 (sve_fmla_op, sve_fmad_op): New int attributes.
10381 * config/aarch64/aarch64-sve.md (cond_<optab><mode>)
10382 (*cond_<optab><mode>_2, *cond_<optab><mode_4)
10383 (*cond_<optab><mode>_any): New SVE_COND_FP_TERNARY patterns.
10385 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
10387 * target.def (preferred_else_value): New target hook.
10388 * doc/tm.texi.in (TARGET_PREFERRED_ELSE_VALUE): New hook.
10389 * doc/tm.texi: Regenerate.
10390 * targhooks.h (default_preferred_else_value): Declare.
10391 * targhooks.c (default_preferred_else_value): New function.
10392 * internal-fn.h (conditional_internal_fn_code): Declare.
10393 * internal-fn.c (FOR_EACH_CODE_MAPPING): New macro.
10394 (get_conditional_internal_fn): Use it.
10395 (conditional_internal_fn_code): New function.
10396 * gimple-match.h (gimple_match_cond): New struct.
10397 (gimple_match_op): Add a cond member function.
10398 (gimple_match_op::gimple_match_op): Update all forms to take a
10400 * genmatch.c (expr::gen_transform): Use the same condition as res_op
10401 for the suboperation, but don't specify a particular else_value.
10402 * tree-ssa-sccvn.c (vn_nary_simplify, vn_reference_lookup_3)
10403 (visit_nary_op, visit_reference_op_load): Pass
10404 gimple_match_cond::UNCOND to the gimple_match_op constructor.
10405 * gimple-match-head.c: Include tree-eh.h
10406 (convert_conditional_op): New function.
10407 (maybe_resimplify_conditional_op): Likewise.
10408 (gimple_resimplify1): Call maybe_resimplify_conditional_op.
10409 (gimple_resimplify2): Likewise.
10410 (gimple_resimplify3): Likewise.
10411 (gimple_resimplify4): Likewise.
10412 (maybe_push_res_to_seq): Return null for conditional operations.
10413 (try_conditional_simplification): New function.
10414 (gimple_simplify): Call it. Pass conditions to the gimple_match_op
10416 * match.pd: Fold VEC_COND_EXPRs of an IFN_COND_* call to a new
10418 * config/aarch64/aarch64.c (aarch64_preferred_else_value): New
10420 (TARGET_PREFERRED_ELSE_VALUE): Redefine.
10422 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
10424 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
10426 (hash_tree): Do not hash DECL_FCONTEXT
10427 * tree-streamer-in.c (lto_input_ts_field_decl_tree_pointers):
10428 Do not stream DECL_FCONTEXT.
10429 * tree-streamer-out.c (write_ts_field_decl_tree_pointers): Likewise.
10430 * tree.c (free_lang_data_in_decl): Free DECL_FCONTEXT.
10432 2018-07-12 Richard Biener <rguenther@suse.de>
10435 * dwarf2out.c (gen_block_die): Only output blocks when they have
10436 at least one !DECL_IGNORED_P variable.
10438 2018-07-12 Richard Biener <rguenther@suse.de>
10441 * config/gnu-user.h (GNU_USER_TARGET_NO_PTHREADS_LIB_SPEC):
10442 Remove -mieee-fp handling.
10444 2018-07-12 Richard Biener <rguenther@suse.de>
10446 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Remove bogus
10447 left-over from last patch.
10449 2018-07-12 Jakub Jelinek <jakub@redhat.com>
10451 PR tree-optimization/86492
10452 * gimple-ssa-store-merging.c
10453 (imm_store_chain_info::coalesce_immediate_stores): Call
10454 check_no_overlap even for the merge_overlapping case. Formatting fix.
10456 2018-07-12 Richard Biener <rguenther@suse.de>
10458 PR middle-end/86479
10459 * fold-const.c (fold_binary_op_with_conditional_arg): Do not
10460 move possibly trapping operations into the conditional.
10462 2018-07-12 Richard Biener <rguenther@suse.de>
10464 * tree-ssa-sccvn.c (mprts_hook_cnt): Remove.
10465 (vn_lookup_simplify_result): Remove recursion limit applied
10467 (vn_nary_build_or_lookup_1): Adjust.
10468 (try_to_simplify): Likewise.
10469 * gimple-match-head.c (gimple_resimplify1): Instead apply one
10471 (gimple_resimplify2): Likewise.
10472 (gimple_resimplify3): Likewise.
10473 (gimple_resimplify4): Likewise.
10475 2018-07-11 Jakub Jelinek <jakub@redhat.com>
10477 * config/i386/avx512bitalgintrin.h (_mm512_mask_bitshuffle_epi64_mask):
10478 Use __mmask64 type instead of __mmask8 for __M argument.
10479 * config/i386/avx512fintrin.h (_mm512_mask_xor_epi64,
10480 _mm512_maskz_xor_epi64): Use __mmask8 type instead of __mmask16 for
10482 (_mm512_mask_cmpneq_epi64_mask): Use __mmask8 type instead of
10483 __mmask16 for __M argument.
10484 (_mm512_maskz_insertf32x4, _mm512_maskz_inserti32x4,
10485 _mm512_mask_insertf32x4, _mm512_mask_inserti32x4): Cast last argument
10486 to __mmask16 instead of __mmask8.
10487 * config/i386/avx512vlintrin.h (_mm_mask_add_ps, _mm_maskz_add_ps,
10488 _mm256_mask_add_ps, _mm256_maskz_add_ps, _mm_mask_sub_ps,
10489 _mm_maskz_sub_ps, _mm256_mask_sub_ps, _mm256_maskz_sub_ps,
10490 _mm256_maskz_cvtepi32_ps, _mm_maskz_cvtepi32_ps): Use __mmask8 type
10491 instead of __mmask16 for __U argument.
10492 * config/i386/avx512vlbwintrin.h (_mm_mask_cmp_epi8_mask): Use
10493 __mmask16 instead of __mmask8 for __U argument.
10494 (_mm256_mask_cmp_epi8_mask): Use __mmask32 instead of __mmask16 for
10496 (_mm256_cmp_epi8_mask): Use __mmask32 return type instead of
10498 (_mm_mask_cmp_epu8_mask): Use __mmask16 instead of __mmask8 for __U
10500 (_mm256_mask_cmp_epu8_mask): Use __mmask32 instead of __mmask16 for
10502 (_mm256_cmp_epu8_mask): Use __mmask32 return type instead of
10504 (_mm_mask_cmp_epi16_mask): Cast last argument to __mmask8 instead
10506 (_mm256_mask_cvtepi8_epi16): Use __mmask16 instead of __mmask32 for
10508 (_mm_mask_cvtepi8_epi16): Use __mmask8 instead of __mmask32 for
10510 (_mm256_mask_cvtepu8_epi16): Use __mmask16 instead of __mmask32 for
10512 (_mm_mask_cvtepu8_epi16): Use __mmask8 instead of __mmask32 for
10514 (_mm256_mask_cmpneq_epu8_mask, _mm256_mask_cmplt_epu8_mask,
10515 _mm256_mask_cmpge_epu8_mask, _mm256_mask_cmple_epu8_mask): Change
10516 return type as well as __M argument type and all casts from __mmask8
10518 (_mm256_mask_cmpneq_epu16_mask, _mm256_mask_cmplt_epu16_mask,
10519 _mm256_mask_cmpge_epu16_mask, _mm256_mask_cmple_epu16_mask): Change
10520 return type as well as __M argument type and all casts from __mmask8
10522 (_mm256_mask_cmpneq_epi8_mask, _mm256_mask_cmplt_epi8_mask,
10523 _mm256_mask_cmpge_epi8_mask, _mm256_mask_cmple_epi8_mask): Change
10524 return type as well as __M argument type and all casts from __mmask8
10526 (_mm256_mask_cmpneq_epi16_mask, _mm256_mask_cmplt_epi16_mask,
10527 _mm256_mask_cmpge_epi16_mask, _mm256_mask_cmple_epi16_mask): Change
10528 return type as well as __M argument type and all casts from __mmask8
10530 * config/i386/avx512vbmi2vlintrin.h (_mm_mask_shrdi_epi32,
10531 _mm_mask_shldi_epi32): Cast last argument to __mmask8 instead of
10534 2018-07-11 Grazvydas Ignotas <notasas@gmail.com>
10536 * config/i386/avx512bwintrin.h: (_mm512_mask_cmp_epi8_mask,
10537 _mm512_mask_cmp_epu8_mask): Use __mmask64 type instead of __mmask32
10540 2018-07-11 Paul Koning <ni1d@arrl.net>
10542 * doc/md.texi (define_subst): Document how multiple occurrences of
10543 the same argument in the replacement pattern are handled.
10545 2018-07-11 Paul Koning <ni1d@arrl.net>
10547 * doc/extend.texi (Common Variable Attributes): Move "mode" into
10548 alphabetical order.
10549 (Common Type Attributes): Add "mode" attribute.
10551 2018-07-11 Jan Hubicka <hubicka@ucw.cz>
10553 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not
10554 stream DECL_ORIGINAL_TYPE.
10555 (DFS::DFS_write_tree_body): Drop hack handling local external decls.
10556 (hash_tree): Do not walk DECL_ORIGINAL_TYPE.
10557 * tree-streamer-in.c (lto_input_ts_decl_non_common_tree_pointers):
10558 Do not walk original type.
10559 * tree-streamer-out.c (streamer_write_chain): Drop hack handling
10561 (write_ts_decl_non_common_tree_pointers): Do not stream
10563 * tree.c (free_lang_data_in_decl): Clear DECL_ORIGINAL_TYPE.
10564 (find_decls_types_r): Do not walk DEC_ORIGINAL_TYPE.
10566 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
10568 * tree-ssa-threadupdate.c (thread_through_all_blocks): Do not jump
10569 thread twice from the same starting edge.
10571 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
10573 * vr-values.c (gimple_stmt_nonzero_p): Abstract common code to...
10574 * gimple.c (gimple_call_nonnull_result_p): ...here...
10575 (gimple_call_nonnull_arg): ...and here.
10576 * gimple.h (gimple_call_nonnull_result_p): New.
10577 (gimple_call_nonnull_arg): New.
10579 2018-07-11 Richard Earnshaw <rearnsha@arm.com>
10581 * config/arm/arm-cpus.in: Move information from fpu field of each
10582 cpu definition to the isa field.
10583 * config/arm/parsecpu.awk (fpu): Delete match rule.
10584 (gen_comm_data): Don't add bits from the CPU's FPU entry.
10586 2018-07-11 Richard Biener <rguenther@suse.de>
10589 * dwarf2out.c (init_sections_and_labels): Use
10590 output_asm_line_debug_info consistently.
10591 (dwarf2out_early_finish): Likewise.
10592 (dwarf2out_finish): Remove DW_AT_stmt_list from early generated
10595 2018-07-11 Richard Biener <rguenther@suse.de>
10597 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1):
10598 Rework father_bb setting in a way to avoid propagating constants
10599 multiple times on a loop body.
10601 2018-07-10 Mark Wielaard <mark@klomp.org>
10604 * dwarf2out.c (output_macinfo_op): Fix dwarf_FORM typo in gcc_assert.
10606 2018-07-10 Richard Biener <rguenther@suse.de>
10608 * hash-map.h (hash_map::iterator::operator*): Return
10609 references to key and value.
10611 2018-07-10 Jakub Jelinek <jakub@redhat.com>
10614 * gimplify.c (find_combined_omp_for): Add DATA argument, in addition
10615 to finding the inner OMP_FOR/OMP_SIMD stmt find non-trivial wrappers,
10616 BLOCKs with BLOCK_VARs, OMP_PARALLEL in between, OMP_FOR in between.
10617 (gimplify_omp_for): For composite loops, move outer
10618 OMP_{DISTRIBUTE,TASKLOOP,FOR,PARALLEL} right around innermost
10619 OMP_FOR/OMP_SIMD if there are any non-trivial wrappers. For class
10620 iterators add any needed clauses. Allow OMP_FOR_ORIG_DECLS to contain
10621 TREE_LIST for both the original class iterator and the "last" helper
10622 var. Gimplify OMP_FOR_PRE_BODY before the outermost composite
10623 loop, remember has_decl_expr from outer composite loops for the
10624 innermost OMP_SIMD in TREE_PRIVATE bit on OMP_FOR_INIT.
10626 2018-07-09 Martin Sebor <msebor@redhat.com>
10628 PR middle-end/77357
10629 PR middle-end/86428
10630 * builtins.c (c_strlen): Avoid out-of-bounds warnings when
10631 accessing implicitly initialized array elements.
10632 * expr.c (string_constant): Handle string initializers of
10633 character arrays within aggregates.
10634 * gimple-fold.c (fold_array_ctor_reference): Add argument.
10635 Store element offset. As a special case, handle zero size.
10636 (fold_nonarray_ctor_reference): Same.
10637 (fold_ctor_reference): Add argument. Store subobject offset.
10638 * gimple-fold.h (fold_ctor_reference): Add argument.
10640 2018-07-09 Paul Koning <ni1d@arrl.net>
10642 * config/pdp11/pdp11.c (pdp11_addr_cost): New function.
10643 (pdp11_insn_cost): New function.
10644 (pdp11_md_asm_adjust): New function.
10645 (TARGET_INVALID_WITHIN_DOLOOP): Define.
10646 (pdp11_rtx_costs): Update to match machine better.
10647 (output_addr_const_pdp11): Correct format mismatch warnings.
10648 * config/pdp11/pdp11.h (SLOW_BYTE_ACCESS): Correct definition.
10649 * config/pdp11/pdp11.md: General change to add base_cost and/or
10650 length attributes for use by new pdp11_insn_cost function.
10651 (MIN_BRANCH): Correct definition.
10653 (doloop_end): Use standard pattern name for looping pattern.
10654 (doloop_end_nocc): New.
10655 (movsf): Add another constraint alternative.
10656 (zero_extendqihi2): Add constraint alternatives for not in place
10658 (zero_extendhisi2): Remove.
10659 (shift patterns): Add CC handling variants.
10663 (define_peephole2): New peephole to recognize mov that sets CC for
10666 2018-07-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10668 * config/sparc/sparc.c (sparc_fold_builtin) <SPARC_BUILTIN_PDIST,
10669 SPARC_BUILTIN_PDISTN>: Adapt for signature change of wi::neg,
10672 2018-07-09 Jakub Jelinek <jakub@redhat.com>
10675 * real.c (real_nextafter): Return true if result is denormal.
10677 2018-07-09 Martin Liska <mliska@suse.cz>
10679 * common.opt: Add back wrongly removed attribute.
10681 2018-07-09 Richard Biener <rguenther@suse.de>
10684 * dwarf2out.c (gen_block_die): For an early generated DIE
10685 always output high/low PC attributes.
10687 2018-07-09 Tom de Vries <tdevries@suse.de>
10689 * cfgexpand.c (expand_debug_source_expr): Handle VAR_DECL.
10690 * tree-inline.c (remap_ssa_name): Handle default def ssa_name mapping
10691 onto VAR_DECL with abstract origin.
10693 2018-07-07 Jim Wilson <jimw@sifive.com>
10695 * config/riscv/riscv.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): New.
10697 2018-07-07 Tom de Vries <tdevries@suse.de>
10699 * tree-dfa.c (dump_enumerated_decls): Handle cfun->cfg == NULL.
10701 2018-07-07 Aldy Hernandez <aldyh@redhat.com>
10703 * tree-vrp.c (vrp_int_const_binop): Change overflow type to
10705 (combine_bound): Use wide-int overflow calculation instead of
10707 * calls.c (maybe_warn_alloc_args_overflow): Change overflow type to
10709 * fold-const.c (int_const_binop_2): Same.
10710 (extract_muldiv_1): Same.
10711 (fold_div_compare): Same.
10712 (fold_abs_const): Same.
10714 * poly-int.h (add): Same.
10718 * predict.c (predict_iv_comparison): Same.
10719 * profile-count.c (slow_safe_scale_64bit): Same.
10720 * simplify-rtx.c (simplify_const_binary_operation): Same.
10721 * tree-chrec.c (tree_fold_binomial): Same.
10722 * tree-data-ref.c (split_constant_offset_1): Same.
10723 * tree-if-conv.c (idx_within_array_bound): Same.
10724 * tree-scalar-evolution.c (iv_can_overflow_p): Same.
10725 * tree-ssa-phiopt.c (minmax_replacement): Same.
10726 * tree-vect-loop.c (is_nonwrapping_integer_induction): Same.
10727 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Same.
10728 * vr-values.c (vr_values::adjust_range_with_scev): Same.
10729 * wide-int.cc (wi::add_large): Same.
10730 (wi::mul_internal): Same.
10731 (wi::sub_large): Same.
10732 (wi::divmod_internal): Same.
10733 * wide-int.h: Change overflow type to overflow_type for neg, add,
10734 mul, smul, umul, div_trunc, div_floor, div_ceil, div_round,
10735 mod_trunc, mod_ceil, mod_round, add_large, sub_large,
10736 mul_internal, divmod_internal.
10737 (overflow_type): New enum.
10738 (accumulate_overflow): New.
10740 2018-07-06 Kugan Vivekanandarajah <kugan.vivekanandarajah@linaro.org>
10742 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): New.
10743 (tree_ssa_phiopt_worker): Call cond_removal_in_popcount_pattern.
10745 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
10747 * tree-ssa-loop-niter.c (number_of_iterations_popcount): If popcount
10748 argument is checked for zero before entering loop, avoid checking again.
10750 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
10752 * gimplify.h (generic_expr_could_trap_p): Set as global function.
10753 * gimplify.h (generic_expr_could_trap_p): Likwise.
10754 * tree-scalar-evolution.c (expression_expensive_p): Handle COND_EXPR.
10756 2018-07-06 Jakub Jelinek <jakub@redhat.com>
10758 PR tree-optimization/86401
10759 * fold-const.c (fold_binary_loc) <case BIT_AND_EXPR>: Move the
10760 ((A & N) + B) & M -> (A + B) & M etc. optimization into ...
10761 (fold_bit_and_mask): ... here. New helper function for match.pd.
10762 * fold-const.h (fold_bit_and_mask): Declare.
10763 * match.pd (((A & N) + B) & M -> (A + B) & M): New optimization.
10765 2018-07-06 Peter Bergner <bergner@linux.ibm.com>
10768 * target.def (translate_mode_attribute): New hook.
10769 * targhooks.h (default_translate_mode_attribute): Declare.
10770 * targhooks.c (default_translate_mode_attribute): New function.
10771 * doc/tm.texi.in (TARGET_TRANSLATE_MODE_ATTRIBUTE): New hook.
10772 * doc/tm.texi: Regenerate.
10773 * config/rs6000/rs6000.c (TARGET_TRANSLATE_MODE_ATTRIBUTE): Define.
10774 (rs6000_translate_mode_attribute): New function.
10776 2018-07-06 Paul Koning <ni1d@arrl.net>
10778 * doc/md.texi (define_split): Document DONE and FAIL.
10779 (define_peephole2): Ditto.
10781 2018-07-05 Jeff Law <law@redhat.com>
10783 PR tree-optimization/86010
10784 * tree-ssa-dse.c (compute_trims): More aggressively trim at
10785 both the head and tail of mem* and str* calls.
10787 2018-07-05 Jim Wilson <jimw@sifive.com>
10789 * config.gcc (riscv*-*-*): When setting xlen, handle riscv-*.
10791 2018-07-05 Indu Bhagat <indu.bhagat@oracle.com>
10793 * config/aarch64/aarch64-simd.md: correct flags text for
10794 MIN_EXPR replacement.
10796 2018-07-05 James Clarke <jrtc27@jrtc27.com>
10798 * configure: Regenerated.
10800 2018-07-05 Carl Love <cel@us.ibm.com>
10802 * config/rs6000/rs6000-c.c: Map ALTIVEC_BUILTIN_VEC_UNPACKH for
10803 float argument to VSX_BUILTIN_DOUBLEH_V4SF.
10804 Map ALTIVEC_BUILTIN_VEC_UNPACKL for float argument to
10805 VSX_BUILTIN_DOUBLEL_V4SF.
10807 2018-07-05 Martin Sebor <msebor@redhat.com>
10810 * tree-ssa-strlen.c (maybe_set_strlen_range): Use type size rather
10811 than its domain to compute its the upper bound of a char array.
10813 2018-07-05 Nathan Sidwell <nathan@acm.org>
10815 Replace NO_IMPLICIT_EXTERN_C with SYSTEM_IMPLICIT_EXTERN_C.
10816 * doc/cpp.texi: Update comment.
10817 * doc/tm.texi: Rebuilt.
10818 * doc/tm.texi.in (NO_IMPLICIT_EXTERN_C): Replace with ...
10819 (SYSTEM_IMPLICIT_EXTERN_C): ... this, opposite sense.
10820 * doc/extend.texi (Backwards Compatibility): Clarify it is system
10821 headers affected by extern "C".
10822 * system.h: Poison NO_IMPLICIT_EXTERN_C.
10823 * config/alpha/alpha.h, config/arm/uclinux-elf.h,
10824 config/bfin/elf.h, config/cris/cris.h, config/darwin.h,
10825 config/dragonfly.h, config/freebsd.h, config/gnu-user.h,
10826 config/i386/cygming.h, config/i386/djgpp.h, config/i386/nto.h,
10827 config/ia64/hpux.h, config/lm32/lm32.h, config/lm32/uclinux-elf.h,
10828 config/lynx.h, config/mips/elf.h, config/mmix/mmix.h,
10829 config/netbsd.h, config/pa/pa-hpux.h, config/powerpcspe/sysv4.h,
10830 config/riscv/elf.h, config/rs6000/sysv4.h, config/rtems.h,
10831 config/s390/tpf.h, config/sh/newlib.h, config/sol2.h,
10832 config/sparc/openbsd64.h, config/sparc/sp-elf.h,
10833 config/sparc/sp64-elf.h, config/spu/spu.h,
10834 config/stormy16/stormy16.h, config/v850/v850.h,
10835 config/visium/visium.h, config/vx-common.h, config/xtensa/elf.h: Don't
10836 define NO_IMPLICIT_EXTERN_C.
10837 * config/rs6000/aix.h: Set SYSTEM_IMPLICIT_EXTERN_C.
10839 2018-07-05 Tamar Christina <tamar.christina@arm.com>
10842 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
10843 instead of GET_MODE_SIZE when comparing Units.
10845 2018-07-05 Tamar Christina <tamar.christina@arm.com>
10848 * rtlanal.c (set_noop_p): Constrain on mode change,
10849 include hard-reg-set.h
10851 2018-07-05 Tamar Christina <tamar.christina@arm.com>
10853 * config/aarch64/aarch64.c (aarch64_expand_movmem): Fix mode size.
10855 2018-07-05 Jakub Jelinek <jakub@redhat.com>
10858 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
10861 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
10863 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
10865 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
10868 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
10870 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
10872 2018-07-04 Eric Botcazou <ebotcazou@adacore.com>
10874 PR middle-end/86380
10875 * expmed.c (choose_multiplier): Fix incorrect comparison with mask.
10877 2018-07-04 Aldy Hernandez <aldyh@redhat.com>
10879 * tree-vrp.c (extract_range_from_binary_expr_1): Initialize
10880 neg_*_op* variables.
10882 2018-07-04 Martin Liska <mliska@suse.cz>
10884 * tree-switch-conversion.c: Define
10885 max_ratio_for_speed and max_ratio_for_size constants.
10887 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
10888 Martin Liska <mliska@suse.cz>
10890 PR middle-end/66240
10893 * common.opt: Rename align options with 'str_' prefix.
10894 * common/config/i386/i386-common.c (set_malign_value): New
10896 (ix86_handle_option): Use it to set -falign-* options/
10897 * config/aarch64/aarch64-protos.h (struct tune_params): Change
10898 type from int to string.
10899 * config/aarch64/aarch64.c: Update default values from int
10901 * config/alpha/alpha.c (alpha_override_options_after_change):
10903 * config/arm/arm.c (arm_override_options_after_change_1): Likewise.
10904 * config/i386/dragonfly.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
10905 max skip conditionally.
10906 * config/i386/freebsd.h (SUBALIGN_LOG): New.
10907 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
10908 max skip conditionally.
10909 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
10910 max skip conditionally.
10911 * config/i386/gnu-user.h (SUBALIGN_LOG): New.
10912 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
10913 max skip conditionally.
10914 * config/i386/i386.c (struct ptt): Change type from int to
10916 (ix86_default_align): Set default values.
10917 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Print
10918 max skip conditionally.
10919 * config/i386/iamcu.h (SUBALIGN_LOG): New.
10920 (ASM_OUTPUT_MAX_SKIP_ALIGN):
10921 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN):
10922 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
10923 max skip conditionally.
10924 * config/i386/openbsdelf.h (SUBALIGN_LOG): New.
10925 (ASM_OUTPUT_MAX_SKIP_ALIGN) Print max skip conditionally.:
10926 * config/i386/x86-64.h (SUBALIGN_LOG): New.
10927 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
10928 max skip conditionally.
10929 (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
10930 * config/ia64/ia64.c (ia64_option_override): Set default values
10931 for alignment options.
10932 * config/m68k/m68k.c: Handle new str_align_* options.
10933 * config/mips/mips.c (mips_set_compression_mode): Change
10935 (mips_option_override): Set default values for options.
10936 * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
10938 * config/rs6000/rs6000.c (rs6000_option_override_internal):
10940 * config/rx/rx.c (rx_option_override): Likewise.
10941 * config/rx/rx.h (JUMP_ALIGN): Use align_jumps_log.
10942 (LABEL_ALIGN): Use align_labels_log.
10943 (LOOP_ALIGN): Use align_loops_align.
10944 * config/s390/s390.c (s390_asm_output_function_label): Use new
10946 * config/sh/sh.c (sh_override_options_after_change):
10947 Change type of constants.
10948 * config/spu/spu.c (spu_sched_init): Likewise.
10949 * config/sparc/sparc.c (sparc_option_override): Set default
10950 values for options.
10951 * config/visium/visium.c (visium_option_override): Likewise.
10952 * config/visium/visium.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Do not
10953 emit p2align format with last argument if it's not needed.
10954 * doc/invoke.texi: Document extended format of -falign-*.
10955 * final.c: Use align_labels alignment.
10956 * flags.h (struct target_flag_state): Change type to use
10958 (struct align_flags_tuple): New.
10959 (struct align_flags): Likewise.
10960 (align_loops_log): Redefine macro to use new types.
10961 (align_loops_max_skip): Redefine macro to use new types.
10962 (align_jumps_log): Redefine macro to use new types.
10963 (align_jumps_max_skip): Redefine macro to use new types.
10964 (align_labels_log): Redefine macro to use new types.
10965 (align_labels_max_skip): Redefine macro to use new types.
10966 (align_functions_log): Redefine macro to use new types.
10967 (align_loops): Redefine macro to use new types.
10968 (align_jumps): Redefine macro to use new types.
10969 (align_labels): Redefine macro to use new types.
10970 (align_functions): Redefine macro to use new types.
10971 (align_functions_max_skip): Redefine macro to use new types.
10972 (align_loops_value): New macro.
10973 (align_jumps_value): New macro.
10974 (align_labels_value): New macro.
10975 (align_functions_value): New macro.
10976 * function.c (invoke_set_current_function_hook): Propagate
10977 alignment values from flags to global variables default in
10979 * ipa-icf.c (sem_function::equals_wpa): Use
10980 cl_optimization_option_eq instead of memcmp.
10981 * lto-streamer.h (cl_optimization_stream_out): Support streaming
10983 (cl_optimization_stream_in): Likewise.
10984 * optc-save-gen.awk: Support strings in cl_optimization.
10985 * opth-gen.awk: Likewise.
10986 * opts.c (finish_options): Remove error checking of invalid
10988 (MAX_CODE_ALIGN): Remove.
10989 (MAX_CODE_ALIGN_VALUE): Likewise.
10990 (parse_and_check_align_values): New function.
10991 (check_alignment_argument): Likewise.
10992 (common_handle_option): Use check_alignment_argument.
10993 * opts.h (parse_and_check_align_values): Declare.
10994 * toplev.c (init_alignments): Remove.
10995 (read_log_maxskip): New.
10996 (parse_N_M): Likewise.
10997 (parse_alignment_opts): Likewise.
10998 (backend_init_target): Remove usage of init_alignments.
10999 * toplev.h (parse_alignment_opts): Declare.
11000 * tree-streamer-in.c (streamer_read_tree_bitfields): Add new
11002 * tree-streamer-out.c (streamer_write_tree_bitfields): Likewise.
11003 * tree.c (cl_option_hasher::equal): New.
11004 * varasm.c: Use new global macros.
11006 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
11008 * config/i386/dragonfly.h: (ASM_OUTPUT_MAX_SKIP_ALIGN):
11009 Use a simpler align directive also if MAXSKIP = ALIGN-1.
11010 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
11011 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
11012 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
11013 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
11014 * config/i386/freebsd.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Remove "If N
11015 is large, do at least 8 byte alignment" code. Add SUBALIGN_LOG
11016 define. Use a simpler align directive also if MAXSKIP = ALIGN-1.
11017 * config/i386/gnu-user.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
11018 * config/i386/iamcu.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
11019 * config/i386/openbsdelf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
11020 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
11022 2018-07-04 Martin Liska <mliska@suse.cz>
11023 Jonathan Wakely <jwakely@redhat.com>
11025 * coverage.c: Use correct type.
11026 * doc/invoke.texi: Language correction.
11028 2018-07-03 H.J. Lu <hongjiu.lu@intel.com>
11031 * config/i386/i386.c (rest_of_insert_endbranch): Also generate
11032 ENDBRANCH for non-tail call which may return via indirect branch.
11033 * doc/extend.texi: Document indirect_return attribute.
11035 2018-07-03 Martin Sebor <msebor@redhat.com>
11037 PR tree-optimization/86274
11038 * gimple-ssa-sprintf.c (fmtresult::type_max_digits): Verify
11040 (format_floating): Correct handling of infinities and NaNs.
11042 2018-07-03 Martin Sebor <msebor@redhat.com>
11044 * print-tree.c (print_real_cst): New function.
11045 (print_node_brief): Call it.
11046 (print_node): Ditto.
11048 2018-07-03 Jeff Law <law@redhat.com>
11050 * config/h8300/h8300.md (logical<mode>3_sn, logical<mode>3): Merge
11051 into a single pattern.
11053 * config/h8300/h8300.md (ors code_iterator): New.
11054 (bsetqi_msx, bnotqi_msx patterns and splitters): Consolidate into
11055 a single pattern and single splitter.
11056 (bsethi_msx, bnothi_msx patterns): Consolidate into a single pattern.
11057 (iorqi3_1, xorqi3_1): Likewise.
11058 (iorqi3, xorqi3 expanders): Similarly.
11060 * config/h8300/h8300.md (movmd_internal_normal): Consolidated with
11061 (movmd_internal) into a single pattern using the P mode iterator.
11062 (movmd splitters): Similarly.
11063 (stpcpy_internal_normal, stpcpy_internal): Similarly for thes patterns.
11064 (movsd splitters): Similarly.
11066 * config/h8300/h8300.c (h8300_insn_length_from_table): Consolidate
11067 ADDB, ADDW and ADDL into a single ADD attribute which selects the
11068 right table based on the size of the operand.
11069 * config/h8300/h8300.md (length_table): Corresponding changes. All
11070 references to "addb", "addw" and "addl" changed to "add".
11071 (btst patterns): Merge two variants into a single pattern.
11072 (tstqi, tsthi): Likewise.
11073 (addhi3_incdec, addsi3_incdec): Likewise.
11074 (subhi3_h8300hs, subsi3_h8300hs): Likewise.
11075 (mulhi3, mulsi3): Likewise.
11076 (udivhi3, udivsi3): Likewise.
11077 (divhi3, divsi3): Likewise.
11078 (andorqi3, andorhi3, andorsi3): Likewise.
11080 2018-07-03 Uros Bizjak <ubizjak@gmail.com>
11083 * config/i386/sse.md (uavg<mode>3_ceil): New expander.
11084 (<sse2_avx2>_uavg<mode>3<mask_name>): Simplify expander.
11086 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
11088 PR tree-optimization/85694
11089 * config/aarch64/iterators.md (HADD, RHADD): New int iterators.
11090 (u): Handle UNSPEC_SHADD, UNSPEC_UHADD, UNSPEC_SRHADD and
11092 * config/aarch64/aarch64-simd.md (<u>avg<mode>3_floor)
11093 (<u>avg<mode>3_ceil): New patterns.
11095 2018-07-03 David Malcolm <dmalcolm@redhat.com>
11097 * gcc.dg/vect/slp-perm-1.c: Remove "note: " prefix from
11098 scan-tree-dump directive.
11099 * gcc.dg/vect/slp-perm-2.c: Likewise.
11100 * gcc.dg/vect/slp-perm-3.c: Likewise.
11101 * gcc.dg/vect/slp-perm-5.c: Likewise.
11102 * gcc.dg/vect/slp-perm-6.c: Likewise.
11103 * gcc.dg/vect/slp-perm-7.c: Likewise.
11104 * gcc.dg/vect/slp-perm-8.c: Likewise.
11106 2018-07-03 Marek Polacek <polacek@redhat.com>
11108 PR middle-end/86202
11109 * gimple-fold.c (size_must_be_zero_p): Check the type of the size.
11111 2018-07-03 Richard Biener <rguenther@suse.de>
11114 * tree-ssa-structalias.c (find_func_clobbers): Properly
11115 handle indirect calls.
11117 2018-07-03 Jeff Law <law@redhat.com>
11119 * config/h8300/h8300.md (HSI, QHSI, QHSIF): New mode iterators.
11120 (shifts): New code iterator.
11121 (movqi, movhi, movsi, movsf expanders): Consolidate into a single
11122 expander. Fix HImode handling on H8/SX.
11123 (addqi3, addhi3, addsi3 expanders): Consolidate into a single expander.
11124 (subqi3, subhi3, subsi3 expanders): Likewise.
11125 (andqi3, andhi3, andsi3 expanders): Likewise.
11126 (iorqi3, iorhi3, iorsi3 expanders): Likewise.
11127 (xorqi3, xorhi3, xorsi3 expanders): Likewise.
11128 (negqi2, neghi2, negsi2, negsf2 expanders): Likewise.
11129 (one_cmplqi2, one_cmplhi2, one_cmplsi2): Likewise.
11130 (zero_extendqihi2, zero_extendqisi2): Likewise.
11131 (extendqihi2, extendqisi2): Likewise.
11132 (rotlqi3, rotlhi3, rotlsi3): Likewise.
11133 (neghi2_h8300, negsi2_h8300): Likewise for these patterns.
11134 (rotlqi3_1, rotlhi3_1): Likewise.
11135 (logicalhi3_sn, logicalsi3_sn): Likewise.
11136 (logicalhi3, logicalsi3): Likewise.
11138 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
11140 * tree-vect-patterns.c (vect_recog_rotate_pattern)
11141 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
11142 (vect_recog_mixed_size_cond_pattern, adjust_bool_pattern_cast)
11143 (adjust_bool_pattern, vect_recog_bool_pattern): Pass the vector
11144 type to append_pattern_def_seq instead of creating a stmt_vec_info
11146 (build_mask_conversion): Likewise. Remove vinfo argument.
11147 (vect_add_conversion_to_patterm): Likewise, renaming to...
11148 (vect_add_conversion_to_pattern): ...this.
11149 (vect_recog_mask_conversion_pattern): Update call to
11150 build_mask_conversion. Pass the vector type to
11151 append_pattern_def_seq here too.
11152 (vect_recog_gather_scatter_pattern): Update call to
11153 vect_add_conversion_to_pattern.
11155 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
11157 * tree-vect-patterns.c (new_pattern_def_seq): Delete.
11158 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
11159 (vect_recog_widen_op_pattern, vect_recog_over_widening_pattern)
11160 (vect_recog_rotate_pattern, vect_synth_mult_by_constant): Don't set
11161 STMT_VINFO_PATTERN_DEF_SEQ to null here.
11162 (vect_recog_pow_pattern, vect_recog_vector_vector_shift_pattern)
11163 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern): Use
11164 append_pattern_def_seq instead of new_pattern_def_seq.
11165 (vect_recog_divmod_pattern): Do both of the above.
11166 (vect_pattern_recog_1): Assert that STMT_VINO_PATTERN_DEF_SEQ
11169 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
11171 * tree-vect-patterns.c (vect_recog_dot_prod_pattern):
11172 (vect_recog_sad_pattern, vect_recog_widen_op_pattern)
11173 (vect_recog_widen_mult_pattern, vect_recog_pow_pattern):
11174 (vect_recog_widen_sum_pattern, vect_recog_over_widening_pattern)
11175 (vect_recog_average_pattern, vect_recog_cast_forwprop_pattern)
11176 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
11177 (vect_recog_vector_vector_shift_pattern, vect_synth_mult_by_constant)
11178 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
11179 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
11180 (vect_recog_mask_conversion_pattern): Replace vec<gimple *>
11181 parameter with a single stmt_vec_info.
11182 (vect_recog_func_ptr): Likewise.
11183 (vect_recog_gather_scatter_pattern): Likewise, folding in...
11184 (vect_try_gather_scatter_pattern): ...this.
11185 (vect_pattern_recog_1): Remove stmts_to_replace and just pass
11186 the stmt_vec_info of the statement to be matched. Don't clear
11187 STMT_VINFO_RELATED_STMT.
11188 (vect_pattern_recog): Update call accordingly.
11190 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
11192 PR tree-optimization/85694
11193 * doc/md.texi (avgM3_floor, uavgM3_floor, avgM3_ceil)
11194 (uavgM3_ceil): Document new optabs.
11195 * doc/sourcebuild.texi (vect_avg_qi): Document new target selector.
11196 * internal-fn.def (IFN_AVG_FLOOR, IFN_AVG_CEIL): New internal
11198 * optabs.def (savg_floor_optab, uavg_floor_optab, savg_ceil_optab)
11199 (savg_ceil_optab): New optabs.
11200 * tree-vect-patterns.c (vect_recog_average_pattern): New function.
11201 (vect_vect_recog_func_ptrs): Add it.
11202 * tree-vect-stmts.c (vectorizable_call): Get the type of the zero
11203 constant directly from the associated lhs.
11205 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
11207 * tree-vect-patterns.c (vect_split_statement): New function.
11208 (vect_convert_input): Use it to try to split an existing cast.
11210 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
11212 * poly-int.h (print_hex): New function.
11213 * dumpfile.h (dump_dec, dump_hex): Declare.
11214 * dumpfile.c (dump_dec, dump_hex): New poly_wide_int functions.
11215 * tree-vectorizer.h (_stmt_vec_info): Add min_output_precision,
11216 min_input_precision, operation_precision and operation_sign.
11217 * tree-vect-patterns.c (vect_get_range_info): New function.
11218 (vect_same_loop_or_bb_p, vect_single_imm_use)
11219 (vect_operation_fits_smaller_type): Delete.
11220 (vect_look_through_possible_promotion): Add an optional
11221 single_use_p parameter.
11222 (vect_recog_over_widening_pattern): Rewrite to use new
11223 stmt_vec_info infomration. Handle one operation at a time.
11224 (vect_recog_cast_forwprop_pattern, vect_narrowable_type_p)
11225 (vect_truncatable_operation_p, vect_set_operation_type)
11226 (vect_set_min_input_precision): New functions.
11227 (vect_determine_min_output_precision_1): Likewise.
11228 (vect_determine_min_output_precision): Likewise.
11229 (vect_determine_precisions_from_range): Likewise.
11230 (vect_determine_precisions_from_users): Likewise.
11231 (vect_determine_stmt_precisions, vect_determine_precisions): Likewise.
11232 (vect_vect_recog_func_ptrs): Put over_widening first.
11234 (vect_pattern_recog): Call vect_determine_precisions.
11236 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
11238 * tree-vect-patterns.c (vect_mark_pattern_stmts): Remove pattern
11239 statements that have been replaced by further pattern statements.
11240 (vect_pattern_recog_1): Clear STMT_VINFO_PATTERN_DEF_SEQ on failure.
11242 2018-07-03 Richard Biener <rguenther@suse.de>
11244 * tree-vect-stmts.c (vect_is_simple_use): Consolidate dumping,
11245 always set *dt. Dump vectype in vectype overload.
11246 * dumpfile.h (dump_gimple_expr): New function.
11247 (dump_gimple_expr_loc): Likewise.
11248 * dumpfile.c (dump_gimple_expr): New function.
11249 (dump_gimple_expr_loc): Likewise.
11251 2018-07-02 Jeff Law <law@redhat.com>
11253 * config/h8300/h8300.md (movqi_h8300, movqi_h8300hs): Consolidate
11254 the H8/300, H8/300H and H8/S variants into a single pattern.
11255 (movhi_h8300, movqi_h8300hs): Similarly.
11256 (pushqi_h8300hs, pushhi_h8300hs): Consolidate into a single pattern.
11257 (QHI mode iterator): New.
11259 * config/h8300/h8300.md: Remove trailing whitespace.
11261 2018-07-02 Jim Wilson <jimw@sifive.com>
11263 * config/riscv/riscv.c (riscv_expand_epilogue): Use emit_jump_insn
11264 instead of emit_insn for interrupt returns.
11265 * config/riscv/riscv.md (riscv_met): Add (return) to rtl.
11266 (riscv_sret, riscv_uret): Likewise.
11268 2018-07-02 David Malcolm <dmalcolm@redhat.com>
11270 * pretty-print.c (selftest::test_pp_format): Move save and restore
11271 of quotes to class auto_fix_quotes, and add an instance.
11272 * selftest.c: Include "intl.h".
11273 (selftest::auto_fix_quotes::auto_fix_quotes): New ctor.
11274 (selftest::auto_fix_quotes::~auto_fix_quotes): New dtor.
11275 * selftest.h (selftest::auto_fix_quotes): New class.
11277 2018-07-02 Richard Henderson <richard.henderson@linaro.org>
11279 * config/aarch64/aarch64-protos.h, config/aarch64/aarch64.c
11280 (aarch64_sve_prepare_conditional_op): Remove.
11281 * config/aarch64/aarch64-sve.md (cond_<SVE_INT_BINARY><SVE_I>):
11282 Allow aarch64_simd_reg_or_zero as select operand; remove
11283 the aarch64_sve_prepare_conditional_op call.
11284 (cond_<SVE_INT_BINARY_SD><SVE_SDI>): Likewise.
11285 (cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
11286 (*cond_<SVE_INT_BINARY><SVE_I>_z): New pattern.
11287 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_z): New pattern.
11288 (*cond_<SVE_COND_FP_BINARY><SVE_F>_z): New pattern.
11289 (*cond_<SVE_INT_BINARY><SVE_I>_any): New pattern.
11290 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_any): New pattern.
11291 (*cond_<SVE_COND_FP_BINARY><SVE_F>_any): New pattern
11292 and a splitters to match all of the *_any patterns.
11293 * config/aarch64/predicates.md (aarch64_sve_any_binary_operator): New.
11295 * config/aarch64/iterators.md (SVE_INT_BINARY_REV): Remove.
11296 (SVE_COND_FP_BINARY_REV): Remove.
11297 (sve_int_op_rev, sve_fp_op_rev): New.
11298 * config/aarch64/aarch64-sve.md (*cond_<SVE_INT_BINARY><SVE_I>_0): New.
11299 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_0): New.
11300 (*cond_<SVE_COND_FP_BINARY><SVE_F>_0): New.
11301 (*cond_<SVE_INT_BINARY><SVE_I>_2): Rename, add movprfx alternative.
11302 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_2): Similarly.
11303 (*cond_<SVE_COND_FP_BINARY><SVE_F>_2): Similarly.
11304 (*cond_<SVE_INT_BINARY><SVE_I>_3): Similarly; use sve_int_op_rev.
11305 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_3): Similarly.
11306 (*cond_<SVE_COND_FP_BINARY><SVE_F>_3): Similarly; use sve_fp_op_rev.
11308 * config/aarch64/aarch64-sve.md (cond_<SVE_COND_FP_BINARY><SVE_F>):
11309 Remove match_dup 1 from the inner unspec.
11310 (*cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
11312 * config/aarch64/aarch64.md (movprfx): New attr.
11313 (length): Default movprfx to 8.
11314 * config/aarch64/aarch64-sve.md (*mul<SVE_I>3): Add movprfx alt.
11315 (*madd<SVE_I>, *msub<SVE_I): Likewise.
11316 (*<su>mul<SVE_I>3_highpart): Likewise.
11317 (*<SVE_INT_BINARY_SD><SVE_SDI>3): Likewise.
11318 (*v<ASHIFT><SVE_I>3): Likewise.
11319 (*<su><MAXMIN><SVE_I>3): Likewise.
11320 (*<su><MAXMIN><SVE_F>3): Likewise.
11321 (*fma<SVE_F>4, *fnma<SVE_F>4): Likewise.
11322 (*fms<SVE_F>4, *fnms<SVE_F>4): Likewise.
11323 (*div<SVE_F>4): Likewise.
11325 2018-07-02 Richard Sandiford <richard.sandiford@arm.com>
11327 * tree-vect-patterns.c (vect_recog_widen_shift_pattern): Fix typo
11330 2018-07-02 Richard Biener <rguenther@suse.de>
11332 PR tree-optimization/86363
11333 * tree-ssa-sccvn.c (vn_reference_lookup_3): Check the
11334 memset argument refers to a non-variable address.
11336 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
11338 * tree-vrp.c (extract_range_from_binary_expr_1): Abstract a lot of the
11339 {PLUS,MINUS}_EXPR code to...
11340 (adjust_symbolic_bound): ...here,
11341 (combine_bound): ...here,
11342 (set_value_range_with_overflow): ...and here.
11344 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
11346 * tree-vrp.c (extract_range_from_unary_expr): Abstract ABS_EXPR
11348 (extract_range_from_abs_expr): ...here.
11350 2018-07-02 Eric Botcazou <ebotcazou@adacore.com>
11352 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Do not overrule
11353 -fno-omit-frame-pointer when not optimizing.
11355 2018-07-02 Martin Liska <mliska@suse.cz>
11358 * ipa-pure-const.c (malloc_candidate_p): Revert usage of ::get.
11359 (propagate_nothrow): Likewise.
11361 2018-07-02 Martin Liska <mliska@suse.cz>
11364 * ipa-inline.c (early_inliner): Revert wrongly added ::get call.
11366 2018-07-02 David Malcolm <dmalcolm@redhat.com>
11368 * dumpfile.c (dump_generic_expr_loc): Undo removal of this
11369 function in r262149, changing "loc" param from source_location to
11370 const dump_location_t &.
11371 * dumpfile.h (dump_generic_expr_loc): Undo removal of this
11372 declaration, as above.
11374 2018-07-01 Paul Koning <ni1d@arrl.net>
11376 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
11377 -munit-asm, -mgnu-asm, -mdec-asm.
11378 * config/pdp11/pdp11-protos.h (pdp11_gen_int_label): New.
11379 (pdp11_output_labelref): New.
11380 (pdp11_output_def): New.
11381 (pdp11_output_addr_vec_elt): New.
11382 * config/pdp11/pdp11.c: Use tab between opcode and operands. Use
11383 %# and %@ format codes.
11384 (pdp11_option_override): New.
11385 (TARGET_ASM_FILE_START_FILE_DIRECTIVE): Define.
11386 (pdp11_output_ident): New.
11387 (pdp11_asm_named_section): New.
11388 (pdp11_asm_init_sections): New.
11389 (pdp11_file_start): New.
11390 (pdp11_file_end): New.
11391 (output_ascii): Use .ascii/.asciz for -mdec-asm.
11392 (pdp11_asm_print_operand): Update %# and %$ for -mdec-asm. Add
11393 %o, like %c but octal.
11394 (pdp11_option_override): New.
11395 * config/pdp11/pdp11.h (TEXT_SECTION_ASM_OP): Update for
11397 (DATA_SECTION_ASM_OP): Ditto.
11398 (READONLY_DATA_SECTION_ASM_OP): New.
11399 (IS_ASM_LOGICAL_LINE_SEPARATOR): New.
11400 (ASM_GENERATE_INTERNAL_LABEL): Use new function.
11401 (ASM_OUTPUT_LABELREF): Ditto.
11402 (ASM_OUTPUT_DEF): Ditto.
11403 (ASM_OUTPUT_EXTERNAL): New.
11404 (ASM_OUTPUT_SOURCE_FILENAME): New.
11405 (ASM_OUTPUT_ADDR_VEC_ELT): Use new function.
11406 (ASM_OUTPUT_SKIP): Update for -mdec-asm.
11407 * config/pdp11/pdp11.md: Use tab between opcode and operands. Use
11408 %# and %@ format codes.
11409 * config/pdp11/pdp11.opt (mgnu-asm): New.
11410 (mdec-asm): Conflicts with -mgnu-asm and -munix-asm.
11411 (munix-asm): Conflicts with -mdec-asm and -mgnu-asm.
11412 * doc/invoke.txt (PDP-11 Options): Add -mgnu-asm.
11414 2018-07-01 Aldy Hernandez <aldyh@redhat.com>
11416 * tree-ssa-threadupdate.c (mark_threaded_blocks): Avoid
11417 dereferencing path[] beyond its length.
11419 (debug_all_paths): New.
11420 (rewire_first_differing_edge): New.
11421 (adjust_paths_after_duplication): New.
11422 (duplicate_thread_path): Call adjust_paths_after_duplication.
11424 (thread_through_all_blocks): Add new argument to
11425 duplicate_thread_path.
11427 2018-06-30 Jim Wilson <jimw@sifive.com>
11429 * config/riscv/predicates.md (p2m1_shift_operand): New.
11430 (high_mask_shift_operand): New.
11431 * config/riscv/riscv.md (lshrsi3_zero_extend_3+1): New combiner
11432 pattern using p2m1_shift_operand.
11433 (lshsi3_zero_extend_3+2): New combiner pattern using
11434 high_mask_shift_operand.
11436 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
11438 * tree-vect-patterns.c (vect_get_external_def_edge): New function,
11440 (vect_recog_rotate_pattern): ...here.
11441 (vect_convert_input): Try to insert casts of invariants in the
11443 * tree-vect-loop-manip.c (vect_loop_versioning): Don't require the
11444 preheader to be empty.
11446 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
11448 * tree-vect-patterns.c (append_pattern_def_seq): Take an optional
11449 vector type. If given, install it in the new statement's
11450 STMT_VINFO_VECTYPE.
11451 (vect_element_precision): New function.
11452 (vect_unpromoted_value): New struct.
11453 (vect_unpromoted_value::vect_unpromoted_value): New function.
11454 (vect_unpromoted_value::set_op): Likewise.
11455 (vect_look_through_possible_promotion): Likewise.
11456 (vect_joust_widened_integer, vect_joust_widened_type): Likewise.
11457 (vect_widened_op_tree, vect_convert_input): Likewise.
11458 (vect_convert_inputs, vect_convert_output): Likewise.
11459 (vect_recog_dot_prod_pattern): Use vect_look_through_possible_promotion
11460 to handle the optional cast of the multiplication result and
11461 vect_widened_op_tree to detect the widened multiplication itself.
11462 Do not require the input and output of promotion casts to have
11463 the same sign, but base the signedness of the operation on the
11464 input rather than the result. If the pattern includes two
11465 promotions, check that those promotions have the same sign.
11466 Do not restrict the MULT_EXPR handling to a double-width result;
11467 handle quadruple-width results and wider. Use vect_convert_inputs
11468 to convert the inputs to the common type.
11469 (vect_recog_sad_pattern): Use vect_look_through_possible_promotion
11470 to handle the optional cast of the ABS result. Also allow a sign
11471 change or a sign extension between the ABS and MINUS.
11472 Use vect_widened_op_tree to detect the widened subtraction and use
11473 vect_convert_inputs to convert the inputs to the common type.
11474 (vect_handle_widen_op_by_const): Delete.
11475 (vect_recog_widen_op_pattern): New function.
11476 (vect_recog_widen_mult_pattern): Use it.
11477 (vect_recog_widen_shift_pattern): Likewise.
11478 (vect_recog_widen_sum_pattern): Use
11479 vect_look_through_possible_promotion to handle the promoted
11482 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
11484 * gimple-iterator.c (gsi_for_stmt): Add a new overload that takes
11485 the containing gimple_seq *.
11486 * gimple-iterator.h (gsi_for_stmt): Declare it.
11487 * tree-vect-patterns.c (vect_recog_dot_prod_pattern)
11488 (vect_recog_sad_pattern, vect_recog_widen_sum_pattern)
11489 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
11490 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
11491 (vect_recog_mask_conversion_pattern): Remove STMT_VINFO_IN_PATTERN_P
11493 (vect_init_pattern_stmt, vect_set_pattern_stmt): New functions,
11495 (vect_mark_pattern_stmts): ...here. Handle cases in which the
11496 statement being replaced is part of an existing pattern
11497 definition sequence, inserting the new pattern statements before
11499 (vect_pattern_recog_1): Don't return a bool. If the statement
11500 is already part of a pattern, instead apply pattern matching
11501 to the pattern definition statements. Don't clear the
11502 STMT_VINFO_RELATED_STMT if is_pattern_stmt_p.
11503 (vect_pattern_recog): Don't break after the first match;
11504 continue processing the pattern definition statements instead.
11505 Don't bail out for STMT_VINFO_IN_PATTERN_P here.
11507 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
11509 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
11510 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
11511 (vect_recog_widen_sum_pattern): Use it.
11513 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
11515 * tree-vect-loop.c (vectorizable_reduction): Assert that the
11516 phi is not a pattern statement and has not been replaced by
11517 a pattern statement.
11518 * tree-vect-patterns.c (type_conversion_p): Don't check
11519 STMT_VINFO_IN_PATTERN_P.
11520 (vect_recog_vector_vector_shift_pattern): Likewise.
11521 (vect_recog_dot_prod_pattern): Expect vect_is_simple_use to return
11522 the pattern statement rather than the original statement; check
11523 directly for a WIDEN_MULT_EXPR here.
11524 * tree-vect-slp.c (vect_get_and_check_slp_defs): Expect
11525 vect_is_simple_use to return the pattern statement rather
11526 than the original statement; use is_pattern_stmt_p to check
11527 for such a pattern statement.
11528 * tree-vect-stmts.c (process_use): Expect vect_is_simple_use
11529 to return the pattern statement rather than the original statement;
11530 don't do the same transformation here.
11531 (vect_is_simple_use): If the defining statement has been replaced
11532 by a pattern statement, return the pattern statement instead.
11533 Remove the corresponding (local) transformation from the vectype
11536 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
11538 * tree-vectorizer.h (vect_is_simple_use): Move the gimple ** to the
11539 end and default to null.
11540 * tree-vect-loop.c (vect_create_epilog_for_reduction)
11541 (vectorizable_reduction): Update calls accordingly, dropping the
11542 gimple ** argument if the passed-back statement isn't needed.
11543 * tree-vect-patterns.c (vect_get_internal_def, type_conversion_p)
11544 (vect_recog_rotate_pattern): Likewise.
11545 (vect_recog_mask_conversion_pattern): Likewise.
11546 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
11547 (vect_mask_constant_operand_p): Likewise.
11548 * tree-vect-stmts.c (is_simple_and_all_uses_invariant, process_use):
11549 (vect_model_simple_cost, vect_get_vec_def_for_operand): Likewise.
11550 (get_group_load_store_type, get_load_store_type): Likewise.
11551 (vect_check_load_store_mask, vect_check_store_rhs): Likewise.
11552 (vectorizable_call, vectorizable_simd_clone_call): Likewise.
11553 (vectorizable_conversion, vectorizable_assignment): Likewise.
11554 (vectorizable_shift, vectorizable_operation): Likewise.
11555 (vectorizable_store, vect_is_simple_cond): Likewise.
11556 (vectorizable_condition, vectorizable_comparison): Likewise.
11557 (get_same_sized_vectype, vect_get_mask_type_for_stmt): Likewise.
11558 (vect_is_simple_use): Rename the def_stmt argument to def_stmt_out
11559 and move it to the end. Cope with null def_stmt_outs.
11561 2018-06-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
11563 * Makefile.in (FLAGS_TO_PASS): Add RANLIB_FOR_TARGET.
11565 2018-06-29 Jeff Law <law@redhat.com>
11567 * config/v850/v850.c (v850_legitimate_address_p): Handle large
11568 displacements for TARGET_V850E2V3 and newer.
11569 (TARGET_LRA_P): Remove. Defaults to LRA now.
11570 * config/v850/v850.md (sign23byte_load): Remove.
11571 (unsign23byte_load, sign23hword_load, unsign23hword_load): Likewise.
11572 (23word_load, 23byte_store, 23hword_store, 23word_store): Likewise.
11574 2018-06-29 Martin Liska <mliska@suse.cz>
11577 * coverage.c (coverage_init): Mangle full path name.
11578 * doc/invoke.texi: Document the change.
11579 * gcov-io.c (mangle_path): New.
11580 * gcov-io.h (mangle_path): Likewise.
11581 * gcov.c (mangle_name): Use mangle_path for path mangling.
11583 2018-06-29 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11585 * config/arm/arm.c (output_move_double): Don't allow STRD instructions
11586 if starting source register is not even.
11588 2018-06-29 Martin Liska <mliska@suse.cz>
11590 PR tree-optimization/86263
11591 * tree-switch-conversion.c (switch_decision_tree::try_switch_expansion):
11592 Make edge redirection.
11594 2018-06-29 David Malcolm <dmalcolm@redhat.com>
11596 * dumpfile.c (dump_loc): Add indentation based on scope depth.
11597 (dump_scope_depth): New variable.
11598 (get_dump_scope_depth): New function.
11599 (dump_begin_scope): New function.
11600 (dump_end_scope): New function.
11601 * dumpfile.h (get_dump_scope_depth): New declaration.
11602 (dump_begin_scope): New declaration.
11603 (dump_end_scope): New declaration.
11604 (class auto_dump_scope): New class.
11605 (AUTO_DUMP_SCOPE): New macro.
11606 * tree-vectorizer.h (DUMP_VECT_SCOPE): Reimplement in terms of
11609 2018-06-29 Richard Biener <rguenther@suse.de>
11611 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences): Assert
11612 compute_all_dependences succeeds.
11613 * tree-vect-loop.c (vect_get_datarefs_in_loop): Fail early if we
11614 exceed --param loop-max-datarefs-for-datadeps.
11616 2018-06-29 Jakub Jelinek <jakub@redhat.com>
11618 * config/rs6000/t-rs6000: Append rs6000-modes.h to TM_H.
11620 2018-06-28 Uros Bizjak <ubizjak@gmail.com>
11623 * config/i386/sse.md (*vec_extractv4si_0_zext_sse4): Use
11624 alternative 0 in preferred_for_speed attribute.
11626 2018-06-28 Paul Koning <ni1d@arrl.net>
11628 * config/pdp11/pdp11-protos.h (pdp11_shift_length): New function.
11629 * config/pdp11/pdp11.c (pdp11_shift_length): New function.
11630 * config/pdp11/pdp11.h (ADJUST_INSN_LENGTH): Remove.
11631 * config/pdp11/pdp11.md: Correct "length" attribute calculation
11632 for shift insn patterns.
11634 2018-06-28 David Malcolm <dmalcolm@redhat.com>
11636 * cgraph.c (cgraph_node::get_body): Replace assignments to
11637 "dump_file" with calls to set_dump_file.
11638 * dumpfile.c (alt_dump_file): Make static, and group with...
11639 (alt_flags): ...this definition.
11640 (dumps_are_enabled): New variable.
11641 (refresh_dumps_are_enabled): New function.
11642 (set_dump_file): New function.
11643 (set_alt_dump_file): New function.
11644 (gcc::dump_manager::dump_start): Replace assignments to
11645 "dump_file" and "alt_dump_file" with calls to set_dump_file and
11647 (gcc::dump_manager::dump_finish): Likewise.
11648 * dumpfile.h (alt_dump_file): Delete decl.
11649 (dumps_are_enabled): New variable decl.
11650 (set_dump_file): New function decl.
11651 (dump_enabled_p): Rewrite in terms of new "dumps_are_enabled"
11653 * tree-nested.c (lower_nested_functions): Replace assignments to
11654 "dump_file" with calls to set_dump_file.
11656 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
11658 * tree-cfg.c (verify_gimple_in_cfg): Call verify_location on the
11659 goto_locus of each outgoing edge of each basic block.
11661 2018-06-28 Richard Biener <rguenther@suse.de>
11663 * dwarf2out.c (decl_scope_table): Remove.
11664 (push_decl_scope): Likewise.
11665 (pop_decl_scope): Likewise.
11666 (gen_type_die_for_member): Do not call push/pop_decl_scope.
11667 (gen_struct_or_union_type_die): Likewise.
11668 (gen_tagged_type_die): Likewise.
11669 (dwarf2out_init): Do not initialize decl_scope_table.
11670 (dwarf2out_c_finalize): Do not free it.
11672 2018-06-28 Richard Biener <rguenther@suse.de>
11674 * dwarf2out.c (gen_subprogram_die): Use is_unit_die when
11675 deciding whether to not re-use a DIE.
11677 2018-06-28 Richard Biener <rguenther@suse.de>
11679 * dwarf2out.c (gen_subprogram_die): Always re-use DIEs with an
11680 DW_AT_abstract_origin attribute.
11682 2018-06-28 Martin Liska <mliska@suse.cz>
11684 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
11685 Use newly introduced constants.
11686 * tree-switch-conversion.h (struct jump_table_cluster):
11687 Define max_ratio_for_size and max_ratio_for_speed.
11689 2018-06-28 Martin Liska <mliska@suse.cz>
11691 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
11692 Add new checking assert to catch invalid state.
11693 (jump_table_cluster::can_be_handled): Handle single case
11695 (jump_table_cluster::is_beneficial): Bail out for such case.
11696 (bit_test_cluster::find_bit_tests):
11697 Add new checking assert to catch invalid state.
11698 (bit_test_cluster::can_be_handled): Handle single case
11700 (bit_test_cluster::is_beneficial): Bail out for such case.
11701 (switch_decision_tree::analyze_switch_statement):
11704 2018-06-28 Martin Liska <mliska@suse.cz>
11706 * common.opt: Introduce -completion option.
11707 * gcc.c (driver_handle_option): Handle it.
11708 (driver::main): Print completions if completion
11710 * opt-suggestions.c (option_proposer::get_completions):
11712 (option_proposer::suggest_completion): Likewise.
11713 (option_proposer::find_param_completions): Likewise.
11714 (verify_autocompletions): Likewise.
11715 (test_completion_valid_options): Likewise.
11716 (test_completion_valid_params): Likewise.
11717 (in_completion_p): Likewise.
11718 (empty_completion_p): Likewise.
11719 (test_completion_partial_match): Likewise.
11720 (test_completion_garbage): Likewise.
11721 (opt_proposer_c_tests): Likewise.
11722 * opt-suggestions.h: Declare new functions.
11723 * opts.c (common_handle_option): Handle OPT__completion_.
11724 * selftest-run-tests.c (selftest::run_tests): Add
11725 opt_proposer_c_tests.
11726 * selftest.c (assert_str_startswith): New.
11727 * selftest.h (assert_str_startswith): Likewise.
11728 (opt_proposer_c_tests): New.
11729 (ASSERT_STR_STARTSWITH): Likewise.
11731 2018-06-28 Martin Liska <mliska@suse.cz>
11733 * Makefile.in: Add opt-suggestions.o.
11734 * gcc-main.c: Include opt-suggestions.h.
11735 * gcc.c (driver::driver): Likewise.
11736 (driver::~driver): Remove m_option_suggestions.
11737 (driver::build_option_suggestions): Moved to option_proposer.
11738 (driver::suggest_option): Likewise.
11739 (driver::handle_unrecognized_options): Use option_proposer.
11740 * gcc.h (class driver): Add new memver m_option_proposer.
11741 * opt-suggestions.c: New file.
11742 * opt-suggestions.h: New file.
11744 2018-06-28 Martin Liska <mliska@suse.cz>
11746 * vec.h (class auto_string_vec): New (moved from auto_argvec).
11747 (auto_string_vec::~auto_string_vec): Likewise.
11749 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
11751 * tree-inline.h (struct copy_body_data): Move remapping_type_depth and
11752 prevent_decl_creation_for_types fields up and add reset_location field.
11753 * tree-inline.c (remap_gimple_stmt): Force input_location on the new
11754 statement if id->reset_location is true.
11755 (copy_edges_for_bb): Do not set goto_locus on the new edges if
11756 id->reset_location is true.
11757 (copy_phis_for_bb): Force input_location on the arguments if
11758 id->reset_location is true.
11759 (expand_call_inline): Set id->reset_location if DECL_IGNORED_P
11760 is set on the function to be inlined.
11762 2018-06-27 Stephan Bergmann <sbergman@redhat.com>
11764 * doc/invoke.texi (Debugging Options): Add -gsplit-dwarf.
11766 2018-06-27 Dimitar Dimitrov <dimitar@dinux.eu>
11768 * lra-eliminations.c (update_reg_eliminate): Mark all spanning hard
11769 registers for Pmode.
11770 * lra-lives.c (check_pseudos_live_through_calls): Mark all spanning
11771 hard registers for the clobbered pseudo.
11773 2018-06-27 Paul Koning <ni1d@arrl.net>
11775 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
11776 mutually exclusive options.
11777 * config/pdp11/constraints.md (h): New constraint.
11778 (O): Update definition to match shift code generation.
11779 (D): New constraint.
11780 * config/pdp11/pdp11-modes.def (CCNZ): Define mode.
11782 * config/pdp11/pdp11-protos.h (int_no_side_effect_operand): New
11784 (output_jump): Change arguments.
11785 (pdp11_fixed_cc_regs): New function.
11786 (pdp11_cc_mode): Ditto.
11787 (pdp11_expand_shift): Ditto.
11788 (pdp11_assemble_shift): Ditto.
11789 (pdp11_small_shift): Ditto.
11790 (pdp11_branch_cost): Remove.
11791 * config/pdp11/pdp11.c (pdp11_assemble_integer): Remove comments
11793 (pdp11_register_move_cost): Update for CC registers.
11794 (pdp11_rtx_costs): Add case for LSHIFTRT.
11795 (pdp11_output_jump): Add CCNZ mode conditional branches.
11796 (notice_update_cc_on_set): Remove.
11797 (pdp11_cc_mode): New function.
11798 (simple_memory_operand): Correct pre/post decrement case.
11799 (no_side_effect_operand): New function.
11800 (pdp11_regno_reg_class): Add CC_REGS class.
11801 (pdp11_fixed_cc_regs): New function.
11802 (pdp11_small_shift): New function.
11803 (pdp11_expand_shift): New function to expand shift insns.
11804 (pdp11_assemble_shift): New function to output shifts.
11805 (pdp11_branch_cost): Remove.
11806 (pdp11_modes_tieable_p): Make QI/HI modes tieable.
11807 * config/pdp11/pdp11.h (SIZE_TYPE): Ensure 16-bit type.
11808 (WCHAR_TYPE): Ditto.
11809 (PTRDIFF_TYPE): Ditto.
11810 (ADJUST_INSN_LENGTH): New macro.
11811 (FIXED_REGISTERS): Add CC registers.
11812 (CALL_USED_REGISTERS): Ditto.
11813 (reg_class): Ditto.
11814 (REG_CLASS_NAMES): Ditto.
11815 (REG_CLASS_CONTENTS): Ditto.
11816 (SELECT_CC_MODE): Use new function.
11817 (TARGET_FLAGS_REGNUM): New macro.
11818 (TARGET_FIXED_CONDITION_CODE_REGS): Ditto.
11819 (cc0_reg_rtx): Remove.
11820 (CC_STATUS_MDEP): Remove.
11821 (CC_STATUS_MDEFP_INIT): Remove.
11822 (CC_IN_FPU): Remove.
11823 (NOTICE_UPDATE_CC): Remove.
11824 (REGISTER_NAMES): Add CC registers.
11825 (BRANCH_COST): Change to constant 1.
11826 * config/pdp11/pdp11.md: Rewrite for CCmode condition code
11828 * config/pdp11/pdp11.opt (mbcopy): Remove.
11829 (mbcopy-builtin): Remove.
11830 (mbranch-cheap): Remove.
11831 (mbranch-expensive): Remove.
11832 * config/pdp11/predicates.md (expand_shift_operand): Update to
11833 match shift code generation.
11834 (ccnz_operator): New predicate.
11835 * doc/invoke.texi (PDP-11 Options): Remove deleted options
11836 -mbcopy, -mbcopy-builtin, -mbranch-cheap, -mbranch-expensive.
11837 Remove non-existent option -mabshi, -mno-abshi. Document mutually
11839 * doc/md.texi (PDP-11): Document new D and h constraints. Update
11840 description of O constraint.
11842 2018-06-27 Jeff Law <law@redhat.com>
11843 Austin Law <austinklaw@gmail.com>
11845 * config/v850/v850.md (addsi3_set_flags): New pattern.
11846 (subsi3_set_flags, negsi2_set_flags, andsi3_set_flags): Likewise.
11847 (iorsi3_set_flags, xorsi3_set_flags, one_cmplsi2_set_flags): Likewise.
11848 (zero_extendhisi2_v850_set_flags): Likewise.
11849 (zero_extendqisi2_v850_set_flags): Likewise.
11850 (ashlsi3_set_flags, ashlsi3_v850e2_set_flags): Likewise.
11851 (lshrsi3_set_flags, lshrsi3_v850e2_set_flags): Likewise.
11852 (ashrsi3_set_flags, ashrsi3_v850e2_set_flags): Likewise.
11854 * config/v850/v850-protos.h (notice_update_cc): Remove.
11855 * config/v850/v850.c (v850_compare_op0, v850_compare_op1): Remove.
11856 (v850_print_operand): Handle 'D' and "d".
11857 (v850_select_cc_mode): Remove ATTRIBUTE_UNUSED for last argument.
11858 Add handling of arithmetic/logical operations compared against zero.
11859 (v850_gen_float_compare): Remove ATTRIBUTE_UNUSED for last argument.
11860 Do not look at v850_compare_op, instead get mode from last argument.
11861 (v850_gen_compare): Remove
11862 (increment_stack): Use addsi3_clobber_flags to avoid splitting failure
11863 after reload for prologue insns.
11864 (expand_prologue): Account for CLOBBER of CC_REGNUM in various
11866 (construct_save_jarl): Likewise.
11867 (TARGET_FLAGS_REGNUM): Define.
11868 * config/v850/v850.h (v850_compare_op0, v850_compare_op1): Remove.
11869 (NOTICE_UPDATE_CC): Remove.
11870 * config/v850/v850.md (v850_tst1): Use (reg:CCZ CC_REGNUM) rather
11871 than cc0. Conditionalize on reload_completed.
11872 (cmpsi_insn, setfcc_insn): Likewise.
11873 (tst1 splitter): Turn into define_and_split which sets the flags
11875 (cstoresi4, cbranchsf4, cbranchdf4, cbranchsi4_insn): Likewise.
11876 (cbranchsi4, branch_normal, branch_invert): Do not expose cc0 here.
11877 (cstoresf4, cstoredf4): Clobber the flags.
11878 (cmpsi, cmpsf, cmpdf): Remove expanders.
11879 (setf_insn): Remove pattern.
11880 (addsi3): Turn into define_and_split which clobbers the flags after
11881 reload and a suitable pattern (addsi3_clobber_flags) for use after
11883 (subsi3, negsi2, andsi3, iorsi3, xorsi3, one_cmplsi2) Likewise.
11884 (ashlsi3, ashlsi3_v850e2, lshrsi3, lsh4si3_v850e2): Likewise.
11885 (ashrsi3, ashrsi3_v850e2): Likewise.
11886 (bins): Clobber the flags.
11887 (movsicc_normal_cc, movsicc_normal, movsicc_tst1): Likewise.
11888 (movsicc_tst1_revesed, sasf, swap and rotate patterns): Likewise.
11889 (fix_loop_counter, call_internal_short, call_internal_long): Likewise.
11890 (call_value_internal_short, call_value_internal_long): Likewise.
11891 (callt_save_interrupt, callt_return_interrupt): Likewise.
11892 (save_interrupt, return_interrupt): Likewise.
11893 (callt_save_all_interrupt, save_all_interrupt): Likewise.
11894 (_save_all_interrupt, callt_restore_all_interrupt): Likewise.
11895 (restore_all_interrupt, _restore_all_interrupt): Likewise.
11896 (All FP comparisons): Only allow after reload has completed.
11898 (divh, divhu): Tweak output template.
11899 (branch_z_normal, branch_z_invert): Remove
11900 (branch_nz_normal, branch_nz_invert): Likewise.
11901 (extendhisi_insn, extendqisi_insn): Do not clobber flags.
11903 * config/v850/v850-modes.def (CCZ, CCNZ): Add new modes.
11904 * config/v850/v850.c (notice_update_cc): Remove.
11905 * config/v850/v850.h (CC_OVERFLOW_UNUSABLE): Remove
11906 (CC_NO_CARRY): Likewise.
11907 (NOTICE_UPDATE_CC): Define to nothing.
11908 * config/v850/v850.md: Remove block comment on cc0 handling
11909 Remove "cc" attribute from all patterns. Remove cc_status handling
11910 from all patterns. Minor formatting fixes.
11912 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11914 * config/aarch64/aarch64-cores.def (cortex-a76): New entry.
11915 (cortex-a76.cortex-a55): Likewise.
11916 * config/aarch64/aarch64-tune.md: Regenerate.
11917 * doc/invoke.texi (AArch64 Options): Document cortex-a76 and
11918 cortex-a76.cortex-a55.
11920 2018-06-27 Jeff Law <law@redhat.com>
11922 * config/v850/t-v850 (MULTILIB_OPTIONS): Remove 8byte-align.
11923 (MULTILIB_DIRNAMES): Similarly.
11925 2018-06-27 Eric Botcazou <ebotcazou@adacore.com>
11927 * gimple.h (gimple_return_retbnd): Delete.
11928 (gimple_return_set_retbnd): Likewise.
11929 * cgraphunit.c (cgraph_node::expand_thunk): Remove call to
11930 gimple_return_set_retbnd.
11931 * gimple-pretty-print.c (dump_gimple_return): Remove call to
11932 gimple_return_retbnd and adjust.
11933 * tree-inline.h (struct copy_body_data): Remove retbnd field.
11934 * tree-inline.c (remap_gimple_stmt): Remove handling of retbnd.
11935 Explicitly return NULL in a couple more cases. Move assertion
11936 on debug statements and remove unreachable code.
11937 (reset_debug_binding): Do not test id->retbnd.
11938 (expand_call_inline): Do not set it.
11940 2018-06-27 Rasmus Villemoes <rv@rasmusvillemoes.dk>
11942 * configure.ac: Add --disable-gcov option.
11943 * configure: Regenerate.
11944 * Makefile.in: Honour @enable_gcov@.
11945 * doc/install.texi: Document --disable-gcov.
11947 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11949 * config/arm/arm-cpus.in (cortex-a76): New entry.
11950 (cortex-a76.cortex-a55): Likewise.
11951 * config/arm/arm-tables.opt: Regenerate.
11952 * config/arm/arm-tune.md: Likewise.
11953 * config/arm/driver-arm.c (arm_cpu_table): Add Cortex-A76 entry.
11954 * doc/invoke.texi (ARM Options): Document cortex-a76 and
11955 cortex-a76.cortex-a55.
11957 2018-06-27 Tamar Christina <tamar.christina@arm.com>
11960 * config/aarch64/aarch64.md (*movhf_aarch64): Add dup v0.4h pattern.
11962 2018-06-27 Siddhesh Poyarekar <siddhesh@sourceware.org>
11964 * config/aarch64/aarch64.h (CALL_USE_REGISTERS): Fix obsolete
11966 (EPILOGUE_USES): Likewise.
11968 2018-06-26 Eric Botcazou <ebotcazou@adacore.com>
11970 * tree-inline.c (remap_location): New function extracted from...
11971 (copy_edges_for_bb): Add ID parameter. Remap goto_locus.
11972 (copy_phis_for_bb): ...here. Call remap_location.
11973 (copy_cfg_body): Adjust call to copy_edges_for_bb.
11975 2018-06-26 Aaron Sawdey <acsawdey@linux.ibm.com>
11977 * config/rs6000/rs6000-string.c (expand_block_clear): Don't use
11978 unaligned vsx for 16B memset.
11980 2018-06-26 Segher Boessenkool <segher@kernel.crashing.org>
11983 * config/rs6000/rs6000.c (rs6000_init_builtins): Do not set
11984 ieee128_float_type_node to long_double_type_node unless
11985 TARGET_LONG_DOUBLE_128 is set.
11987 2018-06-26 David Malcolm <dmalcolm@redhat.com>
11989 * cfgloop.c (get_loop_location): Convert return type from
11990 location_t to dump_user_location_t, replacing INSN_LOCATION lookups
11991 by implicit construction from rtx_insn *, and using
11992 dump_user_location_t::from_function_decl for the fallback case.
11993 * cfgloop.h (get_loop_location): Convert return type from
11994 location_t to dump_user_location_t.
11995 * cgraphunit.c (walk_polymorphic_call_targets): Update call to
11996 dump_printf_loc to pass in a dump_location_t rather than a
11997 location_t, via the gimple stmt.
11998 * coverage.c (get_coverage_counts): Update calls to
11999 dump_printf_loc to pass in dump_location_t rather than a
12001 * doc/optinfo.texi (Dump types): Convert example of
12002 dump_printf_loc from taking "locus" to taking "insn". Update
12003 description of the "_loc" calls to cover dump_location_t.
12004 * dumpfile.c: Include "backend.h", "gimple.h", "rtl.h", and
12006 (dump_user_location_t::dump_user_location_t): New constructors,
12007 from gimple *stmt and rtx_insn *.
12008 (dump_user_location_t::from_function_decl): New function.
12009 (dump_loc): Make static.
12010 (dump_gimple_stmt_loc): Convert param "loc" from location_t to
12011 const dump_location_t &.
12012 (dump_generic_expr_loc): Delete.
12013 (dump_printf_loc): Convert param "loc" from location_t to
12014 const dump_location_t &.
12015 (selftest::test_impl_location): New function.
12016 (selftest::dumpfile_c_tests): New function.
12017 * dumpfile.h: Include "profile-count.h".
12018 (class dump_user_location_t): New class.
12019 (struct dump_impl_location_t): New struct.
12020 (class dump_location_t): New class.
12021 (dump_printf_loc): Convert 2nd param from source_location to
12022 const dump_location_t &.
12023 (dump_generic_expr_loc): Delete.
12024 (dump_gimple_stmt_loc): Convert 2nd param from source_location to
12025 const dump_location_t &.
12026 * gimple-fold.c (fold_gimple_assign): Update call to
12027 dump_printf_loc to pass in a dump_location_t rather than a
12028 location_t, via the gimple stmt.
12029 (gimple_fold_call): Likewise.
12030 * gimple-loop-interchange.cc
12031 (loop_cand::analyze_iloop_reduction_var): Update for change to
12032 check_reduction_path.
12033 (tree_loop_interchange::interchange): Update for change to
12034 find_loop_location.
12035 * graphite-isl-ast-to-gimple.c (scop_to_isl_ast): Update for
12036 change in return-type of find_loop_location.
12037 (graphite_regenerate_ast_isl): Likewise.
12038 * graphite-optimize-isl.c (optimize_isl): Likewise.
12039 * graphite.c (graphite_transform_loops): Likewise.
12040 * ipa-devirt.c (ipa_devirt): Update call to dump_printf_loc to
12041 pass in a dump_location_t rather than a location_t, via the
12043 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
12044 * ipa.c (walk_polymorphic_call_targets): Likewise.
12045 * loop-unroll.c (report_unroll): Convert "locus" param from
12046 location_t to dump_location_t.
12047 (decide_unrolling): Update for change to get_loop_location's
12049 * omp-grid.c (struct grid_prop): Convert field "target_loc" from
12050 location_t to dump_user_location_t.
12051 (grid_find_single_omp_among_assignments_1): Updates calls to
12052 dump_printf_loc to pass in a dump_location_t rather than a
12053 location_t, via the gimple stmt.
12054 (grid_parallel_clauses_gridifiable): Convert "tloc" from
12055 location_t to dump_location_t. Updates calls to dump_printf_loc
12056 to pass in a dump_location_t rather than a location_t, via the
12058 (grid_inner_loop_gridifiable_p): Likewise.
12059 (grid_dist_follows_simple_pattern): Likewise.
12060 (grid_gfor_follows_tiling_pattern): Likewise.
12061 (grid_target_follows_gridifiable_pattern): Likewise.
12062 (grid_attempt_target_gridification): Convert initialization
12063 of local "grid" from memset to zero-initialization; FIXME: does
12064 this require C++11? Update call to dump_printf_loc to pass in a
12065 optinfo_location rather than a location_t, via the gimple stmt.
12066 * profile.c (read_profile_edge_counts): Updates call to
12067 dump_printf_loc to pass in a dump_location_t rather than a
12069 (compute_branch_probabilities): Likewise.
12070 * selftest-run-tests.c (selftest::run_tests): Call
12072 * selftest.h (dumpfile_c_tests): New decl.
12073 * tree-loop-distribution.c (pass_loop_distribution::execute):
12074 Update for change in return type of find_loop_location.
12075 * tree-parloops.c (parallelize_loops): Likewise.
12076 * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Convert
12077 "locus" from location_t to dump_user_location_t.
12078 (canonicalize_loop_induction_variables): Likewise.
12079 * tree-ssa-loop-ivopts.c (tree_ssa_iv_optimize_loop): Update
12080 for change in return type of find_loop_location.
12081 * tree-ssa-loop-niter.c (number_of_iterations_exit): Update call
12082 to dump_printf_loc to pass in a dump_location_t rather than a
12083 location_t, via the stmt.
12084 * tree-ssa-sccvn.c (eliminate_dom_walker::before_dom_children):
12086 * tree-vect-loop-manip.c (find_loop_location): Convert return
12087 type from source_location to dump_user_location_t.
12088 (vect_do_peeling): Update for above change.
12089 (vect_loop_versioning): Update for change in type of
12091 * tree-vect-loop.c (check_reduction_path): Convert "loc" param
12092 from location_t to dump_user_location_t.
12093 (vect_estimate_min_profitable_iters): Update for change in type
12095 * tree-vect-slp.c (vect_print_slp_tree): Convert param "loc" from
12096 location_t to dump_location_t.
12097 (vect_slp_bb): Update for change in type of vect_location.
12098 * tree-vectorizer.c (vect_location): Convert from source_location
12099 to dump_user_location_t.
12100 (try_vectorize_loop_1): Update for change in vect_location's type.
12101 (vectorize_loops): Likewise.
12102 (increase_alignment): Likewise.
12103 * tree-vectorizer.h (vect_location): Convert from source_location
12104 to dump_user_location_t.
12105 (find_loop_location): Convert return type from source_location to
12106 dump_user_location_t.
12107 (check_reduction_path): Convert 1st param from location_t to
12108 dump_user_location_t.
12109 * value-prof.c (check_counter): Update call to dump_printf_loc to
12110 pass in a dump_user_location_t rather than a location_t; update
12111 call to error_at for change in type of "locus".
12112 (check_ic_target): Update call to dump_printf_loc to
12113 pass in a dump_user_location_t rather than a location_t, via the
12116 2018-06-26 Robin Dapp <rdapp@linux.vnet.ibm.com>
12118 * config/s390/s390.h (enum processor_flags): Do not use
12119 default tune parameter when -march was specified.
12121 2018-06-26 Jakub Jelinek <jakub@redhat.com>
12124 * config/i386/i386.md (setcc + movzbl to xor + setcc peephole2s):
12125 Check reg_overlap_mentioned_p in addition to reg_set_p with the same
12128 2018-06-26 Richard Biener <rguenther@suse.de>
12130 PR tree-optimization/86287
12132 * tree-vect-loop.c (vect_transform_loop_stmt): Fix read-after-free.
12133 (vect_analyze_loop): Initialize n_stmts.
12135 2018-06-26 Richard Biener <rguenther@suse.de>
12137 PR middle-end/86271
12138 * fold-const.c (fold_convertible_p): Pointer extension
12141 2018-06-26 Alexandre Oliva <aoliva@redhat.com>
12144 * dwarf2out.c (loc_list_has_views): Adjust comments.
12145 (dw_loc_list): Split single cross-partition range with
12148 2018-06-25 Jeff Law <law@redhat.com>
12150 * common/config/v850/v850-common.c (TARGET_DEFAULT_TARGET_FLAGS): Turn
12151 on -mbig-switch by default.
12153 * config/v850/predicates.md (const_float_1_operand): Fix match_code
12155 (const_float_0_operand): Remove unused predicate.
12156 * config/v850/v850.md (define_constants): Remove UNSPEC_LOOP.
12157 (define_c_enum unspec): Add LOOP, RCP and RSQRT constants.
12158 (recipsf2): New expander. Original pattern now called
12160 (recipdf2, recipdf2_insn): Similarly.
12161 (rsqrtsf2, rsqrtsf2_insn): Similarly
12162 (rsqrtdf2, rsqrtdf2_insn): Similarly
12164 2018-06-26 Gerald Pfeifer <gerald@pfeifer.com>
12166 * ginclude/stddef.h: Remove an obsolete comment on FreeBSD 5.
12167 Simplify logic for FreeBSD (twice).
12169 2018-06-25 Martin Sebor <msebor@redhat.com>
12171 PR tree-optimization/86204
12172 * tree-ssa-strlen.c (handle_builtin_strlen): Avoid storing
12173 a strnlen result if it's less than the length of the string.
12175 2018-06-25 Martin Sebor <msebor@redhat.com>
12177 PR tree-optimization/85700
12178 * gimple-fold.c (gimple_fold_builtin_strncat): Adjust comment.
12179 * tree-ssa-strlen.c (is_strlen_related_p): Handle integer subtraction.
12180 (maybe_diag_stxncpy_trunc): Distinguish strncat from strncpy.
12182 2018-06-25 Martin Sebor <msebor@redhat.com>
12184 * doc/extend.texi (Zero-length arrays): Update and clarify.
12186 2018-06-25 Michael Meissner <meissner@linux.ibm.com>
12188 * config.gcc (powerpc64le*): Revert January 16th, 2018 patch that
12189 added IEEE/IBM long double multilib support on PowerPC little
12190 endian Linux systems.
12191 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Likewise.
12192 (MULTILIB_DEFAULTS): Likewise.
12193 * config/rs6000/rs6000.c (rs6000_option_override_internal):
12195 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Likewise.
12196 * config/rs6000/t-ldouble-linux64le-ibm: Delete, no longer used.
12197 * config/rs6000/t-ldouble-linux64le-ieee: Delete, no longer used.
12199 2018-06-25 Alexander Monakov <amonakov@ispras.ru>
12201 PR middle-end/86311
12202 * sort.cc (REORDER_23): Avoid memcpy with same destination and source.
12203 (REORDER_45): Likewise.
12205 2018-06-25 Jeff Law <law@redhat.com>
12207 * config/v850/v850.md (divmodhi4): Make sure to sign extend the
12208 dividend to 32 bits. Adjust length.
12209 (udivmodhi4): Cleanup output template. Fix length.
12211 2018-06-25 Carl Love <cel@us.ibm.com>
12213 * config/rs6000/vsx.md: Change word selector to prefered location.
12215 2018-06-25 Richard Biener <rguenther@suse.de>
12217 PR tree-optimization/86304
12218 * tree-vectorizer.c (vectorize_loops): Walk over new possibly
12219 epilogue-if-converted loops as well.
12221 2018-06-25 Jan Hubicka <hubicka@ucw.cz>
12223 * lto-section-out.c (lto_begin_section): Do not print section
12224 name for noaddr and unnumbered dumps.
12226 2018-06-25 Richard Biener <rguenther@suse.de>
12228 * tree-vectorizer.h (struct vec_info_shared): New structure
12229 with parts split out from struct vec_info and loop_nest from
12230 struct _loop_vec_info.
12231 (struct vec_info): Adjust accordingly.
12232 (struct _loop_vec_info): Likewise.
12233 (LOOP_VINFO_LOOP_NEST): Adjust.
12234 (LOOP_VINFO_DATAREFS): Likewise.
12235 (LOOP_VINFO_DDRS): Likewise.
12236 (struct _bb_vec_info): Likewise.
12237 (BB_VINFO_DATAREFS): Likewise.
12238 (BB_VINFO_DDRS): Likewise.
12239 (struct _stmt_vec_info): Add dr_aux member.
12240 (DR_VECT_AUX): Adjust to refer to member of DR_STMTs vinfo.
12241 (DR_MISALIGNMENT_UNINITIALIZED): New.
12242 (set_dr_misalignment): Adjust.
12243 (dr_misalignment): Assert misalign isn't DR_MISALIGNMENT_UNINITIALIZED.
12244 (vect_analyze_loop): Adjust prototype.
12245 (vect_analyze_loop_form): Likewise.
12246 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
12247 Compute dependences lazily.
12248 (vect_record_base_alignments): Use shared datarefs/ddrs.
12249 (vect_verify_datarefs_alignment): Likewise.
12250 (vect_analyze_data_refs_alignment): Likewise.
12251 (vect_analyze_data_ref_accesses): Likewise.
12252 (vect_analyze_data_refs): Likewise.
12253 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Add
12254 constructor parameter for shared part.
12255 (vect_analyze_loop_form): Pass in shared part and adjust.
12256 (vect_analyze_loop_2): Pass in storage for the number of
12257 stmts. Move loop nest finding to the caller. Compute
12259 (vect_analyze_loop): Pass in shared part.
12260 (vect_transform_loop): Verify shared datarefs are unchanged.
12261 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Add
12262 constructor parameter for shared part.
12263 (vect_slp_analyze_bb_1): Pass in shared part and adjust.
12264 (vect_slp_bb): Verify shared datarefs are unchanged before
12266 * tree-vect-stmts.c (ensure_base_align): Adjust for DR_AUX
12268 (new_stmt_vec_info): Initialize DR_AUX misalignment to
12269 DR_MISALIGNMENT_UNINITIALIZED.
12270 * tree-vectorizer.c (vec_info::vec_info): Add constructor
12271 parameter for shared part.
12272 (vec_info::~vec_info): Adjust.
12273 (vec_info_shared::vec_info_shared): New.
12274 (vec_info_shared::~vec_info_shared): Likewise.
12275 (vec_info_shared::save_datarefs): Likewise.
12276 (vec_info_shared::check_datarefs): Likewise.
12277 (try_vectorize_loop_1): Construct shared part live for analyses
12278 of a single loop for multiple vector sizes.
12279 * tree-parloops.c (gather_scalar_reductions): Adjust.
12281 2018-06-25 Richard Biener <rguenther@suse.de>
12283 * tree-vect-data-refs.c (vect_find_stmt_data_reference): Modify
12284 DR for SIMD lane accesses here and mark DR with (void *)-1 aux.
12285 (vect_analyze_data_refs): Remove similar code from here and
12286 simplify accordingly.
12288 2018-06-25 Richard Biener <rguenther@suse.de>
12290 * tree-vect-data-refs.c (vect_check_gather_scatter): Fail
12291 for reverse storage order accesses rather than asserting
12292 they cannot happen here.
12294 2018-06-25 Tom de Vries <tdevries@suse.de>
12297 * config/i386/i386.md (define_insn "*tls_global_dynamic_64_<mode>"):
12298 Use data16 instead of .byte for insn prefix.
12300 2018-06-25 Andreas Krebbel <krebbel@linux.ibm.com>
12303 * parser.c (make_char_string_pack): Pass this literal chars
12304 through cpp_interpret_string.
12305 (cp_parser_userdef_numeric_literal): Check the result of
12306 make_char_string_pack.
12308 2018-06-24 Maya Rashish <coypu@sdf.org>
12310 * ginclude/stddef.h: Simplify conditions around avoiding
12311 re-definition of __size_t.
12313 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
12315 * lto-streamer-out.c (tree_is_indexable): Make LABEL_DECL nonindexable
12316 unless it is forced or nonlocal; assert that we stream no IMPORTED_DECL.
12318 2018-06-22 Maya Rashish <coypu@sdf.org>
12320 * doc/invoke.texi (mno-fancy-math-387): Update for changes
12321 made to OpenBSD and NetBSD through the years.
12323 2018-06-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
12325 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
12326 behavior of vec_pack (vector double, vector double) to match
12327 behavior of vec_float2 (vector double, vector double).
12329 2018-06-22 Olivier Hainque <hainque@adacore.com>
12331 * gimplify.c (gimplify_function_tree): Prevent creation
12332 of a trampoline for the address of the current function
12333 passed to entry/exit instrumentation hooks.
12335 2018-06-22 Aaron Sawdey <acsawdey@linux.ibm.com>
12338 * config/rs6000/rs6000-string.c (expand_strn_compare): Handle -m32
12341 2018-06-22 Martin Liska <mliska@suse.cz>
12343 PR tree-optimization/86263
12344 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
12345 Bail out if is_enabled is false.
12346 * tree-switch-conversion.h (jump_table_cluster::is_enabled):
12348 (jump_table_cluster::is_enabled): New function.
12350 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
12352 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
12353 BINFO_BASE_ACCESSES and BINFO_VPTR_FIELD.
12354 * tree-streamer-in.c (streamer_read_tree_bitfields): Likewise.
12355 (lto_input_ts_binfo_tree_pointers): Likewise.
12356 * tree-streamer-out.c (streamer_write_tree_bitfields,
12357 write_ts_binfo_tree_pointers): Likewise.
12358 * tree.c (free_lang_data_in_binfo): Clear BINFO_VPTR_FIELD.
12360 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
12362 * tree.c (free_lang_data_in_type): Free all TYPE_VFIELDs.
12364 2018-06-22 Martin Liska <mliska@suse.cz>
12366 * symbol-summary.h (get): Make it pure and inline move
12367 functionality from ::get function.
12368 (get): Remove and inline into ::get and ::get_create.
12369 (get_create): Move code from ::get function.
12371 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12374 * config/i386/sol2.h (CPP_SPEC): Don't pass -P for
12375 -x assembler-with-cpp.
12377 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12379 * config/sol2.h (TARGET_OS_CPP_BUILTINS): Define
12380 _FILE_OFFSET_BITS=64 for C++.
12382 2018-06-21 Michael Meissner <meissner@linux.ibm.com>
12384 * config/rs6000/rs6000.md (extendtfif2): Add missing 128-bit
12385 conversion insn that shows up when pr85657-3.c is compiled using
12386 IEEE 128-bit long double.
12387 (neg<mode>2_internal): Use the correct mode to check whether the
12388 mode is IBM extended.
12389 * config/rs6000/rs6000.c (init_float128_ieee): Prevent complex
12390 multiply and divide external functions from being created more
12393 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
12395 * cfgrtl.c (fixup_reorder_chain): Do not emit NOPs in DECL_IGNORED_P
12397 (rtl_merge_blocks): Likewise. Do not emit a NOP if the location of
12398 the edge can be forwarded.
12399 (cfg_layout_merge_blocks): Likewise.
12401 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
12403 * except.c (finish_eh_generation): Commit edge insertions only after
12404 the EH edges have been redirected from post-landing to landing pads.
12406 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
12408 * tree-nested.c (get_frame_type): Use create_tmp_var_raw instead of
12409 create_tmp_var_for to create the FRAME decl.
12410 (finalize_nesting_tree_1): Do not unchain the FRAME decl.
12412 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
12414 * tree-inline.c (copy_edges_for_bb): Minor tweak.
12415 (maybe_move_debug_stmts_to_successors): Also reset the locus of the
12416 debug statement when resetting its value.
12417 (expand_call_inline): Copy the locus of the call onto the assignment
12418 of the return value, if any. Use local variable in more cases.
12420 2018-06-21 Martin Liska <mliska@suse.cz>
12422 * ipa-pure-const.c (propagate_nothrow): Use
12423 funct_state_summaries->get.
12424 (dump_malloc_lattice): Likewise.
12425 (propagate_malloc): Likewise.
12427 2018-06-21 Richard Biener <rguenther@suse.de>
12429 * lto-streamer-out.c (DFS::DFS_write_tree_body): Update outdated
12430 comment. Follow BLOCK_ABSTRACT_ORIGIN unconditionally.
12431 * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Update
12433 * tree-streamer-out.c (write_ts_block_tree_pointers): Stream
12434 BLOCK_ABSTRACT_ORIGIN unconditionally.
12436 2018-06-21 David Malcolm <dmalcolm@redhat.com>
12438 * ipa-cp.c (ipcp_driver): Set edge_clone_summaries to NULL after
12440 * ipa-reference.c (ipa_reference_c_finalize): Delete
12441 ipa_ref_opt_sum_summaries and set it to NULL.
12443 2018-06-21 Tom de Vries <tdevries@suse.de>
12445 PR tree-optimization/85859
12446 * tree-ssa-tail-merge.c (stmt_local_def): Copy gimple_is_call
12447 test with comment from bb_no_side_effects_p.
12449 2018-06-21 Richard Biener <rguenther@suse.de>
12451 PR tree-optimization/86232
12452 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Adjust
12453 max for constant niter.
12455 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
12457 * config/aarch64/aarch64-simd.md
12458 (*aarch64_crypto_aes<aes_op>v16qi_xor_combine): New.
12460 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
12462 * config/aarch64/aarch64-simd.md (aarch64_crypto_aes<aes_op>v16qi):
12463 Make opernads of the unspec commutative.
12465 2018-06-21 Richard Biener <rguenther@suse.de>
12467 * tree-data-ref.c (dr_step_indicator): Handle NULL DR_STEP.
12468 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
12469 Avoid calling vect_mark_for_runtime_alias_test with gathers or scatters.
12470 (vect_analyze_data_ref_dependence): Re-order checks to deal with
12472 (vect_record_base_alignments): Do not record base alignment
12473 for gathers or scatters.
12474 (vect_compute_data_ref_alignment): Drop return value that is always
12475 true. Bail out early for gathers or scatters.
12476 (vect_enhance_data_refs_alignment): Bail out early for gathers
12478 (vect_find_same_alignment_drs): Likewise.
12479 (vect_analyze_data_refs_alignment): Remove dead code.
12480 (vect_slp_analyze_and_verify_node_alignment): Likewise.
12481 (vect_analyze_data_refs): For possible gathers or scatters do
12482 not create an alternate DR, just check their possible validity
12483 and mark them. Adjust DECL_NONALIASED handling to not rely
12484 on DR_BASE_ADDRESS.
12485 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Do not
12486 update inits of gathers or scatters.
12487 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern):
12488 Also copy gather/scatter flag to pattern vinfo.
12490 2018-06-20 Kelvin Nilsen <kelvin@gcc.gnu.org>
12492 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
12493 behavior of vec_packsu (vector unsigned long long, vector unsigned
12494 long long) to match behavior of vec_packs with same signature.
12496 2018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
12497 Thomas Schwinge <thomas@codesourcery.com>
12498 Cesar Philippidis <cesar@codesourcery.com>
12500 * gimplify.c (gimplify_scan_omp_clauses): Add support for
12501 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
12502 (gimplify_adjust_omp_clauses): Likewise.
12503 (gimplify_oacc_declare_1): Add support for GOMP_MAP_RELEASE, remove
12504 support for GOMP_MAP_FORCE_{ALLOC,TO,FROM,TOFROM}.
12505 (gimplify_omp_target_update): Update handling of acc update and
12507 * omp-low.c (install_var_field): Remove unused parameter
12508 base_pointers_restrict.
12509 (scan_sharing_clauses): Remove base_pointers_restrict parameter.
12510 Update call to install_var_field. Handle OMP_CLAUSE_{IF_PRESENT,
12512 (omp_target_base_pointers_restrict_p): Delete.
12513 (scan_omp_target): Update call to scan_sharing_clauses.
12514 * tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_{IF_PRESENT,
12516 * tree-nested.c (convert_nonlocal_omp_clauses): Handle
12517 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
12518 (convert_local_omp_clauses): Likewise.
12519 * tree-pretty-print.c (dump_omp_clause): Likewise.
12520 * tree.c (omp_clause_num_ops): Add entries for OMP_CLAUSE_{IF_PRESENT,
12522 (omp_clause_code_name): Likewise.
12524 2018-06-20 Jakub Jelinek <jakub@redhat.com>
12527 * var-tracking.c (use_narrower_mode_test): Check if shift amount can
12530 PR tree-optimization/86231
12531 * tree-vrp.c (union_ranges): For ( [ ) ] or ( )[ ] range and
12532 anti-range don't overwrite *vr0min before using it to compute *vr0max.
12534 2018-06-20 Tom de Vries <tdevries@suse.de>
12536 PR tree-optimization/86097
12537 * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Also convert *nit to
12538 iv type if signedness of iv type is not the same as that of *nit.
12540 2018-06-20 Jakub Jelinek <jakub@redhat.com>
12542 * cfgrtl.c (rtl_verify_edges): Formatting fix. If bb->preds has any
12543 EDGE_EH edges, verify they are all EDGE_EH.
12545 2018-06-20 Maya Rashish <coypu@sdf.org>
12547 * ginclude/stddef.h: Limit #include <machine/ansi.h> to NetBSD.
12549 2018-06-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12551 * config/aarch64/aarch64-tuning-flags.def (no_ldp_stp_qregs): New.
12552 * config/aarch64/aarch64.c (xgene1_tunings): Add
12553 AARCH64_EXTRA_TUNE_NO_LDP_STP_QREGS to tune_flags.
12554 (aarch64_mode_valid_for_sched_fusion_p):
12555 Allow 16-byte modes.
12556 (aarch64_classify_address): Allow 16-byte modes for load_store_pair_p.
12557 * config/aarch64/aarch64-ldpstp.md: Add peepholes for LDP STP of
12559 * config/aarch64/aarch64-simd.md (load_pair<VQ:mode><VQ2:mode>):
12561 (vec_store_pair<VQ:mode><VQ2:mode>): Likewise.
12562 * config/aarch64/iterators.md (VQ2): New mode iterator.
12564 2018-06-20 Martin Liska <mliska@suse.cz>
12566 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
12567 Change default ratio from 10 to 8.
12569 2018-06-20 Martin Liska <mliska@suse.cz>
12571 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
12573 (bit_test_cluster::find_bit_tests): Likewise.
12574 (switch_decision_tree::analyze_switch_statement): Find clusters.
12575 * tree-switch-conversion.h (struct jump_table_cluster): Document
12578 2018-06-20 Martin Liska <mliska@suse.cz>
12580 * tree-switch-conversion.c (switch_conversion::collect):
12581 Record m_uniq property.
12582 (switch_conversion::expand): Bail out for special conditions.
12583 (group_cluster::~group_cluster): New.
12584 (group_cluster::group_cluster): Likewise.
12585 (group_cluster::dump): Likewise.
12586 (jump_table_cluster::emit): New.
12587 (switch_decision_tree::fix_phi_operands_for_edges): New.
12588 (struct case_node): Remove struct.
12589 (jump_table_cluster::can_be_handled): New.
12590 (case_values_threshold): Moved to header.
12591 (reset_out_edges_aux): Likewise.
12592 (jump_table_cluster::is_beneficial): New.
12593 (bit_test_cluster::can_be_handled): Likewise.
12594 (add_case_node): Remove.
12595 (bit_test_cluster::is_beneficial): New.
12596 (case_bit_test::cmp): New.
12597 (bit_test_cluster::emit): New.
12598 (expand_switch_as_decision_tree_p): Remove.
12599 (bit_test_cluster::hoist_edge_and_branch_if_true): New.
12600 (fix_phi_operands_for_edge): Likewise.
12601 (switch_decision_tree::analyze_switch_statement): New.
12602 (compute_cases_per_edge): Move ...
12603 (switch_decision_tree::compute_cases_per_edge): ... here.
12604 (try_switch_expansion): Likewise.
12605 (switch_decision_tree::try_switch_expansion): Likewise.
12606 (record_phi_operand_mapping): Likewise.
12607 (switch_decision_tree::record_phi_operand_mapping): Likewise.
12608 (emit_case_decision_tree): Likewise.
12609 (switch_decision_tree::emit): Likewise.
12610 (balance_case_nodes): Likewise.
12611 (switch_decision_tree::balance_case_nodes): Likewise.
12612 (dump_case_nodes): Likewise.
12613 (switch_decision_tree::dump_case_nodes): Likewise.
12614 (emit_jump): Likewise.
12615 (switch_decision_tree::emit_jump): Likewise.
12616 (emit_cmp_and_jump_insns): Likewise.
12617 (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
12618 (emit_case_nodes): Likewise.
12619 (switch_decision_tree::emit_case_nodes): Likewise.
12620 (conditional_probability): Remove.
12621 * tree-switch-conversion.h (enum cluster_type): New.
12623 (struct cluster): Likewise.
12624 (cluster::cluster): Likewise.
12625 (struct simple_cluster): Likewise.
12626 (simple_cluster::simple_cluster): Likewise.
12627 (struct group_cluster): Likewise.
12628 (struct jump_table_cluster): Likewise.
12629 (struct bit_test_cluster): Likewise.
12630 (struct min_cluster_item): Likewise.
12631 (struct case_tree_node): Likewise.
12632 (case_tree_node::case_tree_node): Likewise.
12633 (jump_table_cluster::case_values_threshold): Likewise.
12634 (struct case_bit_test): Likewise.
12635 (struct switch_decision_tree): Likewise.
12636 (struct switch_conversion): Likewise.
12637 (switch_decision_tree::reset_out_edges_aux): Likewise.
12639 2018-06-20 Martin Liska <mliska@suse.cz>
12641 * tree-switch-conversion.c (MAX_CASE_BIT_TESTS): Remove.
12642 (hoist_edge_and_branch_if_true): Likewise.
12643 (expand_switch_using_bit_tests_p): Likewise.
12644 (struct case_bit_test): Likewise.
12645 (case_bit_test_cmp): Likewise.
12646 (emit_case_bit_tests): Likewise.
12647 (switch_conversion::switch_conversion): New class.
12648 (struct switch_conv_info): Remove old struct.
12649 (collect_switch_conv_info): More to ...
12650 (switch_conversion::collect): ... this.
12651 (check_range): Likewise.
12652 (switch_conversion::check_range): Likewise.
12653 (check_all_empty_except_final): Likewise.
12654 (switch_conversion::check_all_empty_except_final): Likewise.
12655 (check_final_bb): Likewise.
12656 (switch_conversion::check_final_bb): Likewise.
12657 (create_temp_arrays): Likewise.
12658 (switch_conversion::create_temp_arrays): Likewise.
12659 (free_temp_arrays): Likewise.
12660 (gather_default_values): Likewise.
12661 (switch_conversion::gather_default_values): Likewise.
12662 (build_constructors): Likewise.
12663 (switch_conversion::build_constructors): Likewise.
12664 (constructor_contains_same_values_p): Likewise.
12665 (switch_conversion::contains_same_values_p): Likewise.
12666 (array_value_type): Likewise.
12667 (switch_conversion::array_value_type): Likewise.
12668 (build_one_array): Likewise.
12669 (switch_conversion::build_one_array): Likewise.
12670 (build_arrays): Likewise.
12671 (switch_conversion::build_arrays): Likewise.
12672 (gen_def_assigns): Likewise.
12673 (switch_conversion::gen_def_assigns): Likewise.
12674 (prune_bbs): Likewise.
12675 (switch_conversion::prune_bbs): Likewise.
12676 (fix_phi_nodes): Likewise.
12677 (switch_conversion::fix_phi_nodes): Likewise.
12678 (gen_inbound_check): Likewise.
12679 (switch_conversion::gen_inbound_check): Likewise.
12680 (process_switch): Use the newly created class.
12681 (switch_conversion::expand): New.
12682 (switch_conversion::~switch_conversion): New.
12683 * tree-switch-conversion.h: New file.
12685 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
12687 * tree-vectorizer.h (NUM_PATTERNS, vect_recog_func_ptr): Move to
12688 tree-vect-patterns.c.
12689 * tree-vect-patterns.c (vect_supportable_direct_optab_p): New function.
12690 (vect_recog_dot_prod_pattern): Use it. Remove the type_in argument.
12691 (vect_recog_sad_pattern): Likewise.
12692 (vect_recog_widen_sum_pattern): Likewise.
12693 (vect_recog_pow_pattern): Likewise. Check for a null vectype.
12694 (vect_recog_widen_shift_pattern): Remove the type_in argument.
12695 (vect_recog_rotate_pattern): Likewise.
12696 (vect_recog_mult_pattern): Likewise.
12697 (vect_recog_vector_vector_shift_pattern): Likewise.
12698 (vect_recog_divmod_pattern): Likewise.
12699 (vect_recog_mixed_size_cond_pattern): Likewise.
12700 (vect_recog_bool_pattern): Likewise.
12701 (vect_recog_mask_conversion_pattern): Likewise.
12702 (vect_try_gather_scatter_pattern): Likewise.
12703 (vect_recog_widen_mult_pattern): Likewise. Check for a null vectype.
12704 (vect_recog_over_widening_pattern): Likewise.
12705 (vect_recog_gather_scatter_pattern): Likewise.
12706 (vect_recog_func_ptr): Move from tree-vectorizer.h
12707 (vect_vect_recog_func_ptrs): Move further down the file.
12708 (vect_recog_func): Likewise. Remove the third argument.
12709 (NUM_PATTERNS): Define based on vect_vect_recog_func_ptrs.
12710 (vect_pattern_recog_1): Expect the pattern function to do any
12711 necessary target tests. Also expect it to provide a vector type.
12712 Remove the type_in handling.
12714 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
12716 * tree-vect-patterns.c (vect_pattern_detected): New function.
12717 (vect_recog_dot_prod_patternm, vect_recog_sad_pattern)
12718 (vect_recog_widen_mult_pattern, vect_recog_widen_sum_pattern)
12719 (vect_recog_over_widening_pattern, vect_recog_widen_shift_pattern
12720 (vect_recog_rotate_pattern, vect_recog_vector_vector_shift_pattern)
12721 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
12722 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
12723 (vect_recog_mask_conversion_pattern)
12724 (vect_try_gather_scatter_pattern): Likewise.
12726 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
12728 * tree-vect-patterns.c (vect_get_internal_def): New function.
12729 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
12730 (vect_recog_vector_vector_shift_pattern, check_bool_pattern)
12731 (search_type_for_mask_1): Use it.
12733 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
12735 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
12736 redundant WIDEN_SUM_EXPR handling.
12737 (vect_recog_sad_pattern): Likewise.
12739 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
12741 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
12742 redundant check that the types of a PLUS_EXPR or MULT_EXPR agree.
12743 (vect_recog_sad_pattern): Likewise PLUS_EXPR, ABS_EXPR and MINUS_EXPR.
12744 (vect_recog_widen_mult_pattern): Likewise MULT_EXPR.
12745 (vect_recog_widen_sum_pattern): Likewise PLUS_EXPR.
12747 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
12749 * tree-vect-stmts.c (vectorizable_call): Make sure that we
12750 use the stmt_vec_info of the original bb statement for the
12751 new zero assignment, even if the call is part of a pattern.
12753 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
12755 * tree-vectorizer.h (_stmt_vec_info): Note above pattern_def_seq
12756 that the sequence is attached to the original statement rather
12757 than the pattern statement.
12758 * tree-vect-loop.c (vect_determine_vf_for_stmt): Take the
12759 PATTERN_DEF_SEQ from the original statement rather than
12760 the main pattern statement.
12761 * tree-vect-stmts.c (free_stmt_vec_info): Likewise.
12762 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Likewise.
12763 (vect_mark_pattern_stmts): Don't copy the PATTERN_DEF_SEQ.
12765 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
12767 * tree-vect-stmts.c (vect_analyze_stmt): Move the handling of pattern
12768 definition statements before the early exit for statements that aren't
12770 * tree-vect-loop.c (vect_transform_loop_stmt): New function,
12772 (vect_transform_loop): ...here. Process pattern definition
12773 statements without first checking whether the main pattern
12774 statement is live or relevant.
12776 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
12778 * tree-cfgcleanup.c (tree_forwarder_block_p): Do not return false at
12779 -O0 if the locus represent UNKNOWN_LOCATION but have different values.
12781 2018-06-19 Aaron Sawdey <acsawdey@linux.ibm.com>
12783 * config/rs6000/rs6000-string.c (select_block_compare_mode): Check
12784 TARGET_EFFICIENT_OVERLAPPING_UNALIGNED here instead of in caller.
12785 (do_and3, do_and3_mask, do_compb3, do_rotl3): New functions.
12786 (expand_block_compare): Change select_block_compare_mode call.
12787 (expand_strncmp_align_check): Use new functions, fix comment.
12788 (emit_final_str_compare_gpr): New function.
12789 (expand_strn_compare): Refactor and clean up code.
12790 * config/rs6000/vsx.md (vsx_mov<mode>_64bit): Remove *.
12792 2018-06-19 Tony Reix <tony.reix@atos.com>
12793 Damien Bergamini <damien.bergamini@atos.com>
12794 David Edelsohn <dje.gcc@gmail.com>
12796 * collect2.c (static_obj): New variable.
12797 (static_libs): New variable.
12798 (is_in_list): Uncomment declaration.
12799 (main): Track AIX libraries linked statically.
12800 (is_in_list): Uncomment definition.
12801 (scan_prog_file): Don't add AIX shared libraries initializer
12802 to constructor list if linking statically.
12804 2018-06-19 Max Filippov <jcmvbkbc@gmail.com>
12806 * config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec
12808 (allocate_stack, frame_blockage, *frame_blockage): New patterns.
12810 2018-06-19 Jan Hubicka <hubicka@ucw.cz>
12812 * tree.c (find_decls_types_r): Remove all non-VAR_DECLs from
12815 2018-06-19 Martin Liska <mliska@suse.cz>
12817 * config/i386/i386.c (ix86_can_inline_p): Do not use
12818 ipa_fn_summaries::get_create.
12819 * ipa-cp.c (ipcp_cloning_candidate_p): Replace get_create with
12821 (devirtualization_time_bonus): Likewise.
12822 (ipcp_propagate_stage): Likewise.
12823 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
12824 (edge_set_predicate): Likewise.
12825 (evaluate_conditions_for_known_args): Likewise.
12826 (evaluate_properties_for_edge): Likewise.
12827 (ipa_call_summary::reset): Tranform to ...
12828 (ipa_call_summary::~ipa_call_summary): ... this.
12829 (ipa_fn_summary::reset): Transform to ...
12830 (ipa_fn_summary::~ipa_fn_summary): ... this.
12831 (ipa_fn_summary_t::remove): Rename to ...
12832 (ipa_fn_summary_t::remove_callees): ... this.
12833 (ipa_fn_summary_t::duplicate): Use placement new
12834 instead of memory copy.
12835 (ipa_call_summary_t::duplicate): Likewise.
12836 (ipa_call_summary_t::remove): Remove.
12837 (dump_ipa_call_summary): Change get_create to get.
12838 (ipa_dump_fn_summary): Dump only when summary exists.
12839 (analyze_function_body): Use symbol_summary::get instead
12841 (compute_fn_summary): Likewise.
12842 (estimate_edge_devirt_benefit): Likewise.
12843 (estimate_edge_size_and_time): Likewise.
12844 (inline_update_callee_summaries): Likewise.
12845 (remap_edge_change_prob): Likewise.
12846 (remap_edge_summaries): Likewise.
12847 (ipa_merge_fn_summary_after_inlining): Likewise.
12848 (write_ipa_call_summary): Likewise.
12849 (ipa_fn_summary_write): Likewise.
12850 (ipa_free_fn_summary): Likewise.
12851 * ipa-fnsummary.h (struct GTY): Add new ctor and copy ctor.
12852 (struct ipa_call_summary): Likewise.
12853 * ipa-icf.c (sem_function::merge): Use symbol_summary::get instead
12855 * ipa-inline-analysis.c (do_estimate_edge_time): Likewise.
12856 (estimate_size_after_inlining): Likewise.
12857 (estimate_growth): Likewise.
12858 (growth_likely_positive): Likewise.
12859 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
12860 (inline_call): Likewise.
12861 * ipa-inline.c (caller_growth_limits): Likewise.
12862 (can_inline_edge_p): Likewise.
12863 (can_inline_edge_by_limits_p): Likewise.
12864 (compute_uninlined_call_time): Likewise.
12865 (compute_inlined_call_time): Likewise.
12866 (want_inline_small_function_p): Likewise.
12867 (edge_badness): Likewise.
12868 (update_caller_keys): Likewise.
12869 (update_callee_keys): Likewise.
12870 (inline_small_functions): Likewise.
12871 (inline_to_all_callers_1): Likewise.
12872 (dump_overall_stats): Likewise.
12873 (early_inline_small_functions): Likewise.
12874 (early_inliner): Likewise.
12875 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
12876 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
12877 * ipa-pure-const.c (malloc_candidate_p): Likewise.
12878 * ipa-split.c (execute_split_functions): Likewise.
12879 * symbol-summary.h: Likewise.
12880 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
12882 2018-06-19 Richard Biener <rguenther@suse.de>
12884 * tree-vectorizer.c (try_vectorize_loop_1): Split out of ...
12885 (vectorize_loops): ... here. Fix dbgcnt handling.
12886 (try_vectorize_loop): Wrap try_vectorize_loop_1.
12888 2018-06-19 Segher Boessenkool <segher@kernel.crashing.org>
12891 * config/rs6000/rs6000.md (rs6000_discover_homogeneous_aggregate): An
12892 ieee128 argument takes up only one (vector) register, not two (floating
12895 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
12897 * gimplify.c (gimplify_init_constructor): Really never clear for an
12898 incomplete constructor if CONSTRUCTOR_NO_CLEARING is set.
12900 2018-06-19 Richard Biener <rguenther@suse.de>
12902 PR tree-optimization/86179
12903 * tree-vect-patterns.c (vect_pattern_recog_1): Clean up
12904 after failed recognition.
12906 2018-06-18 Martin Sebor <msebor@redhat.com>
12908 PR middle-end/85602
12909 * calls.c (maybe_warn_nonstring_arg): Handle strncat.
12910 * tree-ssa-strlen.c (is_strlen_related_p): Make extern.
12911 Handle integer subtraction.
12912 (maybe_diag_stxncpy_trunc): Handle nonstring source arguments.
12913 * tree-ssa-strlen.h (is_strlen_related_p): Declare.
12915 2018-06-18 David Malcolm <dmalcolm@redhat.com>
12917 * config/frv/frv-protos.h (frv_ifcvt_modify_insn): Strengthen 3rd
12918 param from rtx to rtx_insn *.
12919 * config/frv/frv.c (frv_ifcvt_add_insn): Likewise for "insn"
12921 (frv_ifcvt_modify_insn): Likwise.
12922 (frv_ifcvt_modify_final): Likwise for local "existing_insn",
12923 adding an as_a <rtx_insn *> cast. Likewise for local "insn".
12924 * config/mips/mips.c (r10k_insert_cache_barriers): Add an
12925 as_a <rtx_insn *> cast to local "unprotected_region" once
12926 it's been established that it's not NULL or pc_rtx.
12927 * config/nds32/nds32-relax-opt.c (nds32_group_insns): Strengthen
12928 param "sethi" from rtx to rtx_insn *.
12929 (nds32_group_float_insns): Likewise for param "insn".
12930 * config/vax/vax-protos.h (vax_output_int_add): Likewise for 1st
12932 (vax_output_int_subtract): Likewise.
12933 * config/vax/vax.c (vax_output_int_add): Likewise for param
12935 (vax_output_int_subtract): Likewise.
12936 * emit-rtl.c (set_insn_deleted): Likewise, removing cast.
12937 (emit_pattern_after): Likewise for param "after".
12938 (emit_insn_after): Likewise.
12939 (emit_jump_insn_after): Likewise.
12940 (emit_call_insn_after): Likewise.
12941 (emit_debug_insn_after): Likewise.
12942 (emit_pattern_before): Likewise for param "before".
12943 (emit_insn_before): Likewise.
12944 (emit_jump_insn_before): Likewise.
12945 * final.c (get_insn_template): Likewise for param "insn", removing
12947 * output.h (get_insn_template): Likewise for 2nd param.
12948 * rtl.h (emit_insn_before): Likewise.
12949 (emit_jump_insn_before): Likewise.
12950 (emit_debug_insn_before_noloc): Likewise.
12951 (emit_insn_after): Likewise.
12952 (emit_jump_insn_after): Likewise.
12953 (emit_call_insn_after): Likewise.
12954 (emit_debug_insn_after): Likewise.
12955 (set_insn_deleted): Likewise for param.
12957 2018-06-18 Michael Meissner <meissner@linux.ibm.com>
12960 * config/rs6000/rs6000-modes.def (toplevel): Rework the 128-bit
12961 floating point modes, so that IFmode is numerically greater than
12962 TFmode, which is greater than KFmode using FRACTIONAL_FLOAT_MODE
12963 to declare the ordering. This prevents IFmode from being
12964 converted to TFmode when long double is IEEE 128-bit on an ISA 3.0
12965 machine. Include rs6000-modes.h to share the fractional values
12966 between genmodes* and the rest of the compiler.
12967 (IFmode): Likewise.
12968 (KFmode): Likewise.
12969 (TFmode): Likewise.
12970 * config/rs6000/rs6000-modes.h: New file.
12971 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Change the
12972 meaning of rs6000_long_double_size so that 126..128 selects an
12973 appropriate 128-bit floating point type.
12974 (rs6000_option_override_internal): Likewise.
12975 * config/rs6000/rs6000.h (toplevel): Include rs6000-modes.h.
12976 (TARGET_LONG_DOUBLE_128): Change the meaning of
12977 rs6000_long_double_size so that 126..128 selects an appropriate
12978 128-bit floating point type.
12979 (LONG_DOUBLE_TYPE_SIZE): Update comment.
12980 * config/rs6000/rs6000.md (trunciftf2): Correct the modes of the
12981 source and destination to match the standard usage.
12982 (truncifkf2): Likewise.
12983 (copysign<mode>3, IEEE iterator): Rework copysign of float128 on
12984 ISA 2.07 to use an explicit clobber, instead of passing in a
12986 (copysign<mode>3_soft): Likewise.
12988 2018-06-18 David Malcolm <dmalcolm@redhat.com>
12990 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
12991 Replace dump_printf_loc call with DUMP_VECT_SCOPE.
12992 (vect_slp_analyze_instance_dependence): Likewise.
12993 (vect_enhance_data_refs_alignment): Likewise.
12994 (vect_analyze_data_refs_alignment): Likewise.
12995 (vect_slp_analyze_and_verify_instance_alignment
12996 (vect_analyze_data_ref_accesses): Likewise.
12997 (vect_prune_runtime_alias_test_list): Likewise.
12998 (vect_analyze_data_refs): Likewise.
12999 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Likewise.
13000 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
13001 (vect_analyze_scalar_cycles_1): Likewise.
13002 (vect_get_loop_niters): Likewise.
13003 (vect_analyze_loop_form_1): Likewise.
13004 (vect_update_vf_for_slp): Likewise.
13005 (vect_analyze_loop_operations): Likewise.
13006 (vect_analyze_loop): Likewise.
13007 (vectorizable_induction): Likewise.
13008 (vect_transform_loop): Likewise.
13009 * tree-vect-patterns.c (vect_pattern_recog): Likewise.
13010 * tree-vect-slp.c (vect_analyze_slp): Likewise.
13011 (vect_make_slp_decision): Likewise.
13012 (vect_detect_hybrid_slp): Likewise.
13013 (vect_slp_analyze_operations): Likewise.
13014 (vect_slp_bb): Likewise.
13015 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Likewise.
13016 (vectorizable_bswap): Likewise.
13017 (vectorizable_call): Likewise.
13018 (vectorizable_simd_clone_call): Likewise.
13019 (vectorizable_conversion): Likewise.
13020 (vectorizable_assignment): Likewise.
13021 (vectorizable_shift): Likewise.
13022 (vectorizable_operation): Likewise.
13023 * tree-vectorizer.h (DUMP_VECT_SCOPE): New macro.
13025 2018-06-18 Martin Sebor <msebor@redhat.com>
13027 PR tree-optimization/81384
13028 * builtin-types.def (BT_FN_SIZE_CONST_STRING_SIZE): New.
13029 * builtins.c (expand_builtin_strnlen): New function.
13030 (expand_builtin): Call it.
13031 (fold_builtin_n): Avoid setting TREE_NO_WARNING.
13032 * builtins.def (BUILT_IN_STRNLEN): New.
13033 * calls.c (maybe_warn_nonstring_arg): Handle BUILT_IN_STRNLEN.
13034 Warn for bounds in excess of maximum object size.
13035 * tree-ssa-strlen.c (maybe_set_strlen_range): Return tree representing
13036 single-value ranges. Handle strnlen.
13037 (handle_builtin_strlen): Handle strnlen.
13038 (strlen_check_and_optimize_stmt): Same.
13039 * doc/extend.texi (Other Builtins): Document strnlen.
13041 2018-06-18 Maya Rashish <coypu@sdf.org>
13043 * config/alpha/openbsd.h (TARGET_DEFAULT): Define.
13044 (LINK_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Likewise.
13045 (INTMAX_TYPE, UINTMAX_TYPE, WINT_TYPE): Likewise.
13047 * config/alpha/elf.h (STARTFILE_SPEC, ENDFILE_SPEC): Move from
13049 * config/alpha/linux.h (STARTFILE_SPEC, ENDFILE_SPEC): Here.
13051 2018-06-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
13053 * tree.c (escaped_string::escape): Replace cast to char * by
13054 const_cast<char *> (unescaped).
13056 2018-06-18 Nick Clifton <nickc@redhat.com>
13059 * tree.c (escaped_string): New class. Converts an unescaped
13060 string into its escaped equivalent.
13061 (warn_deprecated_use): Use the new class to convert the
13062 deprecation message, if present.
13063 (test_escaped_strings): New self test.
13064 (test_c_tests): Add test_escaped_strings.
13065 * doc/extend.texi (deprecated): Add a note that the
13066 deprecation message is affected by the -fmessage-length
13067 option, and that control characters will be escaped.
13068 (#pragma GCC error): Document this pragma.
13069 (#pragma GCC warning): Likewise.
13070 * doc/invoke.texi (-fmessage-length): Document this option's
13071 effect on the #warning and #error preprocessor directives and
13072 the deprecated attribute.
13074 2018-06-18 Eric Botcazou <ebotcazou@adacore.com>
13076 * tree.c (decl_value_expr_lookup): Revert latest change.
13077 (decl_value_expr_insert): Likewise.
13079 2018-06-17 Eric Botcazou <ebotcazou@adacore.com>
13081 * gimplify.c (nonlocal_vlas): Delete.
13082 (nonlocal_vla_vars): Likewise.
13083 (gimplify_var_or_parm_decl): Do not add debug VAR_DECLs for non-local
13085 (gimplify_body): Do not create and destroy nonlocal_vlas.
13086 * tree-nested.c: Include diagnostic.h.
13087 (use_pointer_in_frame): Tweak.
13088 (lookup_field_for_decl): Add assertion and declare the transformation.
13089 (convert_nonlocal_reference_op) <PARM_DECL>: Rework and issue an
13090 internal error when the reference is in a wrong context. Do not
13091 create a debug decl by default.
13092 (note_nonlocal_block_vlas): Delete.
13093 (convert_nonlocal_reference_stmt) <GIMPLE_BIND>: Do not call it.
13094 (convert_local_reference_op) <PARM_DECL>: Skip the frame decl. Do not
13095 create a debug decl by default.
13096 (convert_gimple_call) <GIMPLE_CALL>: Issue an internal error when the
13097 call is in a wrong context.
13098 (fixup_vla_decls): New function.
13099 (finalize_nesting_tree_1): Adjust comment. Call fixup_vla_decls if no
13100 debug variables were created.
13101 * tree.c (decl_value_expr_lookup): Add checking assertion.
13102 (decl_value_expr_insert): Likewise.
13104 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
13106 PR middle-end/82479
13107 * ipa-fnsummary.c (will_be_nonconstant_expr_predicate): Handle CALL_EXPR.
13108 * tree-scalar-evolution.c (interpret_expr): Likewise.
13109 (expression_expensive_p): Likewise.
13110 * tree-ssa-loop-ivopts.c (contains_abnormal_ssa_name_p): Likewise.
13111 * tree-ssa-loop-niter.c (number_of_iterations_popcount): New.
13112 (number_of_iterations_exit_assumptions): Use number_of_iterations_popcount.
13113 (ssa_defined_by_minus_one_stmt_p): New.
13115 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
13117 PR middle-end/64946
13118 * cfgexpand.c (expand_debug_expr): Hande ABSU_EXPR.
13119 * config/i386/i386.c (ix86_add_stmt_cost): Likewise.
13120 * dojump.c (do_jump): Likewise.
13121 * expr.c (expand_expr_real_2): Check operand type's sign.
13122 * fold-const.c (const_unop): Handle ABSU_EXPR.
13123 (fold_abs_const): Likewise.
13124 * gimple-pretty-print.c (dump_unary_rhs): Likewise.
13125 * gimple-ssa-backprop.c (backprop::process_assign_use): Likesie.
13126 (strip_sign_op_1): Likesise.
13127 * match.pd: Add new pattern to generate ABSU_EXPR.
13128 * optabs-tree.c (optab_for_tree_code): Handle ABSU_EXPR.
13129 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
13130 * tree-eh.c (operation_could_trap_helper_p): Likewise.
13131 * tree-inline.c (estimate_operator_cost): Likewise.
13132 * tree-pretty-print.c (dump_generic_node): Likewise.
13133 * tree-vect-patterns.c (vect_recog_sad_pattern): Likewise.
13134 * tree.def (ABSU_EXPR): New.
13136 2018-06-16 Jakub Jelinek <jakub@redhat.com>
13138 PR middle-end/86095
13139 * common.opt (Wunsafe-loop-optimizations): Add Ignore, remove Var,
13140 documented as preserved for backward compatibility only.
13141 * doc/invoke.texi: Remove -Wunsafe-loop-optimizations documentation.
13143 PR rtl-optimization/86108
13144 * bb-reorder.c (create_forwarder_block): Renamed to ...
13145 (create_eh_forwarder_block): ... this. Split OLD_BB after labels and
13146 jump from new landing pad to the second part.
13147 (sjlj_fix_up_crossing_landing_pad, dw2_fix_up_crossing_landing_pad):
13150 2018-06-15 Jakub Jelinek <jakub@redhat.com>
13152 PR middle-end/85878
13153 * expr.c (expand_assignment): Remove now redundant COMPLEX_MODE_P
13154 check from first store_expr, use to_mode instead of GET_MODE (to_rtx).
13155 Only call store_expr for halves if the mode is the same.
13157 PR middle-end/86123
13158 * match.pd ((X / Y) == 0 -> X < Y): Don't transform complex divisions.
13159 Fix up comment formatting.
13161 2018-06-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
13163 * typed-splay-tree.h (typed_splay_tree::remove): New function.
13164 (typed_splay_tree::closure,
13165 typed_splay_tree::inner_foreach_fn, typed_splay_tree::m_inner): Deleted.
13166 (typed_splay_tree::typed_splay_tree,
13167 typed_splay_tree::operator =): Declared private.
13168 (typed_splay_tree::splay_tree_key, typed_splay_tree::splay_tree_value,
13169 typed_splay_tree::splay_tree_node_s, typed_splay_tree::KDEL,
13170 typed_splay_tree::VDEL, typed_splay_tree::splay_tree_delete_helper,
13171 typed_splay_tree::rotate_left, typed_splay_tree::rotate_right,
13172 typed_splay_tree::splay_tree_splay,
13173 typed_splay_tree::splay_tree_foreach_helper,
13174 typed_splay_tree::splay_tree_insert,
13175 typed_splay_tree::splay_tree_remove,
13176 typed_splay_tree::splay_tree_lookup,
13177 typed_splay_tree::splay_tree_predecessor,
13178 typed_splay_tree::splay_tree_successor,
13179 typed_splay_tree::splay_tree_min,
13180 typed_splay_tree::splay_tree_max): Took over from splay-tree.c/.h.
13181 (typed_splay_tree::root, typed_splay_tree::comp,
13182 typed_splay_tree::delete_key,
13183 typed_splay_tree::delete_value): New data members.
13184 * typed-splay-tree.c (selftest::test_str_to_int): Add a test for
13185 typed_splay_tree::remove.
13187 2018-06-15 Matthew Fortune <matthew.fortune@mips.com>
13189 * config/mips/mips.h (ASM_SPEC): Pass through -mcrc, -mno-crc,
13190 -mginv and -mno-ginv to the assembler.
13191 * config/mips/mips.opt (-mcrc): New option.
13192 (-mginv): Likewise.
13193 * doc/invoke.text (-mcrc): Document.
13194 (-mginv): Likewise.
13196 2018-06-15 Nick Clifton <nickc@redhat.com>
13199 * tree.c (escaped_string): New class. Converts an unescaped
13200 string into its escaped equivalent.
13201 (warn_deprecated_use): Use the new class to convert the
13202 deprecation message, if present.
13203 (test_escaped_strings): New self test.
13204 (test_c_tests): Add test_escaped_strings.
13205 * doc/extend.texi (deprecated): Add a note that the
13206 deprecation message is affected by the -fmessage-length
13207 option, and that control characters will be escaped.
13208 (#pragma GCC error): Document this pragma.
13209 (#pragma GCC warning): Likewise.
13210 * doc/invoke.texi (-fmessage-length): Document this option's
13211 effect on the #warning and #error preprocessor directives and
13212 the deprecated attribute.
13214 2018-06-15 Richard Biener <rguenther@suse.de>
13216 * tree-vect-slp.c (vect_slp_bb): Dump MSG_OPTIMIZED_LOCATIONS
13217 here, also noting vector size used.
13218 * tree-vectorizer.c (vectorize_loops): Adjust. Note vector
13219 size used in MSG_OPTIMIZED_LOCATIONS dump.
13220 (pass_slp_vectorize::execute): Adjust.
13222 2018-06-15 Claudiu Zissulescu <claziss@synopsys.com>
13225 * config/arc/arc.c (arc_return_address_register): Fix
13228 2018-06-15 Richard Biener <rguenther@suse.de>
13230 PR middle-end/86159
13231 * tree-cfg.c (gimplify_build3): Do not strip sign conversions,
13232 leave useless conversion stripping to force_gimple_operand_gsi.
13233 (gimplify_build2): Likewise.
13234 (gimplify_build1): Likewise.
13236 2018-06-15 Richard Biener <rguenther@suse.de>
13238 PR middle-end/86076
13239 * tree-cfg.c (move_stmt_op): unshare invariant addresses
13240 before adjusting their block.
13242 2018-06-15 Sebastian Huber <sebastian.huber@embedded-brains.de>
13244 * config.gcc (riscv*-*-elf* | riscv*-*-rtems*): Use custom
13245 multilibs for *-*-rtems*.
13246 * config/riscv/t-rtems: New file.
13248 2018-06-14 Jakub Jelinek <jakub@redhat.com>
13250 PR middle-end/86122
13251 * match.pd ((A +- CST1) +- CST2): Punt if last resort
13252 unsigned_type_for returns NULL.
13255 * lower-subreg.c (find_decomposable_subregs): Don't decompose float
13256 subregs of multi-word pseudos unless the float mode has word size.
13258 2018-06-14 Richard Biener <rguenther@suse.de>
13260 PR middle-end/86139
13261 * tree-vect-generic.c (build_word_mode_vector_type): Remove
13262 duplicate and harmful type_hash_canon.
13263 * tree.c (type_hash_canon): Assert we didn't find ourselves.
13265 2018-06-14 Richard Biener <rguenther@suse.de>
13268 * tree-ssa-struct-alias.c (create_variable_info_for): Handle
13271 2018-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
13273 * config/rtems.h (STDINT_LONG32): Define.
13275 2018-06-13 Matthew Fortune <matthew.fortune@mips.com>
13276 Prachi Godbole <prachi.godbole@imgtec.com>
13278 * config/mips/mips-cpus.def: Define P6600.
13279 * config/mips/mips-tables.opt: Regenerate.
13280 * config/mips/mips.c (mips_ucbranch_type): New enum.
13281 (mips_rtx_cost_data): Add support for P6600.
13282 (mips_issue_rate): Likewise.
13283 (mips_multipass_dfa_lookahead): Likewise.
13284 (mips_avoid_hazard): Likewise.
13285 (mips_reorg_process_insns): Likewise.
13286 (mips_classify_branch_p6600): New function.
13287 * config/mips/mips.h (TUNE_P6600): New define.
13288 (MIPS_ISA_LEVEL_SPEC): Infer mips64r6 from p6600.
13289 (ENABLE_LD_ST_PAIRS): Enable load/store bonding for p6600.
13290 * config/mips/mips.md: Include p6600.md.
13291 (processor): Add p6600.
13292 * config/mips/p6600.md: New file.
13293 * doc/invoke.texi: Add p6600 to supported architectures.
13295 2018-06-13 Martin Sebor <msebor@redhat.com>
13297 PR tree-optimization/86114
13298 * gimple-fold.c (gimple_fold_builtin_strlen): Only handle LHS
13300 * tree-ssa-strlen.c (maybe_set_strlen_range): Same.
13302 2018-06-13 Richard Biener <rguenther@suse.de>
13304 * tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern):
13305 Properly set vector type of the intermediate stmt.
13306 * tree-vect-stmts.c (vectorizable_operation): The destination
13307 var always has vectype_out type.
13309 2018-06-13 Jeff Law <law@redhat.com>
13311 * config/rl78/rl78.c (move_elim_pass): Use TDF_NONE rather than
13312 integer 0 for argument to print_rtl_with_bb.
13313 (rl78_reorg): Likewise.
13315 2018-06-13 David Malcolm <dmalcolm@redhat.com>
13317 * config/arc/arc.c (hwloop_optimize): Strengthen local "end_label"
13318 from rtx to rtx_insn *.
13319 * config/bfin/bfin.c (hwloop_optimize): Likewise for local
13321 (add_sched_insns_for_speculation): Likewise for local "target",
13322 converting usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
13323 * config/c6x/c6x.c (reorg_split_calls): Strengthen param "call_labels"
13324 from rtx_insn ** to rtx_code_label **.
13325 (reorg_emit_nops): Likewise.
13326 (c6x_reorg): Likewise for local "call_labels".
13327 * config/sh/sh-protos.h (get_dest_uid): Strengthen 1st param from
13329 * config/sh/sh.c (dump_table): Strengthen local "lab" from rtx to
13330 rtx_code_label *, adding safe_as_a <rtx_code_label *> casts to
13331 the loops over LABEL_REFS.
13332 (fixup_addr_diff_vecs): Add as_a <rtx_insn *> to usage of
13334 (barrier_align): Convert usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
13335 (get_dest_uid): Strengthen param "label" from rtx to rtx_insn *.
13336 (split_branches): Strengthen local "olabel" from rtx to
13337 rtx_insn *, adding a safe_as_a cast.
13338 * emit-rtl.c (next_real_insn): Strengthen param from "rtx"
13340 (add_insn_after): Likewise for first two params.
13341 (add_insn_before): Likewise.
13342 (remove_insn): Likewise for param.
13343 (emit_pattern_before_noloc): Likewise for second and third params.
13344 (emit_jump_insn_before_noloc): Convert NULL_RTX to NULL.
13345 (emit_call_insn_before_noloc): Likewise.
13346 (emit_debug_insn_before_noloc): Strengthen "before" param from "rtx"
13348 (emit_barrier_before): Likewise.
13349 (emit_label_before): Strengthen "label" param from "rtx" to
13350 "rtx_code_label *". Strengthen "before" param from "rtx" to
13352 (emit_insn_after_1): Strengthen "after" param from "rtx" to
13354 (emit_pattern_after_noloc): Likewise.
13355 (emit_insn_after_noloc): Likewise.
13356 (emit_jump_insn_after_noloc): Likewise.
13357 (emit_call_insn_after_noloc): Likewise.
13358 (emit_debug_insn_after_noloc): Likewise.
13359 (emit_barrier_after): Likewise.
13360 (emit_label_after): Likewise for both params.
13361 (emit_pattern_after_setloc): Likewise for "after" param. Convert
13362 "loc" param from "int" to "location_t".
13363 (emit_insn_after_setloc): Likewise.
13364 (emit_jump_insn_after_setloc): Likewise.
13365 (emit_call_insn_after_setloc): Likewise.
13366 (emit_debug_insn_after_setloc): Likewise.
13367 (emit_pattern_before_setloc): Likewise for "before" param. Convert
13368 "loc" param from "int" to "location_t".
13369 (emit_pattern_before): Convert NULL_RTX to NULL.
13370 (emit_insn_before_setloc): Convert "loc" param from "int" to
13372 (emit_jump_insn_before_setloc): Likewise.
13373 (emit_call_insn_before_setloc): Likewise.
13374 (emit_debug_insn_before_setloc): Strengthen "before" param from rtx to
13375 rtx_insn *. Convert "loc" param from "int" to "location_t".
13376 * rtl.h (emit_insn_before_setloc, emit_jump_insn_before_setloc,
13377 emit_call_insn_before_setloc, emit_debug_insn_before_setloc):
13378 Convert 3rd param from "int" to "location_t".
13379 (emit_barrier_before, emit_barrier_after, next_real_insn):
13380 Strengthen param from rtx to rtx_insn *.
13381 (emit_label_before): Strengthen 1st param from "rtx" to
13382 "rtx_code_label *". Strengthen 2nd param from "rtx" to
13384 (emit_insn_after_noloc, emit_jump_insn_after_noloc,
13385 emit_call_insn_after_noloc, emit_debug_insn_after_noloc):
13386 Strengthen 2nd param from "rtx" to "rtx_insn *".
13387 (emit_insn_after_setloc, emit_jump_insn_after_setloc)
13388 emit_call_insn_after_setloc, emit_debug_insn_after_setloc):
13389 Likewise. Convert 3rd param from "int" to "location_t".
13390 (emit_label_after): Strengthen 1st param from "rtx" to
13391 "rtx_code_label *".
13392 (next_real_insn, remove_insn): Strengthen param from "rtx" to
13394 (add_insn_before, add_insn_after): Strengthen 1st and 2nd params
13395 from "rtx" to "rtx_insn *".
13397 2018-06-13 Jan Hubicka <hubicka@gcc.gnu.org>
13399 * cgraph.c (cgraph_node::get_untransformed_body): Dump function
13400 bodies streamed in with -Q.
13401 * dumpfile.c (dump_files): Add lto-stream-out dump file.
13402 * dumpfile.h (tree_dump_index): Add lto_stream_out.
13403 * gimple-streamer-out.c: Include gimple-pretty-print.h
13404 (output_bb): Dump stmts streamed.
13405 * lto-section-out.c: Include print-tree.h
13406 (lto_begin_section): Dump sections created.
13407 (lto_output_decl_index): Dump decl encoded.
13408 * lto-streamer-out.c: Include print-tree.h
13409 (create_output_block): Dump output block created.
13410 (DFS::DFS_write_tree_body): Dump DFS SCCs streamed.
13411 (output_function): Dump function output.
13412 (output_constructor): Dump constructor streamed.
13413 (write_global_stream): Output indexes encoded.
13414 (produce_asm_for_decls): Dump streams encoded.
13415 * lto-streamer.c (streamer_dump_file): New global var.
13416 * lto-streamer.h (streamer_dump_file): Declare.
13417 * passes.c (ipa_write_summaries): Initialize streamer dump.
13418 * varpool.c (varpool_node::get_constructor): Dump constructors streamed
13421 2018-06-13 Eric Botcazou <ebotcazou@adacore.com>
13424 * config/i386/winnt.c (i386_pe_seh_cold_init): Do not emit negative
13425 offsets for register save directives. Emit a second batch of save
13426 directives, if need be, when the function accesses prior frames.
13428 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
13430 * config/arc/fpu.md (fmasf4): Force operand to register.
13431 (fnmasf4): Likewise.
13433 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
13435 * config/arc/arc-protos.h (arc_pad_return): Remove.
13436 * config/arc/arc.c (machine_function): Remove force_short_suffix
13438 (arc_print_operand): Adjust printing of '&'.
13439 (arc_verify_short): Remove conditional printing of short suffix.
13440 (arc_final_prescan_insn): Remove reference to size_reason.
13441 (pad_return): New function.
13442 (arc_reorg): Call pad_return.
13443 (arc_pad_return): Remove.
13444 (arc_init_machine_status): Remove reference to force_short_suffix.
13445 * config/arc/arc.md (vunspec): Add VUNSPEC_ARC_BLOCKAGE.
13446 (attr length): When attribute iscompact is true force to 2
13447 regardless; in the case of maybe check if we want to force the
13448 instruction to have 4 bytes length.
13449 (nopv): Change it to generate 4 byte long nop as well.
13450 (blockage): New pattern.
13451 (simple_return): Remove call to arc_pad_return.
13452 (p_return_i): Likewise.
13454 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
13456 * config/arc/elf.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
13458 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
13460 * config/arc/builtins.def (SYNC): SYNC instruction is valid on all
13463 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
13465 * config/arc/arc.c (atomic_exchangesi): EX instruction is default
13466 for ARC700 and ARCv2.
13468 2018-06-13 Chenghua Xu <paul.hua.gm@gmail.com>
13471 * config/mips/loongson.md (vec_setv4hi): Gen_lowpart for
13472 operands[2] instead of operands[1].
13475 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
13477 * lra-constraints.c (simplify_operand_subreg): In the paradoxical
13478 case, check whether the outer register overlaps an unallocatable
13479 register, not just whether it fits the required class.
13481 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
13483 * poly-int.h (can_div_trunc_p): Add new overload in which all values
13485 * alias.c (get_addr): Extend CONST_INT handling to poly_int_rtx_p.
13486 (memrefs_conflict_p): Likewise.
13487 (init_alias_analysis): Likewise.
13488 * cfgexpand.c (expand_debug_expr): Likewise.
13489 * combine.c (combine_simplify_rtx, force_int_to_mode): Likewise.
13490 * cse.c (fold_rtx): Likewise.
13491 * explow.c (adjust_stack, anti_adjust_stack): Likewise.
13492 * expr.c (emit_block_move_hints): Likewise.
13493 (clear_storage_hints, push_block, emit_push_insn): Likewise.
13494 (store_expr_with_bounds, reduce_to_bit_field_precision): Likewise.
13495 (emit_group_load_1): Use rtx_to_poly_int64 for group offsets.
13496 (emit_group_store): Likewise.
13497 (find_args_size_adjust): Use strip_offset. Use rtx_to_poly_int64
13498 to read the PRE/POST_MODIFY increment.
13499 * calls.c (store_one_arg): Use strip_offset.
13500 * rtlanal.c (rtx_addr_can_trap_p_1): Extend CONST_INT handling to
13502 (set_noop_p): Use rtx_to_poly_int64 for the elements selected
13504 * simplify-rtx.c (avoid_constant_pool_reference): Use strip_offset.
13505 (simplify_binary_operation_1): Extend CONST_INT handling to
13507 * var-tracking.c (compute_cfa_pointer): Take a poly_int64 rather
13508 than a HOST_WIDE_INT.
13509 (hard_frame_pointer_adjustment): Change from HOST_WIDE_INT to
13511 (adjust_mems, add_stores): Update accodingly.
13512 (vt_canonicalize_addr): Track polynomial offsets.
13513 (emit_note_insn_var_location): Likewise.
13514 (vt_add_function_parameter): Likewise.
13515 (vt_initialize): Likewise.
13517 2018-06-12 Jeff Law <law@redhat.com>
13519 * config.gcc (alpha*-*-freebsd*): Remove.
13520 * config/alpha/freebsd.h: Remove.
13522 2018-06-12 David Malcolm <dmalcolm@redhat.com>
13525 * spellcheck-tree.c (levenshtein_distance): Rename to...
13526 (get_edit_distance): ...this, and update for underlying renaming.
13527 * spellcheck-tree.h (levenshtein_distance): Rename to...
13528 (get_edit_distance): ...this.
13529 * spellcheck.c (levenshtein_distance): Rename to...
13530 (get_edit_distance): ...this. Convert from Levenshtein distance
13531 to Damerau-Levenshtein distance by supporting transpositions of
13532 adjacent characters. Rename "v1" to "v_next" and "v0" to
13534 (selftest::levenshtein_distance_unit_test_oneway): Rename to...
13535 (selftest::test_edit_distance_unit_test_oneway): ...this, and
13536 update for underlying renaming.
13537 (selftest::levenshtein_distance_unit_test): Rename to...
13538 (selftest::test_get_edit_distance_unit): ...this, and update for
13539 underlying renaming.
13540 (selftest::test_find_closest_string): Add example from PR 69968
13541 where transposition helps
13542 (selftest::test_metric_conditions): Update for renaming.
13543 (selftest::test_metric_conditions): Likewise.
13544 (selftest::spellcheck_c_tests): Likewise.
13545 * spellcheck.h (levenshtein_distance): Rename both overloads to...
13546 (get_edit_distance): ...this.
13547 (best_match::consider): Update for renaming.
13549 2018-06-12 Martin Sebor <msebor@redhat.com>
13551 PR tree-optimization/85259
13552 * builtins.c (compute_objsize): Handle constant offsets.
13553 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return
13554 true iff a warning has been issued.
13555 * gimple.h (gimple_nonartificial_location): New function.
13556 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Call
13557 gimple_nonartificial_location and handle -Wno-system-headers.
13558 (handle_builtin_stxncpy): Same.
13560 2018-06-12 Martin Sebor <msebor@redhat.com>
13563 * fold-const.c (operand_equal_p): Handle SAVE_EXPR.
13565 2018-06-12 Will Schmidt <will_schmidt@vnet.ibm.com>
13567 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
13568 BUILTIN_VEC_XST entries for pointer to double and long long.
13570 2018-06-12 H.J. Lu <hongjiu.lu@intel.com>
13573 * config/i386/gnu-user.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
13575 * config/i386/gnu-user64.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
13578 2018-06-12 Martin Liska <mliska@suse.cz>
13580 * doc/options.texi: Document IntegerRange.
13582 2018-06-12 Martin Liska <mliska@suse.cz>
13584 * config/i386/i386.opt: Make MPX-related options as Deprecated.
13585 * opt-functions.awk: Handle Deprecated flag.
13586 * opts-common.c (decode_cmdline_option): Handle cl_deprecated
13588 (read_cmdline_option): Report warning for a deprecated option.
13589 * opts.h (struct cl_option): Add new field cl_deprecated.
13590 (CL_ERR_DEPRECATED): New.
13592 2018-06-12 Martin Liska <mliska@suse.cz>
13594 * doc/options.texi: Document Deprecated option flag.
13596 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
13598 * config/arc/arc-arch.h (arc_extras): New enum.
13599 (arc_cpu_t):Add field extra.
13600 (arc_cpu_types): Consider the extras.
13601 * config/arc/arc-cpus.def: Add extras info.
13602 * config/arc/arc-opts.h (processor_type): Consider extra field.
13603 * config/arc/arc.c (arc_override_options): Handle extra field.
13605 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
13607 * config/arc/arc-arch.h: Update ARC_OPTX macro.
13608 * config/arc/arc-options.def (ARC_OPTX): Introduce a new doc
13610 * config/arc/arc.c (arc_init): Update pic warning.
13611 (irq_range): Update irq range parsing warnings.
13612 (arc_override_options): Update various warning messages.
13613 (arc_handle_aux_attribute): Likewise.
13615 2018-06-12 Robert Suchanek <robert.suchanek@mips.com>
13617 * config/mips/i6400.md (i6400_fpu_fadd): Remove frint.
13619 2018-06-12 Jozef Lawrynowicz <jozef.l@mittosystems.com>
13621 * doc/sourcebuild.texi: Document usage of line number 0 in verify
13622 compiler messages directives.
13624 2018-06-12 Matthew Fortune <mfortune@gmail.com>
13626 * config/mips/mips-cpus.def: New MIPS_CPU for i6500.
13627 * config/mips/mips-tables.opt: Regenerate.
13628 * config/mips/mips.h (MIPS_ISA_LEVEL_SPEC): Mark i6500 as
13630 * doc/invoke.texi: Document -march=i6500.
13632 2018-06-12 Prachi Godbole <prachi.godbole@imgtec.com>
13634 * config/mips/i6400.md (i6400_gpmuldiv): Remove cpu_unit.
13635 (i6400_gpmul): Add cpu_unit.
13636 (i6400_gpdiv): Likewise.
13637 (i6400_msa_add_d): Update reservations.
13638 (i6400_msa_int_add) Likewise.
13639 (i6400_msa_short_logic3) Likewise.
13640 (i6400_msa_short_logic2) Likewise.
13641 (i6400_msa_short_logic) Likewise.
13642 (i6400_msa_move) Likewise.
13643 (i6400_msa_cmp) Likewise.
13644 (i6400_msa_short_float2) Likewise.
13645 (i6400_msa_div_d) Likewise.
13646 (i6400_msa_long_logic1) Likewise.
13647 (i6400_msa_long_logic2) Likewise.
13648 (i6400_msa_mult) Likewise.
13649 (i6400_msa_long_float2) Likewise.
13650 (i6400_msa_long_float4) Likewise.
13651 (i6400_msa_long_float5) Likewise.
13652 (i6400_msa_long_float8) Likewise.
13653 (i6400_fpu_fadd): Include frint type.
13654 (i6400_fpu_store): New define_insn_reservation.
13655 (i6400_fpu_load): Likewise.
13656 (i6400_fpu_move): Likewise.
13657 (i6400_fpu_fcmp): Likewise.
13658 (i6400_fpu_fmadd): Likewise.
13659 (i6400_int_mult): Include imul3nc type and update reservation.
13660 (i6400_int_div): Include idiv3 type and update reservation.
13661 (i6400_int_load): Update to check type not move_type.
13662 (i6400_int_store): Likewise.
13663 (i6400_int_prefetch): Set zero latency.
13665 2018-06-12 Eric Botcazou <ebotcazou@adacore.com>
13667 * gcc.c: Document new %@{...} sequence.
13668 (LINK_COMMAND_SPEC): Use it for the -L switches.
13669 (cpp_unique_options): Use it for the -I switches.
13670 (at_file_argbuf): New global variable.
13671 (in_at_file): Likewise.
13672 (alloc_args): Create at_file_argbuf.
13673 (clear_args): Truncate at_file_argbuf.
13674 (store_arg): If in_at_file, push the argument onto at_file_argbuf.
13675 (open_at_file): New function.
13676 (close_at_file): Likewise.
13677 (create_at_file): Delete.
13678 (do_spec_1) <'i'>: Use open_at_file/close_at_file.
13681 (validate_switches_from_spec): Deal with %@{...} sequence.
13682 (validate_switches): Likewise.
13683 (driver::finalize): Call clear_args.
13685 2018-06-11 Rasmus Villemoes <rasmus.villemoes@prevas.dk>
13687 * config/vx-common.h (USE_TM_CLONE_REGISTRY): #define to 0.
13689 2018-06-11 Martin Sebor <msebor@redhat.com>
13691 * doc/invoke.texi (-Wall): List -Wc++17-compat.
13692 (Wno-class-memaccess): Add @opindex.
13693 (Wno-templates, Wno-multiple-inheritance): Same.
13694 (Wno-virtual-inheritance, Wno-namespaces): Same.
13695 (Wno-pedantic, Wno-chkp, Wcoverage-mismatch): Same.
13696 (Wno-format-overflow, Wno-format-truncation): Same.
13697 (Wno-unused-local-typedefs, Walloc-size-larger-than): Same.
13698 (Wno-alloc-size-larger-than, Wframe-larger-than): Same
13699 (Wno-stack-usage, Wno-c++-compat, Wno-c++11-compat): Same.
13700 (Wno-c++14-compat, Wno-c++17-compat, Wno-openmp-simd): Same.
13701 (Wno-unsuffixed-float-constants, Wno-addr-space-convert): Same.
13702 (Wno-misspelled-isr): Same.
13704 2018-06-11 Martin Sebor <msebor@redhat.com>
13706 * PR tree-optimization/86083
13707 * tree-ssa-strlen.c (handle_char_store): Use tree_expr_nonzero_p.
13709 2018-06-11 Zhouyi Zhou <zhouzhouyi@gmail.com>
13711 * tree-eh.c (lower_eh_constructs_2): Add a comma to comment.
13713 2018-06-11 Segher Boessenkool <segher@kernel.crashing.org>
13716 * config/rs6000/rs6000.md (*movdi_internal32): Put constraint modifiers
13717 on the correct operand.
13718 (*movdi_internal64): Ditto.
13720 2018-06-11 Martin Liska <mliska@suse.cz>
13722 PR tree-optimization/86089
13723 * tree-ssa-strlen.c (get_string_length): Move back removed hunk.
13725 2018-06-11 Julia Koval <julia.koval@intel.com>
13727 * config/i386/vaesintrin.h (_mm_aesdec_epi128, _mm_aesdeclast_epi128)
13728 _mm_aesenc_epi128, _mm_aesenclast_epi128: Remove.
13729 * config/i386/vpclmulqdqintrin.h (_mm_clmulepi64_epi128): Remove.
13731 2018-06-11 Olivier Hainque <hainque@adacore.com>
13733 * dwarf2out.c (gen_compile_unit_die): Fallout to DW_LANG_Ada83
13734 for Ada with strict dwarf2.
13736 2018-06-08 Peter Bergner <bergner@vnet.ibm.com>
13739 * config/rs6000/rs6000.c (mem_operand_gpr): Enable PRE_INC and PRE_DEC
13742 2018-06-08 Jan Hubicka <hubicka@ucw.cz>
13744 * dumpfile.c (FIRST_ME_AUTO_NUMBERED_DUMP): Bump to 4.
13746 2018-06-08 David Edelsohn <dje.gcc@gmail.com>
13748 * config/rs6000/rs6000.c (rs6000_passes_ieee128): Protect with #if
13751 2018-06-08 Martin Liska <mliska@suse.cz>
13753 * tree-cfg.h (debug_function): Fix argument type to match
13756 2018-06-08 Martin Liska <mliska@suse.cz>
13758 * config/powerpcspe/powerpcspe.c (rs6000_xcoff_visibility):
13759 Remove usage of MPX-related (and removed) fields.
13760 * config/rs6000/rs6000.c (rs6000_xcoff_visibility): Likewise.
13762 2018-06-08 David Malcolm <dmalcolm@redhat.com>
13764 * cfg.c (debug): Use TDF_NONE rather than 0.
13765 * cfghooks.c (debug): Likewise.
13766 * dumpfile.c (DUMP_FILE_INFO): Likewise; also for OPTGROUP.
13767 (struct dump_option_value_info): Convert to...
13768 (struct kv_pair): ...this template type.
13769 (dump_options): Convert to kv_pair<dump_flags_t>; use TDF_NONE
13771 (optinfo_verbosity_options): Likewise.
13772 (optgroup_options): Convert to kv_pair<optgroup_flags_t>; use
13774 (gcc::dump_manager::dump_register): Use optgroup_flags_t rather
13775 than int for "optgroup_flags" param.
13776 (dump_generic_expr_loc): Use dump_flags_t rather than int for
13778 (dump_dec): Likewise.
13779 (dump_finish): Use TDF_NONE rather than 0.
13780 (gcc::dump_manager::opt_info_enable_passes): Use optgroup_flags_t
13781 rather than int for "optgroup_flags" param. Use TDF_NONE rather
13782 than 0. Update for change to option_ptr.
13783 (opt_info_switch_p_1): Convert "optgroup_flags" param from int *
13784 to optgroup_flags_t *. Use TDF_NONE and OPTGROUP_NONE rather than
13785 0. Update for changes to optinfo_verbosity_options and
13787 (opt_info_switch_p): Convert optgroup_flags from int to
13789 (dump_basic_block): Use dump_flags_t rather than int
13790 for "dump_kind" param.
13791 * dumpfile.h (TDF_ADDRESS, TDF_SLIM, TDF_RAW, TDF_DETAILS,
13792 TDF_STATS, TDF_BLOCKS, TDF_VOPS, TDF_LINENO, TDF_UID)
13793 TDF_STMTADDR, TDF_GRAPH, TDF_MEMSYMS, TDF_RHS_ONLY, TDF_ASMNAME,
13794 TDF_EH, TDF_NOUID, TDF_ALIAS, TDF_ENUMERATE_LOCALS, TDF_CSELIB,
13795 TDF_SCEV, TDF_GIMPLE, TDF_FOLDING, MSG_OPTIMIZED_LOCATIONS,
13796 MSG_MISSED_OPTIMIZATION, MSG_NOTE, MSG_ALL, TDF_COMPARE_DEBUG,
13797 TDF_NONE): Convert from macros to...
13798 (enum dump_flag): ...this new enum.
13799 (dump_flags_t): Update to use enum.
13800 (operator|, operator&, operator~, operator|=, operator&=):
13801 Implement for dump_flags_t.
13802 (OPTGROUP_NONE, OPTGROUP_IPA, OPTGROUP_LOOP, OPTGROUP_INLINE,
13803 OPTGROUP_OMP, OPTGROUP_VEC, OPTGROUP_OTHER, OPTGROUP_ALL):
13804 Convert from macros to...
13805 (enum optgroup_flag): ...this new enum.
13806 (optgroup_flags_t): New typedef.
13807 (operator|, operator|=): Implement for optgroup_flags_t.
13808 (struct dump_file_info): Convert field "alt_flags" to
13809 dump_flags_t. Convert field "optgroup_flags" to
13811 (dump_basic_block): Use dump_flags_t rather than int for param.
13812 (dump_generic_expr_loc): Likewise.
13813 (dump_dec): Likewise.
13814 (dump_register): Convert param "optgroup_flags" to
13816 (opt_info_enable_passes): Likewise.
13817 * early-remat.c (early_remat::dump_edge_list): Use TDF_NONE rather
13819 * gimple-pretty-print.c (debug): Likewise.
13820 * gimple-ssa-store-merging.c (bswap_replace): Likewise.
13821 (merged_store_group::apply_stores): Likewise.
13822 * gimple-ssa-strength-reduction.c (insert_initializers): Likewise.
13823 * gimple.c (verify_gimple_pp): Likewise.
13824 * graphite-poly.c (print_pbb_body): Likewise.
13825 * passes.c (pass_manager::register_one_dump_file): Convert
13826 local "optgroup_flags" to optgroup_flags_t.
13827 * print-tree.c (print_node): Use TDF_NONE rather than 0.
13829 (debug_body): Likewise.
13830 * tree-pass.h (struct pass_data): Convert field "optgroup_flags"
13831 to optgroup_flags_t.
13832 * tree-pretty-print.c (print_struct_decl): Use TDF_NONE rather
13834 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Likewise.
13835 (convert_mult_to_fma): Likewise.
13836 * tree-ssa-reassoc.c (undistribute_ops_list): Likewise.
13837 * tree-ssa-sccvn.c (vn_eliminate): Likewise.
13838 * tree-vect-data-refs.c (dump_lower_bound): Convert param
13839 "dump_kind" to dump_flags_t.
13841 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
13843 * config/rs6000/rs6000.c (min, max): Delete.
13845 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
13847 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete mention of
13848 -mabi=spe and -mabi=no-spe.
13850 2018-06-08 Martin Liska <mliska@suse.cz>
13852 * ipa-pure-const.c (propagate_pure_const): Use ::get at places
13853 where we expect an existing summary.
13855 2018-06-08 Martin Liska <mliska@suse.cz>
13857 * ipa-inline-analysis.c (simple_edge_hints): Use ::get method.
13858 * ipa-inline.h (estimate_edge_growth): Likewise.
13860 2018-06-08 Martin Liska <mliska@suse.cz>
13862 * cgraph.c (function_version_hasher::hash): Use
13863 cgraph_node::get_uid ().
13864 (function_version_hasher::equal):
13865 * cgraph.h (cgraph_node::get_uid): New method.
13866 * ipa-inline.c (update_caller_keys): Use
13867 cgraph_node::get_uid ().
13868 (update_callee_keys): Likewise.
13869 * ipa-utils.c (searchc): Likewise.
13870 (ipa_reduced_postorder): Likewise.
13871 * lto-cgraph.c (input_node): Likewise.
13872 * passes.c (is_pass_explicitly_enabled_or_disabled): Likewise.
13873 * symbol-summary.h (symtab_insertion): Likewise.
13874 (symtab_removal): Likewise.
13875 (symtab_duplication): Likewise.
13876 * tree-pretty-print.c (dump_function_header): Likewise.
13877 * tree-sra.c (convert_callers_for_node): Likewise.
13879 2018-06-08 Martin Liska <mliska@suse.cz>
13881 * cgraph.c (symbol_table::create_edge): Always assign a new
13883 (symbol_table::free_edge): Do not recycle numbers.
13884 * cgraph.h (cgraph_edge::get): New method.
13885 * symbol-summary.h (symtab_removal): Use it.
13886 (symtab_duplication): Likewise.
13887 (call_summary::hashable_uid): Remove.
13889 2018-06-08 Martin Liska <mliska@suse.cz>
13891 * ipa-inline-analysis.c (inline_edge_removal_hook): Remove.
13892 (initialize_growth_caches): Remove.
13893 (free_growth_caches): Likewise.
13894 (do_estimate_edge_time): Use edge_growth_cache.
13895 (do_estimate_edge_size): Likewise.
13896 (do_estimate_edge_hints): Likewise.
13897 * ipa-inline.c (reset_edge_caches): Likewise.
13898 (recursive_inlining): Likewise.
13899 (inline_small_functions): Likewise.
13900 * ipa-inline.h (initialize_growth_caches): Remove.
13901 (estimate_edge_size): Likewise.
13902 (estimate_edge_time): Likewise.
13903 (estimate_edge_hints): Likewise.
13904 (reset_edge_growth_cache): Likewise.
13905 * symbol-summary.h (call_summary::remove): New method.
13907 2018-06-08 Martin Liska <mliska@suse.cz>
13909 * ipa-cp.c (class edge_clone_summary): New summary.
13910 (grow_edge_clone_vectors): Remove.
13911 (ipcp_edge_duplication_hook): Remove.
13912 (class edge_clone_summary_t): New call_summary class.
13913 (ipcp_edge_removal_hook): Remove.
13914 (edge_clone_summary_t::duplicate): New function.
13915 (get_next_cgraph_edge_clone): Use edge_clone_summaries.
13916 (create_specialized_node): Likewise.
13917 (ipcp_driver): Initialize edge_clone_summaries and do not
13920 2018-06-08 Martin Liska <mliska@suse.cz>
13922 * symbol-summary.h (get): New function.
13923 (call_summary::m_initialize_when_cloning): New class member.
13925 2018-06-08 Martin Liska <mliska@suse.cz>
13927 * cgraph.c (cgraph_node::remove): Do not recycle uid.
13928 * cgraph.h (symbol_table::release_symbol): Do not pass uid.
13929 (symbol_table::allocate_cgraph_symbol): Do not set uid.
13930 * passes.c (uid_hash_t): Record removed_nodes by their uids.
13931 (remove_cgraph_node_from_order): Use the removed_nodes set.
13932 (do_per_function_toporder): Likwise.
13933 * symbol-summary.h (symtab_insertion): Use cgraph_node::uid
13934 instead of summary_uid.
13935 (symtab_removal): Likewise.
13936 (symtab_duplication): Likewise.
13938 2018-06-08 Martin Liska <mliska@suse.cz>
13940 * ipa-cp.c (ipcp_store_bits_results): Use
13941 ipcp_transformation_sum.
13942 (ipcp_store_vr_results): Likewise.
13943 * ipa-prop.c (ipcp_grow_transformations_if_necessary): Renamed
13945 (ipcp_transformation_initialize): ... this.
13946 (ipa_set_node_agg_value_chain):
13947 (ipa_node_params_t::duplicate): Use ipcp_transformation_sum.
13948 (write_ipcp_transformation_info): Likewise.
13949 (read_ipcp_transformation_info): Likewise.
13950 (ipcp_update_bits): Likewise.
13951 (ipcp_update_vr): Likewise.
13952 (ipcp_transform_function): Likewise.
13953 * ipa-prop.h: Rename ipcp_transformation_summary to
13954 ipcp_transformation.
13955 (class ipcp_transformation_t): New function summary.
13956 (ipcp_get_transformation_summary): Use ipcp_transformation_sum.
13957 (ipa_get_agg_replacements_for_node): Likewise.
13959 2018-06-08 Martin Liska <mliska@suse.cz>
13961 * ipa-pure-const.c (struct funct_state_d): Do it class instead
13963 (class funct_state_summary_t): New function_summary class.
13964 (has_function_state): Remove.
13965 (get_function_state): Likewise.
13966 (set_function_state): Likewise.
13967 (add_new_function): Likewise.
13968 (funct_state_summary_t::insert): New function.
13969 (duplicate_node_data): Remove.
13970 (remove_node_data): Remove.
13971 (funct_state_summary_t::duplicate): New function.
13972 (register_hooks): Create new funct_state_summaries.
13973 (pure_const_generate_summary): Use it.
13974 (pure_const_write_summary): Likewise.
13975 (pure_const_read_summary): Likewise.
13976 (propagate_pure_const): Likewise.
13977 (propagate_nothrow): Likewise.
13978 (dump_malloc_lattice): Likewise.
13979 (propagate_malloc): Likewise.
13980 (execute): Do not register hooks, just remove summary
13982 (pass_ipa_pure_const::pass_ipa_pure_const): Simplify
13985 2018-06-08 Martin Liska <mliska@suse.cz>
13987 * ipa-reference.c (remove_node_data): Remove.
13988 (duplicate_node_data): Likewise.
13989 (class ipa_ref_var_info_summary_t): New class.
13990 (class ipa_ref_opt_summary_t): Likewise.
13991 (get_reference_vars_info): Use ipa_ref_var_info_summaries.
13992 (get_reference_optimization_summary): Use
13993 ipa_ref_opt_sum_summaries.
13994 (set_reference_vars_info): Remove.
13995 (set_reference_optimization_summary): Likewise.
13996 (ipa_init): Create summaries.
13997 (init_function_info): Use function summary.
13998 (ipa_ref_opt_summary_t::duplicate): New function.
13999 (ipa_ref_opt_summary_t::remove): New function.
14000 (get_read_write_all_from_node): Fix GNU coding style.
14001 (propagate): Use function summary.
14002 (write_node_summary_p): Fix GNU coding style.
14003 (stream_out_bitmap): Likewise.
14004 (ipa_reference_read_optimization_summary): Use function summary.
14005 (ipa_reference_c_finalize): Do not release hooks.
14007 2018-06-08 Martin Liska <mliska@suse.cz>
14009 * ipa-fnsummary.c (dump_ipa_call_summary): Use ::get method.
14010 (analyze_function_body): Extract multiple calls of get_create.
14011 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
14012 * ipa-inline.c (recursive_inlining): Use ::get method.
14013 * ipa-inline.h (estimate_edge_growth): Likewise.
14015 2018-06-08 Martin Liska <mliska@suse.cz>
14017 * hsa-common.h (enum hsa_function_kind): Rename HSA_NONE to
14019 (hsa_function_summary::hsa_function_summary): Use the new enum
14021 (hsa_gpu_implementation_p): Use hsa_summaries::get.
14022 * hsa-gen.c (hsa_get_host_function): Likewise.
14023 (get_brig_function_name): Likewise.
14024 * ipa-hsa.c (process_hsa_functions): Likewise.
14025 (ipa_hsa_write_summary): Likewise.
14026 * symbol-summary.h (symtab_duplication): Use ::get function/
14027 (get): New function.
14029 2018-06-08 Martin Liska <mliska@suse.cz>
14031 * config/i386/i386.c (ix86_can_inline_p): Use get_create instead
14033 * hsa-common.c (hsa_summary_t::link_functions): Likewise.
14034 (hsa_register_kernel): Likewise.
14035 * hsa-common.h (hsa_gpu_implementation_p): Likewise.
14036 * hsa-gen.c (hsa_get_host_function): Likewise.
14037 (get_brig_function_name): Likewise.
14038 (generate_hsa): Likewise.
14039 (pass_gen_hsail::execute): Likewise.
14040 * ipa-cp.c (ipcp_cloning_candidate_p): Likewise.
14041 (devirtualization_time_bonus): Likewise.
14042 (ipcp_propagate_stage): Likewise.
14043 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
14044 (edge_set_predicate): Likewise.
14045 (evaluate_conditions_for_known_args): Likewise.
14046 (evaluate_properties_for_edge): Likewise.
14047 (ipa_fn_summary::reset): Likewise.
14048 (ipa_fn_summary_t::duplicate): Likewise.
14049 (dump_ipa_call_summary): Likewise.
14050 (ipa_dump_fn_summary): Likewise.
14051 (analyze_function_body): Likewise.
14052 (compute_fn_summary): Likewise.
14053 (estimate_edge_devirt_benefit): Likewise.
14054 (estimate_edge_size_and_time): Likewise.
14055 (estimate_calls_size_and_time): Likewise.
14056 (estimate_node_size_and_time): Likewise.
14057 (inline_update_callee_summaries): Likewise.
14058 (remap_edge_change_prob): Likewise.
14059 (remap_edge_summaries): Likewise.
14060 (ipa_merge_fn_summary_after_inlining): Likewise.
14061 (ipa_update_overall_fn_summary): Likewise.
14062 (read_ipa_call_summary): Likewise.
14063 (inline_read_section): Likewise.
14064 (write_ipa_call_summary): Likewise.
14065 (ipa_fn_summary_write): Likewise.
14066 (ipa_free_fn_summary): Likewise.
14067 * ipa-hsa.c (process_hsa_functions): Likewise.
14068 (ipa_hsa_write_summary): Likewise.
14069 (ipa_hsa_read_section): Likewise.
14070 * ipa-icf.c (sem_function::merge): Likewise.
14071 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
14072 (do_estimate_edge_time): Likewise.
14073 (estimate_size_after_inlining): Likewise.
14074 (estimate_growth): Likewise.
14075 (growth_likely_positive): Likewise.
14076 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
14077 (inline_call): Likewise.
14078 * ipa-inline.c (caller_growth_limits): Likewise.
14079 (can_inline_edge_p): Likewise.
14080 (can_inline_edge_by_limits_p): Likewise.
14081 (compute_uninlined_call_time): Likewise.
14082 (compute_inlined_call_time): Likewise.
14083 (want_inline_small_function_p): Likewise.
14084 (edge_badness): Likewise.
14085 (update_caller_keys): Likewise.
14086 (update_callee_keys): Likewise.
14087 (recursive_inlining): Likewise.
14088 (inline_small_functions): Likewise.
14089 (inline_to_all_callers_1): Likewise.
14090 (dump_overall_stats): Likewise.
14091 (early_inline_small_functions): Likewise.
14092 (early_inliner): Likewise.
14093 * ipa-inline.h (estimate_edge_growth): Likewise.
14094 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
14095 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
14096 * ipa-prop.h (IPA_NODE_REF): Likewise.
14097 (IPA_EDGE_REF): Likewise.
14098 * ipa-pure-const.c (malloc_candidate_p): Likewise.
14099 (propagate_malloc): Likewise.
14100 * ipa-split.c (execute_split_functions): Likewise.
14101 * symbol-summary.h: Rename get to get_create.
14103 (get_create): Likewise.
14104 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
14106 2018-06-08 Martin Liska <mliska@suse.cz>
14108 * symbol-summary.h (release): Move definition out of class
14110 (symtab_removal): Likewise.
14111 (symtab_duplication): Likewise.
14113 2018-06-08 Martin Liska <mliska@suse.cz>
14115 * symbol-summary.h (function_summary): Move constructor
14116 implementation out of class declaration.
14117 (release): Likewise.
14118 (symtab_insertion): Likewise.
14119 (symtab_removal): Likewise.
14120 (symtab_duplication): Likewise.
14123 2018-06-08 Martin Liska <mliska@suse.cz>
14125 * Makefile.in: Remove support for MPX (macros, related functions,
14126 fields in cgraph_node, ...).
14127 * builtin-types.def (BT_BND): Likewise.
14128 (BT_FN_BND_CONST_PTR): Likewise.
14129 (BT_FN_CONST_PTR_BND): Likewise.
14130 (BT_FN_VOID_PTR_BND): Likewise.
14131 (BT_FN_BND_CONST_PTR_SIZE): Likewise.
14132 (BT_FN_VOID_CONST_PTR_BND_CONST_PTR): Likewise.
14133 * builtins.c (expand_builtin_memcpy_with_bounds): Likewise.
14134 (expand_builtin_mempcpy_with_bounds): Likewise.
14135 (expand_builtin_memset_with_bounds): Likewise.
14136 (expand_builtin_memset_args): Likewise.
14137 (std_expand_builtin_va_start): Likewise.
14138 (expand_builtin): Likewise.
14139 (expand_builtin_with_bounds): Likewise.
14140 * builtins.def (DEF_BUILTIN_CHKP): Likewise.
14141 (DEF_LIB_BUILTIN_CHKP): Likewise.
14142 (DEF_EXT_LIB_BUILTIN_CHKP): Likewise.
14143 (DEF_CHKP_BUILTIN): Likewise.
14144 (BUILT_IN_MEMCPY): Likewise.
14145 (BUILT_IN_MEMMOVE): Likewise.
14146 (BUILT_IN_MEMPCPY): Likewise.
14147 (BUILT_IN_MEMSET): Likewise.
14148 (BUILT_IN_STPCPY): Likewise.
14149 (BUILT_IN_STRCAT): Likewise.
14150 (BUILT_IN_STRCHR): Likewise.
14151 (BUILT_IN_STRCPY): Likewise.
14152 (BUILT_IN_STRLEN): Likewise.
14153 (BUILT_IN_MEMCPY_CHK): Likewise.
14154 (BUILT_IN_MEMMOVE_CHK): Likewise.
14155 (BUILT_IN_MEMPCPY_CHK): Likewise.
14156 (BUILT_IN_MEMSET_CHK): Likewise.
14157 (BUILT_IN_STPCPY_CHK): Likewise.
14158 (BUILT_IN_STRCAT_CHK): Likewise.
14159 (BUILT_IN_STRCPY_CHK): Likewise.
14160 * calls.c (store_bounds): Likewise.
14161 (emit_call_1): Likewise.
14162 (special_function_p): Likewise.
14163 (maybe_warn_nonstring_arg): Likewise.
14164 (initialize_argument_information): Likewise.
14165 (finalize_must_preallocate): Likewise.
14166 (compute_argument_addresses): Likewise.
14167 (expand_call): Likewise.
14168 * cfgexpand.c (expand_call_stmt): Likewise.
14169 (expand_return): Likewise.
14170 (expand_gimple_stmt_1): Likewise.
14171 (pass_expand::execute): Likewise.
14172 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
14173 (cgraph_node::remove): Likewise.
14174 (cgraph_node::dump): Likewise.
14175 (cgraph_node::verify_node): Likewise.
14176 * cgraph.h (chkp_function_instrumented_p): Likewise.
14177 (symtab_node::get_alias_target): Likewise.
14178 (cgraph_node::can_remove_if_no_direct_calls_and_refs_p): Likewise.
14179 (cgraph_local_p): Likewise.
14180 * cgraphbuild.c (cgraph_edge::rebuild_edges): Likewise.
14181 (cgraph_edge::rebuild_references): Likewise.
14182 * cgraphunit.c (varpool_node::finalize_decl): Likewise.
14183 (walk_polymorphic_call_targets): Likewise.
14184 (cgraph_node::expand_thunk): Likewise.
14185 (symbol_table::output_weakrefs): Likewise.
14186 * common/config/i386/i386-common.c (OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET): Likewise.
14187 (ix86_handle_option): Likewise.
14188 * config/i386/constraints.md: Likewise.
14189 * config/i386/i386-builtin-types.def (BND): Likewise.
14193 * config/i386/i386-builtin.def (BDESC_END): Likewise.
14194 (BDESC_FIRST): Likewise.
14196 * config/i386/i386-c.c (ix86_target_macros_internal): Likewise.
14197 * config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): Likewise.
14198 * config/i386/i386.c (enum reg_class): Likewise.
14199 (ix86_target_string): Likewise.
14200 (ix86_option_override_internal): Likewise.
14201 (ix86_conditional_register_usage): Likewise.
14202 (ix86_valid_target_attribute_inner_p): Likewise.
14203 (ix86_set_indirect_branch_type): Likewise.
14204 (ix86_set_current_function): Likewise.
14205 (ix86_function_arg_regno_p): Likewise.
14206 (init_cumulative_args): Likewise.
14207 (ix86_function_arg_advance): Likewise.
14208 (ix86_function_arg): Likewise.
14209 (ix86_pass_by_reference): Likewise.
14210 (ix86_function_value_regno_p): Likewise.
14211 (ix86_function_value_1): Likewise.
14212 (ix86_function_value_bounds): Likewise.
14213 (ix86_return_in_memory): Likewise.
14214 (ix86_setup_incoming_vararg_bounds): Likewise.
14215 (ix86_va_start): Likewise.
14216 (indirect_thunk_need_prefix): Likewise.
14217 (print_reg): Likewise.
14218 (ix86_print_operand): Likewise.
14219 (ix86_expand_call): Likewise.
14220 (ix86_output_function_return): Likewise.
14221 (reg_encoded_number): Likewise.
14222 (BDESC_VERIFYS): Likewise.
14223 (ix86_init_mpx_builtins): Likewise.
14224 (ix86_init_builtins): Likewise.
14225 (ix86_emit_cmove): Likewise.
14226 (ix86_emit_move_max): Likewise.
14227 (ix86_expand_builtin): Likewise.
14228 (ix86_builtin_mpx_function): Likewise.
14229 (ix86_get_arg_address_for_bt): Likewise.
14230 (ix86_load_bounds): Likewise.
14231 (ix86_store_bounds): Likewise.
14232 (ix86_load_returned_bounds): Likewise.
14233 (ix86_store_returned_bounds): Likewise.
14234 (ix86_class_likely_spilled_p): Likewise.
14235 (ix86_hard_regno_mode_ok): Likewise.
14236 (x86_order_regs_for_local_alloc): Likewise.
14237 (ix86_mitigate_rop): Likewise.
14238 (ix86_bnd_prefixed_insn_p): Likewise.
14239 (ix86_mpx_bound_mode): Likewise.
14240 (ix86_make_bounds_constant): Likewise.
14241 (ix86_initialize_bounds): Likewise.
14242 (TARGET_LOAD_BOUNDS_FOR_ARG): Likewise.
14243 (TARGET_STORE_BOUNDS_FOR_ARG): Likewise.
14244 (TARGET_LOAD_RETURNED_BOUNDS): Likewise.
14245 (TARGET_STORE_RETURNED_BOUNDS): Likewise.
14246 (TARGET_CHKP_BOUND_MODE): Likewise.
14247 (TARGET_BUILTIN_CHKP_FUNCTION): Likewise.
14248 (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): Likewise.
14249 (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): Likewise.
14250 (TARGET_CHKP_INITIALIZE_BOUNDS): Likewise.
14251 * config/i386/i386.h (TARGET_MPX): Likewise.
14252 (TARGET_MPX_P): Likewise.
14253 (VALID_BND_REG_MODE): Likewise.
14254 (FIRST_BND_REG): Likewise.
14255 (LAST_BND_REG): Likewise.
14256 (enum reg_class): Likewise.
14257 (BND_REG_P): Likewise.
14258 (BND_REGNO_P): Likewise.
14259 (BNDmode): Likewise.
14260 (ADJUST_INSN_LENGTH): Likewise.
14261 * config/i386/i386.md: Likewise.
14262 * config/i386/i386.opt: Likewise.
14263 * config/i386/linux-common.h (LIBMPX_LIBS): Likewise.
14264 (defined): Likewise.
14265 (LINK_MPX): Likewise.
14266 (MPX_SPEC): Likewise.
14267 (LIBMPX_SPEC): Likewise.
14268 (LIBMPXWRAPPERS_SPEC): Likewise.
14269 (CHKP_SPEC): Likewise.
14270 * config/i386/predicates.md: Likewise.
14271 * dbxout.c (dbxout_type): Likewise.
14272 * doc/extend.texi: Likewise.
14273 * doc/invoke.texi: Likewise.
14274 * doc/md.texi: Likewise.
14275 * doc/tm.texi: Likewise.
14276 * doc/tm.texi.in: Likewise.
14277 * dwarf2out.c (is_base_type): Likewise.
14278 (gen_formal_types_die): Likewise.
14279 (gen_subprogram_die): Likewise.
14280 (gen_type_die_with_usage): Likewise.
14281 (gen_decl_die): Likewise.
14282 (dwarf2out_late_global_decl): Likewise.
14283 * expr.c (expand_assignment): Likewise.
14284 (emit_storent_insn): Likewise.
14285 (store_expr_with_bounds): Likewise.
14286 (store_expr): Likewise.
14287 (expand_expr_real_1): Likewise.
14288 * expr.h (store_expr_with_bounds): Likewise.
14289 * function.c (use_register_for_decl): Likewise.
14290 (struct bounds_parm_data): Likewise.
14291 (assign_parms_augmented_arg_list): Likewise.
14292 (assign_parm_find_entry_rtl): Likewise.
14293 (assign_parm_is_stack_parm): Likewise.
14294 (assign_parm_load_bounds): Likewise.
14295 (assign_bounds): Likewise.
14296 (assign_parms): Likewise.
14297 (expand_function_start): Likewise.
14298 * gcc.c (CHKP_SPEC): Likewise.
14299 * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
14300 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Likewise.
14301 (wrestrict_dom_walker::check_call): Likewise.
14302 * gimple.c (gimple_build_call_from_tree): Likewise.
14303 * gimple.h (enum gf_mask): Likewise.
14304 (gimple_call_with_bounds_p): Likewise.
14305 (gimple_call_set_with_bounds): Likewise.
14306 * gimplify.c (gimplify_init_constructor): Likewise.
14307 * ipa-cp.c (initialize_node_lattices): Likewise.
14308 (propagate_constants_across_call): Likewise.
14309 (find_more_scalar_values_for_callers_subset): Likewise.
14310 * ipa-hsa.c (process_hsa_functions): Likewise.
14311 * ipa-icf-gimple.c (func_checker::compare_gimple_call): Likewise.
14312 * ipa-icf.c (sem_function::merge): Likewise.
14313 * ipa-inline.c (early_inliner): Likewise.
14314 * ipa-pure-const.c (warn_function_noreturn): Likewise.
14315 (warn_function_cold): Likewise.
14316 (propagate_pure_const): Likewise.
14317 * ipa-ref.h (enum GTY): Likewise.
14318 * ipa-split.c (find_retbnd): Likewise.
14319 (consider_split): Likewise.
14320 (split_function): Likewise.
14321 * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
14322 * ipa.c (walk_polymorphic_call_targets): Likewise.
14323 (symbol_table::remove_unreachable_nodes): Likewise.
14324 (process_references): Likewise.
14325 (cgraph_build_static_cdtor_1): Likewise.
14326 * lto-cgraph.c (lto_output_node): Likewise.
14327 (output_refs): Likewise.
14328 (compute_ltrans_boundary): Likewise.
14329 (input_overwrite_node): Likewise.
14330 (input_node): Likewise.
14331 (input_cgraph_1): Likewise.
14332 * params.def (PARAM_CHKP_MAX_CTOR_SIZE): Likewise.
14333 * passes.c (pass_manager::execute_early_local_passes): Likewise.
14334 (class pass_chkp_instrumentation_passes): Likewise.
14335 (make_pass_chkp_instrumentation_passes): Likewise.
14336 * passes.def: Likewise.
14337 * rtl.h (struct GTY): Likewise.
14338 (CALL_EXPR_WITH_BOUNDS_P): Likewise.
14339 * stor-layout.c (layout_type): Likewise.
14340 * symtab.c: Likewise.
14341 * target.def: Likewise.
14342 * targhooks.c (default_chkp_bound_type): Likewise.
14343 (default_chkp_bound_mode): Likewise.
14344 (default_builtin_chkp_function): Likewise.
14345 (default_chkp_function_value_bounds): Likewise.
14346 (default_chkp_make_bounds_constant): Likewise.
14347 (default_chkp_initialize_bounds): Likewise.
14348 * targhooks.h (default_chkp_bound_type): Likewise.
14349 (default_chkp_bound_mode): Likewise.
14350 (default_builtin_chkp_function): Likewise.
14351 (default_chkp_function_value_bounds): Likewise.
14352 (default_chkp_make_bounds_constant): Likewise.
14353 (default_chkp_initialize_bounds): Likewise.
14354 * toplev.c (compile_file): Likewise.
14355 (process_options): Likewise.
14356 * tree-core.h (DEF_BUILTIN): Likewise.
14357 (DEF_BUILTIN_CHKP): Likewise.
14358 * tree-inline.c (declare_return_variable): Likewise.
14359 (remap_gimple_stmt): Likewise.
14360 (copy_bb): Likewise.
14361 (initialize_inlined_parameters): Likewise.
14362 (expand_call_inline): Likewise.
14363 * tree-pass.h (make_pass_ipa_chkp_versioning): Likewise.
14364 (make_pass_ipa_chkp_early_produce_thunks): Likewise.
14365 (make_pass_ipa_chkp_produce_thunks): Likewise.
14366 (make_pass_chkp): Likewise.
14367 (make_pass_chkp_opt): Likewise.
14368 (make_pass_chkp_instrumentation_passes): Likewise.
14369 * tree-pretty-print.c (dump_generic_node): Likewise.
14370 * tree-ssa-ccp.c (insert_clobber_before_stack_restore): Likewise.
14371 * tree-ssa-dce.c (propagate_necessity): Likewise.
14372 (eliminate_unnecessary_stmts): Likewise.
14373 * tree-ssa-pre.c (create_expression_by_pieces): Likewise.
14374 * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
14375 * tree-ssa-sccvn.h: Likewise.
14376 * tree-ssa-strlen.c (get_string_length): Likewise.
14377 (valid_builtin_call): Likewise.
14378 (adjust_last_stmt): Likewise.
14379 (handle_builtin_strchr): Likewise.
14380 (handle_builtin_strcpy): Likewise.
14381 (handle_builtin_stxncpy): Likewise.
14382 (handle_builtin_memcpy): Likewise.
14383 (handle_builtin_strcat): Likewise.
14384 (strlen_check_and_optimize_stmt): Likewise.
14385 * tree-stdarg.c (expand_ifn_va_arg_1): Likewise.
14386 * tree-streamer-in.c: Likewise.
14387 * tree-streamer.c (record_common_node): Likewise.
14388 * tree.c (tree_code_size): Likewise.
14389 (wide_int_to_tree_1): Likewise.
14390 (type_contains_placeholder_1): Likewise.
14391 (build_common_tree_nodes): Likewise.
14392 * tree.def (POINTER_BOUNDS_TYPE): Likewise.
14393 * tree.h (POINTER_BOUNDS_TYPE_P): Likewise.
14394 (POINTER_BOUNDS_P): Likewise.
14395 (BOUNDED_TYPE_P): Likewise.
14396 (BOUNDED_P): Likewise.
14397 (CALL_WITH_BOUNDS_P): Likewise.
14398 (pointer_bounds_type_node): Likewise.
14399 * value-prof.c (gimple_ic): Likewise.
14400 * var-tracking.c (vt_add_function_parameters): Likewise.
14401 * varasm.c (make_decl_rtl): Likewise.
14402 (assemble_start_function): Likewise.
14403 (output_constant): Likewise.
14404 (maybe_assemble_visibility): Likewise.
14405 * varpool.c (ctor_for_folding): Likewise.
14406 * chkp-builtins.def: Remove.
14407 * ipa-chkp.c: Remove.
14408 * ipa-chkp.h: Remove.
14409 * rtl-chkp.c: Remove.
14410 * rtl-chkp.h: Remove.
14411 * tree-chkp-opt.c: Remove.
14412 * tree-chkp.c: Remove.
14413 * tree-chkp.h: Remove.
14415 2018-06-07 Carl Love <cel@us.ibm.com>
14417 * config/rs6000/vsx.md (vextract_fp_from_shorth,
14418 vextract_fp_from_shortl): Add BE support.
14420 2018-06-07 Paul Koning <ni1d@arrl.net>
14422 * compare-elim.c (try_merge_compare): Don't merge compare if
14423 address contains a side effect.
14424 (try_eliminate_compare): Likewise.
14426 2018-06-07 Olga Makhotina <olga.makhotina@intel.com>
14428 * config.gcc: Support "tremont".
14429 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "tremont".
14430 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
14432 * config/i386/i386.c (m_TREMONT): Define.
14433 (processor_target_table): Add "tremont".
14434 (PTA_TREMONT): Define.
14435 (ix86_lea_outperforms): Add TARGET_TREMONT.
14436 (get_builtin_code_for_version): Handle PROCESSOR_TREMONT.
14437 (fold_builtin_cpu): Add M_INTEL_TREMONT, replace M_INTEL_GOLDMONT
14438 and M_INTEL_GOLDMONT_PLUS.
14439 (fold_builtin_cpu): Add "tremont".
14440 (ix86_add_stmt_cost): Add TARGET_TREMONT.
14441 (ix86_option_override_internal): Add "tremont".
14442 * config/i386/i386.h (processor_costs): Define TARGET_TREMONT.
14443 (processor_type): Add PROCESSOR_TREMONT.
14444 * config/i386/x86-tune.def: Add m_TREMONT.
14445 * doc/invoke.texi: Add tremont as x86 -march=/-mtune= CPU type.
14447 2018-06-07 Jozef Lawrynowicz <jozef.l@mittosystems.com>
14449 * config/msp430/msp430.c (msp430_mcu_name): Set the "i" in the
14450 symbol defined for msp430i* devices to be lower case.
14452 2018-06-07 Richard Biener <rguenther@suse.de>
14454 * graphite-sese-to-poly.c (extract_affine): Avoid unneded
14455 wrapping. Properly wrap the result of a BIT_NOT_EXPR.
14456 Properly wrap signed arithmetic if overflow wraps.
14458 2018-06-07 Jakub Jelinek <jakub@redhat.com>
14460 PR tree-optimization/69615
14461 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If rhs2 is lhs
14462 of a cast from a same precision integral SSA_NAME in a bb dominated
14463 by first_bb, retry with rhs2 set to the rhs1 of the cast. Don't emit
14464 cast to utype if rhs2 has already a compatible type.
14466 2018-06-07 Richard Biener <rguenther@suse.de>
14468 PR tree-optimization/85935
14469 * graphite-scop-detection.c (find_params_in_bb): Analyze
14470 condition operands with respect to the correct loop. Assert
14471 the analysis doesn't fail.
14473 2018-06-04 Carl Love <cel@us.ibm.com>
14475 * config/rs6000/vsx.md (first_match_index_<mode>): Calculate index
14476 using natural element order. Use gen_lshrsi3 instead of gen_ashrsi3
14477 as it is slightly cheaper.
14478 (first_match_or_eos_index_<mode>):
14479 Calculate index using natural element order.
14480 (first_match_index_<mode>):
14481 Calculate index using natural element order.
14482 (first_match_or_eos_index_<mode>):
14483 Calculate index using natural order.
14484 (define_insn vclzlsbb): Change to define_insn vclzlsbb_<mode>.
14485 for BE and LE modes.
14486 * config/rs6000/rs6000-c.c: Rename P9V_BUILTIN_VCLZLSBB,
14487 P9V_BUILTIN_VCLZLSBB_V16QI.
14488 * config/rs6000/rs6000-builtin.def: Make VCLZLSBB mode
14491 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
14493 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
14494 indentation and line wrap for many prototypes. Add missing
14495 @smallexample directives around block of prototypes for vec_xl and
14498 2018-06-05 Michael Meissner <meissner@linux.ibm.com>
14500 * config/rs6000/rs6000.c (rs6000_passes_ieee128): New boolean to
14501 track if we pass or return IEEE 128-bit floating point.
14502 (ieee128_mangling_gcc_8_1): New boolean to say whether to generate
14503 C++ mangling that is compatible with GCC 8.1.
14504 (TARGET_ASM_GLOBALIZE_DECL_NAME): Override target hook.
14505 (init_cumulative_args): Note if we pass or return IEEE 128-bit
14506 floating point types.
14507 (rs6000_function_arg_advance_1): Likewise.
14508 (rs6000_mangle_type): Optionally generate mangled names that match
14509 what GCC 8.1 generated for IEEE 128-bit floating point types.
14510 (rs6000_globalize_decl_name): If we have an external function that
14511 passes or returns IEEE 128-bit types, generate a weak reference
14512 from the mangled name used in GCC 8.1 to the current mangled
14514 (rs6000_init_builtins): Make __ibm128 use the long double type if
14515 long double is IBM extended double. Make __float128 use the long
14516 double type if long double is IEEE 128-bit.
14519 * config/rs6000/rs6000-builtin.def (BU_IBM128_2): New helper
14520 macro for __ibm128 built-in functions.
14521 (PACK_IF): Add __ibm128 pack/unpack functions.
14522 (UNPACK_IF): Likewise.
14523 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Do not
14524 enable long double built-in functions if long double is IEEE
14525 128-bit floating point.
14526 (rs6000_invalid_builtin): Update long double built-in function
14528 (rs6000_expand_builtin): For PACK_IF and UNPACK_IF built-in
14529 functions, adjust the built-in function to use the long double
14530 built-in function if __ibm128 and long double are the same type.
14531 * doc/extend.texi (PowerPC builtins): Update documention for
14532 __builtin_{,un}pack_longdouble. Add documentation for
14533 __builtin_{,un}pack_ibm128.
14535 2018-06-06 Jim Wilson <jimw@sifive.com>
14537 * config/riscv/riscv.c (enum riscv_privilege_levels): New.
14538 (struct machine_function): New field interrupt_mode.
14539 (riscv_handle_type_attribute): New function. Add forward declaration.
14540 (riscv_attribute_table) <interrupt>: Use riscv_handle_type_attribute.
14541 (riscv_expand_epilogue): Check interrupt_mode field.
14542 (riscv_set_current_function): Check interrupt attribute args and
14543 set interrupt_mode field.
14544 * config/riscv/riscv.md (UNSPECV_SRET, UNSPECV_URET): New.
14545 (riscv_sret, riscv_uret): New.
14546 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: Document
14547 new arguments to interrupt attribute.
14549 2018-06-06 Peter Bergner <bergner@vnet.ibm.com>
14552 * /config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for -mpower9.
14553 Don't handle -mcpu=power8 if -mpower9-vector is also used.
14555 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
14557 * config/rs6000/rs6000-builtin.def (VSX_BUILTIN_VEC_LD,
14558 VSX_BUILTIN_VEC_ST): Add comment to explain non-traditional uses.
14559 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
14560 several redundant entries.
14562 2018-06-06 David Malcolm <dmalcolm@redhat.com>
14564 * config/i386/i386-protos.h (ix86_expand_call): Strengthen return
14565 type from "rtx" to "rtx_insn *".
14566 * config/i386/i386.c (ix86_expand_split_stack_prologue): Likewise
14567 for local "call_insn", removing cast.
14568 (ix86_expand_call): Likewise, introducing a "call_insn" local.
14570 2018-06-06 Eric Botcazou <ebotcazou@adacore.com>
14572 PR tree-optimization/86066
14573 * gimple-ssa-store-merging.c (process_store): Do not bypass BIT_NOT_EXPR
14574 for BIT_INSERT_EXPR stores.
14576 2018-06-06 Richard Biener <rguenther@suse.de>
14578 PR tree-optimization/86062
14579 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
14580 component refs ontop
14581 of to be offsetted base.
14583 2018-06-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
14585 * config/msp430/msp430.c (msp430_attr): Allow interrupt handlers
14586 to be static and remove check on interrupt attribute name.
14588 2018-06-05 Kelvin Nilsen <kelvin@gcc.gnu.org>
14590 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
14591 volatile qualifier from vec_lvsl and vec_lvsr argument prototypes.
14593 2018-06-05 Steve Ellcey <sellcey@cavium.com>
14596 * config/aarch64/aarch64-protos.h (aarch64_err_no_fpadvsimd): Remove
14598 * config/aarch64/aarch64-protos..c (aarch64_err_no_fpadvsimd):
14599 Remove second argument, change how error is called.
14600 (aarch64_layout_arg): Remove second argument from
14601 aarch64_err_no_fpadvsimd call.
14602 (aarch64_init_cumulative_args): Ditto.
14603 (aarch64_gimplify_va_arg_expr): Ditto.
14604 * config/aarch64/aarch64.md (mov<mode>): Ditto.
14606 2018-06-05 Uros Bizjak <ubizjak@gmail.com>
14608 * config/i386/i386.md (simple_return_indirect_internal): New expander.
14609 (*simple_return_indirect_internal<mode>): Rename from
14610 simple_return_indirect_internal. Use W mode iterator.
14611 (rstorssp): New expander.
14612 (*rstorssp<mode>): Rename from rstorssp. Use P mode iterator.
14613 (clrssbsy): New expander.
14614 (*clrssbsy<mode>): Rename from clrssbsy. Use P mode iterator.
14616 2018-06-05 Andre Vieira <andre.simoesdiasvieira@arm.com>
14618 * config/arm/arm_cmse.h (cmse_nsfptr_create): Change typeof to
14620 (cmse_check_pointed_object): Likewise.
14622 2018-06-05 Martin Liska <mliska@suse.cz>
14624 PR gcov-profile/47618
14625 * doc/invoke.texi: Document how -fprofile-dir format
14628 2018-06-05 Richard Biener <rguenther@suse.de>
14630 * tree-cfgcleanup.c (cleanup_control_flow_pre): For edge
14631 removal pretend DOM info isn't available so we do not update
14632 it and only remove edges, not dominated blocks. Actually free
14633 DOM info in case we removed something. Remove unreachable blocks.
14634 (mfb_keep_latches): Work with either DOM info or marked backedges.
14635 (cleanup_tree_cfg_noloop): Do not remove unreachable blocks
14636 first. Mark backedges if DOM info isn't available.
14637 (Re-)compute DOM info after cleanup_control_flow_pre.
14639 2018-06-05 Richard Biener <rguenther@suse.de>
14641 * tree-cfg.c (struct locus_discrim_map): Store line, not location.
14642 (locus_discrim_hasher::hash): Adjust.
14643 (locus_discrim_hasher::equal): Likewise.
14644 (next_discriminator_for_locus): Work on line directly.
14645 (same_line_p): Pass in expanded locus1 as well.
14646 (assign_discriminators): Avoid redundant location expansions.
14648 2018-06-05 Richard Biener <rguenther@suse.de>
14650 PR tree-optimization/86046
14651 * tree-ssa.c (maybe_optimize_var): Clear DECL_GIMPLE_REG_P
14652 if required after clearing TREE_ADDRESSABLE.
14654 2018-06-05 Richard Biener <rguenther@suse.de>
14656 PR tree-optimization/86047
14657 * tree-ssa-loop.c (for_each_index): Glob handling of all
14658 decls and constants and really handle all of them.
14660 2018-06-05 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
14663 * config/arm/arm-builtins.c (arm_type_qualifiers): Add
14664 qualifier_void_pointer and qualifier_const_void_pointer.
14665 (arm_ldc_qualifiers, arm_stc_qualifiers): Use the above.
14666 (arm_init_builtins): Handle the above.
14667 * config/arm/arm_acle.h (__arm_cdp, __arm_ldc, __arm_ldcl, __arm_stc,
14668 __arm_stcl, __arm_mcr, __arm_cdp2, __arm_ldc2, __arm_ldcl2, __arm_stc2,
14669 __arm_stcl2,__arm_mcr2, __arm_mcrr, __arm_mcrr2): Remove return for
14672 2018-06-05 Martin Liska <mliska@suse.cz>
14674 * auto-profile.c (read_autofdo_file): Do not use
14675 gcov_ctr_summary struct.
14676 (afdo_callsite_hot_enough_for_early_inline): Likewise.
14677 * coverage.c (struct counts_entry): Likewise.
14678 (read_counts_file): Read just single summary entry.
14679 (get_coverage_counts): Use gcov_summary struct.
14680 * coverage.h (get_coverage_counts): Likewise.
14681 * gcov-dump.c (dump_working_sets): Likewise.
14682 (tag_summary): Dump just single summary.
14683 * gcov-io.c (gcov_write_summary): Write just histogram
14685 (gcov_read_summary): Read just single summary.
14686 (compute_working_sets): Use gcov_summary struct.
14687 * gcov-io.h (GCOV_TAG_SUMMARY_LENGTH): Remove usage
14688 of GCOV_COUNTERS_SUMMABLE.
14689 (GCOV_COUNTERS_SUMMABLE): Remove.
14690 (GCOV_FIRST_VALUE_COUNTER): Replace with
14691 GCOV_COUNTER_V_INTERVAL.
14692 (struct gcov_ctr_summary): Remove.
14693 (struct gcov_summary): Directly use fields of former
14695 (compute_working_sets): Use gcov_summary struct.
14696 * gcov.c (read_count_file): Do not use ctrs fields.
14697 * lto-cgraph.c (merge_profile_summaries): Use gcov_summary
14699 * lto-streamer.h (struct GTY): Make profile_info gcov_summary
14701 * profile.c: Likewise.
14702 * profile.h: Likewise.
14704 2018-06-05 Martin Liska <mliska@suse.cz>
14706 PR gcov-profile/84846
14707 * gcov.c (output_lines): Print working directory only
14708 in intermediate format.
14710 2018-06-05 Andreas Krebbel <krebbel@linux.ibm.com>
14712 * config/s390/s390-builtin-types.def: Add void function type.
14713 * config/s390/s390-builtins.def: Use the function type for the
14716 2018-06-04 Jim Wilson <jimw@sifive.com>
14718 * config/riscv/riscv-protos.h (riscv_expand_epilogue): Change bool arg
14720 * config/riscv/riscv.c (riscv_for_each_saved_reg): New args epilogue
14721 and maybe_eh_return. Change regno to unsigned int. Use new args to
14722 handle EH_RETURN_DATA_REGNO registers properly.
14723 (riscv_expand_prologue): Pass new args to riscv_for_each_saved_reg.
14724 (riscv_expand_epilogue): Update comment. Change argument name and
14725 type. Update code to use new name and type. Pass new args to
14726 riscv_for_each_saved_reg. Only use EH_RETURN_STACKADJ_RTX when
14728 * config/riscv/riscv.md (NORMAL_RETURN): New.
14729 (SIBCALL_RETURN, EXCEPTION_RETURN): New.
14730 (epilogue, sibcall_epilogue): Update riscv_expand_epilogue arg.
14731 (eh_return): Call gen_eh_return_internal and emit barrier.
14732 (eh_return_internal): Call riscv_expand_epilogue.
14734 2018-06-04 Eric Botcazou <ebotcazou@adacore.com>
14736 * gimple-ssa-store-merging.c (struct merged_store_group): Move up
14737 bit_insertion field and declare can_be_merged_into method.
14738 (merged_store_group::can_be_merged_into): New method.
14739 (imm_store_chain_info::coalesce_immediate): Call it to decide whether
14740 consecutive non-overlapping stores can be merged. Turn MEM_REF stores
14741 into BIT_INSERT_EXPR stores if the group contains a non-MEM_REF store.
14743 2018-06-04 Richard Biener <rguenther@suse.de>
14745 PR tree-optimization/85955
14746 * builtins.c (fold_builtin_sincos): Convert pointers to
14747 destination to appropriate type before dereferencing.
14749 2018-06-04 Segher Boessenkool <segher@kernel.crashing.org>
14751 * config/rs6000/rs6000.md (abs<mode>2 for FLOAT128): Handle IFmode.
14753 2018-06-04 Richard Sandiford <richard.sandiford@linaro.org>
14755 * expr.c (expand_expr_real_1): Force the operand into memory if
14756 its TYPE_MODE is BLKmode and if there is no integer mode for
14757 the number of bits being extracted.
14759 2018-06-04 Jakub Jelinek <jakub@redhat.com>
14763 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
14764 Use vptestnm rather than vptestm in (=Yc,v,C) variant.
14766 2018-06-04 Richard Biener <rguenther@suse.de>
14768 * tree-cfgcleanup.c (cleanup_tree_cfg_1): Fold into...
14769 (cleanup_tree_cfg_noloop): ... single caller. Do
14770 start_recording_case_labels later.
14772 2018-06-04 Sebastian Peryt <sebastian.peryt@intel.com>
14774 * config/i386/cldemoteintrin.h: Change define from _X86INTRIN_H_INCLUDED
14775 to _IMMINTRIN_H_INCLUDED.
14776 * config/i386/pconfigintrin.h: Ditto.
14777 * config/i386/waitpkgintrin.h: Ditto.
14778 * config/i386/immintrin.h: Add includes for sgxintrin.h,
14779 pconfigintrin.h, waitpkgintrin.h and cldemoteintrin.h.
14780 * config/i386/x86intrin.h: Remove includes for mintrin.h, xmmintrin.h,
14781 emmintrin.h, pmmintrin.h, tmmintrin.h, smmintrin.h, wmmintrin.h,
14782 bmiintrin.h, bmi2intrin.h, lzcntintrin.h, sgxintrin.h, pconfigintrin.h,
14783 waitpkgintrin.h and cldemoteintrin.h.
14785 2018-06-04 Richard Biener <rguenther@suse.de>
14787 PR tree-optimization/86038
14788 * tracer.c (find_best_successor): Check probability for
14789 being initialized, bail out if not.
14791 2018-06-04 Richard Earnshaw <rearnsha@arm.com>
14794 * config/arm/arm-cpus.in (ALL_QUIRKS): Add xscale feature to the list
14795 of bits to ignore when comparing architectures.
14797 2018-06-04 Jakub Jelinek <jakub@redhat.com>
14799 PR tree-optimization/69615
14800 * fold-const.c (merge_ranges): If range1 is - [x, x] and x is the
14801 maximum or minimum of the type, try to merge it also as if
14802 range1 is + [-, x - 1] or + [x + 1, -].
14805 * tree.c (inchash::add_expr): Handle IDENTIFIER_NODE.
14807 2018-06-03 Eric Botcazou <ebotcazou@adacore.com>
14809 PR tree-optimization/86034
14810 * gimple-ssa-store-merging.c (output_merged_store): Convert the RHS to
14811 the unsigned bitfield type in a bit insertion sequence if it does not
14812 have a larger precision than the bitfield size.
14813 (process_store): Also bypass widening conversions for BIT_INSERT_EXPR.
14815 2018-06-03 Kito Cheng <kito.cheng@gmail.com>
14817 * config/nds32/nds32-peephole2.md: Add new patterns for code size.
14819 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
14821 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3J.
14822 * config/nds32/nds32.c (nds32_option_override): Consider ARCH_V3J.
14823 * config/nds32/nds32.h (TARGET_ISA_V3): Add ARCH_V3J checking.
14824 * config/nds32/nds32.opt (march): Add enum value Value(ARCH_V3J).
14826 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
14828 * common/config/nds32/nds32-common.c (nds32_option_optimization_table):
14829 Disable -fdelete-null-pointer-checks for ELF toolchain.
14831 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
14832 Kito Cheng <kito.cheng@gmail.com>
14834 * config.gcc (nds32*): Use nds32-linux.opt and nds32-elf.opt.
14835 (nds32le-*-*, nds32be-*-*): Integrate checking process.
14836 (nds32*-*-*): Add glibc and uclibc conditions.
14837 * common/config/nds32/nds32-common.c (nds32_except_unwind_info): New.
14838 (TARGET_EXCEPT_UNWIND_INFO): Define.
14839 * config/nds32/elf.h: New file.
14840 * config/nds32/linux.h: New file.
14841 * config/nds32/nds32-elf.opt: New file.
14842 * config/nds32/nds32-linux.opt: New file.
14843 * config/nds32/nds32-fp-as-gp.c
14844 (pass_nds32_fp_as_gp::gate): Consider TARGET_LINUX_ABI.
14845 * config/nds32/nds32.c (nds32_conditional_register_usage): Consider
14847 (nds32_asm_file_end): Ditto.
14848 (nds32_print_operand): Ditto.
14849 (nds32_insert_attributes): Ditto.
14850 (nds32_init_libfuncs): New function.
14851 (TARGET_HAVE_TLS): Define.
14852 (TARGET_INIT_LIBFUNCS): Define.
14853 * config/nds32/nds32.h (TARGET_DEFAULT_RELAX): Apply different relax
14855 (TARGET_ELF): Apply different mcmodel setting.
14856 (LINK_SPEC, LIB_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): The content has
14857 been migrated into elf.h and linux.h files.
14858 * config/nds32/nds32.md (add_pc): Consider TARGET_LINUX_ABI.
14859 * config/nds32/nds32.opt (mvh): Consider TARGET_LINUX_ABI.
14860 (mcmodel): The content has been migrated into nds32-elf.opt and
14861 nds32-linux.opt files.
14862 * config/nds32/t-elf: New file.
14863 * config/nds32/t-linux: New file.
14865 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
14866 Shiva Chen <shiva0217@gmail.com>
14868 * config/nds32/constants.md (unspec_volatile_element): Add
14869 UNSPEC_VOLATILE_OMIT_FP_BEGIN and UNSPEC_VOLATILE_OMIT_FP_END.
14870 * config/nds32/nds32-fp-as-gp.c: New implementation of fp_as_gp
14872 * config/nds32/nds32-protos.h (nds32_naked_function_p): Declare.
14873 (make_pass_nds32_fp_as_gp): Declare.
14874 * config/nds32/nds32.c (nds32_register_passes): Add fp_as_gp as one
14876 (nds32_asm_function_end_prologue): Remove unused asm output.
14877 (nds32_asm_function_begin_epilogue): Remove unused asm output.
14878 (nds32_asm_file_start): Output necessary fp_as_gp information.
14879 (nds32_option_override): Adjust register usage.
14880 (nds32_expand_prologue): Consider fp_as_gp situation.
14881 (nds32_expand_prologue_v3push): Consider fp_as_gp situation.
14882 * config/nds32/nds32.md (prologue): Check fp_as_gp_p and naked_p.
14885 (simple_return): Ditto.
14886 (omit_fp_begin): Output special directive for fp_as_gp.
14887 (omit_fp_end): Output special directive for fp_as_gp.
14888 * config/nds32/nds32.opt (mfp-as-gp, mno-fp-as-gp, mforce-fp-as-gp,
14889 mforbid-fp-as-gp): New options.
14891 2018-06-01 Mark Wielaard <mark@klomp.org>
14893 * dwarf2out.c (dwarf2out_finish): Remove generation of
14894 DW_AT_loclists_base.
14896 2018-06-01 Eric Botcazou <ebotcazou@adacore.com>
14898 * gimple-ssa-store-merging.c: Include gimple-fold.h.
14899 (struct store_immediate_info): Document BIT_INSERT_EXPR stores.
14900 (struct merged_store_group): Add bit_insertion field.
14901 (dump_char_array): Use standard hexadecimal format.
14902 (merged_store_group::merged_store_group): Set bit_insertion to false.
14903 (merged_store_group::apply_stores): Use optimal buffer size. Deal
14904 with BIT_INSERT_EXPR stores. Move up code updating the mask and
14905 also print the mask in the dump file.
14906 (pass_store_merging::gate): Minor tweak.
14907 (imm_store_chain_info::coalesce_immediate): Fix wrong association
14908 of stores with groups in dump. Allow coalescing of BIT_INSERT_EXPR
14909 stores with INTEGER_CST stores.
14910 (count_multiple_uses) <BIT_INSERT_EXPR>: New case.
14911 (imm_store_chain_info::output_merged_store): Add try_bitpos variable
14912 and use it throughout. Generate bit insertion sequences if need be.
14913 (pass_store_merging::process_store): Remove redundant condition.
14914 Record stores from a SSA name to a bit-field with BIT_INSERT_EXPR.
14916 2018-06-01 Segher Boessenkool <segher@kernel.crashing.org>
14918 * config/rs6000/rs6000.c (rs6000_mangle_type): Change the mangling of
14919 the 128-bit floating point types. Fix function comment.
14921 2018-06-01 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
14923 * config/aarch64/aarch64-simd.md
14924 (aarch64_simd_vec_unpack<su>_lo_<mode>): Use UXTL and SXTL assembler
14926 (aarch64_simd_vec_unpack<su>_hi_<mode>): Use UXTL2 and SXTL2 assembler
14929 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
14931 PR tree-optimization/85989
14932 * gimple-ssa-backprop.c (backprop::m_visited_phis): New member
14934 (backprop::intersect_uses): Check it when deciding whether this
14935 is a backedge reference.
14936 (backprop::process_block): Add each phi to m_visited_phis
14937 after visiting it, then clear it at the end.
14939 2018-06-01 Richard Biener <rguenther@suse.de>
14941 * tree-vectorizer.h (vect_dr_stmt): New function.
14942 (vect_get_load_cost): Adjust.
14943 (vect_get_store_cost): Likewise.
14944 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
14945 Use vect_dr_stmt instead of DR_SMTT.
14946 (vect_record_base_alignments): Likewise.
14947 (vect_calculate_target_alignment): Likewise.
14948 (vect_compute_data_ref_alignment): Likewise and make static.
14949 (vect_update_misalignment_for_peel): Likewise.
14950 (vect_verify_datarefs_alignment): Likewise.
14951 (vector_alignment_reachable_p): Likewise.
14952 (vect_get_data_access_cost): Likewise. Pass down
14953 vinfo to vect_get_load_cost/vect_get_store_cost instead of DR.
14954 (vect_get_peeling_costs_all_drs): Likewise.
14955 (vect_peeling_hash_get_lowest_cost): Likewise.
14956 (vect_enhance_data_refs_alignment): Likewise.
14957 (vect_find_same_alignment_drs): Likewise.
14958 (vect_analyze_data_refs_alignment): Likewise.
14959 (vect_analyze_group_access_1): Likewise.
14960 (vect_analyze_group_access): Likewise.
14961 (vect_analyze_data_ref_access): Likewise.
14962 (vect_analyze_data_ref_accesses): Likewise.
14963 (vect_vfa_segment_size): Likewise.
14964 (vect_small_gap_p): Likewise.
14965 (vectorizable_with_step_bound_p): Likewise.
14966 (vect_prune_runtime_alias_test_list): Likewise.
14967 (vect_analyze_data_refs): Likewise.
14968 (vect_supportable_dr_alignment): Likewise.
14969 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
14970 (vect_gen_prolog_loop_niters): Likewise.
14971 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
14972 * tree-vect-patterns.c (vect_recog_bool_pattern): Do not
14974 (vect_recog_mask_conversion_pattern): Likewise.
14975 (vect_try_gather_scatter_pattern): Likewise.
14976 * tree-vect-stmts.c (vect_model_store_cost): Pass stmt_info
14977 to vect_get_store_cost.
14978 (vect_get_store_cost): Get stmt_info instead of DR.
14979 (vect_model_load_cost): Pass stmt_info to vect_get_load_cost.
14980 (vect_get_load_cost): Get stmt_info instead of DR.
14982 2018-06-01 Richard Biener <rguenther@suse.de>
14984 PR middle-end/86017
14985 * gimple-fold.c (var_decl_component_p): Also allow offsetted
14986 vars wrapped in MEM_REFs.
14988 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
14990 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
14991 Fix subreg tests so that we only return a choice between
14992 GENERAL_REGS and FP_REGS if the original classes included both.
14994 2018-06-01 Richard Biener <rguenther@suse.de>
14997 * tree-ssa-structalias.c (get_function_part_constraint):
14998 Handle NULL fi->decl.
14999 (find_func_aliases_for_call): Properly handle indirect
15000 fi from direct call.
15001 (find_func_clobbers): Likewise.
15002 (ipa_pta_execute): Likewise.
15003 (create_variable_info_for): For functions that are ifunc_resolver
15004 resolve to a varinfo that contains the result of the resolver call.
15005 (associate_varinfo_to_alias): Do not treat ifunc resolvers as
15008 2018-05-31 Michael Collison <michael.collison@arm.com>
15010 * config/aarch64/aarch64.md:
15011 (*fix_to_zero_extenddfdi2): New pattern.
15012 * gcc.target/aarch64/fix_extend1.c: New testcase.
15014 2018-05-31 Qing Zhao <qing.zhao@oracle.com>
15016 PR middle-end/78809
15017 PR middle-end/83026
15018 * builtins.c (expand_builtin): Add the handling of BUILT_IN_STRCMP_EQ
15019 and BUILT_IN_STRNCMP_EQ.
15020 * builtins.def: Add new builtins BUILT_IN_STRCMP_EQ and
15021 BUILT_IN_STRNCMP_EQ.
15022 * gimple-fold.c (gimple_fold_builtin_string_compare): Add the
15023 handling of BUILTIN_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
15024 (gimple_fold_builtin): Likewise.
15025 * tree-ssa-strlen.c (compute_string_length): New function.
15026 (determine_min_obsize): New function.
15027 (handle_builtin_string_cmp): New function to handle calls to
15028 string compare functions.
15029 (strlen_optimize_stmt): Add handling to builtin string compare
15031 * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
15032 Add the handling of BUILT_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
15033 * tree.c (build_common_builtin_nodes): Add new defines of
15034 BUILT_IN_STRNCMP_EQ and BUILT_IN_STRCMP_EQ.
15036 2018-05-31 Jakub Jelinek <jakub@redhat.com>
15039 * bb-reorder.c (pass_partition_blocks::gate): Return false for
15040 functions with naked attribute.
15042 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
15044 * config/i386/sse.md (avx_vec_concat<mode>):
15045 Substitute concat_tg_mode mode attribute with xtg_mode.
15046 (<mask_codefor>avx512dq_broadcast<mode><mask_name>_1): Ditto.
15047 (concat_tg_mode): Remove mode attribute.
15049 2018-05-31 Martin Sebor <msebor@redhat.com>
15052 * calls.c (alloc_max_size): Correct a logic error/typo.
15053 Treat excessive arguments as infinite. Warn for invalid arguments.
15054 * doc/invoke.texi (-Walloc-size-larger-than): Update.
15056 2018-05-31 H.J. Lu <hongjiu.lu@intel.com>
15059 * config/i386/x86-tune.def: Re-enable partial_reg_dependency
15060 and movx for Haswell.
15062 2018-05-31 Chung-Lin Tang <cltang@codesourcery.com>
15063 Cesar Philippidis <cesar@codesourcery.com>
15065 PR middle-end/85879
15066 * gimplify.c (gimplify_adjust_omp_clauses): Add 'remove = true'
15067 when emitting error on private/firstprivate reductions.
15068 * omp-low.c (lower_omp_target): Avoid reference-type processing
15069 on pointers for firstprivate clause.
15071 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
15073 * config/aarch64/aarch64-simd-builtins.def (ld1x3): New.
15076 * config/aarch64/aarch64-simd.md
15077 (aarch64_ld1x3<VALLDIF:mode>): New pattern.
15078 (aarch64_ld1_x3_<mode>): Likewise
15079 (aarch64_st1x2<VALLDIF:mode>): Likewise
15080 (aarch64_st1_x2_<mode>): Likewise
15081 (aarch64_st1x3<VALLDIF:mode>): Likewise
15082 (aarch64_st1_x3_<mode>): Likewise
15083 * config/aarch64/arm_neon.h (vld1_u8_x3): New function.
15084 (vld1_s8_x3): Likewise.
15085 (vld1_u16_x3): Likewise.
15086 (vld1_s16_x3): Likewise.
15087 (vld1_u32_x3): Likewise.
15088 (vld1_s32_x3): Likewise.
15089 (vld1_u64_x3): Likewise.
15090 (vld1_s64_x3): Likewise.
15091 (vld1_f16_x3): Likewise.
15092 (vld1_f32_x3): Likewise.
15093 (vld1_f64_x3): Likewise.
15094 (vld1_p8_x3): Likewise.
15095 (vld1_p16_x3): Likewise.
15096 (vld1_p64_x3): Likewise.
15097 (vld1q_u8_x3): Likewise.
15098 (vld1q_s8_x3): Likewise.
15099 (vld1q_u16_x3): Likewise.
15100 (vld1q_s16_x3): Likewise.
15101 (vld1q_u32_x3): Likewise.
15102 (vld1q_s32_x3): Likewise.
15103 (vld1q_u64_x3): Likewise.
15104 (vld1q_s64_x3): Likewise.
15105 (vld1q_f16_x3): Likewise.
15106 (vld1q_f32_x3): Likewise.
15107 (vld1q_f64_x3): Likewise.
15108 (vld1q_p8_x3): Likewise.
15109 (vld1q_p16_x3): Likewise.
15110 (vld1q_p64_x3): Likewise.
15111 (vst1_s64_x2): Likewise.
15112 (vst1_u64_x2): Likewise.
15113 (vst1_f64_x2): Likewise.
15114 (vst1_s8_x2): Likewise.
15115 (vst1_p8_x2): Likewise.
15116 (vst1_s16_x2): Likewise.
15117 (vst1_p16_x2): Likewise.
15118 (vst1_s32_x2): Likewise.
15119 (vst1_u8_x2): Likewise.
15120 (vst1_u16_x2): Likewise.
15121 (vst1_u32_x2): Likewise.
15122 (vst1_f16_x2): Likewise.
15123 (vst1_f32_x2): Likewise.
15124 (vst1_p64_x2): Likewise.
15125 (vst1q_s8_x2): Likewise.
15126 (vst1q_p8_x2): Likewise.
15127 (vst1q_s16_x2): Likewise.
15128 (vst1q_p16_x2): Likewise.
15129 (vst1q_s32_x2): Likewise.
15130 (vst1q_s64_x2): Likewise.
15131 (vst1q_u8_x2): Likewise.
15132 (vst1q_u16_x2): Likewise.
15133 (vst1q_u32_x2): Likewise.
15134 (vst1q_u64_x2): Likewise.
15135 (vst1q_f16_x2): Likewise.
15136 (vst1q_f32_x2): Likewise.
15137 (vst1q_f64_x2): Likewise.
15138 (vst1q_p64_x2): Likewise.
15139 (vst1_s64_x3): Likewise.
15140 (vst1_u64_x3): Likewise.
15141 (vst1_f64_x3): Likewise.
15142 (vst1_s8_x3): Likewise.
15143 (vst1_p8_x3): Likewise.
15144 (vst1_s16_x3): Likewise.
15145 (vst1_p16_x3): Likewise.
15146 (vst1_s32_x3): Likewise.
15147 (vst1_u8_x3): Likewise.
15148 (vst1_u16_x3): Likewise.
15149 (vst1_u32_x3): Likewise.
15150 (vst1_f16_x3): Likewise.
15151 (vst1_f32_x3): Likewise.
15152 (vst1_p64_x3): Likewise.
15153 (vst1q_s8_x3): Likewise.
15154 (vst1q_p8_x3): Likewise.
15155 (vst1q_s16_x3): Likewise.
15156 (vst1q_p16_x3): Likewise.
15157 (vst1q_s32_x3): Likewise.
15158 (vst1q_s64_x3): Likewise.
15159 (vst1q_u8_x3): Likewise.
15160 (vst1q_u16_x3): Likewise.
15161 (vst1q_u32_x3): Likewise.
15162 (vst1q_u64_x3): Likewise.
15163 (vst1q_f16_x3): Likewise.
15164 (vst1q_f32_x3): Likewise.
15165 (vst1q_f64_x3): Likewise.
15166 (vst1q_p64_x3): Likewise.
15168 2018-05-30 Jozef Lawrynowicz <jozef.l@mittosystems.com>
15170 * config/msp430/msp430.c (msp430_output_labelref): Prepend
15171 user_label_prefix to name.
15173 * tree-core.h: Update comment about the format of NAME string
15174 passed to handler in attribute_spec.
15176 * config/msp430/msp430.md: Remove erroneous subreg expression from
15177 zero_extendqisi2 insn pattern. Remove msp430x ISA restriction on
15178 zero_extend{q,h}isi2.
15180 2018-05-30 Borislav Petkov <bp@suse.de>
15182 * doc/extend.texi: Document some architecture specific
15183 constraints and sort entries.
15185 2018-05-30 Martin Sebor <msebor@redhat.com>
15187 PR middle-end/85369
15188 * builtins.c (expand_builtin_stpcpy_1): New function.
15189 (expand_builtin_stpcpy): Call it, and call maybe_warn_nonstring_arg
15190 only if the former succeeds.
15192 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
15194 * config/aarch64/aarch64-cores.def (saphira) : Add support for ARMv8.4
15197 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
15199 * doc/invoke.texi (-flinker-output): Document
15201 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
15203 * passes.c (ipa_write_summaries): Only modify statements if body
15205 * cgraphunit.c (ipa_passes): Also produce intermeidate code when
15206 incrementally linking.
15207 (ipa_passes): Likewise.
15208 * lto-cgraph.c (lto_output_node): When incrementally linking do not
15209 pass down resolution info.
15210 * common.opt (flag_incremental_link): Update info.
15211 * gcc.c (plugin specs): Turn flinker-output=* to
15212 -plugin-opt=-linker-output-known
15213 * toplev.c (compile_file): Also cut compilation when doing incremental
15215 * flag-types. (enum lto_partition_model): Add
15216 LTO_LINKER_OUTPUT_NOLTOREL.
15217 (invoke.texi): Add -flinker-output docs.
15218 * ipa.c (symbol_table::remove_unreachable_nodes): Handle LTO incremental
15219 link same way as WPA; do not stream in dead initializers.
15221 * dwarf2out.c (dwarf2out_die_ref_for_decl,
15222 darf2out_register_external_decl): Support incremental link.
15224 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
15226 * lto-opts.c (lto_write_options): Skip OPT_dumpdir, OPT_fresolution_.
15228 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
15230 * lto-wrapper.c (debug_objcopy): Add rename parameter; pass
15231 it down to simple_object_copy_lto_debug_sections.
15232 (run_gcc): Determine incremental LTO link time and configure
15233 lto1 into non-wpa mode, disable renaming of debug sections.
15235 2018-05-30 Kelvin Nilsen <kelvin@gcc.gnu.org>
15237 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
15238 descriptions of various incorrectly documented functions.
15240 2018-05-30 Andre Vieira <andre.simoesdiasvieira@arm.com>
15243 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
15244 address check not strict.
15246 2018-05-30 Richard Biener <rguenther@suse.de>
15248 PR tree-optimization/85964
15249 * tracer.c (better_p): Drop initialized count check, we only
15250 call the function with initialized counts now.
15251 (find_best_successor): Do find a best edge if one
15252 has uninitialized count.
15253 (find_best_predecessor): Likewise. Do BB frequency check only
15254 if count is initialized.
15256 2017-05-30 Jackson Woodruff <jackson.woodruff@arm.com>
15258 * config/aarch64/aarch64.c (aarch64_host_wide_int_compare): New.
15259 (aarch64_ldrstr_offset_compare): New.
15260 (aarch64_operands_adjust_ok_for_ldpstp): Update to consider all
15261 load/store orderings.
15262 (aarch64_gen_adjusted_ldpstp): Likewise.
15264 2018-05-30 Wilco Dijkstra <wdijkstr@arm.com>
15266 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
15267 Check for subset of GENERAL_REGS and FP_REGS.
15268 * config/aarch64/aarch64-simd.md (aarch64_get_lane): Increase cost of
15271 2018-05-30 Richard Sandiford <richard.sandiford@linaro.org>
15273 * alias.c (adjust_offset_for_component_ref): Use poly_int_tree_p
15274 and wi::to_poly_offset. Add the current offset and then check
15275 whether the sum fits, rather than using an unchecked addition of
15276 a checked term. Check for a shwi rather than a uhwi.
15277 * expr.c (get_bit_range): Use tree_to_poly_uint64.
15278 (store_constructor): Use poly_int_tree_p.
15279 (expand_expr_real_1): Likewise.
15280 * function.c (assign_temp): Likewise.
15281 * fold-const.c (const_binop): Use poly_int_tree_p and
15282 wi::to_poly_offset.
15283 (fold_indirect_ref_1): Likewise. Use multiple_p to attempt an exact
15285 * ipa-icf-gimple.c (func_checker::compare_operand): Use
15286 to_poly_offset for MEM offsets.
15287 * ipa-icf.c (sem_variable::equals): Likewise.
15288 * stor-layout.c (compute_record_mode): Use poly_int_tree_p.
15289 * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use
15290 wi::to_poly_offset for BIT_FIELD_REF offsets.
15291 (vn_reference_maybe_forwprop_address): Use poly_int_tree_p and
15292 wi::to_poly_offset.
15293 * var-tracking.c (emit_note_insn_var_location): Use
15294 tree_to_poly_uint64.
15296 2018-05-29 Jim Wilson <jimw@sifive.com>
15298 * config/riscv/riscv.c (riscv_interrupt_type): Fix comment typo.
15300 2018-05-29 Uros Bizjak <ubizjak@gmail.com>
15303 * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
15304 Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
15306 (sse4_1_round<mode>2): Use nonimmediate_operand
15307 for operand 1 predicate.
15309 2018-05-29 Martin Sebor <msebor@redhat.com>
15310 Richard Biener <rguenther@suse.de>
15313 * calls.c (get_size_range): Call determine_value_range instead
15314 of get_value_range..
15315 * tree-vrp.h (determine_value_range): Declared new function.
15316 * tree-vrp.c (determine_value_range_1, determine_value_range): New.
15318 2018-05-29 Richard Biener <rguenther@suse.de>
15320 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Make
15321 sure to use non-pattern stmts for get_earlier_stmt arguments.
15322 * tree-vectorizer.h (get_earlier_stmt): Assert we do not get
15323 called on pattern stmts.
15324 (get_later_stmt): Likewise.
15326 2018-05-29 Martin Liska <mliska@suse.cz>
15328 PR gcov-profile/85759
15329 * doc/gcov.texi: Document GCOV_ERROR_FILE and GCOV_EXIT_AT_ERROR
15332 2018-05-29 Jakub Jelinek <jakub@redhat.com>
15334 * tree-cfg.c (verify_gimple_assign_unary): Add checking for
15336 (verify_gimple_assign_binary): Check TYPE_VECTOR_SUBPARTS for
15340 * tree.def (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
15341 VEC_PACK_FLOAT_EXPR): New tree codes.
15342 * tree-pretty-print.c (op_code_prio): Handle
15343 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR.
15344 (dump_generic_node): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
15345 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
15346 * tree-inline.c (estimate_operator_cost): Likewise.
15347 * gimple-pretty-print.c (dump_binary_rhs): Handle VEC_PACK_FLOAT_EXPR.
15348 * fold-const.c (const_binop): Likewise.
15349 (const_unop): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR and
15350 VEC_UNPACK_FIX_TRUNC_LO_EXPR.
15351 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
15352 (verify_gimple_assign_binary): Handle VEC_PACK_FLOAT_EXPR.
15353 * cfgexpand.c (expand_debug_expr): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
15354 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
15355 * expr.c (expand_expr_real_2): Likewise.
15356 * optabs.def (vec_packs_float_optab, vec_packu_float_optab,
15357 vec_unpack_sfix_trunc_hi_optab, vec_unpack_sfix_trunc_lo_optab,
15358 vec_unpack_ufix_trunc_hi_optab, vec_unpack_ufix_trunc_lo_optab): New
15360 * optabs.c (expand_widen_pattern_expr): For
15361 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR use
15362 sign from result type rather than operand's type.
15363 (expand_binop_directly): For vec_packu_float_optab and
15364 vec_packs_float_optab allow result type to be different from operand's
15366 * optabs-tree.c (optab_for_tree_code): Handle
15367 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
15368 VEC_PACK_FLOAT_EXPR. Formatting fixes.
15369 * tree-vect-generic.c (expand_vector_operations_1): Handle
15370 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
15371 VEC_PACK_FLOAT_EXPR.
15372 * tree-vect-stmts.c (supportable_widening_operation): Handle
15374 (supportable_narrowing_operation): Handle FLOAT_EXPR.
15375 * config/i386/i386.md (fixprefix, floatprefix): New code attributes.
15376 * config/i386/sse.md (*float<floatunssuffix>v2div2sf2): Rename to ...
15377 (float<floatunssuffix>v2div2sf2): ... this. Formatting fix.
15378 (vpckfloat_concat_mode, vpckfloat_temp_mode, vpckfloat_op_mode): New
15380 (vec_pack<floatprefix>_float_<mode>): New expander.
15381 (vunpckfixt_mode, vunpckfixt_model, vunpckfixt_extract_mode): New mode
15383 (vec_unpack_<fixprefix>fix_trunc_lo_<mode>,
15384 vec_unpack_<fixprefix>fix_trunc_hi_<mode>): New expanders.
15385 * doc/md.texi (vec_packs_float_@var{m}, vec_packu_float_@var{m},
15386 vec_unpack_sfix_trunc_hi_@var{m}, vec_unpack_sfix_trunc_lo_@var{m},
15387 vec_unpack_ufix_trunc_hi_@var{m}, vec_unpack_ufix_trunc_lo_@var{m}):
15389 * doc/generic.texi (VEC_UNPACK_FLOAT_HI_EXPR,
15390 VEC_UNPACK_FLOAT_LO_EXPR): Fix pasto in description.
15391 (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
15392 VEC_PACK_FLOAT_EXPR): Document.
15394 2018-05-29 Richard Biener <rguenther@suse.de>
15396 * tree-vectorizer.h (struct vec_info): Add stmt_vec_infos
15398 (stmt_vec_info_vec): Make pointer.
15399 (init_stmt_vec_info_vec): Remove.
15400 (free_stmt_vec_info_vec): Likewise.
15401 (set_stmt_vec_info_vec): New function.
15402 (free_stmt_vec_infos): Likewise.
15403 (vinfo_for_stmt): Adjust for stmt_vec_info_vec indirection.
15404 (set_vinfo_for_stmt): Likewise.
15405 (get_earlier_stmt): Likewise.
15406 (get_later_stmt): Likewise.
15407 * tree-vectorizer.c (stmt_vec_info_vec): Make pointer.
15408 (vec_info::vec_info): Allocate stmt_vec_infos and set the global.
15409 (vec_info::~vec_info): Free stmt_vec_infos.
15410 (vectorize_loops): Set the global stmt_vec_info_vec to NULL.
15411 Remove old init_stmt_vec_info_vec/free_stmt_vec_info_vec calls.
15412 (pass_slp_vectorize::execute): Likewise.
15413 * tree-vect-stmts.c (init_stmt_vec_info_vec): Remove.
15414 (free_stmt_vec_info_vec): Likewise.
15415 (set_stmt_vec_info_vec): New function.
15416 (free_stmt_vec_infos): Likewise.
15417 * tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Set
15418 the global stmt_vec_info_vec.
15419 * tree-parloops.c (gather_scalar_reductions): Use
15420 set_stmt_vec_info_vec/free_stmt_vec_infos and maintain a local
15423 2018-05-29 Richard Biener <rguenther@suse.de>
15425 * dominance.c (iterate_fix_dominators): Push/pop TV_DOMINANCE.
15427 2018-05-29 Martin Liska <mliska@suse.cz>
15428 David Malcolm <dmalcolm@redhat.com>
15430 * vec.c (test_reverse): New.
15431 (vec_c_tests): Add new test.
15432 * vec.h (vl_ptr>::reverse): New function.
15434 2018-05-29 Gerald Pfeifer <gerald@pfeifer.com>
15436 * config.gcc: Identify FreeBSD 3.x and 4.x as unsupported.
15438 * config/freebsd-spec.h (FBSD_LIB_SPEC): Only consider FreeBSD 5
15441 2018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
15443 * tree-dump.c (dump_node): Use splay_tree_delete_pointers.
15445 2018-05-28 Richard Biener <rguenther@suse.de>
15447 PR tree-optimization/85933
15448 * tree-vect-data-refs.c (vect_record_base_alignments): Only
15449 look at stmts marked as vectorizable.
15451 2018-05-28 Richard Biener <rguenther@suse.de>
15453 PR tree-optimization/85934
15454 * tree-vect-generic.c (expand_vector_operations_1): Hoist
15455 vector boolean check before scalar optimization.
15457 2018-05-28 Jakub Jelinek <jakub@redhat.com>
15459 * doc/invoke.texi (ARM Options): Use @item instead of @itemx
15462 2018-05-28 Mark Wielaard <mark@klomp.org>
15464 * dwarf2asm.c (dw2_asm_output_delta_uleb128): Add brackets around lab2
15465 if it is an expression containing a minus sign.
15467 2018-05-27 John David Anglin <danglin@gcc.gnu.org>
15469 * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
15471 2018-05-27 Paul Koning <ni1d@arrl.net>
15473 * config/pdp11/pdp11.md (truncsihi2): Remove.
15475 2018-05-27 Monk Chiang <sh.chiang04@gmail.com>
15476 Chung-Ju Wu <jasonwucj@gmail.com>
15478 * config/nds32/nds32-intrinsic.md (unaligned_storedi): Modify patterns
15480 (unaligned_store_dw): Ditto.
15481 * config/nds32/nds32-memory-manipulation.c
15482 (nds32_expand_movmemsi_loop_known_size): Refactoring implementation.
15483 (nds32_gen_dup_4_byte_to_word_value): Rename to ...
15484 (nds32_gen_dup_4_byte_to_word_value_aux): ... this.
15485 (emit_setmem_word_loop): Rename to ...
15486 (emit_setmem_doubleword_loop): ... this.
15487 (nds32_gen_dup_4_byte_to_word_value): New function.
15488 (nds32_gen_dup_8_byte_to_double_word_value): New function.
15489 (nds32_expand_setmem_loop): Refine implementation.
15490 (nds32_expand_setmem_loop_v3m): Ditto.
15491 * config/nds32/nds32-multiple.md (unaligned_store_update_base_dw): New
15494 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
15496 * config/nds32/nds32.md (bswapsi2, bswaphi2): New patterns.
15498 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
15500 * config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
15501 (nds32_init_machine_status): Initialize machine->attr_naked_p and
15502 machine->attr_no_prologue_p.
15503 (nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
15504 (nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
15505 (nds32_expand_epilogue): Consider attr_naked_p.
15506 (nds32_expand_epilogue_v3pop): Likewise.
15507 (nds32_can_use_return_insn): Likewise.
15508 * config/nds32/nds32.h (machine_function): Add attr_naked_p and
15509 attr_no_prologue_p fields.
15510 * config/nds32/nds32.opt (mret-in-naked-func): New option.
15512 2018-05-27 Jakub Jelinek <jakub@redhat.com>
15515 * config/i386/i386.md (fixunssuffix, floatunssuffix): New code
15517 * config/i386/sse.md
15518 (<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>):
15520 (float<floatunssuffix><sseintvecmodelower><mode>2<mask_name><round_name>):
15522 (<floatsuffix>float<sselongvecmodelower><mode>2<mask_name><round_name>):
15524 (float<floatunssuffix><sselongvecmodelower><mode>2<mask_name><round_name>):
15526 (*<floatsuffix>floatv2div2sf2): Rename to ...
15527 (*float<floatunssuffix>v2div2sf2): ... this.
15528 (<floatsuffix>floatv2div2sf2_mask): Rename to ...
15529 (float<floatunssuffix>v2div2sf2_mask): ... this.
15530 (*<floatsuffix>floatv2div2sf2_mask_1): Rename to ...
15531 (*float<floatunssuffix>v2div2sf2_mask_1): ... this.
15532 (<fixsuffix>fix_truncv8dfv8si2<mask_name><round_saeonly_name>): Rename
15534 (fix<fixunssuffix>_truncv8dfv8si2<mask_name><round_saeonly_name>):
15536 (<fixsuffix>fix_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
15538 (fix<fixunssuffix>_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
15540 (<fixsuffix>fix_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
15542 (fix<fixunssuffix>_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
15544 (<fixsuffix>fix_truncv2sfv2di2<mask_name>): Rename to ...
15545 (fix<fixunssuffix>_truncv2sfv2di2<mask_name>): ... this.
15546 (vec_pack_ufix_trunc_<mode>): Use gen_fixuns_truncv8dfv8si2 instead of
15547 gen_ufix_truncv8dfv8si2.
15548 * config/i386/i386-builtin.def (__builtin_ia32_cvttpd2uqq256_mask,
15549 __builtin_ia32_cvttpd2uqq128_mask, __builtin_ia32_cvttps2uqq256_mask,
15550 __builtin_ia32_cvttps2uqq128_mask, __builtin_ia32_cvtuqq2ps256_mask,
15551 __builtin_ia32_cvtuqq2ps128_mask, __builtin_ia32_cvtuqq2pd256_mask,
15552 __builtin_ia32_cvtuqq2pd128_mask, __builtin_ia32_cvttpd2udq512_mask,
15553 __builtin_ia32_cvtuqq2ps512_mask, __builtin_ia32_cvtuqq2pd512_mask,
15554 __builtin_ia32_cvttps2uqq512_mask, __builtin_ia32_cvttpd2uqq512_mask):
15555 Use fixuns instead ufix or floatuns instead ufloat in CODE_FOR_ names.
15557 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
15561 * varasm.c (assemble_alias): Lookup ifunc attribute on error.
15563 2018-05-25 Jim Wilson <jimw@sifive.com>
15565 * config/riscv/riscv-protos.h (riscv_epilogue_uses): New.
15566 * config/riscv/riscv.c (struct machine_function): Add
15567 interrupt_handler_p and attribute_checked_p fields.
15568 (riscv_attribute_table): Add interrupt.
15569 (riscv_interrupt_type_p): New.
15570 (riscv_save_reg_p): Save extra regs for interrupt handler.
15571 (riscv_use_save_libcall): Return false for interrupt handler.
15572 (riscv_first_stack_step): Add forward declaration.
15573 (riscv_compute_frame_info): New local interrupt_save_t1. Set it
15574 for interrupt handler with large frame. Use it for saved reg list.
15575 (riscv_expand_prologue): Move flag_stack_usage_info support to
15576 eliminate duplication.
15577 (riscv_expand_epilogue): Generate mret for interrupt handler.
15578 (riscv_epilogue_uses): New.
15579 (riscv_can_use_return_insn): Return false for interrupt handler.
15580 (riscv_function_ok_for_sibcall): Likewise.
15581 (riscv_set_current_function): Add interrupt handler support.
15582 * config/riscv/riscv.h (EPILOGUE_USES): Call riscv_epilogue_uses.
15583 * config/riscv/riscv.md (UNSPECV_MRET): New.
15585 (riscv_frflags, riscv_fsflags): Use tab after opcode.
15587 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: New.
15589 2018-05-25 Bill Schmidt <wschmidt@linux.ibm.com>
15591 PR tree-optimization/85712
15592 * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
15593 this candidate has already been replaced in-situ by a copy.
15595 2018-05-25 Jason Merrill <jason@redhat.com>
15597 PR c++/80485 - inline function non-zero address.
15598 * symtab.c (nonzero_address): Check DECL_COMDAT.
15600 2018-05-25 Uros Bizjak <ubizjak@gmail.com>
15603 * config/alpha/alpha.md (ashlsi3): New insn pattern.
15604 (*ashlsi_se): Rename from *ashldi_se. Define as sign
15605 extension of SImode operation. Use const123_operand predicate.
15606 (*saddsi_1): Remove.
15607 (*saddl_se_1): Ditto.
15608 (*ssubsi_1): Ditto.
15609 (*ssubl_se_1): Ditto.
15610 * config/alpha/predicates.md (const123_operand): New predicate.
15611 * config/alpha/constraints.md (P): Use IN_RANGE.
15613 2018-05-25 Richard Biener <rguenther@suse.de>
15615 * tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
15617 (ref_maybe_used_by_stmt_p): Likewise.
15618 (stmt_may_clobber_ref_p): Likewise.
15619 (stmt_may_clobber_ref_p_1): Likewise.
15620 * tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
15622 (ref_maybe_used_by_stmt_p): Likewise.
15623 (stmt_may_clobber_ref_p): Likewise.
15624 (stmt_may_clobber_ref_p_1): Likewise.
15625 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
15626 the alias oracle to disambiguate DRs with stmts DR analysis
15628 (vect_analyze_data_refs): Do not give up on not analyzable
15629 DRs for BB vectorization. Remove code truncating the dataref
15632 2018-05-25 Jakub Jelinek <jakub@redhat.com>
15635 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
15636 Add (=Yk,v,C) variant using vptestm insn. Use TARGET_AVX512BW
15637 in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
15639 2018-05-25 Richard Biener <rguenther@suse.de>
15641 * tree-vect-data-refs.c (vect_find_stmt_data_reference): New
15642 function, combining stmt data ref gathering and fatal analysis
15644 (vect_analyze_data_refs): Remove now redudnant code and simplify.
15645 * tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
15646 vect_analyze_loop_2 and use vect_find_stmt_data_reference.
15647 * tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
15648 * tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
15650 2018-05-25 Bin Cheng <bin.cheng@arm.com>
15652 PR tree-optimization/85720
15653 * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
15654 SCC if all partitions are builtins.
15655 (version_loop_by_alias_check): New parameter. Generate cancelable
15656 runtime alias check if all partitions are builtins.
15657 (distribute_loop): Update call to above function.
15659 2018-05-25 Bin Cheng <bin.cheng@arm.com>
15661 * tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
15662 (create_default_def, for_all_parms): Moved from tree-ssa-coalesce.c.
15663 (parm_default_def_partition_arg): Ditto.
15664 (set_parm_default_def_partition): Ditto.
15665 (get_parm_default_def_partitions): Ditto and make it static.
15666 (get_undefined_value_partitions): Ditto and make it static.
15667 (remove_ssa_form): Refactor call to init_var_map here.
15668 * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
15669 computation for loop region.
15670 (coalesce_partitions, compute_optimized_partition_bases): Ditto.
15671 (register_default_def): Delete.
15672 (for_all_parms, create_default_def): Move to tree-outof-ssa.c.
15673 (parm_default_def_partition_arg): Ditto.
15674 (set_parm_default_def_partition): Ditto.
15675 (get_parm_default_def_partitions): Ditto and make it static.
15676 (get_undefined_value_partitions): Ditto and make it static.
15677 (coalesce_with_default, coalesce_with_default): Update comment.
15678 (create_coalesce_list_for_region): New func factored out from
15679 create_outofssa_var_map.
15680 (populate_coalesce_list_for_outofssa): New func factored out from
15681 create_outofssa_var_map and coalesce_ssa_name.
15682 (create_outofssa_var_map): Delete.
15683 (coalesce_ssa_name): Refactor to support live range computation.
15684 * tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
15685 (get_parm_default_def_partitions): Delete.
15686 (get_undefined_value_partitions): Ditto.
15687 * tree-ssa-live.c (init_var_map, delete_var_map): Support live range
15688 computation for loop region.
15689 (new_tree_live_info, loe_visit_block): Ditto.
15690 (live_worklist, set_var_live_on_entry): Ditto.
15691 (calculate_live_on_exit, verify_live_on_entry): Ditto.
15692 * tree-ssa-live.h (struct _var_map): New fields.
15693 (init_var_map): Change decl.
15694 (region_contains_p): New.
15696 2018-05-25 Bin Cheng <bin.cheng@arm.com>
15698 * tree-ssa-live.h (live_merge_and_clear): Delete.
15700 2018-05-25 Richard Biener <rguenther@suse.de>
15703 * tree-dump.c (dequeue_and_dump): Remove access to removed
15704 operand 2 of a SWITCH_EXPR.
15706 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
15708 * doc/sourcebuild.texi (vect_double_cond_arith): Include
15709 multiplication and division.
15710 * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
15711 (cond_udiv@var{m}, cond_umod@var{m}): Document.
15712 * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
15713 (cond_udiv_optab, cond_umod_optab): New optabs.
15714 * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
15715 (IFN_COND_RDIV): New internal functions.
15716 * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
15717 TRUNC_MOD_EXPR and RDIV_EXPR.
15718 * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
15719 * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
15721 (SVE_INT_BINARY): Include mult.
15722 (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
15723 (optab, sve_int_op): Handle mult.
15724 (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
15726 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
15727 for SVE_INT_BINARY_SD.
15729 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
15731 * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
15732 (optab, sve_int_op): Handle div and udiv.
15733 * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
15734 for SVE_INT_BINARY_SD.
15735 (*<optab><mode>3): New insn for the same.
15737 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
15739 * tree-vect-patterns.c: Include predict.h.
15740 (vect_recog_divmod_pattern): Restrict check for division support
15741 to when optimizing for size.
15743 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
15745 * doc/sourcebuild.texi (vect_double_cond_arith: Document.
15746 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
15747 (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
15748 (gimple_match_op::set_op): Likewise.
15749 (gimple_resimplify4): Declare.
15750 * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
15751 (expr::gen_transform): Likewise.
15752 (decision_tree::gen): Generate a simplification routine for 4 operands.
15753 * gimple-match-head.c (gimple_simplify): Add an overload for
15754 4 operands. In the top-level function, handle up to 4 call
15755 arguments and call gimple_resimplify4.
15756 (gimple_resimplify4): New function.
15757 (build_call_internal): Pass a fourth operand.
15758 (maybe_push_to_seq): Likewise.
15759 * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
15760 Fold VEC_COND_EXPRs of an operation and a default value into
15761 an IFN_COND_* function if possible.
15762 * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
15764 (SVE_COND_FP_BINARY): Include them.
15765 (optab, sve_fp_op): Handle them.
15766 (SVE_INT_BINARY_REV): New code iterator.
15767 (SVE_COND_FP_BINARY_REV): New int iterator.
15768 (commutative): New int attribute.
15769 * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
15771 * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
15773 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
15774 (*cond_<optab><mode>): New patterns for reversed operands.
15776 2018-05-25 Richard Biener <rguenther@suse.de>
15778 * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
15779 (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
15780 (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
15781 (STMT_VINFO_GROUPED_ACCESS): Adjust.
15782 * tree-vect-data-refs.c (everywhere): Adjust users.
15783 * tree-vect-loop.c (everywhere): Likewise.
15784 * tree-vect-slp.c (everywhere): Likewise.
15785 * tree-vect-stmts.c (everywhere): Likewise.
15786 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
15788 2018-05-25 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
15790 * configure.ac (gcc_cv_as_section_has_e): Move to common section.
15792 (gcc_cv_as_section_exclude): ... this.
15793 Try Solaris as #exclude syntax.
15794 * configure: Regenerate.
15795 * config.in: Regenerate.
15796 * config/i386/i386.c (i386_solaris_elf_named_section): Handle
15798 * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
15799 [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
15801 * varasm.c (default_elf_asm_named_section): Don't check if
15802 HAVE_GAS_SECTION_EXCLUDE is defined.
15804 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
15806 * doc/md.texi: Update the documentation of the cond_* optabs
15807 to mention the new final operand. Fix GET_MODE_NUNITS call.
15808 Describe the scalar case too.
15809 * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
15810 * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
15812 (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
15813 (get_conditional_internal_fn): Update comment.
15814 * tree-vect-loop.c (vectorizable_reduction): Pass the original
15815 accumulator value as a final argument to conditional functions.
15816 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
15817 a define_expand and add an "else" operand. Assert for now that
15818 the else operand is equal to operand 2. Use SVE_INT_BINARY and
15819 SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
15820 (*cond_<optab><mode>): New patterns.
15821 * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
15822 (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
15823 (UNSPEC_COND_EOR): Delete.
15824 (optab): Remove associated mappings.
15825 (SVE_INT_BINARY): New code iterator.
15826 (sve_int_op): Remove int attribute and add "minus" to the code
15828 (SVE_COND_INT_OP): Delete.
15829 (SVE_COND_FP_OP): Rename to...
15830 (SVE_COND_FP_BINARY): ...this.
15832 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
15834 * optabs.c (can_reuse_operands_p): New function.
15835 (maybe_legitimize_operands): Try to reuse the results for
15838 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
15840 * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
15841 Add {q} suffix to insn mnemonic.
15843 2018-05-23 Jozef Lawrynowicz <jozef.l@mittosystems.com>
15845 * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
15846 (msp430_warn_func_return): New.
15848 2018-05-24 Roger Sayle <roger@nextmovesoftware.com>
15850 * fold-const.c (tree_nonzero_bits): New function.
15851 * fold-const.h (tree_nonzero_bits): Likewise.
15852 * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
15853 friends. POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
15855 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
15859 * varasm.c (assemble_alias): Check ifunc_resolver only on
15862 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
15865 * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
15866 when memory input operand is handled.
15868 2018-05-24 Luis Machado <luis.machado@linaro.org>
15870 * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
15872 (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
15874 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
15876 * match.pd: Delay FMA folds until after vectorization.
15878 2018-05-24 Andre Vieira <andre.simoesdiasvieira@arm.com>
15881 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
15882 address check not strict.
15884 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
15886 * gimple-match.h (gimple_match_op): New class.
15887 (mprts_hook): Replace parameters with a gimple_match_op *.
15888 (maybe_build_generic_op): Likewise.
15889 (gimple_simplified_result_is_gimple_val): Replace parameters with
15890 a const gimple_match_op *.
15891 (gimple_simplify): Replace code_helper * and tree * parameters with
15892 a gimple_match_op * parameter.
15893 (gimple_resimplify1): Replace code_helper *, tree and tree *
15894 parameters with a gimple_match_op * parameter.
15895 (gimple_resimplify2): Likewise.
15896 (gimple_resimplify3): Likewise.
15897 (maybe_push_res_to_seq): Replace code_helper, tree and tree *
15898 parameters with a gimple_match_op * parameter.
15899 * gimple-match-head.c (gimple_simplify): Change prototypes of
15900 auto-generated functions to take a gimple_match_op * instead of
15901 separate code_helper * and tree * parameters. Make the same
15902 change in the top-level overload and update calls to the
15903 gimple_resimplify routines. Update calls to the auto-generated
15904 functions and to maybe_push_res_to_seq in the publicly-facing
15905 operation-specific gimple_simplify overloads.
15906 (gimple_match_op::MAX_NUM_OPS): Define.
15907 (gimple_resimplify1): Replace rcode and ops with a single res_op
15908 parameter. Update call to gimple_simplify.
15909 (gimple_resimplify2): Likewise.
15910 (gimple_resimplify3): Likewise.
15911 (mprts_hook): Replace parameters with a gimple_match_op *.
15912 (maybe_build_generic_op): Likewise.
15913 (build_call_internal): Replace type, nargs and ops with
15914 a gimple_match_op *.
15915 (maybe_push_res_to_seq): Replace res_code, type and ops parameters
15916 with a single gimple_match_op *. Update calls to mprts_hook,
15917 build_call_internal and gimple_simplified_result_is_gimple_val.
15918 Factor out code that is common to the tree_code and combined_fn cases.
15919 * genmatch.c (expr::gen_transform): Replace tem_code and
15920 tem_ops with a gimple_match_op called tem_op. Update calls
15921 to the gimple_resimplify functions and maybe_push_res_to_seq.
15922 (dt_simplify::gen_1): Manipulate res_op instead of res_code and
15923 res_ops. Update call to the gimple_resimplify functions.
15924 (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
15925 (decision_tree::gen): Make the functions take a gimple_match_op *
15926 called res_op instead of separate res_code and res_ops parameters.
15927 Update call accordingly.
15928 * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
15929 and ops with a single res_op parameter. Update calls to
15930 maybe_build_generic_op and maybe_push_res_to_seq.
15931 (fold_stmt_1): Update calls to gimple_simplify and
15932 replace_stmt_with_simplification.
15933 (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
15934 and gimple_simplified_result_is_gimple_val.
15935 * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
15937 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
15938 with a gimple_match_op *.
15939 (vn_nary_build_or_lookup): Likewise. Update call to
15940 vn_nary_build_or_lookup_1.
15941 (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
15942 gimple_match_op *. Update calls to the gimple_resimplify routines
15943 and to gimple_simplified_result_is_gimple_val.
15944 (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
15945 Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
15946 (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
15947 (visit_nary_op): Likewise.
15948 (visit_reference_op_load): Likewise.
15950 2018-05-23 Luis Machado <luis.machado@linaro.org>
15952 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
15953 modifier for printing the step amount.
15955 2018-05-23 Jozef Lawrynowicz <jozef.l@somniumtech.com>
15958 * tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
15961 2018-05-23 Segher Boessenkool <segher@kernel.crashing.org>
15963 * doc/sourcebuild.texi (Endianness): New subsubsection.
15965 2018-05-23 Luis Machado <luis.machado@linaro.org>
15967 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
15968 <prefetch_dynamic_strides>: New const bool field.
15969 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
15970 prefetch_dynamic_strides.
15971 (exynosm1_prefetch_tune): Likewise.
15972 (thunderxt88_prefetch_tune): Likewise.
15973 (thunderx_prefetch_tune): Likewise.
15974 (thunderx2t99_prefetch_tune): Likewise.
15975 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
15977 (aarch64_override_options_internal): Update to set
15978 PARAM_PREFETCH_DYNAMIC_STRIDES.
15979 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
15980 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
15981 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
15982 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
15983 prefetch-dynamic-strides setting.
15985 2018-05-23 Luis Machado <luis.machado@linaro.org>
15987 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
15988 <minimum_stride>: New const int field.
15989 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
15990 minimum_stride field defaulting to -1.
15991 (exynosm1_prefetch_tune): Likewise.
15992 (thunderxt88_prefetch_tune): Likewise.
15993 (thunderx_prefetch_tune): Likewise.
15994 (thunderx2t99_prefetch_tune): Likewise.
15995 (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
15996 <default_opt_level>: Set to 3.
15997 (aarch64_override_options_internal): Update to set
15998 PARAM_PREFETCH_MINIMUM_STRIDE.
15999 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
16000 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
16001 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
16002 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
16003 stride is constant and is below the minimum stride threshold.
16005 2018-05-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16007 * config/arm/arm-cpus.in (mode26): Delete.
16008 (armv4): Delete mode26 reference.
16009 * config/arm/arm.c (arm_configure_build_target): Delete use of
16012 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
16014 * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
16016 (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
16017 Rewrite expander pattern. Emit gen_floatunssi<mode>2_i387_with_xmm
16019 (floatunsdisf2): Rewrite expander pattern. Hanlde TARGET_AVX512F.
16020 (floatunsdidf2): Ditto.
16022 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
16024 * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
16025 (fixuns_trunc<mode>si2_avx512f): Ditto.
16026 (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
16027 (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
16028 Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
16030 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
16032 PR rtl-optimization/79985
16033 * df-scan.c (df_insn_refs_collect): Remove special case for
16034 global registers and asm statements.
16036 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
16038 * extend.texi (Global Register Variables): Rewrite the bullet list.
16039 Note that the register is available for allocation. Note that access
16040 via inline asm must use constraints. Add note about async-signal
16041 handlers. Remove paragraph about automagic register selection.
16043 2018-05-23 Richard Biener <rguenther@suse.de>
16045 * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
16046 of fixed offset from memset VN.
16048 2018-05-23 Bill Schmidt <wschmidt@linux.ibm.com>
16050 * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
16051 first_interp field.
16052 (alloc_cand_and_find_basis): Initialize first_interp field.
16053 (slsr_process_mul): Modify first_interp field.
16054 (slsr_process_add): Likewise.
16055 (slsr_process_cast): Modify first_interp field for each new
16057 (slsr_process_copy): Likewise.
16058 (dump_candidate): Dump first_interp field.
16059 (replace_mult_candidate): Process all interpretations, not just
16061 (replace_rhs_if_not_dup): Likewise.
16062 (replace_one_candidate): Likewise.
16064 2018-05-23 Wilco Dijkstra <wdijkstr@arm.com>
16066 * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
16068 (aarch64_needs_frame_chain): New function.
16069 (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
16071 2018-05-23 Sudakshina Das <sudi.das@arm.com>
16074 * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
16075 Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
16076 * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
16077 * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
16078 as true for strict-align.
16079 (aarch64_can_inline_p): Perform checks even when callee has no
16080 attributes to check for strict alignment.
16081 * doc/extend.texi (AArch64 Function Attributes): Document
16083 * doc/invoke.texi: (AArch64 Options): Likewise.
16085 2018-05-23 Richard Sandiford <richard.sandiford@linaro.org>
16087 PR tree-optimization/85853
16088 * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
16089 the handling of the root of the node to...
16090 (vect_slp_analyze_node_operations_1): ...this new function,
16091 and run the whole thing with the child nodes' def types
16092 set according to their SLP node's def type.
16094 2018-05-23 Richard Biener <rguenther@suse.de>
16096 PR middle-end/85874
16097 * tree-data-ref.c (create_runtime_alias_checks): Defer
16098 and ignore overflow warnings.
16100 2018-05-23 Yury Gribov <tetra2005@gmail.com>
16102 PR tree-optimization/85822
16103 * tree-vrp.c (is_masked_range_test): Fix handling of negative
16106 2018-05-23 Richard Biener <rguenther@suse.de>
16108 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
16109 memset constants via native_interpret_expr.
16111 2018-05-22 H.J. Lu <hongjiu.lu@intel.com>
16114 * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
16116 (cgraph_node::create_alias): Likewise.
16117 (cgraph_node::get_availability): Check ifunc_resolver instead
16118 of looking up ifunc attribute.
16119 * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
16120 * varasm.c (do_assemble_alias): Likewise.
16121 (assemble_alias): Likewise.
16122 (default_binds_local_p_3): Likewise.
16123 * cgraph.h (cgraph_node): Add ifunc_resolver.
16124 (cgraph_node::only_called_directly_or_aliased_p): Return false
16125 for IFUNC resolver.
16126 * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
16128 * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
16129 is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
16130 (symtab_node::binds_to_current_def_p): Check ifunc_resolver
16131 instead of looking up ifunc attribute.
16133 2018-05-22 Luis Machado <luis.machado@linaro.org>
16135 * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
16137 2018-05-22 Martin Sebor <msebor@redhat.com>
16139 PR middle-end/85359
16140 * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
16141 only when expasion succeeds.
16142 (expand_builtin_strcmp): Same.
16143 (expand_builtin_strncmp): Same.
16145 2018-05-22 Martin Sebor <msebor@redhat.com>
16147 * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
16149 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
16150 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16152 * config/aarch64/aarch64-ldpstp.md: Replace uses of
16153 aarch64_mem_pair_operand with memory_operand and delete operand swapping
16155 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
16156 Add check for legitimate_address.
16157 (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
16158 (aarch64_swap_ldrstr_operands): New.
16159 * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
16162 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
16163 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16165 * config/aarch64/aarch64.md: New patterns to generate stp
16167 (store_pair_sw, store_pair_dw): New patterns to generate stp for
16168 single words and double words.
16169 (load_pair_sw, load_pair_dw): Likewise.
16170 (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
16172 (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
16174 * config/aarch64/aarch64-ldpstp.md: Modify peephole
16175 for different mode ldpstp and add peephole for merged zero stores.
16176 Likewise for loads.
16177 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
16179 (aarch64_gen_store_pair): Rename calls to match new patterns.
16180 (aarch64_gen_load_pair): Rename calls to match new patterns.
16181 * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
16182 (load_pair<DREG:mode><DREG2:mode>): ... This.
16183 (store_pair<mode>): Rename to...
16184 (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
16185 * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
16186 New mode iterators.
16187 (V_INT_EQUIV): Handle SImode.
16188 * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
16191 2018-05-22 Martin Sebor <msebor@redhat.com>
16194 * calls.c (maybe_warn_nonstring_arg): Use string length to set
16195 or ajust the presumed bound on an operation to avoid unnecessary
16198 2018-05-22 Martin Sebor <msebor@redhat.com>
16200 PR tree-optimization/85826
16201 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
16202 assuming that a DECL necesarily has a constant size.
16204 2018-05-22 Richard Sandiford <richard.sandiford@linaro.org>
16206 PR middle-end/85862
16207 * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
16209 2018-05-22 Richard Biener <rguenther@suse.de>
16211 PR tree-optimization/85834
16212 * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
16213 non-constant and non-zero memset arguments.
16215 2018-05-22 Martin Liska <mliska@suse.cz>
16218 * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
16220 2018-05-22 Richard Biener <rguenther@suse.de>
16222 PR tree-optimization/85863
16223 * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
16224 comparisons when vectype is specified.
16225 (vectorizable_condition): Do not specify vectype for
16226 vect_is_simple_cond when SLP vectorizing.
16228 2018-05-21 Michael Meissner <meissner@linux.ibm.com>
16231 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
16232 define __ibm128 as long double.
16233 * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
16234 as a distinct type when IEEE 128-bit support is enabled.
16235 (init_float128_ieee): Fix up conversions between IFmode and IEEE
16236 128-bit types to use the correct functions.
16237 (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
16238 convert between 128-bit floating point types that have different
16239 modes but the same representation, instead of using gen_lowpart to
16241 * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
16243 (IFKF_reg): New attributes to give the register constraints for
16245 (extend<mode>tf2_internal): New insns to mark an explicit
16246 conversion between 128-bit floating point types that have a
16247 different mode but share the same representation.
16249 2018-05-21 Richard Sandiford <richard.sandiford@linaro.org>
16251 PR tree-optimization/85814
16252 * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
16253 a null return from get_strinfo when unsharing the next
16254 strinfo in the chain.
16256 2018-05-21 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
16259 * varasm.c (weak_finish): Clean up weak_decls.
16261 2018-05-21 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16263 * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
16264 UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
16265 UNSPEC_UADALP values.
16266 * config/aarch64/iterators.md (ABAL): New int iterator.
16269 (sur): Add mappings for the above.
16270 * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
16272 (aarch64_<sur>abal<mode>_4): Likewise.
16273 (aarch64_<sur>adalp<mode>_3): Likewise.
16274 (<sur>sadv16qi): New define_expand.
16276 2018-05-21 Alexander Nesterovskiy <alexander.nesterovskiy@intel.com>
16278 * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
16279 (*movdf_internal): Ditto.
16280 (*rcpsf2_sse): Ditto.
16281 (*rsqrtsf2_sse): Ditto.
16282 (*sqrt<mode>2_sse): Ditto.
16284 2018-05-21 Tamar Christina <tamar.christina@arm.com>
16286 * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
16288 (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
16289 * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
16290 veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
16291 vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
16293 * config/aarch64/arm_neon.h: Likewise.
16294 * config/aarch64/iterators.md (VQ_I): New.
16296 2018-05-21 Alexey Brodkin <abrodkin@synopsys.com>
16298 * config.gcc: Add arc/t-multilib-linux to tmake_file for
16300 * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
16303 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
16305 * config/nds32/constraints.md (S): New constraint.
16306 * config/nds32/nds32.md (call_internal): Use constraint S.
16307 (call_value_internal): Likewise.
16308 (sibcall_internal): Likewise.
16309 (sibcall_value_internal): Likewise.
16311 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
16312 Chung-Ju Wu <jasonwucj@gmail.com>
16314 * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
16315 into consideration.
16317 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
16318 Chung-Ju Wu <jasonwucj@gmail.com>
16320 * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
16321 (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
16322 (nds32_rtx_costs_impl): Simplify.
16323 (nds32_address_cost_impl): Simplify.
16324 (nds32_init_rtx_costs): New function.
16325 (nds32_rtx_costs_speed_prefer): Likewise.
16326 (nds32_rtx_costs_size_prefer): Likewise.
16327 (nds32_address_cost_speed_prefer): Likewise.
16328 (nds32_address_cost_speed_fwprop): Likewise.
16329 (nds32_address_cost_size_prefer): Likewise.
16330 * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
16331 * config/nds32/nds32.c (nds32_option_override): Use
16332 nds32_init_rtx_costs function.
16334 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
16336 * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
16337 * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
16338 (TARGET_PIPELINE_N8): Likewise.
16339 (TARGET_PIPELINE_N10): Likewise.
16340 (TARGET_PIPELINE_N13): Likewise.
16341 (TARGET_PIPELINE_GRAYWOLF): Likewise.
16343 2018-05-19 Monk Chiang <sh.chiang04@gmail.com>
16345 * config/nds32/nds32-fpu.md: Update copyright year.
16347 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
16349 * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
16351 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
16353 * config/nds32/nds32.c
16354 (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
16355 * config/nds32/nds32.opt (minline-asm-r15): New option.
16357 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
16359 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
16361 * config/nds32/nds32.md (abssi2): New pattern.
16363 2018-05-19 Uros Bizjak <ubizjak@gmail.com>
16365 * config/i386/i386.md (rex64namesuffix): New mode attribute.
16366 * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
16367 Merge insn pattern from sse_cvtsi2ss<round_name> and
16368 sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
16369 (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
16370 from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
16371 using SWI48 mode iterator.
16372 (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
16373 sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
16374 (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
16375 pattern from sse_cvttss2si<round_saeonly_name>
16376 and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
16377 (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
16378 from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
16379 using SWI48 mode iterator.
16380 (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
16381 insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
16382 avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
16383 (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
16384 from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
16385 using SWI48 mode iterator.
16386 (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
16387 insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
16388 avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
16389 (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
16390 sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
16391 SWI48 mode iterator.
16392 (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
16393 sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
16394 (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
16395 pattern from sse_cvttsd2si<round_saeonly_name>
16396 and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
16398 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
16400 * config/nds32/nds32-md-auxiliary.c
16401 (nds32_valid_smw_lwm_base_p): Refine.
16402 (nds32_output_smw_single_word): Refine.
16403 (nds32_output_smw_double_word): New.
16404 * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
16406 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
16408 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
16409 (nds32_output_stack_pop): Refine.
16410 (nds32_expand_unaligned_load): Refine.
16411 (nds32_expand_unaligned_store): Refine.
16413 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
16414 Chung-Ju Wu <jasonwucj@gmail.com>
16416 * config/nds32/constants.md: Add TP_REGNUM constant.
16417 (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
16418 UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
16420 * config/nds32/nds32-doubleword.md: Consider flag_pic.
16421 * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
16422 * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
16423 * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
16424 and PIC code generation.
16425 * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
16427 * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
16429 * config/nds32/nds32.md: Support TLS and PIC.
16430 * config/nds32/nds32.c: Support TLS and PIC.
16431 * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
16432 * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
16435 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
16437 * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
16438 mode with E_ prefix.
16440 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
16441 Chung-Ju Wu <jasonwucj@gmail.com>
16443 * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
16444 * config/nds32/nds32-md-auxiliary.c
16445 (symbolic_reference_mentioned_p): New.
16446 (nds32_legitimize_ict_address): New.
16447 (nds32_expand_ict_move): New.
16448 (nds32_indirect_call_referenced_p): New.
16449 (nds32_symbol_binds_local_p): Delete.
16450 (nds32_long_call_p): Modify.
16451 * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
16452 * config/nds32/nds32-protos.h
16453 (symbolic_reference_mentioned_p): Declare.
16454 (nds32_legitimize_ict_address): Declare.
16455 (nds32_expand_ict_move): Declare.
16456 (nds32_indirect_call_referenced_p): Declare.
16457 * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
16458 (nds32_relax_group): Use nds32_ict_const_p as condition.
16459 * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
16460 (nds32_asm_file_start): Output ict_model directive in asm code.
16461 (nds32_legitimate_address_p): Consider indirect call.
16462 (nds32_print_operand): Consider indirect call.
16463 (nds32_print_operand_address): Consider indirect call.
16464 (nds32_insert_attributes): Handle "indirect_call" attribute.
16465 (TARGET_LEGITIMATE_ADDRESS_P): Define.
16466 (TARGET_LEGITIMATE_CONSTANT_P): Define.
16467 (TARGET_CANNOT_FORCE_CONST_MEM): Define.
16468 (TARGET_DELEGITIMIZE_ADDRESS): Define.
16469 (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
16470 * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
16471 (TARGET_ICT_MODEL_SMALL): Define.
16472 (TARGET_ICT_MODEL_LARGE): Define.
16473 * config/nds32/nds32.md (movsi): Consider ict model.
16474 (call, call_value): Consider ict model.
16475 (sibcall, sibcall_value): Consider ict model.
16476 * config/nds32/nds32.opt (mict-model): New option.
16477 * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
16480 2018-05-18 Kito Cheng <kito.cheng@gmail.com>
16481 Monk Chiang <sh.chiang04@gmail.com>
16482 Jim Wilson <jimw@sifive.com>
16484 * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
16485 Add support to parse rv32e*. Clear MASK_RVE for rv32i and rv64i.
16486 * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
16487 * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
16488 __riscv_32e when TARGET_RVE. Handle ABI_ILP32E as soft-float ABI.
16489 * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
16490 * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
16491 compute save_libcall_adjustment properly.
16492 (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
16493 (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
16494 * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
16495 (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
16496 (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
16497 (ABI_SPEC): Handle mabi=ilp32e.
16498 * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
16499 (RVE): Add RVE mask.
16500 * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
16501 <-march>: Add rv32e as an example.
16503 2018-05-18 Marc Glisse <marc.glisse@inria.fr>
16506 * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
16507 (intra_create_variable_infos): Handle C++ constructors.
16509 2018-05-18 Martin Liska <mliska@suse.cz>
16511 * passes.def: Remove a redundant pass.
16513 2018-05-18 Eric Botcazou <ebotcazou@adacore.com>
16516 * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
16518 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16520 * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
16522 (ARMv2, ARMv3, ARMv3m): Delete fgroups.
16524 (armv2, armv2a, armv3, armv3m): Delete architectures.
16525 (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
16526 arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
16527 arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
16529 * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
16530 (*mulsidi3adddi): Likewise.
16531 (mulsidi3): Likewise.
16532 (*mulsidi3_nov6): Likewise.
16533 (umulsidi3): Likewise.
16534 (umulsidi3_nov6): Likewise.
16535 (umaddsidi4): Likewise.
16536 (*umulsidi3adddi): Likewise.
16537 (smulsi3_highpart): Likewise.
16538 (*smulsi3_highpart_nov6): Likewise.
16539 (umulsi3_highpart): Likewise.
16540 (*umulsi3_highpart_nov6): Likewise.
16541 * config/arm/arm.h (arm_arch3m): Delete.
16542 * config/arm/arm.c (arm_arch3m): Delete.
16543 (arm_option_override_internal): Update armv3-related comment.
16544 (arm_configure_build_target): Delete use of isa_bit_mode32.
16545 (arm_option_reconfigure_globals): Delete set of arm_ach3m.
16546 (arm_rtx_costs_internal): Delete check of arm_arch3m.
16547 * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
16548 (mulsa3): Likewise.
16549 (mulusa3): Likewise.
16550 * config/arm/arm-protos.h (arm_arch3m): Delete.
16551 * config/arm/arm-tables.opt: Regenerate.
16552 * config/arm/arm-tune.md: Likewise.
16553 * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
16554 deleted architectures.
16556 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16558 * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
16559 (armv5t, armv5te): New features.
16560 (ARMv5, ARMv5e): Delete fgroups.
16561 (ARMv5t, ARMv5te): Adjust for above changes.
16562 (ARMv6m): Likewise.
16563 (armv5, armv5e): Delete arches.
16564 * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
16566 (*call_reg_arm): Likewise.
16567 (*call_value_reg_armv5): Likewise.
16568 (*call_value_reg_arm): Likewise.
16569 (*call_symbol): Likewise.
16570 (*call_value_symbol): Likewise.
16571 (*sibcall_insn): Likewise.
16572 (*sibcall_value_insn): Likewise.
16573 (clzsi2): Likewise.
16574 (prefetch): Likewise.
16575 (define_split and define_peephole2 dependent on arm_arch5):
16577 * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
16579 (TARGET_ARM_QBIT): Likewise.
16580 (TARGET_DSP_MULTIPLY): Likewise.
16581 (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
16582 (arm_arch5, arm_arch5e): Delete.
16583 (arm_arch5t, arm_arch5te): Declare.
16584 * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
16585 (arm_arch5t): Declare.
16586 (arm_option_reconfigure_globals): Update for the above.
16587 (arm_options_perform_arch_sanity_checks): Update comment, replace
16588 use of arm_arch5 with arm_arch5t.
16589 (use_return_insn): Likewise.
16590 (arm_emit_call_insn): Likewise.
16591 (output_return_instruction): Likewise.
16592 (arm_final_prescan_insn): Likewise.
16593 (arm_coproc_builtin_available): Likewise.
16594 * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
16595 arm_arch5e with arm_arch5t and arm_arch5te.
16596 * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
16597 (arm_arch5t, arm_arch5te): Declare.
16598 * config/arm/arm-tables.opt: Regenerate.
16599 * config/arm/t-arm-elf: Remove references to armv5, armv5e.
16600 * config/arm/t-multilib: Likewise.
16601 * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
16602 instead of arm_arch5.
16603 (*call_reg_thumb1): Likewise.
16604 (*call_value_reg_thumb1_v5): Likewise.
16605 (*call_value_reg_thumb1): Likewise.
16606 * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
16608 * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
16610 2018-05-18 Martin Liska <mliska@suse.cz>
16612 PR gcov-profile/84846
16613 * doc/gcov.texi: Document -t option of gcov tool.
16615 2018-05-18 Martin Liska <mliska@suse.cz>
16617 PR gcov-profile/84846
16618 * gcov.c (print_usage): Add new -t option.
16619 (process_args): Handle the option.
16620 (generate_results): Use stdout as output when requested by
16623 2018-05-18 Martin Liska <mliska@suse.cz>
16625 PR gcov-profile/84846
16626 * coverage.c (coverage_init): Write PWD to .gcno file.
16627 * doc/gcov.texi: Document how working directory is printed.
16628 * gcov-dump.c (dump_gcov_file): Print PWD.
16629 * gcov.c (output_intermediate_file): Likewise.
16630 (read_graph_file): Read PWD string.
16631 (output_lines): Print PWD.
16633 2018-05-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
16635 PR middle-end/85817
16636 * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
16637 for retval and return false if all args to phi are zero.
16639 2018-05-18 Richard Biener <rguenther@suse.de>
16641 * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
16643 (evrp_dom_walker::before_dom_children): Call it.
16645 2018-05-18 Richard Biener <rguenther@suse.de>
16647 * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
16648 results when processing array refs with variable index.
16650 2018-05-18 Toon Moene <toon@moene.org>
16652 * doc/invoke.texi: Move -floop-unroll-and-jam documentation
16653 directly after that of -floop-interchange. Indicate that both
16654 options are enabled by default when specifying -O3.
16656 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16658 * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
16659 iterator. Delete separate integer-mode vec_set<mode> expander.
16660 (aarch64_simd_vec_setv2di): Delete.
16661 (vec_setv2di): Delete.
16662 (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
16663 Use VALL_F16 mode iterator. Add LD1 alternative and use vwcore for
16664 the "w, r" alternative.
16666 2018-05-18 Martin Liska <mliska@suse.cz>
16668 * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
16669 * tree-pass.h (make_pass_lower_switch_O0): New function.
16670 * tree-switch-conversion.c (node_has_low_bound): Remove.
16671 (node_has_high_bound): Likewise.
16672 (node_is_bounded): Likewise.
16673 (class pass_lower_switch): Make it a template type and create
16675 (pass_lower_switch::execute): Add template argument.
16676 (make_pass_lower_switch): New function.
16677 (make_pass_lower_switch_O0): New function.
16678 (do_jump_if_equal): Remove.
16679 (emit_case_nodes): Simplify to just handle all 3 cases and leave
16680 all the hard work to tree optimization passes.
16682 2018-05-18 Martin Liska <mliska@suse.cz>
16684 * dbgcnt.c (limit_low): Renamed from limit.
16685 (limit_high): New variable.
16686 (dbg_cnt_is_enabled): Check for upper limit.
16687 (dbg_cnt): Adjust dumping.
16688 (dbg_cnt_set_limit_by_index): Add new argument for high
16690 (dbg_cnt_set_limit_by_name): Likewise.
16691 (dbg_cnt_process_single_pair): Parse new format.
16692 (dbg_cnt_process_opt): Use strtok.
16693 (dbg_cnt_list_all_counters): Remove 'value' and add
16695 * doc/invoke.texi: Document changes.
16697 2018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
16699 * doc/sourcebuild.texi (scalar_all_fma): Document.
16700 * tree.def (FMA_EXPR): Delete.
16701 * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
16702 * internal-fn.c (ternary_direct): New macro.
16703 (expand_ternary_optab_fn): Likewise.
16704 (direct_ternary_optab_supported_p): Likewise.
16705 * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
16706 * builtins.c (fold_builtin_fma): Delete.
16707 (fold_builtin_3): Don't call it.
16708 * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
16709 * expr.c (expand_expr_real_2): Likewise.
16710 * fold-const.c (operand_equal_p): Likewise.
16711 (fold_ternary_loc): Likewise.
16712 * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
16713 * gimple.c (DEFTREECODE): Likewise.
16714 * gimplify.c (gimplify_expr): Likewise.
16715 * optabs-tree.c (optab_for_tree_code): Likewise.
16716 * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
16717 * tree-eh.c (operation_could_trap_p): Likewise.
16718 (stmt_could_throw_1_p): Likewise.
16719 * tree-inline.c (estimate_operator_cost): Likewise.
16720 * tree-pretty-print.c (dump_generic_node): Likewise.
16721 (op_code_prio): Likewise.
16722 * tree-ssa-loop-im.c (stmt_cost): Likewise.
16723 * tree-ssa-operands.c (get_expr_operands): Likewise.
16724 * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
16725 * fold-const-call.h (fold_fma): Delete.
16726 * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
16727 CFN_FNMA and CFN_FNMS.
16728 (fold_fma): Delete.
16729 * genmatch.c (combined_fn): New enum.
16730 (commutative_ternary_tree_code): Remove FMA_EXPR handling.
16731 (commutative_op): New function.
16732 (commutate): Use it. Handle more than 2 operands.
16733 (dt_operand::gen_gimple_expr): Use commutative_op.
16734 (parser::parse_expr): Allow :c to be used with non-binary
16735 operators if the commutative operand is known.
16736 * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
16737 CFN_FMS, CFN_FNMA and CFN_FNMS.
16738 (backprop::process_assign_use): Remove FMA_EXPR handling.
16739 * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
16740 (gen_hsa_fma): New function.
16741 (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
16742 IFN_FNMA and IFN_FNMS.
16743 * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
16744 * gimple-fold.h (follow_all_ssa_edges): Declare.
16745 * gimple-fold.c (follow_all_ssa_edges): New function.
16746 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
16747 gimple_build interface and use follow_all_ssa_edges to fold the result.
16748 (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
16749 instead of checking for optabs directly.
16750 * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
16751 rather than FMA_EXPRs.
16752 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
16753 call to IFN_FMA instead of an FMA_EXPR.
16755 2018-05-17 Jim Wilson <jimw@sifive.com>
16757 * expr.c (do_tablejump): When converting index to Pmode, if we have a
16758 sign extended promoted subreg, and the range does not have the sign bit
16759 set, then do a sign extend.
16761 * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
16762 test, check for sign extended subreg and/or constant operands, and
16763 do a sign extend in that case.
16765 2018-05-17 Steve Ellcey <sellcey@cavium.com>
16767 * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
16768 (thunderx2t99_multiple): Delete psuedo-units from used cpus.
16770 (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
16771 Change logics_shift_reg to logics_shift_imm.
16772 (thunderx2t99_fp_loadpair_basic): Delete.
16773 (thunderx2t99_fp_storepair_basic): Delete.
16774 (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
16775 (thunderx2t99_asimd_polynomial): Delete.
16776 (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
16777 and neon_fp_mul_d_scalar_q.
16778 (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
16779 (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
16780 (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
16781 (thunderx2t99_asimd_lut): Add missing tbl types.
16782 (thunderx2t99_asimd_ext): Delete.
16783 (thunderx2t99_asimd_load1_1_mult): Delete.
16784 (thunderx2t99_asimd_load1_2_mult): Delete.
16785 (thunderx2t99_asimd_load1_ldp): New.
16786 (thunderx2t99_asimd_load1): New.
16787 (thunderx2t99_asimd_load2): Add missing *load2* types.
16788 (thunderx2t99_asimd_load3): New.
16789 (thunderx2t99_asimd_load4): New.
16790 (thunderx2t99_asimd_store1_1_mult): Delete.
16791 (thunderx2t99_asimd_store1_2_mult): Delete.
16792 (thunderx2t99_asimd_store2_mult): Delete.
16793 (thunderx2t99_asimd_store2_onelane): Delete.
16794 (thunderx2t99_asimd_store_stp): New.
16795 (thunderx2t99_asimd_store1): New.
16796 (thunderx2t99_asimd_store2): New.
16797 (thunderx2t99_asimd_store3): New.
16798 (thunderx2t99_asimd_store4): New.
16800 2018-05-17 Jerome Lambourg <lambourg@adacore.com>
16802 * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
16803 #include <stdint.h>. Replace intptr_t with __INTPTR_TYPE__.
16805 2018-05-17 Pat Haugen <pthaugen@us.ibm.com>
16806 Segher Boessenkool <segher@kernel.crashing.org>
16809 * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
16812 2018-05-17 Richard Biener <rguenther@suse.de>
16814 * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
16815 for pruning loop and prune defs feeding only already visited PHIs.
16817 2018-05-17 Richard Biener <rguenther@suse.de>
16819 * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
16821 2018-05-17 Bin Cheng <bin.cheng@arm.com>
16822 Richard Biener <rguenther@suse.de>
16824 PR tree-optimization/85793
16825 * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
16826 for VMAT_ELEMENTWISE.
16828 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
16830 * internal-fn.h (lookup_internal_fn): Declare
16831 * internal-fn.c (lookup_internal_fn): New function.
16832 * gimple.c (gimple_build_call_from_tree): Handle calls to
16833 internal functions.
16834 * gimple-pretty-print.c (dump_gimple_call): Print "." before
16835 internal function names.
16836 * tree-pretty-print.c (dump_generic_node): Likewise.
16837 * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
16839 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
16841 * gimple-fold.h (gimple_build): Make the function forms take
16842 combined_fn rather than built_in_function.
16843 (gimple_simplify): Likewise.
16844 * gimple-match-head.c (gimple_simplify): Likewise.
16845 * gimple-fold.c (gimple_build): Likewise.
16846 * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
16847 rather than gimple_build_call_internal.
16848 (get_initial_defs_for_reduction): Likewise.
16849 (vect_create_epilog_for_reduction): Likewise.
16850 (vectorizable_live_operation): Likewise.
16852 2018-05-17 Martin Liska <mliska@suse.cz>
16854 * gimple-ssa-sprintf.c (format_directive): Do not use
16855 space in between 'G_' and '('.
16857 2018-05-17 Jakub Jelinek <jakub@redhat.com>
16860 * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
16861 even if the mask is not all ones.
16864 * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
16866 (ix86_gimple_fold_builtin): Likewise.
16869 * config/i386/i386.c: Include tree-vector-builder.h.
16870 (ix86_vector_shift_count): New function.
16871 (ix86_fold_builtin): Fold shift builtins by scalar count.
16872 (ix86_gimple_fold_builtin): Likewise.
16874 * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
16875 _mm512_setzero): New intrinsics.
16877 2018-05-17 James Greenhalgh <james.greenhalgh@arm.com>
16878 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16880 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
16881 code generation for cases where splatting a value is not useful.
16882 * simplify-rtx.c (simplify_ternary_operation): Simplify
16883 vec_merge across a vec_duplicate and a paradoxical subreg forming
16884 a vector mode to a vec_concat.
16886 2018-05-17 Olga Makhotina <olga.makhotina@intel.com>
16888 * config.gcc: Support "goldmont-plus".
16889 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
16891 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
16892 PROCESSOR_GOLDMONT_PLUS.
16893 * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
16894 (processor_target_table): Add "goldmont-plus".
16895 (PTA_GOLDMONT_PLUS): Define.
16896 (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
16897 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
16898 (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
16899 (fold_builtin_cpu): Add "goldmont-plus".
16900 (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
16901 (ix86_option_override_internal): Add "goldmont-plus".
16902 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
16903 (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
16904 * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
16905 * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
16907 2018-05-17 Richard Biener <rguenther@suse.de>
16909 PR tree-optimization/85757
16910 * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
16911 remove defs that only feed that PHI from further processing.
16913 2018-05-16 Jim Wilson <jimw@sifive.com>
16915 * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
16917 (<optab>di3_mask, <optab>di3_mask_1): Likewise.
16919 2018-05-16 Mark Wielaard <mark@klomp.org>
16921 * dwarf2out.c (count_index_strings): New function.
16922 (output_indirect_strings): Call count_index_strings and generate
16923 header for dwarf_version >= 5.
16925 2018-05-16 Mark Wielaard <mark@klomp.org>
16927 * dwarf2out.c (dwarf_FORM): New function.
16928 (set_indirect_string): Use dwarf_FORM.
16929 (reset_indirect_string): Likewise.
16930 (size_of_die): Likewise.
16931 (value_format): Likewise.
16932 (output_die): Likewise.
16933 (add_skeleton_AT_string): Likewise.
16934 (output_macinfo_op): Likewise.
16935 (index_string): Likewise.
16936 (output_index_string_offset): Likewise.
16937 (output_index_string): Likewise.
16938 (count_index_strings): Likewise.
16940 2018-05-16 Carl Love <cel@us.ibm.com>
16942 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
16943 dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
16945 2018-05-16 Martin Jambor <mjambor@suse.cz>
16947 * ipa-prop.c (ipa_free_all_edge_args): Remove.
16948 * ipa-prop.h (ipa_free_all_edge_args): Likewise.
16950 2018-05-16 Wilco Dijkstra <wdijkstr@arm.com>
16952 * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
16953 (fnma<mode>4): Likewise.
16954 (fms<mode>4): Likewise.
16955 (fnms<mode>4): Likewise.
16956 (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
16957 (aarch64_fnma<mode>4): Likewise.
16958 (aarch64_fms<mode>4): Likewise.
16959 (aarch64_fnms<mode>4): Likewise.
16960 (aarch64_fnmadd<mode>4): Likewise.
16962 2018-05-16 Jason Merrill <jason@redhat.com>
16964 * tree.c (warn_deprecated_use): Return bool. Simplify logic.
16966 2018-05-16 Richard Biener <rguenther@suse.de>
16968 * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
16969 (dump_stmt_cost): Declare.
16970 (add_stmt_cost): Dump cost we add.
16971 (add_stmt_costs): New function.
16972 (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
16973 No longer exported.
16974 (vect_analyze_stmt): Adjust prototype.
16975 (vectorizable_condition): Likewise.
16976 (vectorizable_live_operation): Likewise.
16977 (vectorizable_reduction): Likewise.
16978 (vectorizable_induction): Likewise.
16979 * tree-vect-loop.c (vect_analyze_loop_operations): Create local
16980 cost vector to pass to vectorizable_ and record afterwards.
16981 (vect_model_reduction_cost): Take cost vector argument and adjust.
16982 (vect_model_induction_cost): Likewise.
16983 (vectorizable_reduction): Likewise.
16984 (vectorizable_induction): Likewise.
16985 (vectorizable_live_operation): Likewise.
16986 * tree-vect-slp.c (vect_create_new_slp_node): Initialize
16987 SLP_TREE_NUMBER_OF_VEC_STMTS.
16988 (vect_analyze_slp_cost_1): Remove.
16989 (vect_analyze_slp_cost): Likewise.
16990 (vect_slp_analyze_node_operations): Take visited args and
16991 a target cost vector. Avoid processing already visited stmt sets.
16992 (vect_slp_analyze_operations): Use a local cost vector to gather
16993 costs and register those of non-discarded instances.
16994 (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
16995 (vect_schedule_slp_instance): Remove copying of
16996 SLP_TREE_NUMBER_OF_VEC_STMTS. Instead assert that it is not
16998 * tree-vect-stmts.c (record_stmt_cost): Remove path directly
16999 adding cost. Record cost entry location.
17000 (vect_prologue_cost_for_slp_op): Function to compute cost of
17001 a constant or invariant generated for SLP vect in the prologue,
17002 split out from vect_analyze_slp_cost_1.
17003 (vect_model_simple_cost): Make static. Adjust for SLP costing.
17004 (vect_model_promotion_demotion_cost): Likewise.
17005 (vect_model_store_cost): Likewise, make static.
17006 (vect_model_load_cost): Likewise.
17007 (vectorizable_bswap): Add cost vector arg and adjust.
17008 (vectorizable_call): Likewise.
17009 (vectorizable_simd_clone_call): Likewise.
17010 (vectorizable_conversion): Likewise.
17011 (vectorizable_assignment): Likewise.
17012 (vectorizable_shift): Likewise.
17013 (vectorizable_operation): Likewise.
17014 (vectorizable_store): Likewise.
17015 (vectorizable_load): Likewise.
17016 (vectorizable_condition): Likewise.
17017 (vectorizable_comparison): Likewise.
17018 (can_vectorize_live_stmts): Likewise.
17019 (vect_analyze_stmt): Likewise.
17020 (vect_transform_stmt): Adjust calls to vectorizable_*.
17021 * tree-vectorizer.c: Include gimple-pretty-print.h.
17022 (dump_stmt_cost): New function.
17024 2018-05-16 Richard Biener <rguenther@suse.de>
17026 * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
17027 * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
17028 * tree-ssa-dse.c: Include tree-ssa-loop.h.
17029 (check_name): New callback.
17030 (dse_classify_store): Track cycles via a visited bitmap of PHI
17031 defs and simplify handling of in-loop and across loop dead stores
17032 and properly fail for loop-variant refs. Handle byte-tracking with
17033 multiple defs. Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
17036 2018-05-16 Richard Sandiford <richard.sandiford@linaro.org>
17038 * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
17039 (vect_get_mask_type_for_stmt): Likewise.
17040 * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
17042 (vect_build_slp_tree_1): ...here. Use vect_get_vector_types_for_stmt
17043 to determine the statement's vector type and the vector type that
17044 should be used for calculating nunits. Deal with cases in which
17045 the type has to be deferred.
17046 (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
17047 and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
17048 * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
17049 (vect_determine_vf_for_stmt): New functions, split out from...
17050 (vect_determine_vectorization_factor): ...here.
17051 * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
17052 (vect_get_mask_type_for_stmt): New functions, split out from
17053 vect_determine_vectorization_factor.
17055 2018-05-16 Richard Biener <rguenther@suse.de>
17057 * tree-cfg.c (verify_gimple_assign_ternary): Properly
17058 verify the [VEC_]COND_EXPR embedded comparison.
17060 2018-05-15 Martin Sebor <msebor@redhat.com>
17062 PR tree-optimization/85753
17063 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
17064 RECORD_TYPE in addition to ARRAY_TYPE.
17066 2018-05-15 Martin Sebor <msebor@redhat.com>
17068 PR middle-end/85643
17069 * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
17071 2018-05-15 Richard Biener <rguenther@suse.de>
17073 * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
17074 add by_clobber_p one. Change algorithm to collect all defs
17075 representing uses we need to walk and try reducing them to
17076 a single one before failing.
17077 (dse_dom_walker::dse_optimize_stmt): Adjust.
17079 2018-05-13 Mark Wielaard <mark@klomp.org>
17081 * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
17082 (size_of_loc_descr): Likewise.
17083 (output_loc_operands): Likewise.
17084 (output_loc_operands_raw): Likewise.
17085 (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
17086 (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
17087 (hash_loc_operands): Likewise.
17088 (compare_loc_operands): Likewise.
17090 2018-05-14 Mark Wielaard <mark@klomp.org>
17092 * dwarf2out.c (count_index_addrs): New function.
17093 (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
17095 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
17097 PR tree-optimization/83648
17098 * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
17099 return value as malloc candidate.
17101 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
17104 * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite
17105 param as true in call to suggest_attribute.
17107 2018-05-14 Segher Boessenkool <segher@kernel.crashing.org>
17109 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
17110 -mreadonly-in-sdata.
17112 2018-05-14 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
17114 * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
17116 (aarch64_crypto_aesd_fused): Likewise.
17118 2018-05-14 Wilco Dijkstra <wdijkstr@arm.com>
17120 * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
17121 (movsi_aarch64): Likewise.
17122 (load_pairsi): Likewise.
17123 (load_pairdi): Likewise.
17124 (store_pairsi): Likewise.
17125 (store_pairdi): Likewise.
17126 (load_pairsf): Likewise.
17127 (load_pairdf): Likewise.
17128 (store_pairsf): Likewise.
17129 (store_pairdf): Likewise.
17130 (zero_extend): Likewise.
17131 (trunc): Swap alternatives.
17132 (fcvt_target): Add '?' to prefer w over r.
17134 2018-05-14 Jakub Jelinek <jakub@redhat.com>
17137 * config/i386/i386.md: Disallow non-commutative arithmetics in
17138 last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
17139 optimization. Use COMMUTATIVE_ARITH_P test rather than != MINUS
17140 in the peephole2 before it.
17142 2018-05-14 Sebastian Peryt <sebastian.peryt@intel.com>
17144 * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
17145 OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
17146 (ix86_handle_option): Handle -mcldemote.
17147 * config.gcc: New header.
17148 * config/i386/cldemoteintrin.h: New file.
17149 * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
17150 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
17152 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
17153 OPTION_MASK_ISA_CLDEMOTE.
17154 * config/i386/i386.c (ix86_target_string): Add -mcldemote.
17155 (ix86_valid_target_attribute_inner_p): Ditto.
17156 (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
17157 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
17158 (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
17159 * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
17160 * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
17162 * config/i386/i386.opt: Add -mcldemote.
17163 * config/i386/x86intrin.h: New header.
17164 * doc/invoke.texi: Add -mcldemote.
17166 2018-05-14 Richard Biener <rguenther@suse.de>
17168 * doc/match-and-simplify.texi: Adjust :s documentation.
17170 2018-05-14 Alexander Monakov <amonakov@ispras.ru>
17172 * sort.cc (REORDER_23): Pass the type for the temporaries instead of
17173 intended memcpy size.
17174 (REORDER_45): Likewise.
17176 2018-05-13 Alexander Monakov <amonakov@ispras.ru>
17178 * sort.cc: New file.
17179 * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
17180 * vec.c (qsort_chk): Use gcc_qsort.
17181 * Makefile.in (OBJS-libcommon): Add sort.o.
17182 (build/sort.o): New target. Use it...
17183 (BUILD_RTL): ... here, and...
17184 (build/gencfn-macros): ... here, and...
17185 (build/genmatch): ... here.
17187 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
17188 Chung-Ju Wu <jasonwucj@gmail.com>
17190 * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
17191 * config/nds32/nds32-graywolf.md: New file.
17192 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
17193 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
17195 * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
17196 * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
17197 * config/nds32/nds32.md (pipeline_model): Add graywolf.
17198 * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
17199 * config/nds32/pipelines.md: Include n15 settings.
17201 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
17202 Chung-Ju Wu <jasonwucj@gmail.com>
17204 * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
17205 * config/nds32/nds32-n13.md: New file.
17206 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
17207 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
17209 * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
17210 * config/nds32/nds32.md (pipeline_model): Add n13.
17211 * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
17212 * config/nds32/pipelines.md: Include n13 settings.
17214 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
17215 Chung-Ju Wu <jasonwucj@gmail.com>
17217 * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
17218 * config/nds32/nds32-n10.md: New file.
17219 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
17220 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
17222 * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
17223 * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
17224 * config/nds32/nds32.md (pipeline_model): Add n10.
17225 * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
17226 * config/nds32/pipelines.md: Include n10 settings.
17228 2018-05-13 Monk Chiang <sh.chiang04@gmail.com>
17229 Kito Cheng <kito.cheng@gmail.com>
17230 Chung-Ju Wu <jasonwucj@gmail.com>
17232 * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
17233 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
17234 Add enum values for DSP extension instructions.
17235 * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
17237 * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
17238 sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
17239 New code iterators.
17240 (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
17241 * config/nds32/nds32-dspext.md: New file for DSP implementation.
17242 * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
17243 * config/nds32/nds32-intrinsic.md: Likewise.
17244 * config/nds32/nds32_intrinsic.h: Likewise.
17245 * config/nds32/nds32-md-auxiliary.c: Likewise.
17246 * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
17247 * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
17248 (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
17249 (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
17250 * config/nds32/nds32-protos.h: New declarations for DSP extension.
17251 * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
17252 TYPE_DMAC in switch statement.
17253 * config/nds32/nds32.c: New checking and implementation for DSP
17254 extension instructions.
17255 * config/nds32/nds32.h: Likewise.
17256 * config/nds32/nds32.md: Likewise.
17257 * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
17258 * config/nds32/predicates.md: Implement new predicates for DSP
17261 2018-05-11 Michael Meissner <meissner@linux.vnet.ibm.com>
17263 * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
17264 Reformat alternatives and attributes so it is easier to identify
17265 which constraints/attributes go with which instruction.
17266 (mov<mode>_hardfloat32, FMOVE64): Likewise.
17267 (mov<mode>_softfloat32, FMOVE64): Likewise.
17268 (mov<mode>_hardfloat64, FMOVE64): Likewise.
17269 (mov<mode>_softfloat64, FMOVE64): Likewise.
17271 2018-05-11 Kelvin Nilsen <kelvin@gcc.gnu.org>
17273 * doc/extend.texi (PowerPC Built-in Functions): Rename this
17275 (Basic PowerPC Built-in Functions): The new name of the
17276 subsection previously known as "PowerPC Built-in Functions".
17277 (Basic PowerPC Built-in Functions Available on all Configurations):
17279 (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
17280 (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
17281 (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
17282 (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
17284 2018-05-11 Martin Jambor <mjambor@suse.cz>
17287 * ipa-cp.c (intersect_with_plats): Check that the lattice contains
17290 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
17293 * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
17295 2018-05-11 Sebastian Peryt <sebastian.peryt@intel.com>
17297 * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
17298 OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
17299 (ix86_handle_option): Handle -mwaitpkg.
17300 * config.gcc: New header.
17301 * config/i386/cpuid.h (bit_WAITPKG): New bit.
17302 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
17303 * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
17305 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
17306 OPTION_MASK_ISA_WAITPKG.
17307 * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
17308 (ix86_option_override_internal): Add PTA_WAITPKG.
17309 (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
17310 (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
17311 IX86_BUILTIN_TPAUSE.
17312 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
17313 __builtin_ia32_umwait and __builtin_ia32_tpause.
17314 (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
17315 IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
17316 * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
17317 * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
17318 UNSPECV_TPAUSE): New.
17319 (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
17320 * config/i386/i386.opt: Add -mwaitpkg.
17321 * config/i386/waitpkgintrin.h: New file.
17322 * config/i386/x86intrin.h: New header.
17323 * doc/invoke.texi: Add -mwaitpkg.
17325 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
17328 * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
17330 (cortex-m0): Use armv6s-m isa.
17331 (cortex-m0plus): Likewise.
17332 (cortex-m1): Likewise.
17333 (cortex-m0.small-multiply): Likewise.
17334 (cortex-m0plus.small-multiply): Likewise.
17335 (cortex-m1.small-multiply): Likewise.
17337 2018-05-11 Allan Sandfeld Jensen <allan.jensen@qt.io>
17338 Jakub Jelinek <jakub@redhat.com>
17340 PR tree-optimization/85692
17341 * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
17342 source permute as well.
17344 2018-05-11 Martin Liska <mliska@suse.cz>
17347 * doc/extend.texi: Document LLVM style format for no_sanitize
17350 2018-05-10 Michael Meissner <meissner@linux.vnet.ibm.com>
17352 * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
17353 mode_supports_vsx_dform_quad to mode_supports_dq_form.
17354 (mode_supports_vsx_dform_quad): Likewise.
17355 (mode_supports_vmx_dform): Move these functions to be next to the
17356 other mode_supports functions.
17357 (mode_supports_dq_form): Likewise.
17358 (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
17359 mode_supports_dq_form.
17360 (reg_offset_addressing_ok_p): Likewise.
17361 (offsettable_ok_by_alignment): Likewise.
17362 (rs6000_legitimate_offset_address_p): Likewise.
17363 (legitimate_lo_sum_address_p): Likewise.
17364 (rs6000_legitimize_address): Likewise.
17365 (rs6000_legitimize_reload_address): Likewise.
17366 (rs6000_secondary_reload_inner): Likewise.
17367 (rs6000_preferred_reload_class): Likewise.
17368 (rs6000_output_move_128bit): Likewise.
17370 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
17372 * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
17373 Generate SImode target register for null target.
17374 <case IX86_BUILTIN_XGETBV>: Ditto.
17375 <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
17376 * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
17378 2018-05-10 Carl Love <cel@us.ibm.com>
17380 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
17381 dcbtt and dcbtstt if operands[2] is 0.
17383 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
17386 * config/i386/sse.md (usadv64qi): New expander.
17388 2018-05-10 Segher Boessenkool <segher@kernel.crashing.org>
17390 * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
17391 altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
17392 -maltivec=be support.
17393 (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
17394 vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
17395 vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
17396 vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
17397 vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
17398 vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
17399 altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
17400 altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
17401 altivec_vsumsws): Adjust.
17402 (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
17403 *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
17404 altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
17406 (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
17407 altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
17408 altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
17409 (altivec_lve<VI_char>x): Delete expand.
17410 (*altivec_lve<VI_char>x_internal): Rename to...
17411 (altivec_lve<VI_char>x): ... this.
17412 (altivec_lvxl_<mode>): Delete expand.
17413 (*altivec_lvxl_<mode>_internal): Rename to ...
17414 (altivec_lvxl_<mode>): ... this.
17415 (altivec_stvxl_<mode>): Delete expand.
17416 (*altivec_stvxl_<mode>_internal): Rename to ...
17417 (altivec_stvxl_<mode>): ... this.
17418 (altivec_stve<VI_char>x): Delete expand.
17419 (*altivec_stve<VI_char>x_internal): Rename to ...
17420 (altivec_stve<VI_char>x): ... this.
17421 (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
17422 doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
17423 reduc_plus_scal_<mode>): Adjust.
17424 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
17426 (rs6000_cpu_cpp_builtins): Adjust.
17427 (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
17428 * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
17429 altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
17430 * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
17431 -maltivec=be support.
17432 (rs6000_split_vec_extract_var): Adjust.
17433 (rs6000_split_v4si_init): Adjust.
17434 (swap_selector_for_mode): Delete.
17435 (altivec_expand_lvx_be, altivec_expand_stvx_be,
17436 altivec_expand_stvex_be): Delete.
17437 (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
17438 -maltivec=be support.
17439 (rs6000_gimple_fold_builtin): Ditto.
17440 (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
17442 * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
17443 (TARGET_DIRECT_MOVE_64BIT): Adjust.
17444 * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
17445 * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
17446 * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
17447 unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
17448 vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
17449 *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
17450 *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
17451 *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
17452 anonymous split): Adjust.
17453 (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
17454 (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
17456 2018-05-10 Eric Botcazou <ebotcazou@adacore.com>
17458 * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
17459 when --with-gxx-include-dir is also specified.
17460 * configure: Regenerate.
17462 2018-05-09 Jim Wilson <jimw@sifive.com>
17465 * config.gcc (riscv*-*-*): Handle --with-multilib-list.
17466 * config/riscv/t-withmultilib: New.
17467 * config/riscv/withmultilib.h: New.
17468 * doc/install.texi: Document RISC-V --with-multilib-list support.
17470 2018-05-09 Richard Biener <rguenther@suse.de>
17472 * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
17474 (vect_bb_vectorization_profitable_p): Adjust. Compute
17475 actual scalar cost using the cost vector and the add_stmt_cost
17478 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
17480 PR rtl-optimization/85645
17481 * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
17482 in the REG_CFA_REGISTER note for LR, don't leave it empty.
17484 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
17486 PR rtl-optimization/85645
17487 * shrink-wrap.c (spread_components): Return a boolean saying if
17488 anything was changed.
17489 (try_shrink_wrapping_separate): Iterate spread_components until
17490 nothing changes anymore.
17492 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
17494 PR rtl-optimization/85645
17495 * regrename.c (build_def_use): Also kill the chains that include the
17496 destination of a REG_CFA_REGISTER note.
17498 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
17500 PR rtl-optimization/85645
17501 * regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
17502 insn that has a REG_CFA_REGISTER note.
17504 2018-05-09 Richard Sandiford <richard.sandiford@linaro.org>
17506 * cfgexpand.c (expand_clobber): New function.
17507 (expand_gimple_stmt_1): Use it.
17508 * tree-vect-stmts.c (vect_clobber_variable): New function,
17510 (vectorizable_simd_clone_call): ...here.
17511 (vectorizable_store): Emit a clobber either side of an
17512 IFN_STORE_LANES sequence.
17513 (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
17515 2018-05-09 Tom de Vries <tom@codesourcery.com>
17518 * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
17519 (define_insn "trap_if_false"): Add exit after trap.
17521 2018-05-09 Eric Botcazou <ebotcazou@adacore.com>
17523 PR rtl-optimization/85638
17524 * bb-reorder.c: Include common/common-target.h.
17525 (create_forwarder_block): New function extracted from...
17526 (fix_up_crossing_landing_pad): ...here. Rename into...
17527 (dw2_fix_up_crossing_landing_pad): ...this.
17528 (sjlj_fix_up_crossing_landing_pad): New function.
17529 (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
17530 call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
17531 from both partitions and exit the loop after one iteration.
17533 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
17536 * doc/extend.texi (PowerPC Built-in Functions): Rename this
17538 (Basic PowerPC Built-in Functions): The new name of the
17539 subsection previously known as "PowerPC Built-in Functions".
17540 (Basic PowerPC Built-in Functions Available on all Configurations):
17542 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
17544 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
17546 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
17548 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
17551 2018-05-08 Jim Wilson <jimw@sifive.com>
17553 * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
17554 (LD_EMUL_SUFFIX): New.
17555 (LINK_SPEC): Use it.
17557 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
17559 * doc/extend.texi (PowerPC Built-in Functions): Rename this
17561 (Basic PowerPC Built-in Functions): The new name of the
17562 subsection previously known as "PowerPC Built-in Functions".
17563 (Basic PowerPC Built-in Functions Available on all Configurations):
17565 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
17567 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
17569 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
17571 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
17574 2018-05-08 Jakub Jelinek <jakub@redhat.com>
17577 * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
17578 after cmpelim optimization.
17580 2018-05-08 Olga Makhotina <olga.makhotina@intel.com>
17582 * config.gcc: Support "goldmont".
17583 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
17584 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
17585 PROCESSOR_GOLDMONT.
17586 * config/i386/i386.c (m_GOLDMONT): Define.
17587 (processor_target_table): Add "goldmont".
17588 (PTA_GOLDMONT): Define.
17589 (ix86_lea_outperforms): Add TARGET_GOLDMONT.
17590 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
17591 (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
17592 (fold_builtin_cpu): Add "goldmont".
17593 (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
17594 (ix86_option_override_internal): Add "goldmont".
17595 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
17596 (processor_type): Add PROCESSOR_GOLDMONT.
17597 * config/i386/i386.md: Add CPU "glm".
17598 * config/i386/glm.md: New file.
17599 * config/i386/x86-tune.def: Add m_GOLDMONT.
17600 * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
17602 2018-05-08 Jakub Jelinek <jakub@redhat.com>
17605 * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
17607 * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
17608 VI1248_AVX512VL_AVX512BW. Handle V2DImode and V4DImode if not
17609 TARGET_AVX512VL using ix86_expand_sse2_abs. Formatting fixes.
17612 * config/i386/i386.c (ix86_fold_builtin): Handle
17613 IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
17616 * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
17617 (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
17619 2018-05-08 Richard Earnshaw <rearnsha@arm.com>
17622 * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
17623 (check_arch): Likewise.
17624 (check_fpu): Return the result rather than printing it.
17625 (end arch): Fix operator precedence.
17626 (end cpu): Likewise.
17627 (END): Print the result from check_fpu.
17629 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
17630 Alan Hayward <alan.hayward@arm.com>
17631 David Sherwood <david.sherwood@arm.com>
17633 * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
17634 (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
17635 (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
17636 (*fcmuo<mode>_and): New patterns.
17638 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
17640 * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
17641 (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
17642 (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
17643 (cmp_op, sve_imm_con): New code attributes.
17644 (SVE_COND_INT_CMP, imm_con): Delete.
17645 (cmp_op): Remove above unspecs from int attribute.
17646 * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
17648 (*cmp<cmp_op><mode>): ...this. Use UNSPEC_MERGE_PTRUE instead of
17649 comparison-specific unspecs.
17650 (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
17651 (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
17652 (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
17653 (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
17654 (*vec_fcm<cmp_op><mode>): Rename to...
17655 (*fcm<cmp_op><mode>): ...this and adjust likewise.
17656 (*vec_fcmuo<mode>): Rename to...
17657 (*fcmuo<mode>): ...this and adjust likewise.
17658 (*pred_fcm<cmp_op><mode>): New pattern.
17659 * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
17660 (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
17662 (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
17664 (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
17665 (aarch64_emit_sve_predicated_cond): New function.
17666 (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
17667 (aarch64_emit_unspec_cond_or): Replace with...
17668 (aarch64_emit_sve_or_conds): ...this new function. Use
17669 aarch64_emit_sve_ptrue_op for the individual comparisons and
17670 aarch64_emit_binop to OR them together.
17671 (aarch64_emit_inverted_unspec_cond): Replace with...
17672 (aarch64_emit_sve_inverted_cond): ...this new function. Use
17673 aarch64_emit_sve_ptrue_op for the comparison and
17674 aarch64_emit_unop to invert the result.
17675 (aarch64_expand_sve_vec_cmp_float): Update after the above
17676 changes. Use aarch64_emit_sve_ptrue_op for native comparisons.
17678 2018-05-07 Nathan Sidwell <nathan@acm.org>
17680 * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
17681 * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
17682 (Backwards Compatibility): Likewise.
17684 2018-05-07 Luis Machado <luis.machado@linaro.org>
17688 2018-05-07 Luis Machado <luis.machado@linaro.org>
17690 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
17691 <prefetch_dynamic_strides>: New const bool field.
17692 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
17693 prefetch_dynamic_strides.
17694 (exynosm1_prefetch_tune): Likewise.
17695 (thunderxt88_prefetch_tune): Likewise.
17696 (thunderx_prefetch_tune): Likewise.
17697 (thunderx2t99_prefetch_tune): Likewise.
17698 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
17700 (aarch64_override_options_internal): Update to set
17701 PARAM_PREFETCH_DYNAMIC_STRIDES.
17702 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
17703 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
17704 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
17705 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
17706 prefetch-dynamic-strides setting.
17708 2018-05-07 Luis Machado <luis.machado@linaro.org>
17710 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
17711 <minimum_stride>: New const int field.
17712 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
17713 minimum_stride field.
17714 (exynosm1_prefetch_tune): Likewise.
17715 (thunderxt88_prefetch_tune): Likewise.
17716 (thunderx_prefetch_tune): Likewise.
17717 (thunderx2t99_prefetch_tune): Likewise.
17718 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
17719 (aarch64_override_options_internal): Update to set
17720 PARAM_PREFETCH_MINIMUM_STRIDE.
17721 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
17722 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
17723 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
17724 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
17725 stride is constant and is below the minimum stride threshold.
17727 2018-05-07 Luis Machado <luis.machado@linaro.org>
17729 * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
17732 2018-05-07 Luis Machado <luis.machado@linaro.org>
17734 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
17735 <prefetch_dynamic_strides>: New const bool field.
17736 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
17737 prefetch_dynamic_strides.
17738 (exynosm1_prefetch_tune): Likewise.
17739 (thunderxt88_prefetch_tune): Likewise.
17740 (thunderx_prefetch_tune): Likewise.
17741 (thunderx2t99_prefetch_tune): Likewise.
17742 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
17744 (aarch64_override_options_internal): Update to set
17745 PARAM_PREFETCH_DYNAMIC_STRIDES.
17746 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
17747 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
17748 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
17749 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
17750 prefetch-dynamic-strides setting.
17752 2018-05-07 Luis Machado <luis.machado@linaro.org>
17754 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
17755 <minimum_stride>: New const int field.
17756 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
17757 minimum_stride field.
17758 (exynosm1_prefetch_tune): Likewise.
17759 (thunderxt88_prefetch_tune): Likewise.
17760 (thunderx_prefetch_tune): Likewise.
17761 (thunderx2t99_prefetch_tune): Likewise.
17762 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
17763 (aarch64_override_options_internal): Update to set
17764 PARAM_PREFETCH_MINIMUM_STRIDE.
17765 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
17766 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
17767 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
17768 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
17769 stride is constant and is below the minimum stride threshold.
17771 2018-05-06 Jakub Jelinek <jakub@redhat.com>
17774 * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
17775 the type is addressable. Don't force op into register if it has
17778 2018-05-05 Roland McGrath <mcgrathr@google.com>
17781 * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
17782 any section for which we don't know a specific type it should have,
17783 regardless of name. Previously this was done only for the exact
17784 names ".init_array", ".fini_array", and ".preinit_array".
17785 (default_elf_asm_named_section): Add comment about
17786 relationship with default_section_type_flags and SECTION_NOTYPE.
17787 (get_section): Don't consider it a type conflict if one side has
17788 SECTION_NOTYPE and the other doesn't, as long as neither has the
17789 SECTION_BSS et al used in the default_section_type_flags logic.
17791 2018-05-05 Tom de Vries <tom@codesourcery.com>
17794 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
17795 (workaround_barsyncs): New function.
17796 (nvptx_reorg): Use workaround_barsyncs.
17797 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
17798 (define_expand "nvptx_membar_cta"): New define_expand.
17799 (define_insn "*nvptx_membar_cta"): New insn.
17801 2018-05-04 Pekka Jääskeläinen <pekka.jaaskelainen@parmance.com>
17803 * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
17804 To improve optimization opportunities.
17805 * builtin-types.def: The new needed builtin types for the above.
17807 2018-05-04 Richard Biener <rguenther@suse.de>
17809 * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
17810 * gimple-ssa-store-merging.c
17811 (imm_store_chain_info::output_merged_store): Remove redundant create,
17812 release split_store vector contents on failure.
17813 * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
17814 scalar stmt vector on cache hit.
17816 2018-05-04 Segher Boessenkool <segher@kernel.crashing.org>
17818 * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
17820 * config.gcc (powerpc-xilinx-eabi*): Remove.
17821 * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
17823 (fusion_addis_mem_combo_load): Ditto.
17824 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
17826 (rs6000_cpu_cpp_builtins): Ditto.
17827 * config/rs6000/rs6000-linux.c
17828 (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
17829 * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
17830 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
17832 (rs6000_setup_reg_addr_masks): Ditto.
17833 (rs6000_init_hard_regno_mode_ok): Ditto.
17834 (rs6000_option_override_internal): Ditto.
17835 (legitimate_lo_sum_address_p): Ditto.
17836 (rs6000_legitimize_address): Ditto.
17837 (rs6000_legitimize_reload_address): Ditto.
17838 (rs6000_legitimate_address_p): Ditto.
17839 (abi_v4_pass_in_fpr): Ditto.
17840 (setup_incoming_varargs): Ditto.
17841 (rs6000_gimplify_va_arg): Ditto.
17842 (rs6000_split_multireg_move): Ditto.
17843 (rs6000_savres_strategy): Ditto.
17844 (rs6000_emit_prologue_components): Ditto.
17845 (rs6000_emit_epilogue_components): Ditto.
17846 (rs6000_emit_prologue): Ditto.
17847 (rs6000_emit_epilogue): Ditto.
17848 (rs6000_elf_file_end): Ditto.
17849 (rs6000_function_value): Ditto.
17850 (rs6000_libcall_value): Ditto.
17851 * config/rs6000/rs6000.h: Ditto.
17852 (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
17853 (TARGET_MINMAX): ... this. New.
17854 (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
17855 * config/rs6000/rs6000.md: Remove Xilinx FP support.
17856 (*movsi_internal1_single): Delete.
17857 * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
17858 mfpu=, mxilinx-fpu): Delete.
17859 * config/rs6000/singlefp.h: Delete.
17860 * config/rs6000/sysv4.h: Remove Xilinx FP support.
17861 * config/rs6000/t-rs6000: Ditto.
17862 * config/rs6000/t-xilinx: Delete.
17863 * config/rs6000/titan.md: Adjust for fp_type removal.
17864 * config/rs6000/vsx.md: Remove Xilinx FP support.
17865 (VStype_simple): Delete.
17866 (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
17867 * config/rs6000/xfpu.h: Delete.
17868 * config/rs6000/xfpu.md: Delete.
17869 * config/rs6000/xilinx.h: Delete.
17870 * config/rs6000/xilinx.opt: Delete.
17871 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove
17872 -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
17874 2018-05-04 Tom de Vries <tom@codesourcery.com>
17877 * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
17880 2018-05-04 Richard Biener <rguenther@suse.de>
17882 PR middle-end/85627
17883 * tree-complex.c (update_complex_assignment): We are always in SSA form.
17884 (expand_complex_div_wide): Likewise.
17885 (expand_complex_operations_1): Likewise.
17886 (expand_complex_libcall): Preserve EH info of the original stmt.
17887 (tree_lower_complex): Handle removed blocks.
17888 * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
17889 on complex multiplication and division libcall builtins.
17891 2018-05-04 Richard Biener <rguenther@suse.de>
17893 PR middle-end/85574
17894 * fold-const.c (negate_expr_p): Restrict negation of operand
17895 zero of a division to when we know that can happen without
17897 (fold_negate_expr_1): Likewise.
17899 2018-05-04 Jakub Jelinek <jakub@redhat.com>
17902 * real.h (real_nextafter): Declare.
17903 * real.c (real_nextafter): New function.
17904 * fold-const-call.c (fold_const_nextafter): New function.
17905 (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
17906 CASE_CFN_NEXTTOWARD.
17907 (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
17908 even when arg1_mode is different from arg0_mode.
17910 2018-05-03 Nathan Sidwell <nathan@acm.org>
17912 * doc/extend.texi (Deprecated Features): Remove
17913 -ffriend-injection.
17914 (Backwards Compatibility): Likewise.
17915 * doc/invoke.texi (C++ Language Options): Likewise.
17916 (C++ Dialect Options): Likewise.
17918 2018-05-03 Jakub Jelinek <jakub@redhat.com>
17921 * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
17922 _mm512_mask_mullox_epi64): New intrinsics.
17924 2018-05-03 Tom de Vries <tom@codesourcery.com>
17927 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
17928 dump files): Add offload-tree.
17930 2018-05-03 Richard Biener <rguenther@suse.de>
17932 PR tree-optimization/85615
17933 * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
17934 to loops not nested in BBs loop father to avoid creating multi-entry
17937 2018-05-03 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
17939 PR tree-optimization/70291
17940 * tree-complex.c (expand_complex_libcall): Add type, inplace_p
17941 arguments. Change return type to tree. Emit libcall as a new
17942 statement rather than replacing existing one when inplace_p is true.
17943 (expand_complex_multiplication_components): New function.
17944 (expand_complex_multiplication): Expand floating-point complex
17945 multiplication using the above.
17946 (expand_complex_division): Rename inner_type parameter to type.
17947 Update expand_complex_libcall call-site.
17948 (expand_complex_operations_1): Update expand_complex_multiplication
17949 and expand_complex_division call-sites.
17951 2018-05-02 Jakub Jelinek <jakub@redhat.com>
17954 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
17955 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
17956 *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
17957 the highest significant bit of the shift count mask is clear. In
17958 check whether and[sq]i3 is needed verify that all significant bits
17959 of the shift count other than the highest are set.
17961 2018-05-02 Tom de Vries <tom@codesourcery.com>
17964 * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
17965 * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
17966 (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
17967 * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
17968 (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
17969 * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
17970 __builtin_goacc_parlevel_size.
17972 2018-05-02 Richard Biener <rguenther@suse.de>
17974 PR tree-optimization/85597
17975 * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
17976 do not use split vect_get_vec_defs call but call vect_get_slp_defs
17979 2018-05-02 Tom de Vries <tom@codesourcery.com>
17982 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
17983 dump files): Add ltrans-tree.
17985 2018-05-02 Tom de Vries <tom@codesourcery.com>
17988 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
17989 dump files): Add wpa-ipa.
17991 2018-05-02 Segher Boessenkool <segher@kernel.crashing.org>
17993 * config.gcc (powerpc*-*-*): Remove paired.h. Unsupport the
17994 powerpc*-*-linux*paired* target.
17995 * config/rs6000/750cl.h: Delete.
17996 * config/rs6000/paired.h: Delete.
17997 * config/rs6000/paired.md: Delete.
17998 * config/rs6000/predicates.md (easy_vector_constant): Remove paired
18000 * config/rs6000/rs6000-builtin.def: Remove paired float support.
18001 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
18002 comment. Remove paired float support.
18003 * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
18004 * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
18006 * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
18007 paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
18009 * config/rs6000/rs6000.c: Remove paired float support.
18010 (paired_expand_vector_init, paired_expand_vector_move,
18011 paired_emit_vector_compare, paired_emit_vector_cond_expr,
18012 (paired_expand_lv_builtin, paired_expand_stv_builtin,
18013 paired_expand_builtin, paired_expand_predicate_builtin,
18014 paired_init_builtins): Delete.
18015 * config/rs6000/rs6000.h: Remove paired float support.
18016 * config/rs6000/rs6000.md: Remove paired float support.
18017 (move_from_CR_ov_bit): Delete.
18018 * config/rs6000/rs6000.opt (mpaired): Delete.
18019 * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
18020 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
18022 2018-05-02 Richard Biener <rguenther@suse.de>
18024 PR middle-end/85567
18025 * gimplify.c (gimplify_save_expr): When in SSA form allow
18026 SAVE_EXPRs to compute to SSA vars.
18028 2018-05-02 Jakub Jelinek <jakub@redhat.com>
18031 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
18032 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
18033 *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
18034 clobber operands[2], instead use a new pseudo. Formatting fixes.
18036 2018-05-02 Richard Sandiford <richard.sandiford@linaro.org>
18038 PR tree-optimization/85586
18039 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
18040 exit early for statements in the same group if the accesses are
18043 2018-05-02 Tom de Vries <tom@codesourcery.com>
18046 * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
18049 2018-05-01 Marc Glisse <marc.glisse@inria.fr>
18051 PR tree-optimization/85143
18052 * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
18054 2018-05-01 Tom de Vries <tom@codesourcery.com>
18057 * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
18058 not found" error message.
18060 2018-05-01 Tom de Vries <tom@codesourcery.com>
18063 * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
18064 * vec.c (test_ordered_remove_if): New function.
18065 (vec_c_tests): Call test_ordered_remove_if.
18066 * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
18067 * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
18068 * tree-vect-patterns.c (vect_pattern_recog_1): Use
18069 VEC_ORDERED_REMOVE_IF.
18071 2018-05-01 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
18073 PR tree-optimization/82665
18074 * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
18075 pointer subtraction where arguments come from a memchr call.
18077 2018-05-01 Jakub Jelinek <jakub@redhat.com>
18079 * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
18080 --push-state --as-needed and --pop-state instead of --as-needed and
18081 --no-as-needed if ld supports it.
18082 * configure: Regenerated.
18085 * doc/install.texi2html: Replace _002d with - and _002a with * in
18086 generated html files using sed.
18088 2018-04-30 David Malcolm <dmalcolm@redhat.com>
18091 * gcc-rich-location.c (blank_line_before_p): New function.
18092 (use_new_line): New function.
18093 (gcc_rich_location::add_fixit_insert_formatted): New function.
18094 * gcc-rich-location.h
18095 (gcc_rich_location::add_fixit_insert_formatted): New function.
18097 2018-04-30 David Malcolm <dmalcolm@redhat.com>
18099 * selftest.c (assert_streq): Rename "expected" and "actual" to
18100 "val1" and "val2". Extend NULL-handling to cover both inputs
18101 symmetrically, while still requiring both to be non-NULL for a pass.
18102 * selftest.h (assert_streq): Rename "expected" and "actual" to
18104 (ASSERT_EQ): Likewise.
18105 (ASSERT_EQ_AT): Likewise.
18106 (ASSERT_KNOWN_EQ): Likewise.
18107 (ASSERT_KNOWN_EQ_AT): Likewise.
18108 (ASSERT_NE): Likewise.
18109 (ASSERT_MAYBE_NE): Likewise.
18110 (ASSERT_MAYBE_NE_AT): Likewise.
18111 (ASSERT_STREQ): Likewise. Clarify that both must be non-NULL for
18112 the assertion to pass.
18113 (ASSERT_STREQ_AT): Likewise.
18115 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
18117 * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
18118 interaction with -pie.
18120 2018-04-30 David Malcolm <dmalcolm@redhat.com>
18122 * selftest.h: Fix alphabetization of per-source-file selftest
18125 2018-04-30 Jason Merrill <jason@redhat.com>
18127 PR c++/61982 - dead stores to destroyed objects.
18128 * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
18131 2018-04-30 Jason Merrill <jason@redhat.com>
18133 * tree.c (build_clobber): New.
18134 * tree.h: Declare it.
18135 * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
18137 2018-04-30 David Malcolm <dmalcolm@redhat.com>
18139 * diagnostic-show-locus.c (layout::layout): Update for
18140 location_get_source_line returning a char_span.
18141 (struct char_span): Move to input.h.
18142 (struct correction): Update for fields in char_span becoming
18144 (struct source_line): Update for location_get_source_line
18145 returning a char_span.
18146 (layout::print_line): Likewise.
18147 * edit-context.c (edited_file::print_content): Likewise.
18148 (edited_file::print_diff_hunk): Likewise.
18149 (edited_file::print_run_of_changed_lines): Likewise.
18150 (edited_file::get_num_lines): Likewise.
18151 (edited_line::edited_line): Likewise.
18152 * final.c (asm_show_source): Likewise.
18153 * input.c (location_get_source_line): Convert return type
18154 from const char * to char_span, losing the final "line_len"
18156 (dump_location_info): Update for the above.
18157 (get_substring_ranges_for_loc): Likewise. Use a char_span
18158 when handling the literal within the line.
18159 (test_reading_source_line): Update for location_get_source_line
18160 returning a char_span.
18161 * input.h (class char_span): Move here from
18162 diagnostic-show-locus.c, converting from a struct to a class.
18163 Make data members private.
18164 (char_span::operator bool): New.
18165 (char_span::length): New.
18166 (char_span::get_buffer): New.
18167 (char_span::operator[]): New.
18168 (char_span::subspan): Make const.
18169 (char_span::xstrdup): New.
18170 (location_get_source_line): Convert return type from const char *
18171 to char_span, losing the final "line_size" param.
18173 2018-04-30 Jan Hubicka <jh@suse.cz>
18175 * lto-wrapper.c (ltrans_priorities): New static var.
18176 (cmp_priority): New.
18177 (run_gcc): Read priorities and if doing parallel build order
18178 the Makefile by them.
18180 2018-04-30 David Malcolm <dmalcolm@redhat.com>
18182 * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
18184 2018-04-30 Richard Biener <rguenther@suse.de>
18186 * tree-cfg.c (verify_address): Remove base argument, add
18187 flag whether to check TREE_ADDRESSABLE and do that.
18188 (verify_expr): Remove.
18189 (verify_types_in_gimple_reference): Add pieces from verify_expr.
18190 (verify_gimple_assign_single): Likewise.
18191 (verify_gimple_switch): Likewise.
18192 (verify_expr_location_1): Dereference tp once. Add (disabled)
18193 piece from verify_expr.
18194 (verify_gimple_in_cfg): Do not call verify_expr on all ops.
18196 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
18198 * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
18200 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
18202 * config/arc/arc-protos.h (prepare_extend_operands): Remove.
18203 (small_data_pattern): Likewise.
18204 (arc_rewrite_small_data): Likewise.
18205 * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
18206 (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
18207 (get_symbol_alignment): New function.
18208 (legitimate_small_data_address_p): Likewise.
18209 (legitimate_scaled_address): Update, call
18210 legitimate_small_data_address_p.
18211 (output_sdata): New static variable.
18212 (arc_print_operand): Update how we handle small data operands.
18213 (arc_print_operand_address): Likewise.
18214 (arc_legitimate_address_p): Update, use
18215 legitimate_small_data_address_p.
18216 (arc_rewrite_small_data_p): Remove.
18217 (arc_rewrite_small_data_1): Likewise.
18218 (arc_rewrite_small_data): Likewise.
18219 (small_data_pattern): Likewise.
18220 (compact_sda_memory_operand): Update to use
18221 legitimate_small_data_address_p and get_symbol_alignment.
18222 (prepare_move_operands): Don't rewite sdata pattern.
18223 (prepare_extend_operands): Remove.
18224 * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
18226 (zero_extendqisi2): Likewise.
18227 (zero_extendhisi2): Likewise.
18228 (extendqihi2): Likewise.
18229 (extendqisi2): Likewise.
18230 (extendhisi2): Likewise.
18231 (addsi3): Likewise.
18232 (subsi3): Likewise.
18233 (andsi3): Likewise.
18234 * config/arc/constraints.md (Usd): Change it to memory constraint.
18236 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
18238 * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
18239 as source of std instructions.
18240 * config/arc/arc.md (movsi_insn): Update pattern predicate to
18241 allow 6-bit constants as source for store instructions.
18242 (movdi_insn): Update instruction pattern to allow 6-bit constants
18243 as source for store instructions.
18245 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
18247 * doc/invoke.texi (-fdebug-types-section): Fix grammar.
18249 2018-04-30 Nathan Sidwell <nathan@acm.org>
18250 Sandra Loosemore <sandra@codesourcery.com>
18252 * dumpfile.c (dump_open): Allow '-' for stdout.
18253 * doc/invoke.texi (Developer Options): Document dump filename
18254 determination early. Document stdin/stdout selection.
18256 2018-04-30 Andrew Sadek <andrew.sadek.se@gmail.com>
18258 Microblaze Target: PIC data text relative
18260 * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
18261 * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
18263 * config/microblaze/microblaze.h (microblaze_constant_address_p):
18264 CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
18265 * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
18266 New addressing mode for data-text relative position indepenedent code.
18267 (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
18268 'ADDRESS_SYMBOLIC_TXT_REL'.
18269 (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
18270 (microblaze_legitimate_pic_operand): Exclude function calls from
18271 pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
18272 (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
18274 (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
18275 (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
18276 (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
18277 for 'address + offset'.
18278 (microblaze_expand_prologue): Add new function prologue call for
18280 (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
18281 'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
18282 table in case of TARGET_PIC_DATA_TEXT_REL.
18283 (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
18284 * config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
18285 Add new macros 'UNSPEC_TEXT',
18286 'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
18287 + exclude function calls from 'UNSPEC_PLT' in case of data text
18289 * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
18290 new target hook for generating address diff vector tables in case of
18292 * doc/tm.texi : Regenerate.
18293 * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
18294 'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
18295 of addr diff vector generation.
18296 * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
18297 target hook definition.
18298 * targhooks.h, targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
18299 Add default function for generate_pic_addr_diff_vec -> flag_pic.
18300 * doc/invoke.texi (Add new pic option): Add new microblaze pic
18301 option for data text relative.
18303 2018-04-30 Richard Biener <rguenther@suse.de>
18305 * tree-chrec.h (evolution_function_is_constant_p): Remove
18307 * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
18309 2018-04-30 Richard Biener <rguenther@suse.de>
18312 * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
18314 2018-04-30 Richard Biener <rguenther@suse.de>
18316 PR tree-optimization/28364
18317 PR tree-optimization/85275
18318 * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
18319 copying first exit test.
18321 2018-04-28 Mark Wielaard <mark@klomp.org>
18323 * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
18324 dwarf_version >= 5.
18325 (dwarf_AT): Handle DW_AT_addr_base.
18326 (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
18328 2018-04-28 Uros Bizjak <ubizjak@gmail.com>
18331 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
18332 (*ashl<dwi>3_doubleword_mask_1): Ditto.
18333 (*<shift_insn><dwi>3_doubleword_mask): Ditto.
18334 (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
18336 2018-04-28 Richard Biener <rguenther@suse.de>
18338 * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
18339 (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
18340 to reflect use. Only add interesting stmts.
18342 2018-04-27 Martin Jambor <mjambor@suse.cz>
18345 * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
18346 the jump function allows for passing through aggregate values.
18348 2018-04-27 David Malcolm <dmalcolm@redhat.com>
18350 * input.h (in_system_header_at): Convert from macro to inline
18352 (from_macro_expansion_at): Likewise.
18353 (from_macro_definition_at): Likewise.
18355 2018-04-27 Jeff Law <law@redhat.com>
18357 * config.gcc: Mark tile* targets as deprecated/obsolete.
18359 2018-04-27 Richard Biener <rguenther@suse.de>
18361 * config/aarch64/aarch64.c: Simplify ap.__stack advance and
18364 2018-04-27 Richard Biener <rguenther@suse.de>
18366 * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
18368 2018-04-27 Uros Bizjak <ubizjak@gmail.com>
18370 * config/i386/i386.md (*movti_internal): Substitute Ye constraint
18371 with Yd constraint. Set "preferred_for_speed" attribute from
18372 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
18373 with Yd constraint.
18374 (*movdi_internal): Ditto.
18375 (movti_interunit splitters): Remove
18376 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
18377 (movdi_interunit splitters): Ditto.
18378 * config/i386/constraints.md (Ye): Remove.
18379 (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
18381 2018-04-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
18384 * config/aarch64/constraints.md (Usg): Limit to 31.
18385 (Usj): Limit to 63.
18387 2018-04-27 Jakub Jelinek <jakub@redhat.com>
18389 PR tree-optimization/85529
18390 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
18391 argument. Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
18392 rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
18393 zero extension or masking of the MSB bit.
18394 (optimize_range_tests): Add FIRST_BB argument, pass it through
18395 to optimize_range_tests_var_bound.
18396 (maybe_optimize_range_tests, reassociate_bb): Adjust
18397 optimize_range_tests callers.
18399 2018-04-26 Richard Biener <rguenther@suse.de>
18400 Jakub Jelinek <jakub@redhat.com>
18402 * cgraph.h (symbol_table): Just declare debug method here.
18403 * symtab.c (symbol_table::debug): Define.
18405 2018-04-26 Eric Botcazou <ebotcazou@adacore.com>
18407 * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
18409 2018-04-26 Uros Bizjak <ubizjak@gmail.com>
18411 * config/i386/i386.md ("isa" attribute): Add x64_sse2.
18412 ("enabled" attribute): Handle x64_sse2 "isa" attribute.
18413 (*movdi_internal): Substitute Yi and Yj constraint with x
18414 and Ym and Yn constraint with y constraint. Update "isa"
18415 attribute and set "preferred_for_speed" attribute from
18416 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
18417 (*movsi_internal): Ditto.
18418 (*movdf_internal): Ditto.
18419 (*movsf_internal): Ditto.
18420 (*zero_extendsidi2): Ditto.
18421 * config/i386/sse.md (vec_set<mode>_0): Ditto.
18422 (sse2_loadld): Ditto.
18423 (*vec_extract<ssevecmodelower>_0): Ditto.
18424 (*vec_extractv4si_0_zext_sse4): Ditto.
18425 (vec_concatv2di): Ditto.
18426 (*vec_dup<mode>): Ditto.
18427 * config/i386/mmx.md (*mov<mode>_internal): Ditto.
18428 * config/i386/constraints.md (Yi): Remove.
18433 2018-04-26 Nathan Sidwell <nathan@acm.org>
18435 * dumpfile.c (dump_open): New.
18436 (dump_open_alternate_stream, dump_start, dump_begin): Call it.
18437 (dump_finish): Detect stdio/stderr by value not name.
18439 2018-04-26 Jonathan Wakely <jwakely@redhat.com>
18441 * doc/invoke.texi (-Wreturn-type): Document default status for C++.
18443 2018-04-26 Tom de Vries <tom@codesourcery.com>
18446 * config/nvptx/nvptx.c (verify_neutering_jumps)
18447 (verify_neutering_labels): New function
18448 (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
18450 2018-04-26 Tom de Vries <tom@codesourcery.com>
18453 * config/nvptx/nvptx.c (needs_neutering_p): New function.
18454 (nvptx_single): Use needs_neutering_p to skip over insns that do not
18457 2018-04-26 Richard Biener <rguenther@suse.de>
18458 Tom de Vries <tom@codesourcery.com>
18461 * lto-streamer-out.c (output_function): Fixup loops if required to match
18462 discovery done in the reader.
18464 2018-04-26 Richard Biener <rguenther@suse.de>
18466 PR tree-optimization/85116
18467 * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
18468 have a loop exit from the single latch predecessor. Remove
18469 case of header with just condition.
18470 (ch_base::copy_headers): Exclude infinite loops from any
18472 (pass_ch::execute): Record exits.
18474 2018-04-26 Richard Biener <rguenther@suse.de>
18476 * tree-vect-data-refs.c (vect_get_data_access_cost): Get
18477 prologue cost vector and pass it to vect_get_load_cost.
18478 (vect_get_peeling_costs_all_drs): Likewise.
18479 (vect_peeling_hash_get_lowest_cost): Likewise.
18480 (vect_enhance_data_refs_alignment): Likewise.
18482 2018-04-26 Richard Biener <rguenther@suse.de>
18484 PR middle-end/85450
18485 * tree-cfg.c (verify_gimple_assign_unary): Restore proper
18486 checking of integer<->pointer conversions.
18487 * omp-expand.c (expand_omp_for_static_nochunk): Avoid
18488 sign-/zero-extending pointer types.
18489 (expand_omp_for_static_chunk): Likewise.
18491 2018-03-22 Hans-Peter Nilsson <hp@axis.com>
18492 Jean Lee <xiaoyur347@gmail.com>
18494 * config/mips/mips.c (mips_asan_shadow_offset): New function.
18495 (TARGET_ASAN_SHADOW_OFFSET): Define.
18496 * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
18497 true for -fsanitize=address.
18499 2018-04-25 Mark Wielaard <mark@klomp.org>
18501 * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
18504 2018-04-25 Jakub Jelinek <jakub@redhat.com>
18506 * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
18507 than "alu", remove explicit "memory" and "imm_disp" attributes.
18508 (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
18510 PR middle-end/85414
18511 * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
18512 case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
18513 gen_lowpart_no_emit.
18515 2018-04-25 Sebastian Peryt <sebastian.peryt@intel.com>
18518 * config/i386/i386.c (ix86_expand_builtin): Change memory
18519 operand to XI, extend p0 to Pmode.
18520 * config/i386/i386.md: Change unspec volatile and operand
18521 1 mode to XI, change operand 0 mode to P.
18523 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
18525 * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
18526 GET_MODE_MASK before any checking.
18527 (nds32_can_use_bset_p): Likewise.
18528 (nds32_can_use_btgl_p): Likewise.
18530 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
18532 * config/nds32/nds32-doubleword.md: New define_split pattern for
18533 illegal register number.
18535 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
18537 * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
18539 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
18541 * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
18543 2018-04-25 Richard Biener <rguenther@suse.de>
18545 * lto-streamer.h (LTO_major_version): Bump to 8.
18547 2018-04-25 Jakub Jelinek <jakub@redhat.com>
18549 * BASE-VER: Set to 9.0.0.
18551 2018-04-24 Segher Boessenkool <segher@kernel.crashing.org>
18553 * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
18554 in __abskf2 and __powikf2.
18556 2018-04-24 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
18559 * config/aarch64/constraints.md (Usg, Usj): New constraints.
18560 * config/aarch64/iterators.md (cmode_simd): New mode attribute.
18561 * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
18562 Use the above on operand 2. Reindent.
18563 (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
18565 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
18568 * common/config/i386/i386-common.c (ix86_handle_option): Don't
18570 * config/i386/i386.opt (mcet): Removed.
18571 * doc/install.texi: Remove -mcet documentation.
18572 * doc/invoke.texi: Likewise.
18574 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
18577 * doc/install.texi: Remove -mcet from bootstrap-cet.
18579 2018-04-24 Jakub Jelinek <jakub@redhat.com>
18582 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
18583 __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
18587 * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
18588 const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
18589 containing a CONST_VECTOR.
18591 2018-04-24 Cesar Philippidis <cesar@codesourcery.com>
18593 * doc/install.texi: Update newlib dependency for nvptx.
18595 2018-04-24 Jakub Jelinek <jakub@redhat.com>
18598 * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
18599 instead of INTVAL when shifting x left.
18601 2018-04-24 Andreas Krebbel <krebbel@linux.ibm.com>
18603 PR tree-optimization/85478
18604 * tree-vect-loop.c (vect_analyze_loop_2): Do not call
18605 vect_grouped_store_supported for single element vectors.
18607 2018-04-24 Richard Biener <rguenther@suse.de>
18610 * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
18611 load cost increase to the case of non-constant step.
18613 2018-04-24 Jakub Jelinek <jakub@redhat.com>
18616 * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
18617 destination if any_malformed_asm.
18619 2018-04-23 Eric Botcazou <ebotcazou@adacore.com>
18621 PR middle-end/85496
18622 * expr.c (store_field): In the bitfield case, if the value comes from
18623 a function call and is returned in registers by means of a PARALLEL,
18624 do not change the mode of the temporary unless BLKmode and VOIDmode.
18626 2018-04-23 Andrey Belevantsev <abel@ispras.ru>
18628 PR rtl-optimization/85423
18629 * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
18630 dependencies to debug insns when the previous insn is non-debug.
18632 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
18634 * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
18635 enums into a single definition.
18636 (fls): Fix predicates and printing.
18639 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
18641 * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
18642 * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
18643 and short u6 immediate.
18644 (check_if_valid_sleep_operand): Remove.
18645 * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
18647 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
18649 * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
18650 flag_always_save_lp condition.
18651 * config/nds32/nds32.opt (malways-save-lp): New option.
18653 2018-04-22 Shiva Chen <shiva0217@gmail.com>
18655 * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
18656 * config/nds32/nds32.c (nds32_use_load_post_increment): New.
18657 * config/nds32/nds32.h
18658 (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
18659 (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
18661 2018-04-22 Shiva Chen <shiva0217@gmail.com>
18663 * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
18664 * config/nds32/nds32.c (nds32_ls_333_p): Remove.
18666 2018-04-22 Shiva Chen <shiva0217@gmail.com>
18667 Chung-Ju Wu <jasonwucj@gmail.com>
18669 * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
18671 * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
18672 * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
18674 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
18676 * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
18678 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
18680 * config/nds32/nds32-protos.h (nds32_data_alignment,
18681 nds32_local_alignment): Declare.
18682 * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
18683 nds32_local_alignment): New functions.
18684 (TARGET_CONSTANT_ALIGNMENT): Define.
18685 * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
18687 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
18689 * config/nds32/nds32.c
18690 (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
18691 (TARGET_MODES_TIEABLE_P): Likewise.
18693 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
18695 * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
18696 level Ofast and Og.
18698 2018-04-22 Monk Chiang <sh.chiang04@gmail.com>
18699 Chung-Ju Wu <jasonwucj@gmail.com>
18701 * config/nds32/constants.md (unspec_volatile_element): Add enum values
18702 for unaligned access.
18703 * config/nds32/nds32-intrinsic.c: Implementation of expanding
18705 * config/nds32/nds32-intrinsic.md: Likewise.
18706 * config/nds32/nds32_intrinsic.h: Likewise.
18707 * config/nds32/nds32.h (nds32_builtins): Likewise.
18708 * config/nds32/nds32.opt (munaligned-access): New option.
18709 * config/nds32/nds32.c (nds32_asm_file_start): Display
18710 flag_unaligned_access status.
18712 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
18714 * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
18715 -mno-relax is present.
18716 * config/riscv/linux.h (LINK_SPEC): Ditto.
18718 2018-04-20 Martin Sebor <msebor@redhat.com>
18721 * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
18723 (gimple_fold_builtin_stxcpy_chk): Same.
18724 * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
18726 2018-04-20 Michael Meissner <meissner@linux.ibm.com>
18729 * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
18730 __powikf2 when long double is IEEE 128-bit.
18732 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
18734 * config/riscv/riscv.c (riscv_first_stack_step): Round up min
18735 step to make sure stack always aligned.
18737 2018-04-20 Carl Love <cel@us.ibm.com>
18740 * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
18741 size check for arg0.
18743 2018-04-20 Nathan Sidwell <nathan@codesourcery.com>
18744 Tom de Vries <tom@codesourcery.com>
18747 * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
18748 Emit insns for calls too.
18749 (nvptx_find_par): Always look for worker-level predecessor insn.
18750 (nvptx_propagate): Add is_call parm, return bool. Copy frame for
18752 (nvptx_vpropagate, nvptx_wpropagate): Adjust.
18753 (nvptx_process_pars): Propagate frames for calls.
18755 2018-04-20 H.J. Lu <hongjiu.lu@intel.com>
18758 * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
18760 (OPTION_MASK_ISA_IBT_UNSET): Likewise.
18761 (ix86_handle_option): Don't handle OPT_mibt.
18762 * config/i386/cet.h: Check __CET__ instead of __IBT__ and
18764 * config/i386/driver-i386.c (host_detect_local_cpu): Remove
18766 * config/i386/i386-c.c (ix86_target_macros_internal): Don't
18767 check OPTION_MASK_ISA_IBT nor flag_cf_protection.
18768 (ix86_target_macros): Define __CET__ with flag_cf_protection
18769 for -fcf-protection.
18770 * config/i386/i386.c (isa2_opts): Remove -mibt.
18771 * config/i386/i386.h (TARGET_IBT): Removed.
18772 (TARGET_IBT_P): Likewise.
18773 (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
18774 * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
18775 * config/i386/i386.opt (mcet): Update help message.
18776 (mshstk): Likewise.
18778 * doc/invoke.texi: Remove -mibt. Document __CET__. Document
18779 -mcet as an alias for -mshstk.
18781 2018-04-20 Richard Biener <rguenther@suse.de>
18783 PR middle-end/85475
18784 * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
18785 complexity by forcing a single use of the multiply operand.
18787 2018-04-20 Martin Jambor <mjambor@suse.cz>
18790 * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
18791 recursion dependency to only apply to non-clones.
18793 2018-04-20 Martin Jambor <mjambor@suse.cz>
18796 * ipa-cp.c (create_specialized_node): Check that clones of
18797 self-recursive edges exist during IPA-CP.
18799 2018-04-19 Toon Moene <toon@moene.org>
18801 * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
18804 2018-04-19 Jakub Jelinek <jakub@redhat.com>
18806 PR tree-optimization/85467
18807 * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
18808 VECTOR_TYPE_P macro. If type is vector type, VIEW_CONVERT_EXPR the
18809 VECTOR_CST element to type.
18811 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
18814 * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
18815 * config/i386/i386.md (builtin_setjmp_setup): Removed.
18816 (builtin_longjmp): Likewise.
18817 (save_stack_nonlocal): New pattern.
18818 (restore_stack_nonlocal): Likewise.
18820 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
18823 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
18824 Replace ASM_OUTPUT_LABEL with fprintf.
18826 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
18829 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
18830 Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
18831 * config/i386/i386-c.c (ix86_target_macros_internal): Also
18832 define __IBT__ and __SHSTK__ for -fcf-protection.
18833 * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
18835 (ix86_trampoline_init): Likewise.
18836 (x86_output_mi_thunk): Likewise.
18837 (ix86_notrack_prefixed_insn_p): Likewise.
18838 (ix86_option_override_internal): Don't disallow -fcf-protection.
18839 * config/i386/i386.md (rdssp<mode>): Also enable for
18841 (incssp<mode>): Likewise.
18842 (nop_endbr): Likewise.
18843 * config/i386/i386.opt (mcet): Change help message to built-in
18846 (mshstk): Likewise.
18847 * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
18848 on -fcf-protection. Change -mcet, -mibt and -mshstk to only
18849 enable CET built-in functions.
18851 2018-04-19 Sebastian Peryt <sebastian.peryt@intel.com>
18853 * common/config/i386/i386-common.c
18854 (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
18855 OPTION_MASK_ISA_MOVDIRI_UNSET,
18856 OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
18857 (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
18858 * config.gcc (movdirintrin.h): New header.
18859 * config/i386/cpuid.h (bit_MOVDIRI,
18860 bit_MOVDIR64B): New bits.
18861 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
18863 * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
18864 (VOID, PVOID, PCVOID)): New function types.
18865 * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
18866 __builtin_ia32_directstoreu_u64,
18867 __builtin_ia32_movdir64b): New builtins.
18868 * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
18869 * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
18871 (ix86_valid_target_attribute_inner_p): Ditto.
18872 (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
18873 and VOID_FTYPE_PUNSIGNED_UNSIGNED.
18874 (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
18875 * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
18876 TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
18877 * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
18878 (movdiri<mode>, movdir64b_<mode>): New.
18879 * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
18880 * config/i386/immintrin.h: Include movdirintrin.h.
18881 * config/i386/movdirintrin.h: New file.
18882 * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
18884 2018-04-19 Richard Biener <rguenther@suse.de>
18886 PR middle-end/85455
18887 * cfg.c (clear_bb_flags): When loop state says we have
18888 marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
18890 2018-04-19 Richard Biener <rguenther@suse.de>
18892 PR tree-optimization/84737
18893 * tree-vect-data-refs.c (vect_copy_ref_info): New function
18894 copying restrict info.
18895 (vect_setup_realignment): Use it.
18896 * tree-vectorizer.h (vect_copy_ref_info): Declare.
18897 * tree-vect-stmts.c (vectorizable_store): Copy ref info from
18898 the first DR to all generated stores.
18899 (vectorizable_load): Likewise for loads.
18901 2018-04-19 Jakub Jelinek <jakub@redhat.com>
18903 PR tree-optimization/85446
18904 * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
18905 the integral and pointer types to have the same precision.
18907 * doc/install.texi: Document --disable-cet being the default and
18910 2018-04-18 Martin Liska <mliska@suse.cz>
18912 * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
18915 2018-04-18 Martin Liska <mliska@suse.cz>
18918 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
18921 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
18922 arguments if they are comparable.
18924 2018-04-18 Martin Liska <mliska@suse.cz>
18927 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
18930 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
18933 2018-04-18 H.J. Lu <hongjiu.lu@intel.com>
18936 * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
18937 ENDBR after calling __morestack.
18939 2018-04-18 David Malcolm <dmalcolm@redhat.com>
18942 * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
18943 by using gcc_base_ver to generate a gcc_driver_version, and use
18944 it when generating GCC_DRIVER_NAME.
18945 * configure: Regenerate.
18947 2018-04-18 Jakub Jelinek <jakub@redhat.com>
18950 * config.gcc: Obsolete powerpc*-*-*spe*.
18952 2018-04-17 Jakub Jelinek <jakub@redhat.com>
18955 * dbxout.c (dbxout_int): Perform negation in unsigned int type.
18956 (stabstr_D): Change type of unum from unsigned int to
18957 unsigned HOST_WIDE_INT. Perform negation in unsigned HOST_WIDE_INT
18960 2018-04-17 Jim Wilson <jimw@sifive.com>
18963 * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
18964 RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
18965 Set arg_pointer_offset after using pretend_args_size.
18967 2018-04-17 Jakub Jelinek <jakub@redhat.com>
18969 PR rtl-optimization/85431
18970 * dse.c (record_store): Ignore zero width stores.
18973 * asan.c (handle_builtin_stack_restore): Adjust comment. Emit
18974 __asan_allocas_unpoison call and last_alloca_addr = new_sp before
18975 __builtin_stack_restore rather than after it.
18976 * builtins.c (expand_asan_emit_allocas_unpoison): Pass
18977 arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
18978 argument instead of virtual_dynamic_stack_rtx.
18980 2018-04-17 Kelvin Nilsen <kelvin@gcc.gnu.org>
18982 * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
18984 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
18985 Add note to error message to explain internal mapping of overloaded
18986 built-in function name to non-overloaded built-in function name.
18987 * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
18990 2018-04-17 Michael Meissner <meissner@linux.vnet.ibm.com>
18993 * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
18994 where the inputs overlap with the output.
18996 2018-04-17 Jakub Jelinek <jakub@redhat.com>
18998 * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
18999 (=v, v) alternative and explicit "memory" attribute.
19000 (vec_extract_lo_<mode><mask_name>): Likewise. Also add
19001 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
19003 (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
19004 "sselog1" type instead of "sselog".
19005 (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
19006 "sselog". Remove explicit "memory" attribute.
19007 (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
19008 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
19010 (vec_extract_hi_v32hi): Merge all alternatives into one, use
19011 "sselog1" type instead of "sselog". Remove explicit "memory"
19013 (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
19014 use "sselog1" type instead of "sselog". Remove explicit "memory"
19016 (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
19017 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
19019 (vec_extract_hi_v64qi): Merge all alternatives into one, use
19020 "sselog1" type instead of "sselog". Remove explicit "memory"
19022 (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
19023 use "sselog1" type instead of "sselog". Remove explicit "memory"
19027 * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
19029 PR middle-end/85414
19030 * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
19033 2018-04-17 Martin Jambor <mjambor@suse.cz>
19036 * ipa-cp.c (create_specialized_node): Call
19037 expand_all_artificial_thunks if necessary.
19039 2018-04-17 Martin Liska <mliska@suse.cz>
19042 * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
19043 in message, remote space in between '_G' and '('.
19045 2018-04-17 Jakub Jelinek <jakub@redhat.com>
19048 * config/i386/sse.md (reduces<mode><mask_scalar_name>,
19049 avx512f_vmcmp<mode>3<round_saeonly_name>,
19050 avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
19051 avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
19052 avx512f_rndscale<mode><round_saeonly_name>,
19053 avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
19054 avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
19055 Use %<iptr>2 instead of %2 for -masm=intel.
19056 (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
19057 avx512f_vcvttss2usi<round_saeonly_name>,
19058 avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
19060 (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
19061 avx512f_vcvttsd2usi<round_saeonly_name>,
19062 avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
19063 Use %q1 instead of %1 for -masm=intel.
19064 (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
19065 avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
19066 of %3 for -masm=intel.
19067 (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
19069 (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
19071 (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
19073 (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
19074 %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
19076 (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
19078 (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
19079 %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
19080 %g1 and one with %0 and %1.
19081 (avx512er_vmrcp28<mode><round_saeonly_name>,
19082 avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
19083 %1 for -masm=intel.
19084 (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
19085 avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
19086 avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
19087 of %0 and %{%4%} for -masm=intel.
19088 (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
19089 avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
19090 avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
19091 order of %0 and %{%5%}%{z%} for -masm=intel.
19093 2018-04-17 Jan Hubicka <jh@suse.cz>
19096 * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
19098 2018-04-17 Martin Liska <mliska@suse.cz>
19101 * multiple_target.c (create_dispatcher_calls): Set apostrophes
19102 for target_clone error message. Make default implementation
19103 clone to be a local declaration.
19104 (separate_attrs): Add new argument and check for an empty
19106 (expand_target_clones): Handle it.
19107 (ipa_target_clone): Make redirection just for target_clones
19110 2018-04-16 Cesar Philippidis <cesar@codesourcery.com>
19111 Tom de Vries <tom@codesourcery.com>
19113 PR middle-end/84955
19114 * omp-expand.c (expand_oacc_for): Add dummy false branch for
19115 tiled basic blocks without omp continue statements.
19117 2018-04-16 Aaron Sawdey <acsawdey@linux.ibm.com>
19120 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
19121 vec_extract expression as having side effects to make sure it gets
19124 2018-04-16 H.J. Lu <hongjiu.lu@intel.com>
19127 * config/i386/i386.c (get_builtin_code_for_version): Check
19130 2018-04-16 Olga Makhotina <olga.makhotina@intel.com>
19133 * config.gcc: Support "skylake".
19134 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
19136 * config/i386/i386.c (m_SKYLAKE): Define.
19137 (processor_target_table): Add "skylake".
19138 (ix86_option_override_internal): Add "skylake".
19139 (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
19140 PROCESSOR_CANNONLAKE.
19141 (get_builtin_code_for_version): Fix priority for
19142 PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
19143 PROCESSOR_SKYLAKE-AVX512.
19144 * config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
19145 (processor_type): Add PROCESSOR_SKYLAKE.
19147 2018-04-16 Paolo Carlini <paolo.carlini@oracle.com>
19148 Jason Merrill <jason@redhat.com>
19151 * convert.c (convert_to_integer_1): Use direct recursion for
19152 enumeral types and types with a precision less than the number
19153 of bits in their mode.
19155 2018-04-16 Julia Koval <julia.koval@intel.com>
19158 * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
19159 X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
19161 2018-04-14 Segher Boessenkool <segher@kernel.crashing.org>
19164 * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
19165 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
19166 and -mno-direct-move.
19168 2018-04-13 Paul A. Clarke <pc@us.ibm.com>
19171 * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
19172 Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
19173 Ensure negative shifts result in {0}.
19175 2018-04-13 Vladimir Makarov <vmakarov@redhat.com>
19177 PR rtl-optimization/79916
19178 * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
19179 regs (if any) to define how to gnerate SD moves when LRA is in
19182 2018-04-13 Jakub Jelinek <jakub@redhat.com>
19184 PR rtl-optimization/85393
19185 * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
19186 * except.c (expand_dw2_landing_pad_for_region): Make static.
19187 * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
19188 a label and unconditional jump to old_bb, rather than
19189 expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
19192 PR rtl-optimization/85376
19193 * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
19194 zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
19195 instead of a specific value.
19197 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
19198 Bin Cheng <bin.cheng@arm.com>
19200 PR tree-optimization/82965
19201 PR tree-optimization/83991
19202 * cfgloopanal.c (expected_loop_iterations_unbounded): Add
19203 by_profile_only parameter.
19204 * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
19205 information if the loop was predicted to iterate too many times.
19206 * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
19208 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
19211 * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
19214 2018-04-13 Martin Liska <mliska@suse.cz>
19215 Jakub Jelinek <jakub@redhat.com>
19217 PR middle-end/81657
19218 * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
19219 * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
19220 * builtins.c (expand_builtin_memory_copy_args): Use
19221 BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
19222 handle dest_addr == pc_rtx.
19224 2018-04-12 Segher Boessenkool <segher@kernel.crashing.org>
19227 * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
19228 asked to not generate direct moves.
19229 (fix_trunc<mode>si2_stfiwx): Similar.
19230 (fix_trunc<mode>si2_internal): Similar.
19232 2018-04-12 Jakub Jelinek <jakub@redhat.com>
19235 * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
19236 * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
19237 lookup if dest in some wider mode is known to be const0_rtx and
19238 if so, record permanent equivalence for it to be ZERO_EXTEND of
19239 the narrower mode destination.
19241 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
19243 * lto-streamer-out.c (output_function): Revert 259346.
19244 * omp-expand.c (expand_oacc_for): Likewise.
19246 2018-04-12 Alexander Monakov <amonakov@ispras.ru>
19248 PR rtl-optimization/85354
19249 * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
19250 * sel-sched.c (sel_global_init): ... here.
19252 2018-04-12 Eric Botcazou <ebotcazou@adacore.com>
19255 * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
19256 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
19257 mode for PE-COFF targets.
19258 * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
19259 (i386_pe_asm_lto_end): Likewise.
19260 * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
19261 (TARGET_ASM_LTO_END): Likewise.
19262 * config/i386/winnt.c (saved_debug_info_level): New static variable.
19263 (i386_pe_asm_lto_start): New function.
19264 (i386_pe_asm_lto_end): Likewise.
19266 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
19267 Richard Biener <rguenther@suse.de>
19269 PR middle-end/84955
19270 * lto-streamer-out.c (output_function): Fix CFG loop state before
19272 * omp-expand.c (expand_oacc_for): Handle calls to internal
19273 functions like regular functions.
19275 2018-04-12 Richard Biener <rguenther@suse.de>
19278 * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
19279 for the early LTO debug to properly generate references to it
19280 during DIE emission. Do not re-use that for the skeleton for
19282 (dwarf2out_early_finish): Likewise.
19284 2018-04-12 Jakub Jelinek <jakub@redhat.com>
19287 * config/i386/sse.md
19288 (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
19289 <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
19290 vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
19291 vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
19292 and output is a reg, avoid creating invalid lowpart subreg, but
19293 instead split into a 512-bit move. Don't split if not AVX512VL,
19294 input is xmm16+ reg and output is a mem.
19295 (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
19296 vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
19297 xmm16+ reg and output is a mem.
19299 2018-04-12 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
19301 * config/s390/s390.c (s390_output_indirect_thunk_function): Check
19302 also for flag_dwarf2_cfi_asm.
19304 2018-04-12 Jakub Jelinek <jakub@redhat.com>
19306 PR rtl-optimization/85342
19307 * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
19308 a bool scalar var inside of the loop instead. Don't try to update
19309 recog_data.operand after failed apply_change_group.
19311 2018-04-12 Tom de Vries <tom@codesourcery.com>
19314 * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
19315 (nvptx_assemble_decl_begin): Add undefined param. Declare undefined
19316 array with flexible array member as array without given dimension.
19317 (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
19318 argument for undefined param to true.
19320 2018-04-11 Aaron Sawdey <acsawdey@linux.ibm.com>
19323 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
19324 -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
19325 from PowerPC section.
19326 * config/rs6000/sysv4.opt (mcall-): Improve help text.
19327 * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
19328 help text that is too long.
19329 * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
19330 help text that is too long.
19331 * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
19332 help text that is too long.
19334 2018-04-11 Uros Bizjak <ubizjak@gmail.com>
19336 * config/alpha/alpha.md (stack_probe_internal): Rename
19337 from "probe_stack". Update all callers.
19339 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
19341 PR rtl-optimization/84566
19342 * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
19343 sched_macro_fuse_insns.
19345 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
19348 * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
19349 (compute_block_dependences): ... from here.
19351 2018-04-11 Jakub Jelinek <jakub@redhat.com>
19353 PR tree-optimization/85331
19354 * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
19355 from int to HOST_WIDE_INT.
19357 2018-04-11 Martin Jambor <mjambor@suse.cz>
19360 * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
19361 (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
19362 not the same as the source val.
19363 (cgraph_edge_brings_value_p): New parameter.
19364 (gather_edges_for_value): Pass destination value to
19365 cgraph_edge_brings_value_p.
19366 (perhaps_add_new_callers): Likewise.
19367 (get_info_about_necessary_edges): Likewise and exclude values brought
19368 only by self-recursive edges.
19369 (create_specialized_node): Redirect only clones of self-calling edges.
19370 (+self_recursive_pass_through_p): New function.
19371 (find_more_scalar_values_for_callers_subset): Use it.
19372 (find_aggregate_values_for_callers_subset): Likewise.
19373 (known_aggs_to_agg_replacement_list): Removed.
19374 (decide_whether_version_node): Re-calculate known constants for all
19375 remaining context clones.
19377 2018-04-11 Richard Biener <rguenther@suse.de>
19380 * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
19381 from early DWARF output.
19382 (dwarf2out_early_finish): Output line info unconditionally into
19383 early DWARF and add reference to it.
19385 2018-04-11 Jakub Jelinek <jakub@redhat.com>
19388 * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
19389 (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
19390 other than V2DFmode using iptr mode attribute.
19391 (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
19393 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
19395 PR rtl-optimization/84659
19396 * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
19398 2018-04-11 Jakub Jelinek <jakub@redhat.com>
19401 * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
19403 (output_loc_list): Pass address of a dummy size variable even in the
19404 locview handling loop.
19405 (index_location_lists): Add comment on why skip_loc_list_entry can't
19408 2018-04-11 Thomas Preud'homme <thomas.preudhomme@arm.com>
19411 * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
19414 2018-04-10 Aaron Sawdey <acsawdey@linux.ibm.com>
19417 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
19418 -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
19419 and -mstring-compare-inline-limit.
19421 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
19424 * config/rs6000/rs6000.md (allocate_stack): Put the residual size
19425 for stack clash protection in a register whenever we need it to be in
19428 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
19430 * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
19431 Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
19433 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
19436 * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
19438 (mlong-double-): Ditto.
19439 * config/rs6000/sysv4.opt (msdata=): Ditto.
19440 (mtls-size=): Ditto.
19442 2018-04-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
19444 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
19445 erroneous entries for
19446 "vector int vec_ldl (int, long int *)", and
19447 "vector unsigned int vec_ldl (int, unsigned long int *)".
19448 Add comments and entries for
19449 "vector bool char vec_ldl (int, bool char *)",
19450 "vector bool short vec_ldl (int, bool short *)",
19451 "vector bool int vec_ldl (int, bool int *)",
19452 "vector bool long long vec_ldl (int, bool long long *)",
19453 "vector pixel vec_ldl (int, pixel *)",
19454 "vector long long vec_ldl (int, long long *)",
19455 "vector unsigned long long vec_ldl (int, unsigned long long *)".
19456 * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
19457 type tree bool_long_long_type_node and correct definition of
19458 bool_V2DI_type_node to make reference to this new type tree.
19459 (rs6000_mangle_type): Replace erroneous reference to
19460 bool_long_type_node with bool_long_long_type_node.
19461 * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
19462 comments to emphasize sign distinctions for char and int types and
19463 replace RS6000_BTI_bool_long constant with
19464 RS6000_BTI_bool_long_long constant. Also add comment to restrict
19465 use of RS6000_BTI_pixel.
19466 (bool_long_type_node): Remove this macro definition.
19467 (bool_long_long_type_node): New macro definition
19469 2018-04-10 Jakub Jelinek <jakub@redhat.com>
19471 PR rtl-optimization/85300
19472 * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
19473 into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
19474 simplify_unary_operation fails.
19476 2018-04-10 Martin Liska <mliska@suse.cz>
19478 * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
19479 cgraph_edge and ipa_ref.
19481 2018-04-10 Jakub Jelinek <jakub@redhat.com>
19485 * config/i386/sse.md
19486 (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
19487 computation of the VEC_MERGE selector from mask.
19488 (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
19489 Fix decoding of the VEC_MERGE selector into mask.
19491 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
19493 PR tree-optimization/85286
19494 * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
19496 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
19498 * final.c (final_1): Set insn_last_address as well as
19499 insn_current_address.
19501 2018-04-10 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
19504 * explow.c (emit_stack_probe): Call validize_mem on memory location
19505 before passing it to gen_probe_stack. Create address operand and
19506 legitimize it for the probe_stack_address case.
19508 2018-04-09 Jan Hubicka <jh@suse.cz>
19511 * ipa-devirt.c (rebuild_type_inheritance-hash): New.
19512 * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
19513 * tree.c (free_lang_data_in_type): Fix handling of binfos;
19515 (free_lang_data): Rebuild type inheritance graph.
19517 2018-04-09 Martin Sebor <msebor@redhat.com>
19519 * invoke.texi (-finline-small-functions): Mention other optimization
19521 (-findirect-inlining, -fpartial-inlining): Same.
19522 (-finline-functions-called-once): Same.
19523 (-freorder-blocks-and-partition): Same.
19525 2018-04-09 Jan Hubicka <jh@suse.cz>
19528 * cfgcleanup.c (try_forward_edges): Do not give up on crossing
19529 jumps; choose last target that matches the criteria (i.e.
19530 no partition changes for non-crossing jumps).
19531 * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
19532 support for redirecting crossing jumps to non-crossing.
19534 2018-04-09 Alexey Brodkin <abrodkin@synopsys.com>
19536 * config/arc/arc.c (arc_expand_prologue): Set stack usage info
19537 also for naked functions.
19539 2018-04-09 Claudiu Zissulescu <claziss@synopsys.com>
19541 * config/arc/arc.md (add_shift): New pattern.
19542 (add_shift2): Likewise.
19543 (sub_shift): Likewise.
19544 (sub_shift_cmp0_noout): Likewise.
19545 (compare_si_ashiftsi): Likewise.
19546 (xbfu_cmp0_noout): New combine pattern.
19547 (xbfu_cmp0"): Likewise.
19548 (movsi_set_cc_insn): Place the predicable variant first.
19549 (commutative_binary_cmp0_noout): Remove clobber.
19550 (commutative_binary_cmp0): New pattern.
19551 (noncommutative_binary_cmp0): Likewise.
19552 (noncommutative_binary_cmp0_noout): Likewise.
19553 (noncommutative_binary_comparison_result_used): Removed.
19554 (rsub_cmp0): New pattern.
19555 (rsub_cmp0_noout): Likewise.
19556 (extzvsi): Changed, keep only meaningful variants.
19557 (SQH, SEZ): New iterators.
19558 (SQH_postfix): New mode attribute.
19559 (SEZ_prefix): New code attribute.
19560 (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
19561 (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
19562 * config/arc/predicates.md (cc_set_register): Use CC_REG instead
19563 of numerical value.
19564 (noncommutative_operator): Check the availability of barrel
19567 2018-04-09 Richard Biener <rguenther@suse.de>
19569 PR tree-optimization/85284
19570 * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
19571 Only use the niter constraining form of simple_iv when the exit
19572 is always executed.
19574 2018-04-09 Tom de Vries <tom@codesourcery.com>
19577 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
19578 (define_expand "*memory_barrier"): New define_expand.
19579 (define_insn "memory_barrier"): New insn.
19581 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
19583 PR rtl-optimization/80463
19584 PR rtl-optimization/83972
19585 PR rtl-optimization/83480
19587 * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
19588 correct producer for the insn.
19589 (tidy_control_flow): Fixup seqnos in case of debug insns.
19591 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
19593 PR rtl-optimization/83913
19595 * sel-sched-ir.c (merge_expr_data): Choose the middle between two
19596 different sched-times when merging exprs.
19598 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
19600 PR rtl-optimization/83962
19602 * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
19603 tidy_fallthru_edge and tidy_control_flow.
19605 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
19607 PR rtl-optimization/83530
19609 * sel-sched.c (force_next_insn): New global variable.
19610 (remove_insn_for_debug): When force_next_insn is true, also leave only
19611 next insn in the ready list.
19612 (sel_sched_region): When the region wasn't scheduled, make another pass
19613 over it with force_next_insn set to 1.
19615 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
19617 * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
19619 * config/nds32/constants.md (unspec_volatile_element): Add enum values
19620 for interrupt control.
19621 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
19622 functions for interrupt control.
19623 * config/nds32/nds32-intrinsic.md: Likewise.
19624 * config/nds32/nds32_intrinsic.h: Likewise.
19625 * config/nds32/nds32.h (nds32_builtins): Likewise.
19627 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
19629 * config/nds32/nds32.c (nds32_init_machine_status,
19630 nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
19631 strict_aligned_p field.
19632 (nds32_expand_to_rtl_hook): New function.
19633 (TARGET_EXPAND_TO_RTL_HOOK): Define.
19634 * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
19636 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
19637 Chung-Ju Wu <jasonwucj@gmail.com>
19639 * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
19640 * config/nds32/nds32-n7.md: New file.
19641 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
19642 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
19644 * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
19645 * config/nds32/nds32.md (pipeline_model): Add n7.
19646 * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
19647 * config/nds32/pipelines.md: Include n7 settings.
19649 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
19650 Chung-Ju Wu <jasonwucj@gmail.com>
19652 * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
19653 * config/nds32/nds32-e8.md: New file.
19654 * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
19655 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
19657 * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
19658 * config/nds32/nds32.md (pipeline_model): Add e8.
19659 * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
19660 * config/nds32/pipelines.md: Include e8 settings.
19662 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
19663 Chung-Ju Wu <jasonwucj@gmail.com>
19665 * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
19666 * config/nds32/nds32-n8.md: New file.
19667 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
19668 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
19670 * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
19671 * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
19672 * config/nds32/nds32.md (pipeline_model): Add n8.
19673 * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
19674 * config/nds32/pipelines.md: Include n8 settings.
19676 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
19677 Chung-Ju Wu <jasonwucj@gmail.com>
19679 * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
19680 * config/nds32/nds32-n9-2r1w.md: New file.
19681 * config/nds32/nds32-n9-3r2w.md: New file.
19682 * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
19683 nds32_register_ports): New or modify for cpu n9.
19684 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
19686 * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
19687 * config/nds32/nds32-utils.c: New file.
19688 * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
19689 TARGET_MUL_SLOW): Define.
19690 * config/nds32/nds32.md (pipeline_model): New attribute.
19691 * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
19692 New options that support cpu n9.
19693 * config/nds32/pipelines.md: Include n9 settings.
19694 * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
19696 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
19698 * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
19699 information if necessary.
19700 (output_cond_branch_compare_zero): Likewise.
19701 * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
19702 (nds32_target_alignment): Refine for alignment.
19703 * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
19704 (FUNCTION_BOUNDARY): Modify.
19705 * config/nds32/nds32.md (call_internal, call_value_internal): Consider
19707 * config/nds32/nds32.opt (malways-align, malign-functions): New.
19709 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
19711 * config/nds32/constants.md (unspec_volatile_element): Add values for
19712 TLB operation and data prefetch.
19713 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
19714 functions for TLB operation and data prefetch.
19715 * config/nds32/nds32-intrinsic.md: Likewise.
19716 * config/nds32/nds32_intrinsic.h: Likewise.
19717 * config/nds32/nds32.c (nds32_dpref_names): Likewise.
19718 (nds32_print_operand): Likewise.
19719 * config/nds32/nds32.h (nds32_builtins): Likewise.
19721 2018-04-07 Thomas Koenig <tkoenig@gcc.gnu.org>
19722 Andrew Pinski <pinsika@gcc.gnu.org>
19724 PR middle-end/82976
19725 * match.pd: Use constant_boolean_node of correct type instead of
19726 boolean_true_node or boolean_false_node for simplifying
19727 pointer comparisons to zero.
19729 2018-04-07 Jakub Jelinek <jakub@redhat.com>
19731 PR tree-optimization/80021
19732 * tree.c (verify_type_variant): Make error call in verify_variant_match
19733 translatable and remove final full stop.
19735 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
19737 * config/nds32/constants.md (unspec_volatile_element): Add
19738 UNSPEC_VOLATILE_EH_RETURN.
19739 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
19740 nds32_output_stack_pop): Support dwarf exception handling process.
19741 * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
19742 * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
19743 exception handling process.
19744 (nds32_compute_stack_frame): Likewise.
19745 (nds32_return_addr_rtx): Likewise.
19746 (nds32_initial_elimination_offset): Likewise.
19747 (nds32_expand_prologue): Likewise.
19748 (nds32_expand_epilogue): Likewise.
19749 (nds32_dynamic_chain_address): New function.
19750 * config/nds32/nds32.h (machine_function): Add fields for dwarf
19751 exception handling.
19752 (DYNAMIC_CHAIN_ADDRESS): Define.
19753 (EH_RETURN_DATA_REGNO): Define.
19754 (EH_RETURN_STACKADJ_RTX): Define.
19755 * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
19756 patterns for dwarf exception handling.
19758 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
19760 * config/nds32/nds32.h: Clean up obsolete macros.
19762 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
19764 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
19765 Add enum values for particular instructions.
19766 * config/nds32/nds32-intrinsic.c: Implementation of expanding
19767 particular intrinsic functions.
19768 * config/nds32/nds32-intrinsic.md: Likewise.
19769 * config/nds32/nds32_intrinsic.h: Likewise.
19770 * config/nds32/nds32.h (nds32_builtins): Likewise.
19771 * config/nds32/nds32.md (type): Add pbsad and pbsada.
19772 (btst, ave): New patterns for particular instructions.
19774 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
19776 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
19777 Add enum values for atomic load/store and memory sync.
19778 * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
19780 * config/nds32/nds32-intrinsic.md: Likewise.
19781 * config/nds32/nds32_intrinsic.h: Likewise.
19782 * config/nds32/nds32.h (nds32_builtins): Likewise.
19784 2018-04-07 Jakub Jelinek <jakub@redhat.com>
19786 PR tree-optimization/85257
19787 * fold-const.c (native_encode_vector): If not all elts could fit
19788 and off is -1, return 0 rather than offset.
19789 * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
19790 (offseti - offset2) / BITS_PER_UNIT as 4th argument to
19791 native_encode_expr. Verify len * BITS_PER_UNIT >= maxsizei. Don't
19792 adjust buffer in native_interpret_expr call.
19794 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
19796 * config/nds32/constants.md (unspec_volatile_element): Add cache
19797 control enum values.
19798 * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
19799 * config/nds32/nds32-intrinsic.md: Add cache control patterns.
19800 * config/nds32/nds32.c (nds32_cctl_names): New.
19801 (nds32_print_operand): Handle cache control register names.
19802 * config/nds32/nds32.h (nds32_builtins): New enum values.
19803 * config/nds32/nds32_intrinsic.h: Add cache control enum types and
19805 * config/nds32/nds32.md (type): Add mmu.
19806 * config/nds32/pipelines.md (simple_insn): Add mmu.
19808 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
19810 * config/nds32/nds32.md (type): Remove call.
19811 * config/nds32/pipelines.md (simple_insn): Likewise.
19813 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
19815 * config/nds32/constants.md (unspec_volatile_element): Add
19816 UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
19817 UNSPEC_VOLATILE_FMFCFG.
19818 * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
19819 description for fmfcfg and fmfcsr.
19820 (bdesc_1arg): Add fmtcsr.
19821 (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
19822 (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
19823 * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
19824 unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
19825 unspec_fmfcfg): New patterns.
19826 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
19827 NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
19828 NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
19829 * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
19830 __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
19831 __nds32__fmfcfg): Define.
19833 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
19835 * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
19836 intrinsic register names.
19837 * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
19838 intrinsic register enum values and macros.
19840 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
19842 * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
19843 for load/store addressing form.
19844 (nds32_print_operand_address): Likewise.
19846 2018-04-06 Eric Botcazou <ebotcazou@adacore.com>
19849 * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
19850 based on LABEL_REF. Remove useless assertion.
19851 (pic_address_needs_scratch): Fix formatting.
19852 (sparc_legitimize_pic_address): Minor tweaks.
19853 (sparc_delegitimize_address): Adjust assertion accordingly.
19854 * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
19855 into symbolic_operand.
19856 (movsi_high_pic_label_ref): Likewise.
19857 (movsi_lo_sum_pic_label_ref): Likewise.
19858 (movdi_pic_label_ref): Likewise.
19859 (movdi_high_pic_label_ref): Likewise.
19860 (movdi_lo_sum_pic_label_ref): Likewise.
19862 2018-04-06 Amaan Cheval <amaan.cheval@gmail.com>
19864 * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
19865 custom LIB_SPEC setup.
19867 2018-04-06 Ruslan Bukin <br@bsdpad.com>
19868 Kito Cheng <kito.cheng@gmail.com>
19870 * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
19871 * config/riscv/freebsd.h: New.
19873 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
19875 * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
19876 * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
19879 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
19880 Kito Cheng <kito.cheng@gmail.com>
19882 * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
19883 nds32_output_call, nds32_symbol_binds_local_p): New functions.
19884 * config/nds32/nds32-protos.h (nds32_output_call,
19885 nds32_output_return): Declare.
19886 * config/nds32/nds32.md: Refine all the call and return patterns.
19888 2018-04-06 Jakub Jelinek <jakub@redhat.com>
19891 * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
19892 build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
19894 PR rtl-optimization/84872
19895 * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
19896 nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
19897 EDGE_CROSSING edge.
19899 2018-04-06 Tamar Christina <tamar.christina@arm.com>
19901 * expr.c (copy_blkmode_to_reg): Revert 254862.
19902 * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
19904 2018-04-06 Richard Biener <rguenther@suse.de>
19906 PR middle-end/85244
19907 * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
19908 after seeing a component reference with an adjacent field. Treat
19909 refs to arrays at struct end of external decls similar to
19910 refs to unconstrained commons.
19912 2018-04-06 Jakub Jelinek <jakub@redhat.com>
19915 * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
19916 look through SAVE_EXPRs with non-side-effects argument. Adjust
19918 (fold_comparison): Adjust twoval_comparison_p caller, don't handle
19921 2018-04-06 Richard Biener <rguenther@suse.de>
19923 PR middle-end/85180
19924 * alias.c (find_base_term): New wrapper around find_base_term
19925 unwinding CSELIB_VAL_PTR changes.
19926 (find_base_term): Do not restore CSELIB_VAL_PTR during the
19929 2018-04-06 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
19931 * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
19933 * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
19934 constant definitions.
19935 ("nop"): lr 0,0 -> nopr r0
19936 ("nop_lr0", "nop_lr1"): New insn definitions.
19938 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
19940 * config/nds32/nds32.md (*stack_push, *stack_pop): Use
19941 NDS32_V3PUSH_AVAILABLE_P macro.
19943 2018-04-06 Monk Chiang <sh.chiang04@gmail.com>
19944 Chung-Ju Wu <jasonwucj@gmail.com>
19946 * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
19947 (nds32*-*-*): Add float and fpu_config into supported_defaults.
19948 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
19949 Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
19950 * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
19951 UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
19952 * config/nds32/constraints.md: New constraints and checking for hard
19953 float configuration.
19954 * config/nds32/iterators.md: New mode iterator and attribute for hard
19955 float configuration.
19956 * config/nds32/nds32-doubleword.md: Use hard float alternatives and
19958 * config/nds32/nds32-fpu.md: New file.
19959 * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
19960 deal with hard float code generation.
19961 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
19963 (abi_type, float_reg_number): New enum type.
19964 * config/nds32/nds32-predicates.c: New predicates for hard float.
19965 * config/nds32/nds32-protos.h: Declare functions for hard float.
19966 * config/nds32/nds32.c: Implementation for hard float configuration.
19967 * config/nds32/nds32.h: Definitions for hard float configuration.
19968 * config/nds32/nds32.md: Include hard float machine description and
19969 modify patterns for hard float configuration.
19970 * config/nds32/nds32.opt: New options for hard float configuration.
19971 * config/nds32/predicates.md: New predicates for hard float
19974 2018-04-06 Kuan-Lin Chen <kuanlinchentw@gmail.com>
19976 * common/config/nds32/nds32-common.c
19977 (nds32_option_optimization_table): Enable -mreleax-hint by default.
19979 2018-04-05 Jakub Jelinek <jakub@redhat.com>
19981 PR middle-end/85195
19982 * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
19983 CONSTRUCTOR_ELT (ctor, ...)->value.
19985 2018-04-05 Uros Bizjak <ubizjak@gmail.com>
19988 * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
19990 2018-04-05 Tom de Vries <tom@codesourcery.com>
19993 * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
19996 2018-04-05 Shiva Chen <shiva0217@gmail.com>
19997 Kito Cheng <kito.cheng@gmail.com>
19999 * config/nds32/constraints.md (U33): Fine-tune checking condition.
20000 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
20001 * config/nds32/nds32.h (nds32_16bit_address_type): Add
20002 ADDRESS_POST_MODIFY_LO_REG_IMM3U.
20004 2018-04-05 Shiva Chen <shiva0217@gmail.com>
20005 Kito Cheng <kito.cheng@gmail.com>
20007 * config/nds32/constraints.md (Ufe): New memory constraint.
20008 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
20009 nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
20010 * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
20012 * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
20013 * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
20015 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
20017 * config/nds32/nds32.md: Use optimize_size in the condition for
20018 alu-shift instructions.
20020 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
20022 * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
20024 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
20026 * config/nds32/nds32.md (negsi2): Refine pattern.
20028 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
20029 Chung-Ju Wu <jasonwucj@gmail.com>
20031 * config/nds32/iterators.md (shift_rotate): New code iterator.
20032 (shift): New code attribute.
20033 * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
20034 * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
20035 * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
20036 * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
20037 bit-wise operations.
20038 (andsi3, *andsi3): Ditto.
20039 (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
20040 (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
20041 (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
20042 * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
20043 nds32_ior_operand, nds32_xor_operand): New predicates.
20045 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
20047 * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
20048 (addsi3, subsi3): ... this.
20050 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
20052 * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
20054 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
20056 * config/nds32/nds32.md: Adjust indention.
20058 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
20060 * config/nds32/nds32.md (feature): New attribute.
20062 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
20064 * config/nds32/nds32.md (subtype): New attribute.
20066 2018-04-04 Thomas Preud'homme <thomas.preudhomme@arm.com>
20069 * config/arm/arm-builtins.c (arm_expand_builtin): Change
20070 expansion to perform a bitwise AND of the argument followed by a
20071 boolean negation of the result.
20073 2018-04-04 Peter Bergner <bergner@vnet.ibm.com>
20075 PR rtl-optimization/84878
20076 * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
20077 the basic block. Assert the use reference is not artificial and that
20078 it has an associated insn.
20080 2018-04-04 Michael Matz <matz@suse.de>
20082 * builtins.c (compute_objsize): Pass correct operand
20083 to array_at_struct_end_p.
20085 2018-04-04 Richard Biener <rguenther@suse.de>
20088 * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
20089 from contexts for DINFO_LEVEL_TERSE and below.
20091 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
20093 * config/nds32/nds32-doubleword.md (move_<mode>): Require
20094 resiter_operand condition.
20095 * config/nds32/nds32.md (*move<mode>): Ditto.
20097 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
20098 Monk Chiang <sh.chiang04@gmail.com>
20100 * config/nds32/nds32.md (movmisalign<mode>): New pattern.
20102 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
20104 * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
20106 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
20107 Kito Cheng <kito.cheng@gmail.com>
20109 * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
20110 nds32_cond_code_str, output_cond_branch,
20111 output_cond_branch_compare_zero, nds32_expand_cbranch,
20112 nds32_expand_cstore, nds32_expand_movcc,
20113 nds32_output_cbranchsi4_equality_zero,
20114 nds32_output_cbranchsi4_equality_reg,
20115 nds32_output_cbranchsi4_equality_reg_or_const_int,
20116 nds32_output_cbranchsi4_greater_less_zero: New functions.
20117 * config/nds32/nds32-protos.h (nds32_expand_cbranch,
20118 nds32_expand_cstore, nds32_expand_movcc,
20119 nds32_output_cbranchsi4_equality_zero,
20120 nds32_output_cbranchsi4_equality_reg,
20121 nds32_output_cbranchsi4_equality_reg_or_const_int,
20122 nds32_output_cbranchsi4_greater_less_zero): Declare.
20123 * config/nds32/predicates.md (nds32_movecc_comparison_operator,
20124 nds32_rimm11s_operand): New predicates.
20125 * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
20126 * config/nds32/nds32.md: Rewrite all the branch and conditional move
20129 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
20131 * config/nds32/nds32-doubleword.md: Refine all the instruction type.
20132 * config/nds32/nds32.md: Ditto.
20133 * config/nds32/pipelines.md: Ditto.
20135 2018-04-04 Richard Biener <rguenther@suse.de>
20137 PR tree-optimization/85168
20138 * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
20139 propagating abnormals.
20141 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
20143 * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
20145 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
20146 Kito Cheng <kito.cheng@gmail.com>
20148 * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
20149 * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
20150 * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
20151 (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
20152 * config/nds32/nds32.md (sibcall_internal): New.
20153 (sibcall_register): Remove.
20154 (sibcall_immediate): Remove.
20155 (sibcall_value_internal): New.
20156 (sibcall_value_register): Remove.
20157 (sibcall_value_immediate): Remove.
20158 * config/nds32/predicates.md (nds32_general_register_operand): New.
20159 (nds32_call_address_operand): New.
20161 2018-04-03 Jakub Jelinek <jakub@redhat.com>
20163 PR rtl-optimization/85167
20164 * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
20165 bb_defs if *split_p, instead preinitialize it to NULL.
20167 PR tree-optimization/85156
20168 * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
20169 evaluating the argument multiple times.
20171 2018-04-03 Bill Schmidt <wschmidt@linux.ibm.com>
20173 * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
20175 (_mm_cvtpd_ps): Likewise.
20176 (_mm_cvttpd_epi32): Likewise.
20177 * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
20178 * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
20179 vector, pixel, and bool following altivec.h include.
20181 2018-04-03 Martin Sebor <msebor@redhat.com>
20183 * doc/extend.texi (Common Function Attributes): Clarify.
20184 (const attribute): Likewise.
20185 (pure attribute): Likewise.
20187 2018-04-03 Jakub Jelinek <jakub@redhat.com>
20190 * config/i386/i386.c (ix86_expand_vector_set): Use
20191 HOST_WIDE_INT_1U << elt instead of 1 << elt. Formatting fix.
20193 2018-04-03 Uros Bizjak <ubizjak@gmail.com>
20195 * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
20196 instructions when changing rounding bits to preserve precision bits
20197 in the x87 control word.
20199 2018-04-03 Martin Liska <mliska@suse.cz>
20201 PR tree-optimization/82491
20202 * rtl.h (strip_offset_and_add): Replace += suboffset with
20203 poly_uint64 () + suboffset.
20205 2018-03-29 Martin Liska <mliska@suse.cz>
20206 Martin Jambor <mjambor@suse.cz>
20209 * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
20210 param_type is not an integral or pointer type.
20212 2018-04-03 Richard Biener <rguenther@suse.de>
20214 * sese.h (recompute_all_dominators): Remove.
20216 2018-04-02 Martin Sebor <msebor@redhat.com>
20218 * doc/invoke.texi (-Wrestrict): Fix typos.
20220 2018-04-02 Jim Wilson <jimw@sifive.com>
20222 * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
20223 * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
20224 (<optab>di3, <optab>si3_extend): Likewise.
20225 (<optab>si3_mask, <optab>si3_mask_1): New.
20226 (<optab>di3_mask, <optab>di3_mask_1): New.
20227 (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
20228 (lshrsi3_zero_extend_1): Use VOIDmode shift count.
20229 * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
20231 2018-04-02 Gerald Pfeifer <gerald@pfeifer.com>
20233 * doc/cpp.texi (Variadic Macros): Fix line continuation in an
20236 2018-04-02 Chung-Ju Wu <jasonwucj@gmail.com>
20238 * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
20239 (nds32_canonicalize_comparison): New function.
20241 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
20242 Kito Cheng <kito.cheng@gmail.com>
20243 Kuan-Lin Chen <kuanlinchentw@gmail.com>
20245 * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
20246 * config/nds32/constants.md (unspec_volatile_element): Add
20247 UNSPEC_VOLATILE_RELAX_GROUP.
20248 * config/nds32/nds32-relax-opt.c: New file.
20249 * config/nds32/nds32-predicates.c
20250 (nds32_symbol_load_store_p): New function.
20251 * config/nds32/nds32-protos.h
20252 (nds32_symbol_load_store_p): Declare function.
20253 (make_pass_nds32_relax_opt): Declare new rtl pass function.
20254 * config/nds32/nds32.c
20255 (nds32_register_pass): New function to register pass.
20256 (nds32_register_passes): New function to register passes.
20257 * config/nds32/nds32.md (relax_group): New pattern.
20258 * config/nds32/nds32.opt (mrelax-hint): New option.
20259 * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
20261 2018-04-01 Kito Cheng <kito.cheng@gmail.com>
20263 * config/nds32/t-nds32: Modify files dependency.
20265 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
20267 * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
20268 (PROFILE_HOOK): Define its implementation.
20270 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
20272 * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
20273 type and 32-bit size.
20275 2018-04-01 Jakub Jelinek <jakub@redhat.com>
20277 PR middle-end/85090
20278 * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
20279 (V_128_256): New mode iterator.
20280 (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
20281 (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
20282 (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
20284 * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
20285 V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
20287 2018-03-31 Segher Boessenkool <segher@kernel.crashing.org>
20290 * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
20291 NaN inputs correctly.
20293 2018-03-30 Peter Bergner <bergner@vnet.ibm.com>
20296 * config/rs6000/vsx.md (??r): New mode attribute.
20297 (*vsx_mov<mode>_64bit): Use it.
20298 (*vsx_mov<mode>_32bit): Likewise.
20300 2018-03-30 Martin Sebor <msebor@redhat.com>
20302 PR tree-optimization/84818
20303 * builtins.c (check_access): Use warning_n.
20305 2018-03-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
20308 * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
20310 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
20313 2018-03-30 Julia Koval <julia.koval@intel.com>
20316 * x86-tune.def (movx, partial_reg_dependency): Enable for
20319 2018-03-29 Vladimir Makarov <vmakarov@redhat.com>
20321 PR inline-asm/84985
20322 * lra-constraints.c (process_alt_operands): Move setting
20323 this_alternative_matches below.
20325 2018-03-29 Martin Liska <mliska@suse.cz>
20328 * doc/invoke.texi: Document how LTO works with debug info.
20329 Describe auto-load support of binutils. Mention 'x86-64'
20330 as valid option value of -march option.
20332 2018-03-29 Jakub Jelinek <jakub@redhat.com>
20334 * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
20337 * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
20338 For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
20339 OEP_NO_HASH_CHECK for recursive call, to avoid exponential
20342 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
20345 * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
20346 (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
20347 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
20348 for RS6000_BTM_POWERPC64.
20349 (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
20350 (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
20351 * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
20354 (DIVDEU): Likewise.
20356 2018-03-28 Carl Love <cel@us.ibm.com>
20359 2017-09-27 Carl Love <cel@us.ibm.com>
20361 * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
20362 (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
20363 * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
20366 2018-03-28 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
20368 * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
20369 instead of __vector bool.
20370 (_mm_max_pu8): Likewise.
20371 (_mm_min_pi16): Likewise.
20373 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
20376 * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
20377 (DIVWEUO): Likewise.
20378 (DIVDEO): Likewise.
20379 (DIVDEUO): Likewise.
20380 * config/rs6000/rs6000.c (builtin_function_type): Remove support for
20381 DIVWEUO and DIVDEUO.
20382 * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
20383 (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
20384 (div_extend): Likewise.
20385 * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
20387 (__builtin_divweuo): Likewise.
20388 (__builtin_divdeo): Likewise.
20389 (__builtin_divdeuo): Likewise.
20391 2018-03-28 Jakub Jelinek <jakub@redhat.com>
20394 * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
20395 *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
20397 PR tree-optimization/82004
20398 * gimple-match-head.c (optimize_pow_to_exp): New function.
20399 * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
20400 Don't fold to exp if optimize_pow_to_exp is false.
20402 2018-03-28 Martin Liska <mliska@suse.cz>
20405 * calls.c (initialize_argument_information): Fix trailing space.
20406 * common.opt: Fix typo and provide better explanation for
20407 -fsanitize-coverage option.
20408 * config/i386/i386.opt: Fix typo.
20410 2018-03-28 Jakub Jelinek <jakub@redhat.com>
20411 Martin Liska <mliska@suse.cz>
20414 * gimplify.c (asan_poison_variable): Don't do the check for
20415 gimplify_omp_ctxp here.
20416 (gimplify_decl_expr): Do it here.
20417 (gimplify_target_expr): Likewise.
20419 2018-03-28 Martin Liska <mliska@suse.cz>
20422 * config/i386/i386.c (ix86_function_arg_advance): Do not call
20423 chkp_type_bounds_count if MPX is not enabled.
20425 2018-03-27 Chung-Ju Wu <jasonwucj@gmail.com>
20427 * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
20429 2018-03-27 Michael Meissner <meissner@linux.vnet.ibm.com>
20432 * config/rs6000/rs6000.c (create_complex_muldiv): New helper
20433 function to create the function decl for complex long double
20434 multiply and divide for -mabi=ieeelongdouble.
20435 (init_float128_ieee): Call it.
20437 2018-03-27 H.J. Lu <hongjiu.lu@intel.com>
20440 * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
20441 -fcf-protection=branch -mibt.
20442 * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
20444 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
20447 * config/arm/arm.c (arm_valid_symbolic_address): Handle
20448 arm_word_relocations.
20450 2018-03-27 Cesar Philippidis <cesar@codesourcery.com>
20453 * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
20454 extern array declarations.
20456 2018-03-27 Richard Biener <rguenther@suse.de>
20458 PR middle-end/84067
20459 * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
20460 explicit single_use checks.
20462 2018-03-27 Richard Biener <rguenther@suse.de>
20464 PR tree-optimization/85082
20465 * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
20468 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
20470 * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
20471 * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
20472 Turn on fasynchronous-unwind-tables and funwind-tables.
20474 2018-03-26 Uros Bizjak <ubizjak@gmail.com>
20477 * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
20478 (*bmi_blsr_<mode>_ccz): Ditto.
20480 2018-03-26 Tom de Vries <tom@codesourcery.com>
20482 PR tree-optimization/85063
20483 * omp-general.c (offloading_function_p): New function. Factor out
20485 * omp-offload.c (pass_omp_target_link::gate): ... here.
20486 * omp-general.h (offloading_function_p): Declare.
20487 * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
20488 with attribute omp declare target for offloading functions.
20490 2018-03-24 Richard Sandiford <richard.sandiford@linaro.org>
20492 PR tree-optimization/84005
20493 * tree-data-ref.h (get_base_for_alignment): Declare.
20494 * tree-data-ref.c (get_base_for_alignment_1): New function.
20495 (get_base_for_alignment): Likewise.
20496 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
20497 get_base_for_alignment to find a suitable base object, instead
20498 of always using drb->base_address.
20500 2018-03-23 Jakub Jelinek <jakub@redhat.com>
20502 PR inline-asm/85022
20503 * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
20504 known size by default.
20506 2018-03-23 Vladimir Makarov <vmakarov@redhat.com>
20508 PR inline-asm/85030
20509 * lra-constraints.c (process_alt_operands): Don't match BLKmode
20510 and non BLKmode operands.
20512 2018-03-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
20515 * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
20516 Clean up attributes.
20518 2018-03-23 Richard Biener <rguenther@suse.de>
20521 * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
20522 we are going to emit early debug for LTO.
20524 2018-03-23 Jakub Jelinek <jakub@redhat.com>
20526 PR inline-asm/85034
20527 * function.c (match_asm_constraints_1): Don't optimize if input
20528 doesn't satisfy general_operand predicate for output's mode.
20530 PR inline-asm/85022
20531 * alias.c (write_dependence_p): Don't require for x_canonicalized
20532 non-VOIDmode if x has VOIDmode.
20535 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
20536 just don't try to optimize it rather than assert it never happens.
20538 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
20540 * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
20541 macro expansions for definition of ST_INTERNAL_<mode> and
20542 LD_INTERNAL_<mode> builtins.
20543 * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
20545 * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
20547 (altivec_expand_st_builtin): Likewise.
20548 (altivec_expand_builtin): Remove calls to deleted functions.
20549 (rs6000_address_for_altivec): Delete this function.
20550 * config/rs6000/vector.md: Remove expands for
20551 vector_altivec_load_<mode> and vector_altivec_store_<mode>.
20553 2018-03-22 Sudakshina Das <sudi.das@arm.com>
20556 * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
20557 * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
20558 re-computing once computed.
20559 (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
20560 (arm_init_machine_status): Initialize
20561 machine->static_chain_stack_bytes.
20563 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
20566 * doc/extend.texi: Add four new prototypes for vec_ld.
20567 * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
20568 definitions for more logical presentation.
20569 * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
20570 entries for V1TI variants of __builtin_altivec_ld builtin.
20571 * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
20572 handling of V1TI variant of LVX icode pattern.
20573 (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
20574 (rs6000_gimple_fold_builtin): Likewise.
20575 (altivec_init_builtins): Add code to define
20576 __builtin_altivec_lvx_v1ti function.
20578 2018-03-22 Jakub Jelinek <jakub@redhat.com>
20580 PR inline-asm/84941
20581 * function.c (match_asm_constraints_1): Don't do the optimization
20582 if input isn't a REG, SUBREG, MEM or constant.
20584 2018-03-22 Tom de Vries <tom@codesourcery.com>
20586 PR tree-optimization/84956
20587 * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
20588 bb_has_abnormal_pred.
20590 2018-03-22 Jakub Jelinek <jakub@redhat.com>
20593 * dwarf2asm.c (dw2_output_indirect_constant_1): Set
20594 DECL_INITIAL (decl) to decl at the end.
20595 * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
20596 adjust the comment.
20598 2018-03-21 Joseph Myers <joseph@codesourcery.com>
20600 * doc/extend.texi (__builtin_tgmath): Document when complex
20601 integer types are treated as _Complex _Float64.
20603 2018-03-21 Tom de Vries <tom@codesourcery.com>
20605 * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
20607 2018-03-21 Jakub Jelinek <jakub@redhat.com>
20609 PR tree-optimization/84960
20610 * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
20611 if it is ENTRY block, move them into single succ of ENTRY in that case.
20613 2018-03-21 Richard Sandiford <richard.sandiford@linaro.org>
20615 PR tree-optimization/84811
20616 * poly-int.h (poly_span_traits): Remove the T3 parameter and
20617 promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
20618 (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
20619 (known_subrange_p): Update accordingly. Cast each value involved
20620 in the size comparison, rather than casting the result of the
20623 2018-03-21 Jakub Jelinek <jakub@redhat.com>
20625 PR tree-optimization/84982
20626 * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
20627 by flipping the least significant bit rather than all bits from
20628 bitpos to bitpos + bitsize - 1.
20630 2018-03-21 Nathan Sidwell <nathan@acm.org>
20632 * doc/extend.texi (Deprecated Features): Remove mention of
20633 long-deleted deprecations.
20635 2018-03-21 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
20638 * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
20639 * configure: Regenerate.
20641 2018-03-21 Tom de Vries <tom@codesourcery.com>
20643 PR tree-optimization/83126
20644 * tree-parloops.c (num_phis): New function.
20645 (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
20647 2018-03-21 Nathan Sidwell <nathan@acm.org>
20649 * doc/extend.texi (Deprecated Features): Update deprecated flags,
20650 mention anon-struct/union members and trailing attributes.
20652 2018-03-21 Bin Cheng <bin.cheng@arm.com>
20654 PR tree-optimization/84969
20655 * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
20656 builtin memset partitions if they set different rhs values.
20658 2018-03-21 Jakub Jelinek <jakub@redhat.com>
20660 PR rtl-optimization/84989
20661 * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
20662 VEC_DUPLICATE with scalar result mode.
20664 2018-03-21 Martin Liska <mliska@suse.cz>
20667 * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
20668 not intended return statement.
20670 2018-03-21 Martin Liska <mliska@suse.cz>
20673 * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
20674 (chkp_find_bound_slots_1): Limit number of iterations.
20676 2018-03-20 David H. Gutteridge <dhgutteridge@sympatico.ca>
20679 * Minor grammar fixes for x86 options.
20681 2018-03-20 Jakub Jelinek <jakub@redhat.com>
20684 * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
20685 holding REG_CFA_RESTORE notes, instead turn them into a USE.
20687 2018-03-20 Peter Bergner <bergner@vnet.ibm.com>
20690 * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
20691 (altivec_lvx_<mode>_1op): Likewise.
20692 (altivec_stvx_<mode>_2op): Likewise.
20693 (altivec_stvx_<mode>_1op): Likewise.
20694 (altivec_lvx_<VM2:mode>): New define_expand.
20695 (altivec_stvx_<VM2:mode>): Likewise.
20696 (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
20697 (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
20698 (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
20699 (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
20700 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
20701 (rs6000_gen_lvx): Likewise.
20702 * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
20703 (altivec_expand_stv_builtin): Likewise.
20704 (altivec_expand_builtin): Likewise.
20705 * config/rs6000/vector.md: Likewise.
20707 2018-03-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
20710 * config/arm/arm.c (arm_array_mode_supported_p): Return false for
20713 2018-03-20 Richard Biener <rguenther@suse.de>
20716 * config/i386/i386.c (ix86_add_stmt_cost): Only cost
20717 sign-conversions as zero, fall back to standard scalar_stmt
20720 2018-03-20 Martin Liska <mliska@suse.cz>
20723 * predict.c (rebuild_frequencies): Handle case when we have
20724 PROFILE_ABSENT, but flag_guess_branch_prob is false.
20726 2018-03-20 Jakub Jelinek <jakub@redhat.com>
20729 * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
20730 flag_section_anchors.
20731 * varasm.c (use_blocks_for_decl_p): Remove hack for
20732 dw2_force_const_mem.
20735 * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
20737 (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this. If pseudos can't
20738 be created, use lowpart_subreg of operands[0] rather than operands[0]
20740 (*aarch64_reg_<mode>3_minus_mask): Rename to ...
20741 (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
20742 (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
20743 and n constraint instead of aarch64_shift_imm_di and Usd.
20744 (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
20745 (*aarch64_<optab>_reg_minus<mode>3): ... this.
20747 2018-03-20 Sudakshina Das <sudi.das@arm.com>
20750 * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
20751 to favor GPR over NEON registers.
20752 (<shift>di3_neon): Likewise.
20754 2018-03-20 Tom de Vries <tom@codesourcery.com>
20757 * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
20758 (nvptx_process_pars): Emit bar.sync asap and alap.
20760 2018-03-20 Tom de Vries <tom@codesourcery.com>
20763 * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
20764 seen_label if seen_label is already set.
20766 2018-03-20 Jakub Jelinek <jakub@redhat.com>
20769 * config/i386/i386.c (fold_builtin_cpu): For features above 31
20770 use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
20771 Use 1U instead of 1. Formatting fixes.
20774 * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
20775 instead of TREE_TYPE (s1) for the return value.
20777 2018-03-19 Jakub Jelinek <jakub@redhat.com>
20779 PR tree-optimization/84946
20780 * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
20781 bitsize + bitsize in poly_uint64 rather than poly_int64.
20784 * dwarf2asm.c: Include fold-const.c.
20785 (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
20786 of decl rather than decl itself.
20788 PR rtl-optimization/84643
20789 * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
20791 2018-03-19 Maxim Ostapenko <m.ostapenko@samsung.com>
20794 * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
20795 calling assemble_variable.
20797 2018-03-19 Sudakshina Das <sudi.das@arm.com>
20800 * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
20801 instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
20803 2018-03-19 Jim Wilson <jimw@sifive.com>
20806 * config/riscv/riscv.c (riscv_function_arg_boundary): Use
20807 PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
20808 (riscv_first_stack_step): Likewise.
20809 (riscv_option_override): Use STACK_BOUNDARY instead of
20810 MIN_STACK_BOUNDARY.
20811 * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
20812 MIN_STACK_BOUNDARY.
20813 (BIGGEST_ALIGNMENT): Set to 128.
20814 (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
20815 (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
20818 2018-03-19 Richard Biener <rguenther@suse.de>
20820 PR tree-optimization/84933
20821 * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
20822 values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
20824 2018-03-19 Richard Biener <rguenther@suse.de>
20826 PR tree-optimization/84859
20827 * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
20828 (cond_if_else_store_replacement): Perform sinking operation on
20829 single-store BBs regardless of MAX_STORES_TO_SINK setting.
20830 Generalize what a BB with a single eligible store is.
20832 2018-03-19 Richard Biener <rguenther@suse.de>
20834 PR tree-optimization/84929
20835 * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
20836 chrec_is_positive against non-chrec arg.
20838 2018-03-19 Tamar Christina <tamar.christina@arm.com>
20841 * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
20843 2018-03-18 Martin Liska <mliska@suse.cz>
20845 PR rtl-optimization/84635
20846 * regrename.c (build_def_use): Use matches_mode only when
20849 2018-03-18 Richard Sandiford <richard.sandiford@linaro.org>
20851 PR tree-optimization/84913
20852 * tree-vect-loop.c (vectorizable_reduction): Don't try to
20853 vectorize chains of COND_EXPRs.
20855 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
20857 * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
20859 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
20861 * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
20863 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
20865 * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
20867 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
20868 Kito Cheng <kito.cheng@gmail.com>
20870 * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
20871 * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
20872 (nds32_adjust_reg_alloc_order): New function.
20873 * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
20875 2018-03-17 Kito Cheng <kito.cheng@gmail.com>
20877 * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
20878 nds32_print_operand, nds32_print_operand_address): Use
20879 HOST_WIDE_INT_PRINT_DEC instead.
20881 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
20883 * config/nds32/nds32.c (nds32_register_priority): Modify cost.
20885 2018-03-17 Jakub Jelinek <jakub@redhat.com>
20888 * config/i386/i386.c (initial_ix86_tune_features,
20889 initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
20890 unsigned long long.
20891 (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
20892 to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
20893 rather than 1u << ix86_tune. Formatting fix.
20894 (ix86_option_override_internal): Change ix86_arch_mask from
20895 unsigned int to unsigned HOST_WIDE_INT, initialize to
20896 HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
20897 (ix86_function_specific_restore): Likewise.
20899 2018-03-16 Jakub Jelinek <jakub@redhat.com>
20902 * postreload.c (reload_combine_recognize_pattern): Perform
20903 INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
20904 truncate_int_for_mode the result for the destination's mode.
20907 * hsa-gen.c (mem_type_for_type): Fix comment typo.
20908 * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
20910 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
20913 2018-03-16 Vladimir Makarov <vmakarov@redhat.com>
20916 * lra-assigns.c (lra_split_hard_reg_for): Don't use
20917 regno_allocno_class_array and sorted_pseudos.
20918 * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
20919 insns where regno is used.
20921 2018-03-16 Martin Liska <mliska@suse.cz>
20924 * multiple_target.c (create_dispatcher_calls): Redirect
20925 reference in the symbol table.
20927 2018-03-16 Martin Liska <mliska@suse.cz>
20930 * multiple_target.c (create_dispatcher_calls): Redirect also
20933 2018-03-16 Jakub Jelinek <jakub@redhat.com>
20937 * tree.h (TARGET_EXPR_NO_ELIDE): Define.
20938 * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
20939 TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
20941 2018-03-16 Julia Koval <julia.koval@intel.com>
20943 * doc/invoke.texi (Skylake Server): Add CLWB.
20944 Cannonlake): Remove CLWB.
20946 2018-03-16 Jakub Jelinek <jakub@redhat.com>
20948 PR tree-optimization/84841
20949 * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
20951 (FLOAT_ONE_CONST_TYPE): Define.
20952 (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
20953 (sort_by_operand_rank): Put entries with higher constant_type last
20954 rather than first to match comments.
20956 2018-03-15 Sandra Loosemore <sandra@codesourcery.com>
20958 * config/nios2/nios2.md (movsi_internal): Fix thinko in
20961 2018-03-15 Jakub Jelinek <jakub@redhat.com>
20964 * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
20965 check and use address of target always.
20967 2018-03-15 H.J. Lu <hongjiu.lu@intel.com>
20970 * config/i386/i386.c (indirect_thunk_needed): Update comments.
20971 (indirect_thunk_bnd_needed): Likewise.
20972 (indirect_thunks_used): Likewise.
20973 (indirect_thunks_bnd_used): Likewise.
20974 (indirect_return_needed): New.
20975 (indirect_return_bnd_needed): Likewise.
20976 (output_indirect_thunk_function): Add a bool argument for
20978 (output_indirect_thunk_function): Don't generate alias for
20979 function return thunk.
20980 (ix86_code_end): Call output_indirect_thunk_function to generate
20981 function return thunks.
20982 (ix86_output_function_return): Set indirect_return_bnd_needed
20983 and indirect_return_needed instead of indirect_thunk_bnd_needed
20984 and indirect_thunk_needed.
20986 2018-03-15 Olga Makhotina <olga.makhotina@intel.com>
20988 * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
20989 (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
20990 (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
20992 2018-03-15 David Malcolm <dmalcolm@redhat.com>
20993 Paul Hua <paul.hua.gm@gmail.com>
20996 * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
20998 2018-03-15 Segher Boessenkool <segher@kernel.crashing.org>
21000 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
21001 TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
21002 resp. SFmode cases.
21004 2018-03-15 Tamar Christina <tamar.christina@arm.com>
21007 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
21008 instead of GET_MODE_SIZE when comparing Units.
21010 2018-03-15 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
21013 * varasm.c (hash_section): Return an unchangeble hash value
21014 * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
21015 Return !aarch64_can_use_per_function_literal_pools_p ().
21017 2018-03-15 Jakub Jelinek <jakub@redhat.com>
21020 * optabs.c (emit_conditional_move): Pass address of cmode's copy
21021 rather than address of cmode as last argument to prepare_cmp_insn.
21023 2018-03-15 Julia Koval <julia.koval@intel.com>
21025 * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
21026 F_AVX512VNNI, F_AVX512BITALG): New.
21028 2018-03-14 John David Anglin <danglin@gcc.gnu.org>
21031 * config/pa/pa.c (pa_emit_move_sequence): Always emit secondary reload
21032 insn for floating-point loads and stores.
21034 2018-03-14 Carl Love <cel@us.ibm.com>
21036 * config/rs6000/rs6000-c.c: Add macro definitions for
21037 ALTIVEC_BUILTIN_VEC_PERMXOR.
21038 * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
21039 * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
21040 * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
21041 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
21043 * config/doc/extend.texi: Add prototypes for vec_permxor.
21045 2018-03-14 David Malcolm <dmalcolm@redhat.com>
21048 * diagnostic-show-locus.c (class layout_point): Convert m_line
21049 from int to linenum_type.
21050 (line_span::comparator): Use linenum "compare" function when
21051 comparing line numbers.
21052 (test_line_span): New function.
21053 (layout_range::contains_point): Convert param "row" from int to
21055 (layout_range::intersects_line_p): Likewise.
21056 (layout::will_show_line_p): Likewise.
21057 (layout::print_source_line): Likewise.
21058 (layout::should_print_annotation_line_p): Likewise.
21059 (layout::print_annotation_line): Likewise.
21060 (layout::print_leading_fixits): Likewise.
21061 (layout::annotation_line_showed_range_p): Likewise.
21062 (struct line_corrections): Likewise for field m_row.
21063 (line_corrections::line_corrections): Likewise for param "row".
21064 (layout::print_trailing_fixits): Likewise.
21065 (layout::get_state_at_point): Likewise.
21066 (layout::get_x_bound_for_row): Likewise.
21067 (layout::print_line): Likewise.
21068 (diagnostic_show_locus): Likewise for locals "last_line" and "row".
21069 (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
21070 * input.c (selftest::test_linenum_comparisons): New function.
21071 (selftest::input_c_tests): Call it.
21072 * selftest.c (selftest::test_assertions): Test ASSERT_GT,
21073 ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
21074 * selftest.h (ASSERT_GT): New macro.
21075 (ASSERT_GT_AT): New macro.
21076 (ASSERT_LT): New macro.
21077 (ASSERT_LT_AT): New macro.
21079 2018-03-14 Segher Boessenkool <segher@kernel.crashing.org>
21081 PR rtl-optimization/84780
21082 * combine.c (distribute_links): Don't make a link based on pc_rtx.
21084 2018-03-14 Martin Liska <mliska@suse.cz>
21086 * tree.c (record_node_allocation_statistics): Use
21087 get_stats_node_kind.
21088 (get_stats_node_kind): New function extracted from
21089 record_node_allocation_statistics.
21090 (free_node): Use get_stats_node_kind.
21092 2018-03-14 Richard Biener <rguenther@suse.de>
21094 * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
21095 that the value-set of ANTIC_IN doesn't grow.
21098 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
21100 (BB_VISITED_WITH_VISITED_SUCCS): New define.
21101 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
21103 2018-03-14 Julia Koval <julia.koval@intel.com>
21105 * config.gcc (icelake-client, icelake-server): New.
21107 * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
21108 (initial_ix86_arch_features): Ditto.
21109 (PTA_SKYLAKE): Add SGX.
21110 (PTA_ICELAKE): Remove.
21111 (PTA_ICELAKE_CLIENT): New.
21112 (PTA_ICELAKE_SERVER): New.
21113 (ix86_option_override_internal): Split up icelake on icelake client and
21115 (get_builtin_code_for_version): Ditto.
21116 (fold_builtin_cpu): Ditto.
21117 * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
21118 * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
21119 * config/i386/i386.h (processor_type): Ditto.
21120 * doc/invoke.texi: Ditto.
21122 2018-03-14 Jakub Jelinek <jakub@redhat.com>
21125 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
21126 INTEGER_CST offset, add it together with bitpos / 8 and
21127 sign extend based on POINTER_SIZE.
21131 2017-04-20 Uros Bizjak <ubizjak@gmail.com>
21134 * config/i386/constraints.md (Yc): New register constraint.
21135 * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
21136 Use Yc constraint for alternative 2 of operand 0. Remove
21137 preferred_for_speed attribute.
21139 2018-03-14 Richard Biener <rguenther@suse.de>
21141 PR tree-optimization/84830
21142 * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
21143 with the old one to avoid oscillations.
21145 2018-03-13 Vladimir Makarov <vmakarov@redhat.com>
21148 * lra-assigns.c (find_all_spills_for): Ignore uninteresting
21150 (assign_by_spills): Return a flag of reload assignment failure.
21151 Do not process the reload assignment failures. Do not spill other
21152 reload pseudos if they has the same reg class. Update n if
21154 (lra_assign): Add a return arg. Set up from the result of
21155 assign_by_spills call.
21156 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
21157 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
21158 usage_insns if it is not NULL.
21159 (spill_hard_reg_in_range): New function.
21160 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
21161 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
21162 function prototypes.
21163 (lra_assign): Change prototype.
21164 * lra.c (lra): Add code to deal with fails by splitting hard reg
21167 2018-03-01 Palmer Dabbelt <palmer@sifive.com>
21169 * config/riscv/riscv.opt (mrelax): New option.
21170 * config/riscv/riscv.c (riscv_file_start): Emit ".option
21171 "norelax" when riscv_mrelax is disabled.
21172 * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
21174 2018-03-13 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
21177 * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
21178 reassociation for int modes.
21180 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
21182 * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
21183 Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
21185 * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
21186 * config/aarch64/aarch64-sve.md
21187 (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
21188 (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
21189 (*extend<mode><Vwide>2): Rename to...
21190 (aarch64_sve_extend<mode><Vwide>2): ...this.
21191 (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
21192 renaming the old pattern to...
21193 (aarch64_sve_punpk<perm_hilo>_<mode>): ...this. Only define
21195 (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
21196 define_expand, renaming the old pattern to...
21197 (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
21198 (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
21199 (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
21200 account when deciding which SVE instruction the optab should use.
21201 (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
21203 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
21205 * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
21206 (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
21207 (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
21208 (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
21209 (tlsdesc_small_<mode>): Turn a define_expand and use
21210 tlsdesc_small_sve_<mode> for SVE. Rename original define_insn to...
21211 (tlsdesc_small_advsimd_<mode>): ...this.
21212 (tlsdesc_small_sve_<mode>): New pattern.
21214 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
21216 * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
21217 (UNSPEC_UMUL_HIGHPART): New constants.
21218 (MUL_HIGHPART): New int iteraor.
21219 (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
21220 * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
21222 (*<su>mul<mode>3_highpart): New define_insn.
21224 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
21227 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
21230 2018-03-13 Martin Liska <mliska@suse.cz>
21233 * (sem_item_optimizer::sem_item_optimizer): Initialize new
21235 (sem_item_optimizer::~sem_item_optimizer): Release it.
21236 (sem_item_optimizer::merge_classes): Register variable aliases.
21237 (sem_item_optimizer::fixup_pt_set): New function.
21238 (sem_item_optimizer::fixup_points_to_sets): Likewise.
21239 * ipa-icf.h: Declare new variables and functions.
21241 2018-03-13 Jakub Jelinek <jakub@redhat.com>
21243 PR middle-end/84834
21244 * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
21245 integer_pow2p@2 and test integer_pow2p in condition.
21246 (A < 0 ? C : 0): Similarly for @1.
21248 PR middle-end/84831
21249 * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
21250 characters starting at p contain '\0' character, don't look beyond
21254 * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
21255 pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
21258 * reg-stack.c (change_stack): Change update_end var from int to
21259 rtx_insn *, if non-NULL don't update just BB_END (current_block), but
21260 also call set_block_for_insn on the newly added insns and rescan.
21263 * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
21264 on the last operand.
21267 * tree.c (stabilize_reference_1): Return save_expr (e) for
21268 STATEMENT_LIST even if it doesn't have side-effects.
21270 2018-03-12 Jonathan Wakely <jwakely@redhat.com>
21272 * doc/invoke.texi (-mclflushopt): Fix spelling of option.
21274 2018-03-12 Renlin Li <renlin.li@arm.com>
21276 * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
21277 aarch64_output_scalar_simd_mov_immediate.
21279 2018-03-12 Martin Sebor <msebor@redhat.com>
21281 PR tree-optimization/83456
21282 * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
21283 for perfectly overlapping calls to memcpy.
21284 (gimple_fold_builtin_memory_chk): Same.
21285 (gimple_fold_builtin_strcpy): Handle no-warning.
21286 (gimple_fold_builtin_stxcpy_chk): Same.
21287 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
21289 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
21291 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
21292 parameter. Use it for SFmode.
21293 (rs6000_function_arg_advance_1): Adjust.
21294 (rs6000_function_arg): Adjust.
21295 (rs6000_gimplify_va_arg): Pass false for that new parameter.
21297 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
21299 PR rtl-optimization/84169
21300 PR rtl-optimization/84780
21301 * combine.c (can_combine_p): Check for a 2-insn combination whether
21302 the destination register is used between the two insns, too.
21304 2018-03-12 Richard Biener <rguenther@suse.de>
21306 PR tree-optimization/84803
21307 * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
21308 for refs DR analysis didn't process.
21310 2018-03-12 Richard Biener <rguenther@suse.de>
21312 PR tree-optimization/84777
21313 * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
21314 force-vectorize loops ignore whether we are optimizing for size.
21316 2018-03-12 Chung-Ju Wu <jasonwucj@gmail.com>
21318 * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
21319 (TARGET_MD_ASM_ADJUST): Define.
21321 2018-03-12 Monk Chiang <sh.chiang04@gmail.com>
21322 Kito Cheng <kito.cheng@gmail.com>
21323 Chung-Ju Wu <jasonwucj@gmail.com>
21325 * config/nds32/nds32.c (nds32_compute_stack_frame,
21326 nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
21327 nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
21328 nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
21329 nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
21330 * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
21331 NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
21332 * config/nds32/nds32.md (prologue, epilogue): Use macro
21333 NDS32_V3PUSH_AVAILABLE_P to do checking.
21335 2018-03-11 Jakub Jelinek <jakub@redhat.com>
21338 * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
21339 DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
21340 but on TYPE_SIZE. Don't do anything for ENUM_IS_OPAQUE if not creating
21341 a new die. Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE. Guard
21342 addition of most attributes on !orig_type_die or the attribute not
21343 being present already. Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
21345 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
21346 Chung-Ju Wu <jasonwucj@gmail.com>
21348 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
21349 __NDS32_VH__ macro.
21350 * config/nds32/nds32.opt (mvh): New option.
21352 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
21353 Chung-Ju Wu <jasonwucj@gmail.com>
21355 * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
21357 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
21358 * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
21361 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
21362 Chung-Ju Wu <jasonwucj@gmail.com>
21364 * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
21366 * config/nds32/nds32-multiple.md (strlensi): New pattern.
21367 * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
21369 2018-03-11 Monk Chiang <sh.chiang04@gmail.com>
21370 Kito Cheng <kito.cheng@gmail.com>
21371 Chung-Ju Wu <jasonwucj@gmail.com>
21373 * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
21374 UNSPEC_FFMISM and UNSPEC_FLMISM.
21375 * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
21376 for ffb, ffmism and flmism.
21377 * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
21378 (unspec_ffmism): Ditto.
21379 (unspec_flmism): Ditto.
21380 (nds32_expand_builtin_impl): Check if string extension is available.
21381 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
21382 NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
21384 2018-03-10 Vladimir Makarov <vmakarov@redhat.com>
21387 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
21390 * lra-assigns.c (assign_by_spills): Return a flag of reload
21391 assignment failure. Do not process the reload assignment
21392 failures. Do not spill other reload pseudos if they has the same
21394 (lra_assign): Add a return arg. Set up from the result of
21395 assign_by_spills call.
21396 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
21397 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
21398 usage_insns if it is not NULL.
21399 (spill_hard_reg_in_range): New function.
21400 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
21401 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
21402 function prototypes.
21403 (lra_assign): Change prototype.
21404 * lra.c (lra): Add code to deal with fails by splitting hard reg
21407 2018-03-10 H.J. Lu <hongjiu.lu@intel.com>
21410 * config/i386/i386.opt: Replace Enforcment with Enforcement.
21412 2018-03-10 Alexandre Oliva <aoliva@redhat.com>
21415 * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
21416 (dw_val_node): Add val_symbolic_view.
21417 * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
21418 (symview_upper_bound): New.
21419 (new_line_info_table): Initialize symviews_since_reset.
21420 (dwarf2out_source_line): Count symviews_since_reset and set
21421 symview_upper_bound.
21422 (dw_val_equal_p): Handle symview.
21423 (add_AT_symview): New.
21424 (print_dw_val): Handle symview.
21425 (attr_checksum, attr_checksum_ordered): Likewise.
21426 (same_dw_val_p, size_of_die): Likewise.
21427 (value_format, output_die): Likewise.
21428 (add_high_low_attributes): Use add_AT_symview for entry_view.
21429 (dwarf2out_finish): Reset symview_upper_bound, clear
21432 2018-03-09 Peter Bergner <bergner@vnet.ibm.com>
21435 * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
21436 Add strict argument and use it.
21437 (rs6000_split_multireg_move): Update for new strict argument.
21438 (mem_operand_gpr): Disallow all non-offsettable addresses.
21439 * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
21441 2018-03-09 Jakub Jelinek <jakub@redhat.com>
21444 * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
21445 temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
21446 * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
21449 * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
21450 decl, use remap_type if we want to use the type.
21452 2018-03-09 Martin Sebor <msebor@redhat.com>
21454 PR tree-optimization/84526
21455 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
21457 (builtin_access::generic_overlap): Be prepared to handle non-array
21460 2018-03-09 Alexandre Oliva <aoliva@redhat.com>
21462 PR rtl-optimization/84682
21463 * lra-constraints.c (process_address_1): Check is_address flag
21464 for address constraints.
21465 (process_alt_operands): Likewise.
21466 * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
21467 preprocess_constraints.
21468 * recog.h (preprocess_constraints): Add oploc parameter.
21470 * recog.c (preprocess_constraints): Test address_operand for
21471 CT_ADDRESS constraints.
21473 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
21476 * lra-assigns.c (assign_by_spills): Return a flag of reload
21477 assignment failure. Do not process the reload assignment
21478 failures. Do not spill other reload pseudos if they has the same
21480 (lra_assign): Add a return arg. Set up from the result of
21481 assign_by_spills call.
21482 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
21483 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
21484 usage_insns if it is not NULL.
21485 (spill_hard_reg_in_range): New function.
21486 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
21487 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
21488 function prototypes.
21489 (lra_assign): Change prototype.
21490 * lra.c (lra): Add code to deal with fails by splitting hard reg
21493 2018-03-09 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
21496 * common/config/arm/arm-common.c (arm_parse_arch_option_name):
21497 Accept complain bool parameter. Only emit errors if it is true.
21498 (arm_parse_cpu_option_name): Likewise.
21499 (arm_target_thumb_only): Adjust callers of the above.
21500 * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
21501 prototype to take a default true bool parameter.
21502 (arm_parse_arch_option_name): Likewise.
21504 2018-03-09 David Malcolm <dmalcolm@redhat.com>
21505 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
21509 * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
21510 * configure: Regenerate.
21511 * configure.ac ("linker --version-script option"): New.
21512 ("linker soname option"): New.
21514 2018-03-09 Richard Biener <rguenther@suse.de>
21516 PR tree-optimization/84775
21517 * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
21518 immediate uses of predicate stmts and mark them modified.
21521 PR tree-optimization/84178
21522 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
21524 (version_loop_for_if_conversion): Delay update_ssa call.
21525 (tree_if_conversion): Delay update_ssa until after predicate
21528 2018-03-09 Eric Botcazou <ebotcazou@adacore.com>
21531 * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
21532 when the function accesses prior frames.
21534 2018-03-08 Jakub Jelinek <jakub@redhat.com>
21537 * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
21538 gen_llsym, otherwise call maybe_gen_llsym.
21540 PR inline-asm/84742
21541 * recog.c (asm_operand_ok): Return 0 if multi-character constraint
21542 has ',' character inside of it.
21544 2018-03-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
21547 * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
21548 as clobbering CC_REGNUM.
21550 2018-03-08 Richard Biener <rguenther@suse.de>
21552 PR middle-end/84552
21553 * tree-scalar-evolution.c: Include tree-into-ssa.h.
21554 (follow_copies_to_constant): Do not follow SSA names registered
21557 2018-03-08 Richard Biener <rguenther@suse.de>
21559 PR tree-optimization/84178
21560 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
21562 (version_loop_for_if_conversion): Delay update_ssa call.
21563 (tree_if_conversion): Delay update_ssa until after predicate
21566 2018-03-08 David Malcolm <dmalcolm@redhat.com>
21568 PR tree-optimization/84178
21569 * tree-if-conv.c (release_bb_predicate): Remove the
21570 the assertion that the stmts have NULL use_ops.
21571 Discard the statements, asserting that they haven't
21572 yet been added to a BB.
21574 2018-03-08 Richard Biener <rguenther@suse.de>
21576 PR tree-optimization/84746
21577 * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
21578 (phi_translate): Pass in destination ANTIC_OUT set.
21579 (phi_translate_1): Likewise. For a simplified result lookup
21580 a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
21581 (phi_translate_set): Adjust.
21582 (do_pre_regular_insertion): Likewise.
21583 (do_pre_partial_partial_insertion): Likewise.
21585 2018-03-08 Martin Liska <mliska@suse.cz>
21587 PR gcov-profile/84735
21588 * doc/gcov.texi: Document usage of profile files.
21589 * gcov-io.h: Document changes in the format.
21591 2018-03-08 Alexandre Oliva <aoliva@redhat.com>
21595 * dwarf2out.c (struct dw_line_info_table): Update comments for
21597 (FORCE_RESET_NEXT_VIEW): New.
21598 (FORCE_RESETTING_VIEW_P): New.
21599 (RESETTING_VIEW_P): Check for -1 too.
21600 (ZERO_VIEW_P): Likewise.
21601 (new_line_info_table): Force-reset next view.
21602 (dwarf2out_begin_function): Likewise.
21603 (dwarf2out_source_line): Simplify zero_view_p initialization.
21604 Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
21605 view directly. Omit view when omitting .loc at line 0.
21607 2018-03-08 Jakub Jelinek <jakub@redhat.com>
21609 PR tree-optimization/84740
21610 * tree-switch-conversion.c (process_switch): Call build_constructors
21611 only if info.phi_count is non-zero.
21613 PR tree-optimization/84739
21614 * tree-tailcall.c (find_tail_calls): Check call arguments against
21615 DECL_ARGUMENTS (current_function_decl) rather than
21616 DECL_ARGUMENTS (func) when checking for tail recursion.
21618 2018-03-07 Jakub Jelinek <jakub@redhat.com>
21620 * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
21621 Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
21622 Volker Reichelt's entry and add entries for people that perform
21623 GCC fuzzy testing and report numerous bugs.
21625 2018-03-07 Segher Boessenkool <segher@kernel.crashing.org>
21628 * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
21629 readonly data in sdata, if that is disabled.
21630 * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
21631 * doc/invoke.texi (RS/6000 and PowerPC Options): Document
21632 -mreadonly-in-sdata option.
21634 2018-03-07 Martin Sebor <msebor@redhat.com>
21636 PR tree-optimization/84468
21637 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
21638 basic block when looking for nul assignment.
21640 2018-03-07 Eric Botcazou <ebotcazou@adacore.com>
21643 * except.h (output_function_exception_table): Adjust prototype.
21644 * except.c (output_function_exception_table): Remove FNNAME parameter
21645 and add SECTION parameter. Ouput one part of the table at a time.
21646 * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
21647 the first part of the exception table and emit unwind directives.
21648 * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
21649 (i386_pe_seh_cold_init): Likewise.
21650 * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
21651 (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
21652 * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
21653 (ix86_output_call_insn): Emit a nop in one more case for SEH.
21654 * config/i386/winnt.c: Include except.h.
21655 (struct seh_frame_state): Add reg_offset, after_prologue and
21656 in_cold_section fields.
21657 (i386_pe_seh_end_prologue): Set seh->after_prologue.
21658 (i386_pe_seh_cold_init): New function.
21659 (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
21660 to seh->in_cold_section.
21661 (seh_emit_push): Record the offset of the push.
21662 (seh_emit_save): Record the offet of the save.
21663 (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
21664 Test seh->after_prologue to disregard the epilogue.
21665 (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
21666 (i386_pe_end_cold_function): New function.
21668 2018-03-07 Jakub Jelinek <jakub@redhat.com>
21671 * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
21672 aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
21675 * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
21677 * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
21678 don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
21680 PR middle-end/84723
21681 * multiple_target.c: Include tree-inline.h and intl.h.
21682 (expand_target_clones): Diagnose and fail if node->definition and
21683 !tree_versionable_function_p (node->decl).
21685 2018-03-06 John David Anglin <danglin@gcc.gnu.org>
21687 * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
21689 (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
21690 (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
21691 * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
21693 2018-03-06 Jakub Jelinek <jakub@redhat.com>
21696 * combine.c (try_combine): Use reg_or_subregno instead of handling
21697 just paradoxical SUBREGs and REGs.
21699 2018-03-06 Claudiu Zissulescu <claziss@synopsys.com>
21701 * config/arc/arc.c (arc_finalize_pic): Remove function.
21702 (arc_must_save_register): We use single base PIC register, remove
21703 checks to save/restore the PIC register.
21704 (arc_expand_prologue): Likewise.
21705 * config/arc/arc-protos.h (arc_set_default_type_attributes):
21707 (arc_verify_short): Likewise.
21708 (arc_attr_type): Likewise.
21709 * config/arc/arc.c (arc_set_default_type_attributes): Remove.
21710 (walk_stores): Likewise.
21711 (arc_address_cost): Make it static.
21712 (arc_verify_short): Likewise.
21713 (branch_dest): Likewise.
21714 (arc_attr_type): Likewise.
21715 * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
21716 (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
21717 (arc_final_prescan_insn): Remove inserting the nops due to
21718 hardware hazards. It is done in reorg step.
21719 (insn_length_variant_t): Remove.
21720 (insn_length_parameters_t): Likewise.
21721 (arc_insn_length_parameters): Likewise.
21722 (arc_get_insn_variants): Likewise.
21723 * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
21725 2018-03-06 Jakub Jelinek <jakub@redhat.com>
21727 PR inline-asm/84683
21728 * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
21731 PR tree-optimization/84687
21732 * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
21734 * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
21736 2018-03-05 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
21738 * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
21739 Rename to ppc_speculation_barrier.
21740 * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
21741 __builtin_ppc_speculation_barrier.
21743 2018-03-05 Jakub Jelinek <jakub@redhat.com>
21746 * combine.c (combine_simplify_rtx): Don't try to simplify if
21747 if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
21750 2018-03-05 Segher Boessenkool <segher@kernel.crashing.org>
21752 * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
21753 to 32 bytes when compiling for POWER9.
21755 2018-03-05 Jakub Jelinek <jakub@redhat.com>
21758 * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
21759 regparm >= 3 with no arg reg available also for calls with
21760 flag_force_indirect_call. Pass decl to ix86_function_regparm.
21763 * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
21765 (*<plusminus_insn><mode>3): Likewise. Remove <mask_operand3> uses.
21767 2018-03-05 Peter Bergner <bergner@vnet.ibm.com>
21770 * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
21772 2018-03-05 Richard Biener <rguenther@suse.de>
21774 PR tree-optimization/84486
21775 * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
21776 When inserting a __builtin_assume_aligned call set the LHS
21777 SSA name alignment info accordingly.
21779 2018-03-05 Wilco Dijkstra <wdijkstr@arm.com>
21781 PR tree-optimization/84114
21782 * config/aarch64/aarch64.c (aarch64_reassociation_width)
21783 Avoid reassociation of FLOAT_MODE addition.
21785 2018-03-05 Olga Makhotina <olga.makhotina@intel.com>
21787 * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
21788 OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
21789 OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
21790 (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
21791 * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
21792 * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
21793 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
21795 * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
21796 __builtin_ia32_wbinvd): New builtins.
21797 (SPECIAL_ARGS2): New.
21798 * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
21799 (SPECIAL_ARGS2): New.
21800 * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
21801 (ix86_valid_target_attribute_inner_p): Ditto.
21802 (ix86_init_mmx_sse_builtins): Add special_args2.
21803 * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
21804 TARGET_WBNOINVD_P): New.
21805 * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
21806 (define_insn "wbinvd", define_insn "wbnoinvd"): New.
21807 * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
21808 * config/i386/immintrin.h (_wbinvd): New intrinsic.
21809 * config/i386/pconfigintrin.h: New file.
21810 * config/i386/wbnoinvdintrin.h: Ditto.
21811 * config/i386/x86intrin.h: Add headers pconfigintrin.h and
21813 * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
21815 2018-03-05 Richard Biener <rguenther@suse.de>
21817 PR tree-optimization/84670
21818 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
21820 (BB_VISITED_WITH_VISITED_SUCCS): New define.
21821 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
21822 (compute_antic_aux): Only assert the number of values in ANTIC_IN
21823 doesn't grow if all successors (recursively) were visited at least
21826 2018-03-05 Richard Biener <rguenther@suse.de>
21828 PR tree-optimization/84650
21829 * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
21830 if executed in the loop pipeline.
21832 2018-03-05 Sandra Loosemore <sandra@codesourcery.com>
21834 * doc/configfiles.texi (Configuration Files): Move info about
21835 conditionalizing $target-protos.h to...
21836 * doc/sourcebuild.texi (Back End): Here. Explain how $target.h
21837 differs from $target-protos.h.
21839 2018-03-05 Kito Cheng <kito.cheng@gmail.com>
21840 Chung-Ju Wu <jasonwucj@gmail.com>
21842 * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
21843 * config/nds32/nds32-multiple.md (setmemsi): Define.
21844 * config/nds32/nds32-memory-manipulation.c
21845 (nds32_gen_dup_4_byte_to_word_value): New.
21846 (emit_setmem_word_loop): New.
21847 (emit_setmem_byte_loop): New.
21848 (nds32_expand_setmem_loop): New.
21849 (nds32_expand_setmem_loop_v3m): New.
21850 (nds32_expand_setmem_unroll): New.
21851 (nds32_expand_setmem): New.
21853 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
21854 Chung-Ju Wu <jasonwucj@gmail.com>
21856 * config/nds32/nds32-memory-manipulation.c
21857 (nds32_emit_load_store): New.
21858 (nds32_emit_post_inc_load_store): New.
21859 (nds32_emit_mem_move): New.
21860 (nds32_emit_mem_move_block): New.
21861 (nds32_expand_movmemsi_loop_unknown_size): New.
21862 (nds32_expand_movmemsi_loop_known_size): New.
21863 (nds32_expand_movmemsi_loop): New.
21864 (nds32_expand_movmemsi_unroll): New.
21865 (nds32_expand_movmemqi): Rename ...
21866 (nds32_expand_movmemsi): ... to this.
21867 * config/nds32/nds32-multiple.md (movmemqi): Rename ...
21868 (movmemsi): ... to this.
21869 * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
21870 (nds32_expand_movmemsi): ... to this.
21872 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
21873 Monk Chiang <sh.chiang04@gmail.com>
21874 Chung-Ju Wu <jasonwucj@gmail.com>
21876 * config/nds32/nds32-protos.h
21877 (nds32_expand_load_multiple): New arguments.
21878 (nds32_expand_store_multiple): Ditto.
21879 (nds32_valid_multiple_load_store): Rename ...
21880 (nds32_valid_multiple_load_store_p): ... to this.
21881 * config/nds32/nds32-memory-manipulation.c
21882 (nds32_expand_load_multiple): Refine implementation.
21883 (nds32_expand_store_multiple): Ditto.
21884 * config/nds32/nds32-multiple.md
21885 (load_multiple): Update nds32_expand_load_multiple interface.
21886 (store_multiple): Update nds32_expand_store_multiple interface.
21887 * config/nds32/nds32-predicates.c
21888 (nds32_valid_multiple_load_store): Rename ...
21889 (nds32_valid_multiple_load_store_p): ... to this and refine
21891 * config/nds32/predicates.md
21892 (nds32_load_multiple_and_update_address_operation): New predicate.
21893 (nds32_store_multiple_and_update_address_operation): New predicate.
21895 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
21896 Chung-Ju Wu <jasonwucj@gmail.com>
21898 * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
21899 (combo): New attribute.
21900 * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
21902 2018-03-03 Chung-Ju Wu <jasonwucj@gmail.com>
21904 * config/nds32/nds32.opt: Change -mcmodel= default value.
21906 2018-03-03 Kito Cheng <kito.cheng@gmail.com>
21907 Monk Chiang <sh.chiang04@gmail.com>
21908 Chung-Ju Wu <jasonwucj@gmail.com>
21910 * config/nds32/constants.md (unspec_element): New enum.
21911 * config/nds32/constraints.md (Umw): New constraint.
21912 * config/nds32/nds32-intrinsic.c: Add more builtin functions.
21913 * config/nds32/nds32-intrinsic.md: Likewise.
21914 * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
21915 (nds32_valid_smw_lwm_base_p): New.
21916 (nds32_output_smw_single_word): New.
21917 (nds32_output_lmw_single_word): New.
21918 (nds32_expand_unaligned_load): New.
21919 (nds32_expand_unaligned_store): New.
21920 * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
21921 (nds32_output_smw_single_word): Declare.
21922 (nds32_output_lmw_single_word): Declare.
21923 (nds32_expand_unaligned_load): Declare.
21924 (nds32_expand_unaligned_store): Declare.
21925 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
21926 NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
21927 NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
21928 NDS32_BUILTIN_UASTORE_DW.
21929 * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
21932 2018-03-03 Monk Chiang <sh.chiang04@gmail.com>
21933 Kito Cheng <kito.cheng@gmail.com>
21934 Chung-Ju Wu <jasonwucj@gmail.com>
21936 * config/nds32/nds32-intrinsic.c
21937 (nds32_expand_builtin_null_ftype_reg): Delete.
21938 (nds32_expand_builtin_reg_ftype_imm): Ditto.
21939 (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
21940 (nds32_read_argument): New.
21941 (nds32_legitimize_target): Ditto.
21942 (nds32_legitimize_argument): Ditto.
21943 (nds32_check_constant_argument): Ditto.
21944 (nds32_expand_unop_builtin): Ditto.
21945 (nds32_expand_unopimm_builtin): Ditto.
21946 (nds32_expand_binop_builtin): Ditto.
21947 (nds32_builtin_decl_impl): Ditto.
21948 (builtin_description): Ditto.
21949 (nds32_expand_builtin_impl): Rewrite with new infrastructure.
21950 (nds32_init_builtins_impl): Ditto.
21951 * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
21952 (nds32_builtin_decl): New.
21953 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
21954 * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
21956 2018-03-02 Jeff Law <law@redhat.com>
21958 * reorg.c (stop_search_p): Handle DEBUG_INSN.
21959 (redundant_insn, fill_simple_delay_slots): Likewise.
21960 (fill_slots_from_thread): Likewise.
21961 * resource.c (mark_referenced_resources): Likewise.
21962 (mark_set_resources, find_dead_or_set_registers): Likewise.
21964 2018-03-02 Jakub Jelinek <jakub@redhat.com>
21966 * substring-locations.h (format_warning_va): Formatting fix for
21967 ATTRIBUTE_GCC_DIAG.
21968 (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
21970 (format_warning_n_va, format_warning_at_substring_n): New prototypes.
21971 * substring-locations.c: Include intl.h.
21972 (format_warning_va): Turned into small wrapper around
21973 format_warning_n_va, renamed to ...
21974 (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
21975 rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
21977 (format_warning_at_substring_n): New function.
21978 * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
21979 (fmtwarn): Add ATTRIBUTE_GCC_DIAG. Turn into a copy of
21980 format_warning_at_substring with just a shorter name instead of
21981 const function pointer.
21982 (fmtwarn_n): New function.
21983 (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
21984 appropriate, get rid of all the fmtstr temporaries, move conditionals
21985 with G_() wrapped string literals directly into fmtwarn arguments,
21986 cast dir.len to (int), formatting fixes.
21988 2018-03-02 Thomas Schwinge <thomas@codesourcery.com>
21990 * doc/invoke.texi: Remove "Cilk Plus" references.
21992 2018-03-02 Jakub Jelinek <jakub@redhat.com>
21993 Richard Biener <rguenther@suse.de>
21996 * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
21997 for error or warning attributes if CALL_FROM_THUNK_P is set.
22000 2018-03-02 Jakub Jelinek <jakub@redhat.com>
22003 * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
22004 __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
22007 * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
22008 __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
22010 * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
22011 instead of -1U in last predictors element's probability member.
22013 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
22016 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
22017 arguments if they are comparable.
22019 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
22021 PR tree-optimization/84634
22022 * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
22023 masks and masked_loop_p with a single loop_masks, making sure it's
22024 null for bb vectorization.
22026 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
22028 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
22029 (vect_analyze_data_ref_access): Use loop->safe_len rather than
22030 loop->force_vectorize to check whether there is no alias.
22032 2018-03-02 Jakub Jelinek <jakub@redhat.com>
22035 * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
22037 * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
22039 (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
22040 * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
22041 instead of a loop around prev_real_insn.
22042 * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
22045 PR inline-asm/84625
22046 * config/i386/i386.c (ix86_print_operand): Use conditional
22047 output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
22050 2018-03-02 Richard Biener <rguenther@suse.de>
22052 PR tree-optimization/84427
22053 * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
22054 (bitmap_set_subtract_values): Rewrite to handle multiple
22057 (prune_clobbered_mems): Likewise.
22058 (phi_translate): Take edge instead of pred/phiblock.
22059 (phi_translate_1): Likewise.
22060 (phi_translate_set): Likewise. Insert all translated
22061 exprs for a value into the set, keeping possibly multiple
22062 expressions per value.
22063 (compute_antic_aux): Adjust for phi_translate changes.
22064 When intersecting union the expressions and prune those
22065 not in the final value set, keeping possibly multiple
22066 expressions per value. Do not use value-insertion
22067 for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
22068 all expressions. Add verification that the value-sets
22069 only shrink during iteration.
22070 (compute_partial_antic_aux): Adjust for the phi_translate changes.
22071 (do_pre_regular_insertion): Likewise.
22072 (do_pre_partial_partial_insertion): Likewise.
22074 2018-03-02 Richard Biener <rguenther@suse.de>
22077 * config/darwin.c (saved_debug_info_level): New static global.
22078 (darwin_asm_lto_start): Disable debug info generation for LTO out.
22079 (darwin_asm_lto_end): Restore debug info generation settings.
22081 2018-03-01 Martin Liska <mliska@suse.cz>
22084 * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
22085 volatile arguments.
22087 2018-03-01 Richard Biener <rguenther@suse.de>
22090 * dwarf2out.c (gen_variable_die): Properly handle late VLA
22091 type annotation with LTO when debug was disabled at compile-time.
22093 2018-03-01 Matthew Fortune <mfortune@gmail.com>
22095 * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
22097 (mips_final_postscan_insn): Likewise.
22099 2018-03-01 Richard Sandiford <richard.sandiford@linaro.org>
22101 PR rtl-optimization/84528
22102 * alias.c (init_alias_target): Add commentary.
22103 (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
22104 a unique base value if the frame pointer is not eliminated
22105 to the stack pointer.
22107 2018-03-01 Tom de Vries <tom@codesourcery.com>
22109 PR rtl-optimization/83327
22110 * lra-int.h (hard_regs_spilled_into): Declare.
22111 * lra.c (hard_regs_spilled_into): Define.
22112 (init_reg_info): Init hard_regs_spilled_into.
22113 * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
22114 * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
22115 (process_bb_lives): Handle hard_regs_spilled_into.
22116 (lra_create_live_ranges_1): Before doing liveness propagation, clear
22117 regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
22119 2018-02-28 David Edelsohn <dje.gcc@gmail.com>
22121 * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
22122 (powerpc-ibm-aix[789]*): Default to AIX 7.2.
22123 * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
22124 * config/rs6000/aix72.h: New file.
22126 2018-02-28 Jakub Jelinek <jakub@redhat.com>
22128 * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
22129 instead of warning_at with conditional singular and plural messages
22133 * stor-layout.c (update_alignment_for_field): For
22134 targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
22135 && !DECL_PACKED (field), do the alignment update, just use
22136 only desired_align instead of MAX (type_align, desired_align)
22138 (place_field): Don't do known_align < desired_align handling
22139 early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
22140 is non-NULL, instead do it after rli->prev_field handling and
22141 only if not within a bitfield word. For DECL_PACKED (field)
22142 use type_align of BITS_PER_UNIT.
22144 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
22146 * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
22147 superfluous parentheses and trailing spaces.
22149 2018-02-28 Richard Biener <rguenther@suse.de>
22151 PR tree-optimization/84584
22152 * graphite-scop-detection.c (scop_detection::add_scop): Discard
22153 SCoPs with fake exit edge.
22155 2018-02-28 Martin Liska <mliska@suse.cz>
22158 * timevar.c (timer::print): Fix format to properly print 100%
22161 2018-02-28 Richard Biener <rguenther@suse.de>
22163 PR middle-end/84607
22164 * genmatch.c (capture_info::walk_match): Do not mark
22165 captured expressions without operands as expr_p given
22166 they act more like predicates and should be subject to
22167 "lost tail" side-effect preserving.
22169 2018-02-28 Alexandre Oliva <aoliva@redhat.com>
22171 PR rtl-optimization/81611
22172 * auto-inc-dec.c (attempt_change): Move dead note from
22173 mem_insn if it's the next use of regno
22174 (find_address): Take address use of reg holding
22175 non-incremented value. Add parm to limit search to the named
22177 (merge_in_block): Attempt to use a mem insn that is the next
22178 use of the original regno.
22180 2018-02-27 Martin Sebor <msebor@redhat.com>
22183 * doc/invoke.texi (-Wmissing-attributes): New option.
22184 * print-tree.c (print_node): Handle DECL_UNINLINABLE.
22186 2018-02-27 Martin Sebor <msebor@redhat.com>
22188 PR translation/84207
22189 * diagnostic-core.h (warning_n, error_n, inform_n): Change
22190 n argument to unsigned HOST_WIDE_INT.
22191 * diagnostic.c (warning_n, error_n, inform_n): Ditto.
22192 (diagnostic_n_impl): Ditto. Handle arguments in excess of LONG_MAX.
22193 * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
22194 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
22196 2018-02-27 Richard Biener <rguenther@suse.de>
22198 PR tree-optimization/84512
22199 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
22200 Do not use the estimate returned from record_stmt_cost for
22201 the scalar iteration cost but sum properly using add_stmt_cost.
22203 2018-02-27 Richard Biener <rguenther@suse.de>
22205 PR tree-optimization/84466
22206 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
22207 Adjust last change to less strictly validate use operands.
22209 2018-02-27 Martin Liska <mliska@suse.cz>
22211 PR gcov-profile/84548
22212 * gcov.c (process_file): Allow partial overlap and consider it
22213 also as group functions.
22214 (output_lines): Properly calculate range of lines for a group.
22216 2018-02-27 Martin Liska <mliska@suse.cz>
22218 * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
22219 'ggc' suffixes. Change first column width.
22220 (timer::print): Fix formatting of the column.
22222 2018-02-27 Alexandre Oliva <aoliva@redhat.com>
22224 * tree-ssa-live.c (remove_unused_scope_block_p): Do not
22225 preserve inline entry blocks for the sake of debug inline
22226 entry point markers alone.
22227 (remove_unused_locals): Suggest in comments a better place to
22228 force the preservation of inline entry blocks that are
22229 otherwise unused, but do not preserve them.
22231 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
22233 * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
22235 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
22238 * config/i386/constraints.md (Bs): Replace
22239 ix86_indirect_branch_register with
22240 TARGET_INDIRECT_BRANCH_REGISTER.
22242 * config/i386/i386.md (indirect_jump): Likewise.
22243 (tablejump): Likewise.
22244 (*sibcall_memory): Likewise.
22245 (*sibcall_value_memory): Likewise.
22246 Peepholes of indirect call and jump via memory: Likewise.
22247 (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
22248 (*sibcall_value_GOT_32): Likewise.
22249 * config/i386/predicates.md (indirect_branch_operand): Likewise.
22250 (GOT_memory_operand): Likewise.
22251 (call_insn_operand): Likewise.
22252 (sibcall_insn_operand): Likewise.
22253 (GOT32_symbol_operand): Likewise.
22254 * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
22256 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
22258 PR rtl-optimization/83496
22259 * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
22260 booleans to RTXes. Call fix_reg_dead_note on every non-null element.
22261 (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
22262 redundant insn, if any.
22263 (relax_delay_slots): Likewise.
22264 (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
22266 2018-02-26 Richard Sandiford <richard.sandiford@linaro.org>
22268 PR tree-optimization/83965
22269 * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
22270 that grouped statements are part of a reduction chain. Return
22271 true if the statement is not marked as a reduction itself but
22272 is part of a group.
22273 (vect_recog_dot_prod_pattern): Don't check whether the statement
22274 is part of a group here.
22275 (vect_recog_sad_pattern): Likewise.
22276 (vect_recog_widen_sum_pattern): Likewise.
22278 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
22281 * final.c (rest_of_clean_state): Also look for calls inside sequences.
22283 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
22286 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
22288 (ix86_output_indirect_function_return): New prototype.
22289 (ix86_split_simple_return_pop_internal): Likewise.
22290 * config/i386/i386.c (indirect_return_via_cx): New.
22291 (indirect_return_via_cx_bnd): Likewise.
22292 (indirect_thunk_name): Handle return va CX_REG.
22293 (output_indirect_thunk_function): Create alias for
22294 __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
22295 (ix86_output_indirect_jmp): Remove the bool argument.
22296 (ix86_output_indirect_function_return): New function.
22297 (ix86_split_simple_return_pop_internal): Likewise.
22298 * config/i386/i386.md (*indirect_jump): Don't pass false
22299 to ix86_output_indirect_jmp.
22300 (*tablejump_1): Likewise.
22301 (simple_return_pop_internal): Change it to define_insn_and_split.
22302 Call ix86_split_simple_return_pop_internal to split it for
22303 -mfunction-return=.
22304 (simple_return_indirect_internal): Call
22305 ix86_output_indirect_function_return instead of
22306 ix86_output_indirect_jmp.
22308 2018-02-26 Jakub Jelinek <jakub@redhat.com>
22311 * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
22312 memset and value initialization afterwards.
22314 2018-02-26 Christophe Lyon <christophe.lyon@linaro.org>
22316 * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
22318 2018-02-26 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
22321 * common/config/aarch64/aarch64-common.c
22322 (aarch_option_optimization_table[]): Switch
22323 off fomit-frame-pointer
22325 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
22326 Chung-Ju Wu <jasonwucj@gmail.com>
22328 * config/nds32/nds32-multiple.md (load_multiple): Disallow
22330 (store_multiple): Ditto.
22332 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
22334 * config.gcc: Add --with-cpu support for nds32 target.
22335 * config/nds32/nds32-opts.h (nds32_cpu_type): New.
22336 * config/nds32/nds32.opt: Add -mcpu= option.
22338 2018-02-25 Segher Boessenkool <segher@kernel.crashing.org>
22340 * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
22341 isel=yes): Warn for these deprecated options.
22343 2018-02-23 David Edelsohn <dje.gcc@gmail.com>
22345 * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
22346 ISA_2_5_MASKS_EMBEDDED.
22348 2018-02-23 Jakub Jelinek <jakub@redhat.com>
22350 * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
22351 p->max as pointers rather than using iterative_hash_expr.
22353 2018-02-23 Carl Love <cel@us.ibm.com>
22355 * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
22356 macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
22358 * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
22359 P8V_BUILTIN_VEC_VSIGNED2. Change VSX_BUILTIN_VEC_VUNSIGNED2 to
22360 P8V_BUILTIN_VEC_VUNSIGNED2.
22362 2018-02-22 Vladimir Makarov <vmakarov@redhat.com>
22365 * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
22366 * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
22368 * lra-constraints.c (curr_insn_transform): Set up
22369 LRA_NON_CLOBBERED_ALT for moves processed on the fast path. Use
22371 (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
22372 * lra-eliminations.c (spill_pseudos): Ditto.
22373 (process_insn_for_elimination): Ditto.
22374 * lra-lives.c (reg_early_clobber_p): Use the new macros.
22375 * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
22376 LRA_NON_CLOBBERED_ALT.
22378 2018-02-22 Martin Sebor <msebor@redhat.com>
22380 PR tree-optimization/84480
22381 * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
22382 to maybe_diag_stxncpy_trunc. Call it.
22383 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
22384 from gimple_fold_builtin_strcpy. Print inlining stack.
22385 (handle_builtin_stxncpy): Print inlining stack.
22386 * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
22388 2018-02-22 H.J. Lu <hongjiu.lu@intel.com>
22391 * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
22392 error when -mindirect-branch=thunk-extern, -fcf-protection=branch
22393 and -fcheck-pointer-bounds are used together.
22394 (indirect_thunk_prefix): New enum.
22395 (indirect_thunk_need_prefix): New function.
22396 (indirect_thunk_name): Replace need_bnd_p with need_prefix. Use
22397 "_nt" instead of "_bnd" for NOTRACK prefix.
22398 (output_indirect_thunk): Replace need_bnd_p with need_prefix.
22399 (output_indirect_thunk_function): Likewise.
22401 (ix86_code_end): Update output_indirect_thunk_function calls.
22402 (ix86_output_indirect_branch_via_reg): Replace
22403 ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
22404 (ix86_output_indirect_branch_via_push): Likewise.
22405 (ix86_output_function_return): Likewise.
22406 * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
22407 incompatible with -fcf-protection=branch and
22408 -fcheck-pointer-bounds.
22410 2018-02-22 Steve Ellcey <sellcey@cavium.com>
22413 * config/aarch64/aarch64.c (aarch64_print_address_internal):
22414 Change gcc_assert call to output_operand_lossage.
22416 2018-02-22 Steve Ellcey <sellcey@cavium.com>
22418 * doc/extend.texi (__builtin_extend_pointer): Document builtin.
22420 2018-02-22 DJ Delorie <dj@redhat.com>
22421 Sebastian Perta <sebastian.perta@renesas.com>
22422 Oleg Endo <olegendo@gcc.gnu.org>
22424 * config/rx/rx.c (rx_rtx_costs): New function.
22425 (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
22427 2018-02-22 Thomas Preud'homme <thomas.preudhomme@arm.com>
22429 * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
22431 2018-02-22 Martin Liska <mliska@suse.cz>
22434 * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
22435 Add "native" as a possible value.
22437 2018-02-22 Martin Liska <mliska@suse.cz>
22440 * config/i386/i386.c (ix86_option_override_internal):
22441 Add "native" as a possible value for -march and -mtune.
22443 2018-02-22 Jakub Jelinek <jakub@redhat.com>
22446 * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
22447 to all type variants.
22449 PR tree-optimization/84503
22450 * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
22451 width as info->bitpos + info->bitsize - start.
22452 (merged_store_group::merge_overlapping): Simplify width computation.
22453 (check_no_overlap): New function.
22454 (imm_store_chain_info::try_coalesce_bswap): Compute expected
22455 start + width and last_order of the group, fail if check_no_overlap
22457 (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
22458 to group if check_no_overlap fails.
22460 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
22462 * config/rs6000/altivec.md: Delete contraint arguments to
22463 define_expand, define_split, and define_peephole2, and in
22464 define_insn_and_split if always unused.
22465 * config/rs6000/darwin.md: Ditto.
22466 * config/rs6000/dfp.md: Ditto.
22467 * config/rs6000/rs6000.md: Ditto.
22468 * config/rs6000/sync.md: Ditto.
22469 * config/rs6000/vector.md: Ditto.
22470 * config/rs6000/vsx.md: Ditto.
22472 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
22474 * config/rs6000/altivec.md: Write output control strings as braced
22475 blocks instead of double-quoted strings.
22476 * config/rs6000/darwin.md: Ditto.
22477 * config/rs6000/rs6000.md: Ditto.
22478 * config/rs6000/vector.md: Ditto.
22479 * config/rs6000/vsx.md: Ditto.
22481 2018-02-21 Jason Merrill <jason@redhat.com>
22483 PR c++/84314 - ICE with templates and fastcall attribute.
22484 * attribs.c (build_type_attribute_qual_variant): Remove assert.
22486 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
22488 * ipa-cp.c (determine_versionability): Fix comment typos.
22490 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
22493 * ipa-cp.c (determine_versionability): Do not version functions caling
22496 2018-02-21 Martin Liska <mliska@suse.cz>
22499 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
22500 Add "native" as a possible value.
22501 * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT): Define
22502 the macro when native cpu detection is available.
22504 2018-02-21 Martin Liska <mliska@suse.cz>
22507 * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
22508 Add "native" as a possible value.
22509 * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
22510 when native cpu detection is available.
22512 2018-02-21 Jakub Jelinek <jakub@redhat.com>
22513 Martin Sebor <msebor@redhat.com>
22515 PR tree-optimization/84478
22516 * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
22518 * gimple-fold.c (get_range_strlen): Make minlen const and assume it
22519 can't be NULL. Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
22520 support which is conservatively correct, for 2 only stay conservative
22521 for maxlen. Formatting and comment capitalization fixes. Add STRICT
22522 argument to the 2 argument get_range_strlen, adjust 6 arg
22523 get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
22525 (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
22526 (gimple_fold_builtin_strlen): Pass true as last argument to
22529 2018-02-20 Martin Sebor <msebor@redhat.com>
22531 PR middle-end/84095
22532 * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
22533 (builtin_memref::set_base_and_offset): Same. Handle inner references.
22534 (builtin_memref::builtin_memref): Factor out parts into
22535 set_base_and_offset and call it.
22537 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
22539 PR middle-end/84406
22540 * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
22541 is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
22542 greater precision. If to_mode is a MODE_PARTIAL_INT, stop the
22543 search at the associated MODE_INT.
22545 2018-02-20 Jeff Law <law@redhat.com>
22547 PR middle-end/82123
22548 PR tree-optimization/81592
22549 PR middle-end/79257
22550 * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
22551 for range data rather than using global data.
22552 * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
22553 range data rather than using global data.
22554 * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
22555 pass it to children as needed.
22556 (struct directive::fmtresult): Similarly.
22557 (struct directive::set_width): Similarly.
22558 (struct directive::set_precision): Similarly.
22559 (format_integer, format_directive, parse_directive): Similarly.
22560 (format_none): Accept unnamed vr_values parameter.
22561 (format_percent, format_floating, format_character): Similarly.
22562 (format_string, format_plain): Similarly.
22563 * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
22564 the EVRP range analyzer for range data rather than using global data.
22565 * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
22566 gimple-ssa-evrp-analyze.h
22567 (class sprintf_dom_walker): Add after_dom_children member function.
22568 Add evrp_range_analyzer member.
22569 (sprintf_dom_walker::before_dom_children): Call into the EVRP
22570 range analyzer as needed.
22571 (sprintf_dom_walker::after_dom_children): New member function.
22572 * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
22574 (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
22575 (evrp_range_analyzer::pop_to_marker): Likewise.
22577 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
22579 PR tree-optimization/84419
22580 * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
22581 with the required type if its current type is compatible but
22584 2018-02-20 Jakub Jelinek <jakub@redhat.com>
22586 PR middle-end/82004
22587 * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
22588 after vectorization.
22590 2018-02-20 Martin Liska <mliska@suse.cz>
22593 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
22594 possible values if we don't have a hint.
22596 2018-02-20 Martin Liska <mliska@suse.cz>
22600 * final.c (shorten_branches): Build align_tab array with one
22602 * opts.c (finish_options): Add alignment option limit check.
22603 (MAX_CODE_ALIGN): Likewise.
22604 (MAX_CODE_ALIGN_VALUE): Likewise.
22605 * doc/invoke.texi: Document maximum allowed option value for
22606 all -falign-* options.
22608 2018-02-19 Jakub Jelinek <jakub@redhat.com>
22611 * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
22612 * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
22613 * var-tracking.c (emit_note_insn_var_location): Remove all references
22614 to NOTE_INSN_CALL_ARG_LOCATION.
22615 (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
22616 the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
22617 Use copy_rtx_if_shared.
22618 * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
22619 NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
22620 (dwarf2out_var_location): Remove handling of
22621 NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
22623 * final.c (final_scan_insn): Remove all references to
22624 NOTE_INSN_CALL_ARG_LOCATION.
22625 (rest_of_clean_state): Likewise. Remove REG_CALL_ARG_LOCATION notes
22626 before dumping final insns.
22627 * except.c (emit_note_eh_region_end): Remove all references to
22628 NOTE_INSN_CALL_ARG_LOCATION.
22629 * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
22630 * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
22631 * config/arc/arc.c (hwloop_optimize): Likewise.
22632 * config/arm/arm.c (create_fix_barrier): Likewise.
22633 * config/s390/s390.c (s390_chunkify_start): Likewise.
22634 * config/sh/sh.c (find_barrier): Likewise.
22635 * config/i386/i386.c (rest_of_insert_endbranch,
22636 ix86_seh_fixup_eh_fallthru): Likewise.
22637 * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
22638 * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
22639 * config/frv/frv.c (frv_function_prologue): Likewise.
22640 * emit-rtl.c (try_split): Likewise. Copy over REG_CALL_ARG_LOCATION
22642 (note_outside_basic_block_p): Remove all references to
22643 NOTE_INSN_CALL_ARG_LOCATION.
22644 * gengtype.c (adjust_field_rtx_def): Likewise.
22645 * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
22647 * jump.c (cleanup_barriers, delete_related_insns): Likewise.
22648 * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
22651 * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
22654 PR tree-optimization/84452
22655 * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
22656 expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
22659 2018-02-19 Martin Liska <mliska@suse.cz>
22662 * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
22664 2018-02-19 Martin Liska <mliska@suse.cz>
22665 Richard Sandiford <richard.sandiford@linaro.org>
22667 PR tree-optimization/82491
22668 * gimple-fold.c (get_base_constructor): Make earlier bail out
22671 2018-02-19 Carl Love <cel@us.ibm.com>
22673 * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
22674 BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
22676 * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
22677 P8V_BUILTIN_VEC_NEG.
22679 2018-02-19 Sebastian Perta <sebastian.perta@renesas.com>
22681 * config/rl78/rl78.md (movdf): New define expand.
22683 2018-02-19 Martin Liska <mliska@suse.cz>
22686 * doc/invoke.texi: Fix typo.
22687 * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
22689 2018-02-18 Segher Boessenkool <segher@kernel.crashing.org>
22691 * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
22692 handle rs6000_single_float and rs6000_double_float specially for
22695 2018-02-16 Jeff Law <law@redhat.com>
22697 * config/rx/rx.c (add_pop_cfi_notes): New function.;
22698 (pop_regs): Use it.
22700 2018-02-16 Jakub Jelinek <jakub@redhat.com>
22703 * ipa-inline.c (inline_small_functions): Fix a typo.
22705 2018-02-16 Nathan Sidwell <nathan@acm.org>
22707 * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
22709 2018-02-16 Carl Love <cel@us.ibm.com>
22711 * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
22712 Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
22713 from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
22714 * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
22715 expansion to P8V_BUILTIN_VEC_FLOAT2.
22717 2018-02-16 Vladimir Makarov <vmakarov@redhat.com>
22719 PR rtl-optimization/70023
22720 * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
22721 src_regno into account.
22723 2018-02-16 Carl Love <cel@us.ibm.com>
22725 * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
22726 * config/rs6000/rs6000-builtin.def: Remove macro expansion for
22727 VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
22728 * config/rs6000/rs6000.c: Remove case statements for
22729 P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
22730 P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
22731 and P9V_BUILTIN_VEC_VINSERT4B.
22732 * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
22733 P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
22734 * config/rs6000/vsx.md:
22735 * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
22738 2018-02-16 Carl Love <cel@us.ibm.com>
22740 * config/rs6000/altivec.h: Add builtin names vec_extract4b
22742 * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
22744 * config/rs6000/rs6000-c.c: Add the definitions for
22745 P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
22746 * config/rs6000/rs6000.c (altivec_expand_builtin): Add
22747 P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
22748 * config/rs6000/vsx.md: Add define_insn extract4b. Add define_expand
22749 definition for insert4b and define insn *insert3b_internal.
22750 * doc/extend.texi: Add documentation for vec_extract4b.
22752 2018-02-16 Nathan Sidwell <nathan@acm.org>
22754 * doc/extend.texi (Backwards Compatibility): Mention friend
22755 injection. Note for-scope is deprecated.
22756 * doc/invoke.texi (-ffriend-injection): Deprecate.
22758 2018-02-16 Segher Boessenkool <segher@kernel.crashing.org>
22760 * combine.c (try_combine): When adjusting LOG_LINKS for the destination
22761 that moved to I2, also allow destinations that are a paradoxical
22762 subreg (instead of a normal reg).
22764 2018-02-16 Oleg Endo <olegendo@gcc.gnu.org>
22767 * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
22770 2018-02-16 Richard Biener <rguenther@suse.de>
22772 PR tree-optimization/84037
22773 PR tree-optimization/84016
22775 * config/i386/i386.c (ix86_builtin_vectorization_cost):
22776 Adjust vec_construct for the fact we need additional higher latency
22777 128bit inserts for AVX256 and AVX512 vector builds.
22778 (ix86_add_stmt_cost): Scale vector construction cost for
22781 2018-02-16 Richard Biener <rguenther@suse.de>
22783 PR tree-optimization/84417
22784 * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
22785 the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
22786 (non_rewritable_lvalue_p): Likewise, use poly-ints.
22788 2018-02-16 Martin Liska <mliska@suse.cz>
22791 * internal-fn.def (ASAN_CHECK): Set proper flags.
22792 (ASAN_MARK): Likewise.
22794 2018-02-16 Julia Koval <julia.koval@intel.com>
22796 * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
22797 from PTA_CANNONLAKE.
22799 2018-02-16 Jakub Jelinek <jakub@redhat.com>
22802 * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
22803 Use ++iter rather than iter++ for std::list iterators.
22804 (func_fma_steering::dfs): Likewise. Don't delete nodes right away,
22805 defer deleting them until all nodes in the forest are processed. Do
22806 free even leaf nodes. Change to_process into auto_vec.
22809 * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
22810 * vec.h (vec_default_construct): Use memset instead of placement new
22811 if BROKEN_VALUE_INITIALIZATION is defined.
22812 * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
22813 memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
22816 PR rtl-optimization/83723
22817 * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
22818 * lra.c (lra_substitute_pseudo): Likewise. If true, use
22819 gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG. Pass DEBUG_P to
22821 (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
22823 * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
22825 2018-02-16 Eric Botcazou <ebotcazou@adacore.com>
22827 PR rtl-optimization/81443
22828 * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
22829 from inner REGs to paradoxical SUBREGs.
22831 2018-02-16 Richard Biener <rguenther@suse.de>
22833 PR tree-optimization/84399
22834 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
22835 For operands we can analyze at their definition make sure we can
22836 analyze them at each use as well.
22838 2018-02-16 Richard Biener <rguenther@suse.de>
22840 PR tree-optimization/84190
22841 * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
22842 volatile accesses if the decl isn't volatile.
22844 2018-02-15 Jason Merrill <jason@redhat.com>
22846 PR c++/84314 - ICE with templates and fastcall attribute.
22847 * attribs.c (build_type_attribute_qual_variant): Don't clobber
22848 TYPE_CANONICAL on an existing type.
22850 2018-02-15 Jakub Jelinek <jakub@redhat.com>
22852 PR tree-optimization/84383
22853 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
22854 dstoff nor call operand_equal_p if dstbase is NULL.
22856 PR tree-optimization/84334
22857 * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
22858 also a CONSTANT_CLASS_P, punt.
22860 2018-02-14 Jim Wilson <jimw@sifive.com>
22862 * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
22863 first SMALL_OPERAND check. New local min_second_step. Move assert
22864 to where locals are set. Add TARGET_RVC support.
22865 * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
22867 2018-02-14 Indu Bhagat <indu.bhagat@oracle.com>
22869 * doc/invoke.texi: Correct -Wformat-overflow code sample.
22871 2018-02-14 Martin Sebor <msebor@redhat.com>
22873 PR tree-optimization/83698
22874 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
22875 arrays constrain the offset range to their bounds.
22876 (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
22877 (builtin_access::overlap): Avoid setting the size of overlap if it's
22879 (maybe_diag_overlap): Also consider arrays when deciding what values
22880 of offsets to include in diagnostics.
22882 2018-02-14 Martin Sebor <msebor@redhat.com>
22885 * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
22886 that correspond to the kind of a declaration.
22888 2018-02-14 John David Anglin <danglin@gcc.gnu.org>
22891 * config/pa/pa.md: Load address of PIC label using the linkage table
22892 if the label is nonlocal.
22894 2018-02-14 Kelvin Nilsen <kelvin@gcc.gnu.org>
22896 * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
22897 warning message if user requests -maltivec=be.
22898 * doc/invoke.texi: Document deprecation of -maltivec=be.
22900 2018-02-14 Will Schmidt <will_schmidt@vnet.ibm.com>
22903 * config/rs6000/rs6000-c.c: Update definitions for
22904 ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
22905 VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
22907 2018-02-14 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
22910 * config/i386/cetintrin.h: Remove _rdssp[d|q] and
22911 add _get_ssp intrinsics. Remove argument from
22912 __builtin_ia32_rdssp[d|q].
22913 * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
22914 * config/i386/i386-builtin.def: Remove argument from
22915 __builtin_ia32_rdssp[d|q].
22916 * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
22917 ix86_expand_special_args_builtin for _rdssp[d|q].
22918 * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
22919 Clear register before usage.
22920 * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
22921 Add documentation for new _get_ssp and _inc_ssp intrinsics.
22923 2018-02-14 Richard Sandiford <richard.sandiford@linaro.org>
22925 PR tree-optimization/84357
22926 * tree-data-ref.c (object_address_invariant_in_loop_p): Check
22927 operand 1 of an ARRAY_REF too.
22929 2018-02-14 Oleg Endo <olegendo@gcc.gnu.org>
22932 * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
22933 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
22935 (set_of_reg): New struct.
22936 (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
22937 * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
22938 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
22940 * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
22941 Split into bitclr, bitset, bitinvert patterns if appropriate.
22942 (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
22943 use rx_fuse_in_memory_bitop.
22944 (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
22945 to named insn, correct maximum insn length.
22947 2018-02-14 Jozef Lawrynowicz <jozefl.gcc@gmail.com>
22950 * machmode.def: Define a complex mode for PARTIAL_INT.
22951 * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
22953 * doc/rtl.texi: Document CSPImode.
22954 * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
22956 (msp430_hard_regno_nregs_with_padding): Likewise.
22958 2018-02-13 Peter Bergner <bergner@vnet.ibm.com>
22961 * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
22963 2018-02-13 Segher Boessenkool <segher@kernel.crashing.org>
22965 PR rtl-optimization/84169
22966 * combine.c (try_combine): New variable split_i2i3. Set it to true if
22967 we generated a parallel as new i3 and we split that to new i2 and i3
22968 instructions. Handle split_i2i3 similar to swap_i2i3: scan the
22969 LOG_LINKs of i3 to see which of those need to link to i2 now. Link
22970 those to i2, not i1. Partially rewrite this scan code.
22972 2018-02-13 Jakub Jelinek <jakub@redhat.com>
22975 * stor-layout.c (place_field): For variable length fields, adjust
22976 offset_align afterwards not just based on the field's alignment,
22977 but also on the size.
22979 PR middle-end/84309
22980 * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
22981 of exps and logs in the use_exp2 case.
22983 2018-02-13 Jeff Law <law@redhat.com>
22985 * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
22986 entry for "vector".
22988 * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
22991 2018-02-13 Alexandre Oliva <aoliva@redhat.com>
22995 * common.opt (gas-loc-support, gas-locview-support): New.
22996 (ginline-points, ginternal-reset-location-views): New.
22997 * doc/invoke.texi: Document them. Use @itemx where intended.
22998 (gvariable-location-views): Adjust.
22999 * target.def (reset_location_view): New.
23000 * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
23001 (TARGET_RESET_LOCATION_VIEW): New.
23002 * doc/tm.texi: Rebuilt.
23003 * dwarf2out.c (dwarf2out_default_as_loc_support): New.
23004 (dwarf2out_default_as_locview_support): New.
23005 (output_asm_line_debug_info): Use option variables.
23006 (dwarf2out_maybe_output_loclist_view_pair): Likewise.
23007 (output_loc_list): Likewise.
23008 (add_high_low_attributes): Check option variables.
23009 Don't output entry view attribute in strict mode.
23010 (gen_inlined_subroutine_die): Check option variables.
23011 (dwarf2out_inline_entry): Likewise.
23012 (init_sections_and_labels): Likewise.
23013 (dwarf2out_early_finish): Likewise.
23014 (maybe_reset_location_view): New, from...
23015 (dwarf2out_var_location): ... here. Call it.
23016 * debug.h (dwarf2out_default_as_loc_support): Declare.
23017 (dwarf2out_default_as_locview_support): Declare.
23018 * hooks.c (hook_int_rtx_insn_0): New.
23019 * hooks.h (hook_int_rtx_insn_0): Declare.
23020 * toplev.c (process_options): Take -gas-loc-support and
23021 -gas-locview-support from dwarf2out. Enable
23022 -gvariable-location-views by default only with locview
23023 assembler support. Enable -ginternal-reset-location-views by
23024 default only if the target defines the corresponding hook.
23025 Enable -ginline-points by default if location views are
23026 enabled; force it disabled if statement frontiers are
23028 * tree-inline.c (expand_call_inline): Check option variables.
23029 * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
23031 2018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
23033 PR tree-optimization/84321
23034 * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
23035 handling. Also check whether the anti-range contains any values
23036 that satisfy the mask; switch to a VR_RANGE if not.
23038 2018-02-13 Paolo Bonzini <bonzini@gnu.org>
23041 * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
23043 2018-02-13 Martin Jambor <mjambor@suse.cz>
23046 * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
23047 of call statements, also set location of a load to a temporary.
23049 2018-02-13 Sebastian Perta <sebastian.perta@renesas.com>
23051 * config/rl78/rl78.c (add_vector_labels): New function.
23052 * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
23053 * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
23054 * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
23055 which checks that no arguments are passed.
23056 * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
23057 * doc/extend.texi: Documentation for the new attribute.
23059 2018-02-13 Andreas Schwab <schwab@suse.de>
23061 * config/riscv/linux.h (CPP_SPEC): Define.
23063 2018-02-13 Jakub Jelinek <jakub@redhat.com>
23066 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
23067 OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
23068 OPTION_MASK_ISA_AES as first argument to def_builtin_const
23069 for AES builtins. Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
23070 instead of OPTION_MASK_ISA_PCLMUL as first argument to
23071 def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
23072 * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
23073 temporarily for AES and PCLMUL builtins.
23075 PR tree-optimization/84339
23076 * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
23077 ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
23080 PR middle-end/84309
23081 * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
23082 exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
23083 * generic-match-head.c (canonicalize_math_after_vectorization_p): New
23085 * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
23087 * omp-simd-clone.h: New file.
23088 * omp-simd-clone.c: Include omp-simd-clone.h.
23089 (expand_simd_clones): No longer static.
23090 * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
23091 cgraph.h and omp-simd-clone.h.
23092 (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
23093 (vect_recog_widen_shift_pattern): Formatting fix.
23094 (vect_pattern_recog_1): Don't check optab for calls.
23097 * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
23098 operands[2] into a REG before using gen_lowpart on it.
23100 2018-02-12 Jeff Law <law@redhat.com>
23103 * config/sh/sh.c (find_barrier): Consider a sibling call
23106 * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
23107 successfully back substituting a reg.
23109 2018-02-12 Richard Biener <rguenther@suse.de>
23111 PR tree-optimization/84037
23112 * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
23113 parameter, move visited init to caller.
23114 (vect_slp_analyze_operations): Separate cost from validity
23115 check, initialize visited once for all instances.
23116 (vect_schedule_slp): Analyze map to CSE vectorized nodes once
23118 * tree-vect-stmts.c (vect_model_simple_cost): Make early
23120 (vect_model_promotion_demotion_cost): Likewise.
23121 (vectorizable_bswap): Guard cost modeling with !slp_node
23122 instead of !PURE_SLP_STMT to avoid double-counting on hybrid
23124 (vectorizable_call): Likewise.
23125 (vectorizable_conversion): Likewise.
23126 (vectorizable_assignment): Likewise.
23127 (vectorizable_shift): Likewise.
23128 (vectorizable_operation): Likewise.
23129 (vectorizable_store): Likewise.
23130 (vectorizable_load): Likewise.
23131 (vectorizable_condition): Likewise.
23132 (vectorizable_comparison): Likewise.
23134 2018-02-12 Paolo Bonzini <bonzini@gnu.org>
23137 * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
23138 (ASAN_MARK): Fix fnspec to account for return value, change pointer
23139 argument from 'R' to 'W' so that the pointed-to datum is clobbered.
23141 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
23143 PR middle-end/83665
23144 * params.def (inline-min-speedup): Increase from 8 to 15.
23145 (max-inline-insns-auto): Decrease from 40 to 30.
23146 * ipa-split.c (consider_split): Add some buffer for function to
23147 be considered inlining candidate.
23148 * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
23151 2018-02-12 Richard Biener <rguenther@suse.de>
23153 PR tree-optimization/84037
23154 * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
23155 matched stmts if we cannot swap the non-matched ones.
23157 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
23159 * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
23160 _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
23161 _mm_maskz_scalef_round_ss): New intrinsics.
23162 (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
23163 * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
23164 __builtin_ia32_scalefss_round): Remove.
23165 (__builtin_ia32_scalefsd_mask_round,
23166 __builtin_ia32_scalefss_mask_round): New intrinsics.
23167 * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
23168 (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
23169 ((match_operand:VF_128 2 "<round_nimm_predicate>"
23170 "<round_constraint>")): Changed to ...
23171 ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
23172 "<round_scalar_constraint>")): ... this.
23173 ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
23174 %0, %1, %2<round_op3>}"): Changed to ...
23175 ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
23176 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
23177 %2<round_scalar_mask_op3>}"): ... this.
23178 * config/i386/subst.md (round_scalar_nimm_predicate): New.
23180 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
23182 * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
23183 (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
23184 (_mm_maskz_sqrt_round_ss): New intrinsics.
23185 (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
23186 (__builtin_ia32_sqrtsd_mask_round)
23187 (__builtin_ia32_sqrtss_mask_round): New builtins.
23188 * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
23189 (__builtin_ia32_sqrtss_round): Remove.
23190 (__builtin_ia32_sqrtsd_mask_round)
23191 (__builtin_ia32_sqrtss_mask_round): New builtins.
23192 * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
23193 (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
23194 ((match_operand:VF_128 1 "vector_operand"
23195 "xBm,<round_constraint>")): Changed to ...
23196 ((match_operand:VF_128 1 "vector_operand"
23197 "xBm,<round_scalar_constraint>")): ... this.
23198 (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
23199 %0, %2, %<iptr>1<round_op3>}): Changed to ...
23200 (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
23201 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
23202 %<iptr>1<round_scalar_mask_op3>}): ... this.
23203 ((set_attr "prefix" "<round_prefix>")): Changed to ...
23204 ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
23206 2018-02-11 Steven Munroe <munroesj@gcc.gnu.org>
23209 * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
23210 Cast vec_cmpeq result to correct type.
23211 * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
23212 Cast vec_cmpgt result to correct type.
23214 2018-02-11 Alexandre Oliva <aoliva@redhat.com>
23216 * final.c (final_scan_insn_1): Renamed from...
23217 (final_scan_insn): ... this. New wrapper, to recover
23218 seen from the outermost call in recursive ones.
23219 * config/sparc/sparc.c (output_return): Drop seen from call.
23220 (output_sibcall): Likewise.
23221 * config/visium/visium.c (output_branch): Likewise.
23223 2018-02-10 John David Anglin <danglin@gcc.gnu.org>
23225 * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
23228 2018-02-10 Alan Modra <amodra@gmail.com>
23231 * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
23232 Specify LR as an input.
23234 2018-02-10 Jakub Jelinek <jakub@redhat.com>
23237 * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
23238 remove_member_access_dummy_vars): New functions.
23239 (lower_omp_for, lower_omp_taskreg, lower_omp_target,
23240 lower_omp_1, execute_lower_omp): Use them.
23242 PR rtl-optimization/84308
23243 * shrink-wrap.c (spread_components): Release todo vector.
23245 2018-02-09 Vladimir Makarov <vmakarov@redhat.com>
23247 PR rtl-optimization/57193
23248 * ira-color.c (struct allocno_color_data): Add member
23249 conflict_allocno_hard_prefs.
23250 (update_conflict_allocno_hard_prefs): New.
23251 (bucket_allocno_compare_func): Add a preference based on
23252 conflict_allocno_hard_prefs.
23253 (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
23254 (color_allocnos): Remove a dead code. Initiate
23255 conflict_allocno_hard_prefs. Call update_costs_from_prefs.
23257 2018-02-09 Jakub Jelinek <jakub@redhat.com>
23260 * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
23261 constraint from =wa to wa. Avoid a subreg on the output operand,
23262 instead use a pseudo and subreg it in a move.
23263 (p9_xxbrd_<mode>): Changed to ...
23264 (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
23265 (p9_xxbrd_v2df): New expander.
23266 (p9_xxbrw_<mode>): Changed to ...
23267 (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
23268 (p9_xxbrw_v4sf): New expander.
23270 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
23272 * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
23274 2018-02-09 Peter Bergner <bergner@vnet.ibm.com>
23277 * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
23278 multiply in 32-bit mode.
23279 (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
23280 (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
23283 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
23285 * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
23286 to allow or block "symbol_ref" depending on the value of TARGET_JSR.
23287 * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
23288 * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
23290 2018-02-09 Pierre-Marie de Rodat <derodat@adacore.com>
23293 * dwarf2out.c (is_trivial_indirect_ref): New function.
23294 (dwarf2out_late_global_decl): Do not generate a location
23295 attribute for variables that have a non-trivial DECL_VALUE_EXPR
23296 and that are not defined in the current unit.
23298 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
23300 * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
23301 instead of a libcall for UNORDERED.
23303 2018-02-09 Tamar Christina <tamar.christina@arm.com>
23306 * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
23307 __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
23309 2018-02-09 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
23312 * config/s390/s390.c (s390_set_current_function): Invoke
23313 s390_indirect_branch_settings also if fndecl didn't change.
23315 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
23317 * config/rs6000/rs6000.md (blockage): Set length to zero.
23319 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
23321 * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
23323 2018-02-09 Jakub Jelinek <jakub@redhat.com>
23326 * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
23327 STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
23331 * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
23332 PARALLEL incoming that failed vt_get_decl_and_offset check.
23334 PR middle-end/84237
23335 * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
23336 * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
23338 (get_variable_section): For decls in named .bss* sections pass true as
23339 second argument to bss_initializer_p.
23341 2018-02-09 Marek Polacek <polacek@redhat.com>
23342 Jakub Jelinek <jakub@redhat.com>
23345 * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
23346 Formatting fixes. Verify first that tree_fits_poly_int64_p (op01).
23347 Sync some changes from cxx_fold_indirect_ref.
23349 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
23351 * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
23353 * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
23354 (BLOCK_INLINE_ENTRY_LABEL): New.
23355 (dwarf2out_var_location): Disregard inline entry markers.
23356 (inline_entry_data): New struct.
23357 (inline_entry_data_hasher): New hashtable type.
23358 (inline_entry_data_hasher::hash): New.
23359 (inline_entry_data_hasher::equal): New.
23360 (inline_entry_data_table): New variable.
23361 (add_high_low_attributes): Add DW_AT_entry_pc and
23362 DW_AT_GNU_entry_view attributes if a pending entry is found
23363 in inline_entry_data_table. Add old entry_pc attribute only
23364 if debug nonbinding markers are disabled.
23365 (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
23366 markers are enabled.
23367 (block_within_block_p, dwarf2out_inline_entry): New.
23368 (dwarf2out_finish): Check that no entries remained in
23369 inline_entry_data_table.
23370 * final.c (reemit_insn_block_notes): Handle inline entry notes.
23371 (final_scan_insn, notice_source_line): Likewise.
23372 (rest_of_clean_state): Skip inline entry markers.
23373 * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
23375 * gimple.c (gimple_build_debug_inline_entry): New.
23376 * gimple.h (enum gimple_debug_subcode): Add
23377 GIMPLE_DEBUG_INLINE_ENTRY.
23378 (gimple_build_debug_inline_entry): Declare.
23379 (gimple_debug_inline_entry_p): New.
23380 (gimple_debug_nonbind_marker_p): Adjust.
23381 * insn-notes.def (INLINE_ENTRY): New.
23382 * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
23383 inline entry marker notes.
23384 (print_insn): Likewise.
23385 * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
23386 (INSN_DEBUG_MARKER_KIND): Likewise.
23387 (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
23388 * tree-inline.c (expand_call_inline): Build and insert
23389 debug_inline_entry stmt.
23390 * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
23391 inline entry blocks early, if nonbind markers are enabled.
23392 (dump_scope_block): Dump fragment info.
23393 * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
23394 * doc/gimple.texi (gimple_debug_inline_entry_p): New.
23395 (gimple_build_debug_inline_entry): New.
23396 * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
23397 Enable/disable inline entry points too.
23398 * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
23399 (DEBUG_INSN): Describe inline entry markers.
23401 * common.opt (gvariable-location-views): New.
23402 (gvariable-location-views=incompat5): New.
23403 * config.in: Rebuilt.
23404 * configure: Rebuilt.
23405 * configure.ac: Test assembler for view support.
23406 * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
23407 * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
23408 * dwarf2out.c (var_loc_view): New typedef.
23409 (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
23410 (dwarf2out_locviews_in_attribute): New.
23411 (dwarf2out_locviews_in_loclist): New.
23412 (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
23413 (enum dw_line_info_opcode): Add LI_adv_address.
23414 (struct dw_line_info_table): Add view.
23415 (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
23416 (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
23417 (zero_view_p): New variable.
23418 (ZERO_VIEW_P): New macro.
23419 (output_asm_line_debug_info): New.
23420 (struct var_loc_node): Add view.
23421 (add_AT_view_list, AT_loc_list): New.
23422 (add_var_loc_to_decl): Add view param. Test it against last.
23423 (new_loc_list): Add view params. Record them.
23424 (AT_loc_list_ptr): Handle loc and view lists.
23425 (view_list_to_loc_list_val_node): New.
23426 (print_dw_val): Handle dw_val_class_view_list.
23427 (size_of_die): Likewise.
23428 (value_format): Likewise.
23429 (loc_list_has_views): New.
23430 (gen_llsym): Set vl_symbol too.
23431 (maybe_gen_llsym, skip_loc_list_entry): New.
23432 (dwarf2out_maybe_output_loclist_view_pair): New.
23433 (output_loc_list): Output view list or entries too.
23434 (output_view_list_offset): New.
23435 (output_die): Handle dw_val_class_view_list.
23436 (output_dwarf_version): New.
23437 (output_compilation_unit_header): Use it.
23438 (output_skeleton_debug_sections): Likewise.
23439 (output_rnglists, output_line_info): Likewise.
23440 (output_pubnames, output_aranges): Update version comments.
23441 (output_one_line_info_table): Output view numbers in asm comments.
23442 (dw_loc_list): Determine current endview, pass it to new_loc_list.
23443 Call maybe_gen_llsym.
23444 (loc_list_from_tree_1): Adjust.
23445 (add_AT_location_description): Create view list attribute if
23446 needed, check it's absent otherwise.
23447 (convert_cfa_to_fb_loc_list): Adjust.
23448 (maybe_emit_file): Call output_asm_line_debug_info for test.
23449 (dwarf2out_var_location): Reset views as needed. Precompute
23450 add_var_loc_to_decl args. Call get_attr_min_length only if we have the
23451 attribute. Set view.
23452 (new_line_info_table): Reset next view.
23453 (set_cur_line_info_table): Call output_asm_line_debug_info for test.
23454 (dwarf2out_source_line): Likewise. Output view resets and labels to
23455 the assembler, or select appropriate line info opcodes.
23456 (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
23457 (optimize_string_length): Catch it. Adjust.
23458 (resolve_addr): Copy vl_symbol along with ll_symbol. Handle
23459 dw_val_class_view_list, and remove it if no longer needed.
23460 (hash_loc_list): Hash view numbers.
23461 (loc_list_hasher::equal): Compare them.
23462 (optimize_location_lists): Check whether a view list symbol is
23463 needed, and whether the locview attribute is present, and
23464 whether they match. Remove the locview attribute if no longer
23466 (index_location_lists): Call skip_loc_list_entry for test.
23467 (dwarf2out_finish): Call output_asm_line_debug_info for test.
23468 Use output_dwarf_version.
23469 * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
23470 (struct dw_val_node): Add val_view_list.
23471 * final.c (SEEN_NEXT_VIEW): New.
23472 (set_next_view_needed): New.
23473 (clear_next_view_needed): New.
23474 (maybe_output_next_view): New.
23475 (final_start_function): Rename to...
23476 (final_start_function_1): ... this. Take pointer to FIRST,
23477 add SEEN parameter. Emit param bindings in the initial view.
23478 (final_start_function): Reintroduce SEEN-less interface.
23479 (final): Rename to...
23480 (final_1): ... this. Take SEEN parameter. Output final pending
23481 next view at the end.
23482 (final): Reintroduce seen-less interface.
23483 (final_scan_insn): Output pending next view before switching
23484 sections or ending a block. Mark the next view as needed when
23485 outputting variable locations. Notify debug backend of section
23486 changes, and of location view changes.
23487 (rest_of_handle_final): Adjust.
23488 * toplev.c (process_options): Autodetect value for debug variable
23489 location views option. Warn on incompat5 without -gdwarf-5.
23490 * doc/invoke.texi (gvariable-location-views): New.
23491 (gvariable-location-views=incompat5): New.
23492 (gno-variable-location-views): New.
23494 2018-02-08 David Malcolm <dmalcolm@redhat.com>
23496 PR tree-optimization/84136
23497 * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
23498 that the result of find_edge is non-NULL.
23500 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
23503 * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
23504 storing integer register in SImode. Fix cost of 256 and 512
23505 byte aligned SSE register store.
23507 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
23509 * config/i386/i386.c (ix86_multiplication_cost): Fix
23510 multiplication cost for TARGET_AVX512DQ.
23512 2018-02-08 Marek Polacek <polacek@redhat.com>
23514 PR tree-optimization/84238
23515 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
23518 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
23520 PR tree-optimization/84265
23521 * tree-vect-stmts.c (vectorizable_store): Don't treat
23522 VMAT_CONTIGUOUS accesses as grouped.
23523 (vectorizable_load): Likewise.
23525 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
23527 PR tree-optimization/81635
23528 * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
23529 * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
23530 (test_round_for_mask): New functions.
23531 (wide_int_cc_tests): Call test_round_for_mask.
23532 * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
23533 * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
23534 * tree-data-ref.c (split_constant_offset_1): Use it to refine the
23535 range returned by get_range_info.
23537 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
23540 * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
23541 * symtab.c: Include builtins.h
23542 (symtab_node::output_to_lto_symbol_table_p): Move here
23543 from lto-streamer-out.c:output_symbol_p.
23544 * lto-streamer-out.c (write_symbol): Turn early exit to assert.
23545 (output_symbol_p): Move all logic to symtab.c
23546 (produce_symtab): Update.
23548 2018-02-08 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
23550 * config/s390/s390-opts.h (enum indirect_branch): Define.
23551 * config/s390/s390-protos.h (s390_return_addr_from_memory)
23552 (s390_indirect_branch_via_thunk)
23553 (s390_indirect_branch_via_inline_thunk): Add function prototypes.
23554 (enum s390_indirect_branch_type): Define.
23555 * config/s390/s390.c (struct s390_frame_layout, struct
23556 machine_function): Remove.
23557 (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
23558 (indirect_branch_table_label_no, indirect_branch_table_name):
23560 (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
23561 (enum s390_indirect_branch_option): Define.
23562 (s390_return_addr_from_memory): New function.
23563 (s390_handle_string_attribute): New function.
23564 (s390_attribute_table): Add new attribute handler.
23565 (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
23566 (s390_indirect_branch_via_thunk): New function.
23567 (s390_indirect_branch_via_inline_thunk): New function.
23568 (s390_function_ok_for_sibcall): When jumping via thunk disallow
23569 sibling call optimization for non z10 compiles.
23570 (s390_emit_call): Force indirect branch target to be a single
23571 register. Add r1 clobber for non-z10 compiles.
23572 (s390_emit_epilogue): Emit return jump via return_use expander.
23573 (s390_reorg): Handle JUMP_INSNs as execute targets.
23574 (s390_option_override_internal): Perform validity checks for the
23575 new command line options.
23576 (s390_indirect_branch_attrvalue): New function.
23577 (s390_indirect_branch_settings): New function.
23578 (s390_set_current_function): Invoke s390_indirect_branch_settings.
23579 (s390_output_indirect_thunk_function): New function.
23580 (s390_code_end): Implement target hook.
23581 (s390_case_values_threshold): Implement target hook.
23582 (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
23584 * config/s390/s390.h (struct s390_frame_layout)
23585 (struct machine_function): Move here from s390.c.
23586 (TARGET_INDIRECT_BRANCH_NOBP_RET)
23587 (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
23588 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
23589 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
23590 (TARGET_INDIRECT_BRANCH_NOBP_CALL)
23591 (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
23592 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
23593 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
23594 (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
23595 * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
23596 (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
23597 (mnemonic attribute): Add values which aren't recognized
23599 ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
23600 pattern for branch conversion. Fix mnemonic attribute.
23601 ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
23602 indirect branch via thunk if requested.
23603 ("indirect_jump", "<code>"): Expand patterns for branch conversion.
23604 ("*indirect_jump"): Disable for branch conversion using out of
23606 ("indirect_jump_via_thunk<mode>_z10")
23607 ("indirect_jump_via_thunk<mode>")
23608 ("indirect_jump_via_inlinethunk<mode>_z10")
23609 ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
23610 ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
23611 ("casesi_jump_via_inlinethunk<mode>_z10")
23612 ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
23613 ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
23614 ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
23615 ("*indirect2_jump"): Disable for branch conversion.
23616 ("casesi_jump"): Turn into expander and expand patterns for branch
23618 ("return_use"): New expander.
23619 ("*return"): Emit return via thunk and rename it to ...
23620 ("*return<mode>"): ... this one.
23621 * config/s390/s390.opt: Add new options and and enum for the
23624 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
23626 * lra-constraints.c (match_reload): Unconditionally use
23627 gen_lowpart_SUBREG, rather than selecting between that
23628 and equivalent gen_rtx_SUBREG code.
23630 2018-02-08 Richard Biener <rguenther@suse.de>
23632 PR tree-optimization/84233
23633 * tree-ssa-phiprop.c (propagate_with_phi): Use separate
23634 changed flag instead of boguously re-using phi_inserted.
23636 2018-02-08 Martin Jambor <mjambor@suse.cz>
23638 * hsa-gen.c (get_symbol_for_decl): Set program allocation for
23639 static local variables.
23641 2018-02-08 Richard Biener <rguenther@suse.de>
23643 PR tree-optimization/84278
23644 * tree-vect-stmts.c (vectorizable_store): When looking for
23645 smaller vector types to perform grouped strided loads/stores
23646 make sure the mode is supported by the target.
23647 (vectorizable_load): Likewise.
23649 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
23651 * config/aarch64/aarch64.c (aarch64_components_for_bb):
23652 Increase LDP/STP opportunities by adding adjacent callee-saves.
23654 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
23656 PR rtl-optimization/84068
23657 PR rtl-optimization/83459
23658 * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
23660 2018-02-08 Aldy Hernandez <aldyh@redhat.com>
23662 PR tree-optimization/84224
23663 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
23664 * calls.c (gimple_alloca_call_p): Only return TRUE when we have
23665 non-zero arguments.
23667 2018-02-07 Iain Sandoe <iain@codesourcery.com>
23670 * config/rs6000/altivec.md (*restore_world): Remove LR use.
23671 * config/rs6000/predicates.md (restore_world_operation): Adjust op
23672 count, remove one USE.
23674 2018-02-07 Michael Meissner <meissner@linux.vnet.ibm.com>
23676 * doc/install.texi (Configuration): Document the
23677 --with-long-double-format={ibm,ieee} PowerPC configuration
23681 * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
23682 Convert from define_expand to be define_insn_and_split. Rework
23683 float/double/_Float128 conversions to QI/HI/SImode to work with
23684 both ISA 2.07 (power8) or ISA 3.0 (power9). Fix regression where
23685 conversions to QI/HImode types did a store and then a load to
23686 truncate the value. For conversions to VSX registers, don't split
23687 the insn, instead emit the code directly. Use the code iterator
23688 any_fix to combine signed and unsigned conversions.
23689 (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
23690 (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
23691 (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
23692 (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
23693 (fix_<mode>di2_hw): Likewise.
23694 (fixuns_<mode>di2_hw): Likewise.
23695 (fix_<mode>si2_hw): Likewise.
23696 (fixuns_<mode>si2_hw): Likewise.
23697 (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
23698 (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
23699 (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
23700 fix<uns>_trunc<SFDF:mode>si2_p8.
23701 (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer used.
23702 (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
23703 (fix<uns>_<mode>_mem): Likewise.
23704 (fctiw<u>z_<mode>_mem): Likewise.
23705 (fix<uns>_<mode>_mem): Likewise.
23706 (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
23707 the register allocator from doing a direct move to the GPRs to do
23708 a store, and instead use the ISA 3.0 store byte/half-word from
23709 vector register instruction. For IEEE 128-bit floating point,
23710 also optimize stores of 32-bit ints.
23711 (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
23713 2018-02-07 Alan Hayward <alan.hayward@arm.com>
23715 * genextract.c (push_pathstr_operand): New function to support
23717 (walk_rtx): Call push_pathstr_operand.
23718 (print_path): Support [a-zA-Z].
23720 2018-02-07 Richard Biener <rguenther@suse.de>
23722 PR tree-optimization/84037
23723 * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
23724 (cse_and_gimplify_to_preheader): Declare.
23725 (vect_get_place_in_interleaving_chain): Likewise.
23726 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
23728 (_loop_vec_info::~_loop_vec_info): Delete it.
23729 (cse_and_gimplify_to_preheader): New function.
23730 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
23731 * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
23732 (vectorizable_load): Likewise. For grouped stores always base
23733 the IV on the first element.
23734 * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
23735 condition before gimplifying.
23737 2018-02-07 Jakub Jelinek <jakub@redhat.com>
23739 * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
23740 *DIV_EXPR and *MOD_EXPR.
23742 2018-02-07 H.J. Lu <hongjiu.lu@intel.com>
23745 * config/i386/i386.c (ix86_option_override_internal): Mask out
23746 the CF_SET bit when checking -fcf-protection.
23748 2018-02-07 Tom de Vries <tom@codesourcery.com>
23751 * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
23754 2018-02-07 Richard Biener <rguenther@suse.de>
23756 PR tree-optimization/84204
23757 * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
23760 PR tree-optimization/84205
23761 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
23762 special-case isl_ast_op_zdiv_r.
23764 PR tree-optimization/84223
23765 * graphite-scop-detection.c (gather_bbs::before_dom_children):
23766 Only add conditions from within the region.
23767 (gather_bbs::after_dom_children): Adjust.
23769 2018-02-07 Georg-Johann Lay <avr@gjlay.de>
23772 * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
23773 * config/avr/avr.md: Only post-reload split REG-REG moves if
23774 either register is GENERAL_REG_P.
23776 2018-02-07 Jakub Jelinek <jakub@redhat.com>
23778 PR tree-optimization/84235
23779 * tree-ssa-scopedtables.c
23780 (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
23781 if the subtraction is performed in floating point type where NaNs are
23782 honored. For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
23783 build 1. Formatting fix.
23785 2018-02-06 Jakub Jelinek <jakub@redhat.com>
23788 * config/i386/i386.c (rest_of_insert_endbranch): Only skip
23789 NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
23790 and skip it regardless of bb boundaries. Use CALL_P macro,
23791 don't test INSN_P (insn) together with CALL_P or JUMP_P check
23792 unnecessarily, formatting fix.
23794 2018-02-06 Michael Collison <michael.collison@arm.com>
23796 * config/arm/thumb2.md:
23797 (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
23798 (*thumb_mov_notscc): Ditto.
23800 2018-02-06 Michael Meissner <meissner@linux.vnet.ibm.com>
23803 * config/rs6000/rs6000.md (su code attribute): Use "u" for
23804 unsigned_fix, not "s".
23806 2018-02-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
23808 * configure.ac (gcc_fn_eh_frame_ro): New function.
23809 (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
23810 correct .eh_frame permissions.
23811 * configure: Regenerate.
23813 2018-02-06 Andrew Jenner <andrew@codeourcery.com>
23815 * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
23816 irrelevant options.
23818 2018-02-06 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
23820 * config/rs6000/rs6000.c (rs6000_option_override_internal):
23821 Display warning message for -mno-speculate-indirect-jumps.
23823 2018-02-06 Andrew Jenner <andrew@codesourcery.com>
23825 * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
23827 * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
23829 2018-02-06 Aldy Hernandez <aldyh@redhat.com>
23831 PR tree-optimization/84225
23832 * tree-eh.c (find_trapping_overflow): Only call
23833 operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
23835 2018-02-06 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
23838 * config/i386/i386.c: Reimplement the check of possible options
23839 -mibt/-mshstk conbination. Change error messages.
23840 * doc/invoke.texi: Fix a typo: remove extra '='.
23842 2018-02-06 Marek Polacek <polacek@redhat.com>
23844 PR tree-optimization/84228
23845 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
23847 2018-02-06 Tamar Christina <tamar.christina@arm.com>
23850 * config/arm/arm.c (arm_print_asm_arch_directives): Record already
23851 emitted arch directives.
23852 * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
23853 __ARM_FEATURE_COPROC before changing architectures.
23855 2018-02-06 Richard Biener <rguenther@suse.de>
23857 * config/i386/i386.c (print_reg): Fix typo.
23858 (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
23860 2018-02-06 Eric Botcazou <ebotcazou@adacore.com>
23862 * configure: Regenerate.
23864 2018-02-05 Martin Sebor <msebor@redhat.com>
23866 PR tree-optimization/83369
23867 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
23870 2018-02-05 Martin Liska <mliska@suse.cz>
23872 * doc/invoke.texi: Cherry-pick upstream r323995.
23874 2018-02-05 Richard Sandiford <richard.sandiford@linaro.org>
23876 * ira.c (ira_init_register_move_cost): Adjust comment.
23878 2018-02-05 Martin Liska <mliska@suse.cz>
23880 PR gcov-profile/84137
23881 * doc/gcov.texi: Fix typo in documentation.
23883 2018-02-05 Martin Liska <mliska@suse.cz>
23885 PR gcov-profile/83879
23886 * doc/gcov.texi: Document necessity of --dynamic-list-data when
23887 using dlopen functionality.
23889 2018-02-05 Olga Makhotina <olga.makhotina@intel.com>
23891 * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
23892 _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
23893 _mm_maskz_range_ss, _mm_mask_range_round_ss,
23894 _mm_maskz_range_round_ss): New intrinsics.
23895 (__builtin_ia32_rangesd128_round)
23896 (__builtin_ia32_rangess128_round): Remove.
23897 (__builtin_ia32_rangesd128_mask_round,
23898 __builtin_ia32_rangess128_mask_round): New builtins.
23899 * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
23900 __builtin_ia32_rangess128_round): Remove.
23901 (__builtin_ia32_rangesd128_mask_round,
23902 __builtin_ia32_rangess128_mask_round): New builtins.
23903 * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
23904 (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
23905 ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
23906 "<round_saeonly_constraint>")): Changed to ...
23907 ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
23908 "<round_saeonly_scalar_constraint>")): ... this.
23909 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
23910 %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
23911 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
23912 %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
23913 %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
23915 2018-02-02 Andrew Jenner <andrew@codesourcery.com>
23917 * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
23919 * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
23920 Remove all values except native, 8540 and 8548.
23922 2018-02-02 H.J. Lu <hongjiu.lu@intel.com>
23924 * config/i386/i386.c (ix86_output_function_return): Pass
23925 INVALID_REGNUM, instead of -1, as invalid register number to
23926 indirect_thunk_name and output_indirect_thunk.
23928 2018-02-02 Julia Koval <julia.koval@intel.com>
23930 * config.gcc: Add -march=icelake.
23931 * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
23932 * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
23933 * config/i386/i386.c (processor_costs): Add m_ICELAKE.
23934 (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
23935 PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
23936 (processor_target_table): Add icelake.
23937 (ix86_option_override_internal): Handle new PTAs.
23938 (get_builtin_code_for_version): Handle icelake.
23939 (M_INTEL_COREI7_ICELAKE): New.
23940 (fold_builtin_cpu): Handle icelake.
23941 * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
23942 * doc/invoke.texi: Add -march=icelake.
23944 2018-02-02 Julia Koval <julia.koval@intel.com>
23946 * config/i386/i386.c (ix86_option_override_internal): Change flags type
23947 to wide_int_bitmask.
23948 * wide-int-bitmask.h: New.
23950 2018-02-02 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
23953 * config/i386/i386.md: Replace Pmode with word_mode in
23954 builtin_setjmp_setup and builtin_longjmp to support x32.
23956 2018-02-01 Peter Bergner <bergner@vnet.ibm.com>
23960 * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
23962 (rs6000_supported_cpu_names): New static variable.
23963 (linux_cpu_translation_table): Likewise.
23964 (elf_platform) <cpu>: Define new static variable and use it.
23965 Translate kernel AT_PLATFORM name to canonical name if needed.
23966 Error if platform name is unknown.
23968 2018-02-01 Aldy Hernandez <aldyh@redhat.com>
23971 * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
23973 2018-02-01 Jeff Law <law@redhat.com>
23976 * config/i386/i386.c (release_scratch_register_on_entry): Add new
23977 OFFSET and RELEASE_VIA_POP arguments. Use SP+OFFSET to restore
23978 the scratch if RELEASE_VIA_POP is false.
23979 (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
23980 If we have to save a temporary register, decrement SIZE appropriately.
23981 Pass new arguments to release_scratch_register_on_entry.
23982 (ix86_adjust_stack_and_probe): Likewise.
23983 (ix86_emit_probe_stack_range): Pass new arguments to
23984 release_scratch_register_on_entry.
23986 2018-02-01 Uros Bizjak <ubizjak@gmail.com>
23988 PR rtl-optimization/84157
23989 * combine.c (change_zero_ext): Use REG_P predicate in
23990 front of HARD_REGISTER_P predicate.
23992 2018-02-01 Georg-Johann Lay <avr@gjlay.de>
23994 * config/avr/avr.c (avr_option_override): Move disabling of
23995 -fdelete-null-pointer-checks to...
23996 * common/config/avr/avr-common.c (avr_option_optimization_table):
23999 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
24001 PR tree-optimization/81635
24002 * tree-data-ref.c (split_constant_offset_1): For types that
24003 wrap on overflow, try to use range info to prove that wrapping
24006 2018-02-01 Renlin Li <renlin.li@arm.com>
24009 * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
24010 TAILCALL_ADDR_REGS.
24011 (aarch64_register_move_cost): Likewise.
24012 * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
24013 TAILCALL_ADDR_REGS.
24014 (REG_CLASS_NAMES): Likewise.
24015 (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
24016 TAILCALL_ADDR_REGS. Remove IP registers.
24017 * config/aarch64/aarch64.md (Ucs): Update register constraint.
24019 2018-02-01 Richard Biener <rguenther@suse.de>
24021 * domwalk.h (dom_walker::dom_walker): Add additional constructor
24022 for specifying RPO order and allow NULL for that.
24023 * domwalk.c (dom_walker::dom_walker): Likewise.
24024 (dom_walker::walk): Handle NULL RPO order.
24025 * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
24027 (rewrite_update_dom_walker): Likewise.
24028 (mark_def_dom_walker): Likewise.
24030 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
24032 * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
24033 (aarch64_maybe_expand_sve_subreg_move): Declare.
24034 * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
24035 * config/aarch64/predicates.md (aarch64_any_register_operand): New
24037 * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
24038 that are semantically a reverse operation.
24039 (*aarch64_sve_mov<mode>_subreg_be): New pattern.
24040 * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
24041 (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
24043 (aarch64_can_change_mode_class): For big-endian, forbid changes
24044 between two SVE modes if they have different element sizes.
24046 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
24048 * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
24049 the TImode handling for big-endian targets.
24051 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
24053 * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
24054 (*sve_ld1rq<Vesize>): ... this new pattern. Handle all element sizes,
24056 * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
24057 Remove BSWAP handing for big-endian targets and use the form of
24058 LD1RQ appropariate for the mode.
24060 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
24062 * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
24063 all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
24064 duplicated element.
24066 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
24069 * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
24070 check for operands that need to go through aarch64_sve_reload_be.
24072 2018-02-01 Jakub Jelinek <jakub@redhat.com>
24074 PR tree-optimization/81661
24075 PR tree-optimization/84117
24076 * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
24077 * tree-eh.c: Include gimplify.h.
24078 (find_trapping_overflow, replace_trapping_overflow,
24079 rewrite_to_non_trapping_overflow): New functions.
24080 * tree-vect-loop.c: Include tree-eh.h.
24081 (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
24082 * tree-data-ref.c: Include tree-eh.h.
24083 (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
24085 2018-01-31 Uros Bizjak <ubizjak@gmail.com>
24087 PR rtl-optimization/84123
24088 * combine.c (change_zero_ext): Check if hard register satisfies
24089 can_change_dest_mode before calling gen_lowpart_SUBREG.
24091 2018-01-31 Vladimir Makarov <vmakarov@redhat.com>
24094 * ira.c (ira_init_register_move_cost): Remove assert.
24096 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
24098 PR rtl-optimization/84071
24099 * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
24100 * doc/tm.texi: Regenerate.
24102 2018-01-31 Richard Biener <rguenther@suse.de>
24104 PR tree-optimization/84132
24105 * tree-data-ref.c (analyze_miv_subscript): Properly
24106 check whether evolution_function_is_affine_multivariate_p
24107 before calling gcd_of_steps_may_divide_p.
24109 2018-01-31 Julia Koval <julia.koval@intel.com>
24112 * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
24113 * config/i386/i386.md (rdpid_rex64) New.
24114 (rdpid): Make 32bit only.
24116 2018-01-29 Aldy Hernandez <aldyh@redhat.com>
24119 * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
24120 an IDENTIFIER_NODE for FUNCTION_TYPE's.
24122 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
24125 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
24127 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
24129 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
24131 PR rtl-optimization/84071
24132 * combine.c (record_dead_and_set_regs_1): Record the source unmodified
24133 for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
24135 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
24137 * config/arc/arc.c (arc_handle_aux_attribute): New function.
24138 (arc_attribute_table): Add 'aux' attribute.
24139 (arc_in_small_data_p): Consider aux like variables.
24140 (arc_is_aux_reg_p): New function.
24141 (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
24142 (arc_get_aux_arg): New function.
24143 (prepare_move_operands): Handle aux-register access.
24144 (arc_handle_aux_attribute): New function.
24145 * doc/extend.texi (ARC Variable attributes): Add subsection.
24147 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
24149 * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
24150 * config/arc/arc.c (arc_handle_uncached_attribute): New function.
24151 (arc_attribute_table): Add 'uncached' attribute.
24152 (arc_print_operand): Print '.di' flag for uncached memory
24154 (arc_in_small_data_p): Do not consider for small data the uncached
24156 (arc_is_uncached_mem_p): New function.
24157 * config/arc/predicates.md (compact_store_memory_operand): Check
24158 for uncached memory accesses.
24159 (nonvol_nonimm_operand): Likewise.
24160 * doc/extend.texi (ARC Type Attribute): New subsection.
24162 2018-01-31 Jakub Jelinek <jakub@redhat.com>
24165 * common.opt (falign-functions=, falign-jumps=, falign-labels=,
24166 falign-loops=): Add Optimization flag.
24168 2018-01-30 Jeff Law <law@redhat.com>
24171 * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
24172 INT_REGISTERS_SAVED. Check it prior to calling
24173 get_scratch_register_on_entry.
24174 (ix86_adjust_stack_and_probe): Similarly.
24175 (ix86_emit_probe_stack_range): Similarly.
24176 (ix86_expand_prologue): Corresponding changes.
24178 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
24181 * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
24182 -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
24184 2018-01-30 Vladimir Makarov <vmakarov@redhat.com>
24187 * lra-constraints.c (curr_insn_transform): Process AND in the
24190 2018-01-30 Jakub Jelinek <jakub@redhat.com>
24192 PR rtl-optimization/83986
24193 * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
24194 dependence against last_pending_memory_flush in addition to
24195 pending_jump_insns.
24197 2018-01-30 Alexandre Oliva <aoliva@redhat.com>
24199 PR tree-optimization/81611
24200 * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
24203 2018-01-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
24206 * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
24209 2018-01-30 Richard Biener <rguenther@suse.de>
24210 Jakub Jelinek <jakub@redhat.com>
24212 PR tree-optimization/84111
24213 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
24214 inner loops added during recursion, as they don't have up-to-date
24217 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
24220 * ipa-inline.c (can_inline_edge_p): Break out late tests to...
24221 (can_inline_edge_by_limits_p): ... here.
24222 (can_early_inline_edge_p, check_callers,
24223 update_caller_keys, update_callee_keys, recursive_inlining,
24224 add_new_edges_to_heap, speculation_useful_p,
24225 inline_small_functions,
24226 inline_small_functions, flatten_function,
24227 inline_to_all_callers_1): Update.
24229 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
24231 * profile-count.c (profile_count::combine_with_ipa_count): Handle
24234 2018-01-30 Richard Biener <rguenther@suse.de>
24236 PR tree-optimization/83008
24237 * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
24238 invariant and constant vector uses in stmts when they need
24239 more than one stmt.
24241 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
24244 * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
24245 * configure: Regenerate.
24247 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
24249 * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
24251 (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
24252 Use gen_rtx_REG rather than gen_lowpart.
24254 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
24256 * lra-constraints.c (match_reload): Use subreg_lowpart_offset
24257 rather than 0 when creating partial subregs.
24259 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
24261 * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
24264 2018-01-29 Michael Meissner <meissner@linux.vnet.ibm.com>
24267 * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
24268 and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
24269 -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
24270 flags. This restores the settings used before the 2017-07-24.
24271 Turning off pre increment/decrement/modify allows IVOPTS to
24272 optimize DF/SF loops where the index is an int.
24274 2018-01-29 Richard Biener <rguenther@suse.de>
24275 Kelvin Nilsen <kelvin@gcc.gnu.org>
24278 * tree-vect-stmts.c (vectorizable_call): Don't call
24279 targetm.vectorize_builtin_md_vectorized_function if callee is
24282 2018-01-22 Carl Love <cel@us.ibm.com>
24284 * doc/extend.tex: Fix typo in second arg in
24285 __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
24287 2018-01-29 Richard Biener <rguenther@suse.de>
24289 PR tree-optimization/84086
24290 * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
24291 (flush_ssaname_freelist): When SSA names were released reset
24292 the SCEV hash table.
24294 2018-01-29 Richard Biener <rguenther@suse.de>
24296 PR tree-optimization/84057
24297 * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
24298 removed paths when removing edges.
24300 2018-01-27 H.J. Lu <hongjiu.lu@intel.com>
24302 * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
24303 -mfunction-return=@var{choice}.
24305 2018-01-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
24307 PR diagnostic/84034
24308 * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
24309 Handle CR like TAB.
24310 (layout::print_source_line): Likewise.
24311 (test_get_line_width_without_trailing_whitespace): Add test cases.
24313 2018-01-27 Jakub Jelinek <jakub@redhat.com>
24315 PR middle-end/84040
24316 * sched-deps.c (sched_macro_fuse_insns): Return immediately for
24319 2018-01-26 Jim Wilson <jimw@sifive.com>
24321 * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
24323 * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
24326 2018-01-26 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
24328 * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
24329 and CMP + SUB-immediate -> SUBS.
24331 2018-01-26 Martin Sebor <msebor@redhat.com>
24333 PR tree-optimization/83896
24334 * tree-ssa-strlen.c (get_string_len): Rename...
24335 (get_string_cst_length): ...to this. Return HOST_WIDE_INT.
24336 Avoid assuming length is constant.
24337 (handle_char_store): Use HOST_WIDE_INT for string length.
24339 2018-01-26 Uros Bizjak <ubizjak@gmail.com>
24342 * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
24343 to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
24345 2018-01-26 Richard Biener <rguenther@suse.de>
24347 PR rtl-optimization/84003
24348 * dse.c (record_store): Only record redundant stores when
24349 the earlier store aliases at least all accesses the later one does.
24351 2018-01-26 Jakub Jelinek <jakub@redhat.com>
24353 PR rtl-optimization/83985
24354 * dce.c (deletable_insn_p): Return false for separate shrink wrapping
24355 REG_CFA_RESTORE insns.
24356 (delete_unmarked_insns): Don't ignore separate shrink wrapping
24357 REG_CFA_RESTORE insns here.
24360 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
24361 use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
24363 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
24365 * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
24366 * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
24367 (arc_init): Likewise.
24368 (arc_override_options): Likewise.
24369 (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
24371 (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
24373 * config/arc/arc.h (TARGET_DBNZ): Define.
24374 * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
24375 properly set the tune attribute.
24376 (dbnz): Use TARGET_DBNZ guard.
24377 * config/arc/arc.opt (mtune): Add core3 option.
24379 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
24381 * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
24382 recognize new pic like addresses.
24383 (arc_delegitimize_address): Clean up.
24385 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
24387 * config/arc/arc-arches.def: Option mrf16 valid for all
24389 * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
24390 * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
24391 * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
24392 * config/arc/arc-tables.opt: Regenerate.
24393 * config/arc/arc.c (arc_conditional_register_usage): Handle
24394 reduced register file case.
24395 (arc_file_start): Set must have build attributes.
24396 * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
24397 mrf16 option value.
24398 * config/arc/arc.opt (mrf16): Add new option.
24399 * config/arc/elf.h (ATTRIBUTE_PCS): Define.
24400 * config/arc/genmultilib.awk: Handle new mrf16 option.
24401 * config/arc/linux.h (ATTRIBUTE_PCS): Define.
24402 * config/arc/t-multilib: Regenerate.
24403 * doc/invoke.texi (ARC Options): Document mrf16 option.
24405 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
24407 * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
24408 * config/arc/arc.c (arc_handle_secure_attribute): New function.
24409 (arc_attribute_table): Add 'secure_call' attribute.
24410 (arc_print_operand): Print secure call operand.
24411 (arc_function_ok_for_sibcall): Don't optimize tail calls when
24413 (arc_is_secure_call_p): New function. * config/arc/arc.md
24414 (call_i): Add support for sjli instruction.
24415 (call_value_i): Likewise.
24416 * config/arc/constraints.md (Csc): New constraint.
24418 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
24419 John Eric Martin <John.Martin@emmicro-us.com>
24421 * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
24422 * config/arc/arc.c (_arc_jli_section): New struct.
24423 (arc_jli_section): New type.
24424 (rc_jli_sections): New static variable.
24425 (arc_handle_jli_attribute): New function.
24426 (arc_attribute_table): Add jli_always and jli_fixed attribute.
24427 (arc_file_end): New function.
24428 (TARGET_ASM_FILE_END): Define.
24429 (arc_print_operand): Reuse 'S' letter for JLI output instruction.
24430 (arc_add_jli_section): New function.
24431 (jli_call_scan): Likewise.
24432 (arc_reorg): Call jli_call_scan.
24433 (arc_output_addsi): Remove 'S' from printing asm operand.
24434 (arc_is_jli_call_p): New function.
24435 * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
24437 (movhi_insn): Likewise.
24438 (movsi_insn): Likewise.
24439 (movsi_set_cc_insn): Likewise.
24440 (loadqi_update): Likewise.
24441 (load_zeroextendqisi_update): Likewise.
24442 (load_signextendqisi_update): Likewise.
24443 (loadhi_update): Likewise.
24444 (load_zeroextendhisi_update): Likewise.
24445 (load_signextendhisi_update): Likewise.
24446 (loadsi_update): Likewise.
24447 (loadsf_update): Likewise.
24448 (movsicc_insn): Likewise.
24449 (bset_insn): Likewise.
24450 (bxor_insn): Likewise.
24451 (bclr_insn): Likewise.
24452 (bmsk_insn): Likewise.
24453 (bicsi3_insn): Likewise.
24454 (cmpsi_cc_c_insn): Likewise.
24455 (movsi_ne): Likewise.
24456 (movsi_cond_exec): Likewise.
24457 (clrsbsi2): Likewise.
24458 (norm_f): Likewise.
24468 (call_i): Remove 'S' asm letter, add jli instruction.
24469 (call_value_i): Likewise.
24470 * config/arc/arc.op (mjli-always): New option.
24471 * config/arc/constraints.md (Cji): New constraint.
24472 * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
24474 (subsf3_fpx): Likewise.
24475 (mulsf3_fpx): Likewise.
24476 * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
24478 * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
24479 function attrbutes.
24480 * doc/invoke.texi (ARC): Document mjli-always option.
24482 2018-01-26 Sebastian Perta <sebastian.perta@renesas.com>
24484 * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
24485 avoid addition with 0 and use incw and decw where possible.
24487 2018-01-26 Richard Biener <rguenther@suse.de>
24489 PR tree-optimization/81082
24490 * fold-const.c (fold_plusminus_mult_expr): Do not perform the
24491 association if it requires casting to unsigned.
24492 * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
24493 from fold_plusminus_mult_expr to catch important cases late when
24494 range info is available.
24496 2018-01-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
24498 * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
24499 * configure.ac (hidden_linkonce): New test.
24500 * configure: Regenerate.
24501 * config.in: Regenerate.
24503 2018-01-26 Julia Koval <julia.koval@intel.com>
24505 * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
24506 _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
24507 _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
24508 _mm_mask_bitshuffle_epi64_mask): Fix type.
24509 * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
24510 USI_FTYPE_V4DI_V4DI_USI): Remove.
24511 * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
24512 __builtin_ia32_vpshufbitqmb256_mask,
24513 __builtin_ia32_vpshufbitqmb128_mask): Fix types.
24514 * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
24515 * config/i386/sse.md (VI1_AVX512VLBW): Change types.
24517 2018-01-26 Alan Modra <amodra@gmail.com>
24520 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
24521 UNSPEC_VBPERMQ. Sort other unspecs.
24523 2018-01-25 David Edelsohn <dje.gcc@gmail.com>
24525 * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
24527 2018-01-25 Jan Hubicka <hubicka@ucw.cz>
24529 PR middle-end/83055
24530 * predict.c (drop_profile): Do not push/pop cfun; update also
24532 (handle_missing_profiles): Fix logic looking for zero profiles.
24534 2018-01-25 Jakub Jelinek <jakub@redhat.com>
24536 PR middle-end/83977
24537 * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
24538 on functions with #pragma omp declare simd or functions with simd
24540 * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
24541 * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
24542 Remove trailing \n from warning_at calls.
24544 2018-01-25 Tom de Vries <tom@codesourcery.com>
24547 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
24548 for neutered workers.
24550 2018-01-24 Joseph Myers <joseph@codesourcery.com>
24553 * config/m68k/m68k.c (m68k_promote_function_mode): New function.
24554 (TARGET_PROMOTE_FUNCTION_MODE): New macro.
24556 2018-01-24 Jeff Law <law@redhat.com>
24559 * i386.c (get_probe_interval): Move to earlier point.
24560 (ix86_compute_frame_layout): If -fstack-clash-protection and
24561 the frame is larger than the probe interval, then use pushes
24562 to save registers rather than reg->mem moves.
24563 (ix86_expand_prologue): Remove conditional for int_registers_saved
24566 2018-01-24 Vladimir Makarov <vmakarov@redhat.com>
24569 * ira-build.c (setup_min_max_allocno_live_range_point): Set up
24570 min/max for never referenced object.
24572 2018-01-24 Jakub Jelinek <jakub@redhat.com>
24574 PR middle-end/83977
24575 * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
24577 * omp-low.c (create_omp_child_function): Remove "omp declare simd"
24578 attributes from DECL_ATTRIBUTES (decl) without affecting
24579 DECL_ATTRIBUTES (current_function_decl).
24580 * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
24581 functions with non-NULL DECL_ABSTRACT_ORIGIN.
24583 2018-01-24 Richard Sandiford <richard.sandiford@linaro.org>
24585 PR tree-optimization/83979
24586 * fold-const.c (fold_comparison): Use constant_boolean_node
24587 instead of boolean_{true,false}_node.
24589 2018-01-24 Jan Hubicka <hubicka@ucw.cz>
24591 * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
24594 2018-01-24 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
24596 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
24597 Simplify the clause that sets the length attribute.
24598 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
24599 (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
24600 clause that sets the length attribute.
24601 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
24603 2018-01-24 Tom de Vries <tom@codesourcery.com>
24606 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
24607 (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
24608 Add strict parameter.
24609 (prevent_branch_around_nothing): Insert dummy insn between branch to
24610 label and label with no ptx insn inbetween.
24611 * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
24613 2018-01-24 Tom de Vries <tom@codesourcery.com>
24616 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
24617 for neutered threads in warp.
24618 * config/nvptx/nvptx.md (define_insn "exit"): New insn.
24620 2018-01-24 Richard Biener <rguenther@suse.de>
24622 PR tree-optimization/83176
24623 * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
24626 2018-01-24 Richard Biener <rguenther@suse.de>
24628 PR tree-optimization/82819
24629 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
24630 code generating pluses that are no-ops in the target precision.
24632 2018-01-24 Richard Biener <rguenther@suse.de>
24634 PR middle-end/84000
24635 * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
24637 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
24639 * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
24640 to merge probabilities.
24641 * predict.c (probably_never_executed): Also mark as cold functions
24642 with global 0 profile and guessed local profile.
24643 * profile-count.c (profile_probability::combine_with_count): New
24645 * profile-count.h (profile_probability::operator*,
24646 profile_probability::operator*=, profile_probability::operator/,
24647 profile_probability::operator/=): Reduce precision to adjusted
24648 and set value to guessed on contradictory divisions.
24649 (profile_probability::combine_with_freq): Remove.
24650 (profile_probability::combine_wiht_count): Declare.
24651 (profile_count::force_nonzero):: Set to adjusted.
24652 (profile_count::probability_in):: Set quality to adjusted.
24653 * tree-ssa-tail-merge.c (replace_block_by): Use
24654 combine_with_count.
24656 2018-01-23 Andrew Waterman <andrew@sifive.com>
24657 Jim Wilson <jimw@sifive.com>
24659 * config/riscv/riscv.c (riscv_stack_boundary): New.
24660 (riscv_option_override): Set riscv_stack_boundary. Handle
24661 riscv_preferred_stack_boundary_arg.
24662 * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
24663 (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
24664 (STACK_BOUNDARY): Set to riscv_stack_boundary.
24665 (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
24666 * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
24667 * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
24669 2018-01-23 H.J. Lu <hongjiu.lu@intel.com>
24672 * config/i386/i386.c (ix86_expand_prologue): Use cost reference
24673 of struct ix86_frame.
24674 (ix86_expand_epilogue): Likewise. Add a local variable for
24675 the reg_save_offset field in struct ix86_frame.
24677 2018-01-23 Bin Cheng <bin.cheng@arm.com>
24679 PR tree-optimization/82604
24680 * tree-loop-distribution.c (enum partition_kind): New enum item
24681 PKIND_PARTIAL_MEMSET.
24682 (partition_builtin_p): Support above new enum item.
24683 (generate_code_for_partition): Ditto.
24684 (compute_access_range): Differentiate cases that equality can be
24685 proven at all loops, the innermost loops or no loops.
24686 (classify_builtin_st, classify_builtin_ldst): Adjust call to above
24687 function. Set PKIND_PARTIAL_MEMSET for partition appropriately.
24688 (finalize_partitions, distribute_loop): Don't fuse partition of
24689 PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
24690 (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
24691 parloop is enabled.
24693 2018-01-23 Martin Liska <mliska@suse.cz>
24695 * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
24696 order to ignore the predictor.
24697 (PRED_POLYMORPHIC_CALL): Likewise.
24698 (PRED_RECURSIVE_CALL): Likewise.
24700 2018-01-23 Martin Liska <mliska@suse.cz>
24702 * tree-profile.c (tree_profiling): Print function header to
24703 aware reader which function we are working on.
24704 * value-prof.c (gimple_find_values_to_profile): Do not print
24705 not interesting value histograms.
24707 2018-01-23 Martin Liska <mliska@suse.cz>
24709 * profile-count.h (enum profile_quality): Add
24710 profile_uninitialized as the first value. Do not number values
24711 as they are zero based.
24712 (profile_count::verify): Update sanity check.
24713 (profile_probability::verify): Likewise.
24715 2018-01-23 Nathan Sidwell <nathan@acm.org>
24717 * doc/invoke.texi (ffor-scope): Deprecate.
24719 2018-01-23 David Malcolm <dmalcolm@redhat.com>
24721 PR tree-optimization/83510
24722 * domwalk.c (set_all_edges_as_executable): New function.
24723 (dom_walker::dom_walker): Convert bool param
24724 "skip_unreachable_blocks" to enum reachability. Move setup of
24725 edge flags to set_all_edges_as_executable and only do it when
24726 reachability is REACHABLE_BLOCKS.
24727 * domwalk.h (enum dom_walker::reachability): New enum.
24728 (dom_walker::dom_walker): Convert bool param
24729 "skip_unreachable_blocks" to enum reachability.
24730 (set_all_edges_as_executable): New decl.
24731 * graphite-scop-detection.c (gather_bbs::gather_bbs): Convert
24732 from false for "skip_unreachable_blocks" to ALL_BLOCKS for
24734 * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
24735 but converting true to REACHABLE_BLOCKS.
24736 * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
24738 (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
24739 Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
24740 (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
24742 (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
24743 if check_all_array_refs will be called.
24745 2018-01-23 David Malcolm <dmalcolm@redhat.com>
24747 * tree.c (selftest::test_location_wrappers): Add more test
24750 2018-01-23 David Malcolm <dmalcolm@redhat.com>
24752 * sbitmap.c (selftest::test_set_range): Fix memory leaks.
24753 (selftest::test_bit_in_range): Likewise.
24755 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
24758 * doc/sourcebuild.texi (vect_float): Say that the selector
24759 only describes the situation when -funsafe-math-optimizations is on.
24760 (vect_float_strict): Document.
24762 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
24764 PR tree-optimization/83965
24765 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
24766 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
24767 instead of checking only for a reduction.
24768 (vect_recog_widen_sum_pattern): Likewise.
24770 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
24772 * predict.c (probably_never_executed): Only use precise profile info.
24773 (compute_function_frequency): Skip after inlining hack since we now
24774 have quality checking.
24776 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
24778 * profile-count.h (profile_probability::very_unlikely,
24779 profile_probability::unlikely, profile_probability::even): Set
24780 precision to guessed.
24782 2018-01-23 Richard Biener <rguenther@suse.de>
24784 PR tree-optimization/83963
24785 * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
24786 Properly terminate dominator walk when crossing the exit edge not
24787 when visiting its source block.
24789 2018-01-23 Jakub Jelinek <jakub@redhat.com>
24792 * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
24793 VIEW_CONVERT_EXPR to wrap CONST_DECLs.
24795 2018-01-22 Jakub Jelinek <jakub@redhat.com>
24797 PR tree-optimization/83957
24798 * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs. Remove
24799 semicolon after for body surrounded by braces.
24801 PR tree-optimization/83081
24802 * profile-count.h (profile_probability::split): New method.
24803 * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
24804 Use profile_probability::split.
24805 (do_compare_rtx_and_jump): Fix adjustment of probabilities
24806 when splitting a single conditional jump into 2.
24808 2018-01-22 David Malcolm <dmalcolm@redhat.com>
24810 PR tree-optimization/69452
24811 * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
24814 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
24816 * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
24817 * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
24818 * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
24820 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
24822 * config/rl78/rl78-protos.h (rl78_split_movdi): New function
24824 * config/rl78/rl78.md (movdi): New define_expand.
24825 * config/rl78/rl78.c (rl78_split_movdi): New function.
24827 2018-01-22 Michael Meissner <meissner@linux.vnet.ibm.com>
24830 * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
24832 * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
24833 * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
24834 128-bit to produce an UNSPEC move to get the double word with the
24835 signbit and then a shift directly to do signbit.
24836 (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
24837 implementation with a new version that just does either a direct
24838 move or a regular move. Move memory interface to separate insns.
24839 Move insns so they are next to the expander.
24840 (signbit<mode>2_dm_mem_be): New combiner insns to combine load
24841 with signbit move. Split big and little endian case.
24842 (signbit<mode>2_dm_mem_le): Likewise.
24843 (signbit<mode>2_dm_<su>ext): Delete, no longer used.
24844 (signbit<mode>2_dm2): Likewise.
24846 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
24848 * config/rl78/rl78.md (anddi3): New define_expand.
24850 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
24852 * config/rl78/rl78.md (umindi3): New define_expand.
24854 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
24856 * config/rl78/rl78.md (smindi3): New define_expand.
24858 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
24860 * config/rl78/rl78.md (smaxdi3): New define_expand.
24862 2018-01-22 Carl Love <cel@us.ibm.com>
24864 * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
24865 LVX_V1TI): Add macro expansion.
24866 * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
24867 definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
24868 VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
24869 * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
24870 Change check to determine if the instruction is a byte reversing
24871 entry. Fix typo in comment.
24872 * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
24873 for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
24874 Add def_builtin calls for new builtins.
24875 * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
24876 Add define_insn expansion.
24878 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
24880 * config/rl78/rl78.md (umaxdi3): New define_expand.
24882 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
24884 * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
24885 for non-QImode registers.
24887 2018-01-22 Richard Biener <rguenther@suse.de>
24889 PR tree-optimization/83963
24890 * graphite-scop-detection.c (scop_detection::get_sese): Delay
24891 including the loop exit block.
24892 (scop_detection::merge_sese): Likewise.
24893 (scop_detection::add_scop): Do it here instead.
24895 2018-01-22 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
24897 * doc/sourcebuild.texi (arm_softfloat): Document.
24899 2018-01-21 John David Anglin <danglin@gcc.gnu.org>
24902 * config/pa/pa.c (pa_function_ok_for_sibcall): Use
24903 targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
24904 Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
24906 2018-01-21 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
24907 David Edelsohn <dje.gcc@gmail.com>
24910 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
24911 Change "crset eq" to "crset 2".
24912 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
24913 (*call_indirect_aix<mode>_nospec): Likewise.
24914 (*call_value_indirect_aix<mode>_nospec): Likewise.
24915 (*call_indirect_elfv2<mode>_nospec): Likewise.
24916 (*call_value_indirect_elfv2<mode>_nospec): Likewise.
24917 (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
24918 change assembly output from . to $.
24919 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
24920 (indirect_jump<mode>_nospec): Change assembly output from . to $.
24921 (*tablejump<mode>_internal1_nospec): Likewise.
24923 2018-01-21 Oleg Endo <olegendo@gcc.gnu.org>
24926 * config/sh/sh_optimize_sett_clrt.cc:
24927 Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
24929 2018-01-20 Richard Sandiford <richard.sandiford@linaro.org>
24931 PR tree-optimization/83940
24932 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
24933 offset_dt to vect_constant_def rather than vect_unknown_def_type.
24934 (vect_check_load_store_mask): Add a mask_dt_out parameter and
24935 use it to pass back the definition type.
24936 (vect_check_store_rhs): Likewise rhs_dt_out.
24937 (vect_build_gather_load_calls): Add a mask_dt argument and use
24938 it instead of a call to vect_is_simple_use.
24939 (vectorizable_store): Update calls to vect_check_load_store_mask
24940 and vect_check_store_rhs. Use the dt returned by the latter instead
24941 of scatter_src_dt. Use the cached mask_dt and gs_info.offset_dt
24942 instead of calls to vect_is_simple_use. Pass the scalar rather
24943 than the vector operand to vect_is_simple_use when handling
24944 second and subsequent copies of an rhs value.
24945 (vectorizable_load): Update calls to vect_check_load_store_mask
24946 and vect_build_gather_load_calls. Use the cached mask_dt and
24947 gs_info.offset_dt instead of calls to vect_is_simple_use.
24949 2018-01-20 Jakub Jelinek <jakub@redhat.com>
24951 PR middle-end/83945
24952 * tree-emutls.c: Include gimplify.h.
24953 (lower_emutls_2): New function.
24954 (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
24955 with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
24956 it before further processing.
24959 * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
24960 UINTVAL (trueop1) instead of INTVAL (op1).
24962 2018-01-19 Jakub Jelinek <jakub@redhat.com>
24966 * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
24967 INCOMING_FRAME_SP_OFFSET if not defined.
24968 (scan_trace): Add ENTRY argument. If true and
24969 DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
24970 emit a note to adjust the CFA offset.
24971 (create_cfi_notes): Adjust scan_trace callers.
24972 (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
24973 INCOMING_FRAME_SP_OFFSET in the CIE.
24974 * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
24975 * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
24977 * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
24978 * doc/tm.texi: Regenerated.
24980 2018-01-19 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
24982 PR rtl-optimization/83147
24983 * lra-constraints.c (remove_inheritance_pseudos): Use
24984 lra_substitute_pseudo_within_insn.
24986 2018-01-19 Tom de Vries <tom@codesourcery.com>
24987 Cesar Philippidis <cesar@codesourcery.com>
24990 * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
24992 2018-01-19 Cesar Philippidis <cesar@codesourcery.com>
24995 * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
24996 spaces for function labels.
24998 2018-01-19 Martin Liska <mliska@suse.cz>
25000 * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
25001 (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
25002 (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
25003 (PRED_OPCODE_POSITIVE): Change from 64 to 59.
25004 (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
25005 (PRED_CONST_RETURN): Change from 69 to 65.
25006 (PRED_NULL_RETURN): Change from 91 to 71.
25007 (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
25008 (PRED_LOOP_GUARD): Change from 66 to 73.
25010 2018-01-19 Martin Liska <mliska@suse.cz>
25012 * predict.c (predict_insn_def): Add new assert.
25013 (struct branch_predictor): Change type to signed integer.
25014 (test_prediction_value_range): Amend test to cover
25015 PROB_UNINITIALIZED.
25016 * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
25017 (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
25018 (PRED_LOOP_ITERATIONS_MAX): Likewise.
25019 (PRED_LOOP_IV_COMPARE): Likewise.
25020 * predict.h (PROB_UNINITIALIZED): Define new constant.
25022 2018-01-19 Martin Liska <mliska@suse.cz>
25024 * predict.c (dump_prediction): Add new format for
25025 analyze_brprob.py script which is enabled with -details
25027 * profile-count.h (precise_p): New function.
25029 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
25031 PR tree-optimization/83922
25032 * tree-vect-loop.c (vect_verify_full_masking): Return false if
25033 there are no statements that need masking.
25034 (vect_active_double_reduction_p): New function.
25035 (vect_analyze_loop_operations): Use it when handling phis that
25036 are not in the loop header.
25038 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
25040 PR tree-optimization/83914
25041 * tree-vect-loop.c (vectorizable_induction): Don't convert
25042 init_expr or apply the peeling adjustment for inductions
25043 that are nested within the vectorized loop.
25045 2018-01-19 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
25047 * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
25050 2018-01-18 Jakub Jelinek <jakub@redhat.com>
25054 * function.h (gimplify_parameters): Add gimple_seq * argument.
25055 * function.c: Include gimple.h and options.h.
25056 (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
25057 for the added local temporaries if needed.
25058 * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
25059 if there are any parameter cleanups, wrap whole body into a
25060 try/finally with the cleanups.
25062 2018-01-18 Wilco Dijkstra <wdijkstr@arm.com>
25065 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
25066 Use GET_MODE_CLASS for scalar floating point.
25068 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
25072 * cgraphclones.c (cgraph_node::create_version_clone_with_body):
25073 Fix call of call_cgraph_insertion_hooks.
25075 2018-01-18 Martin Sebor <msebor@redhat.com>
25077 * doc/invoke.texi (-Wclass-memaccess): Tweak text.
25079 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
25082 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
25085 2018-01-18 Boris Kolpackov <boris@codesynthesis.com>
25088 * common.opt: (-ffile-prefix-map): New option.
25089 * opts.c (common_handle_option): Defer it.
25090 * opts-global.c (handle_common_deferred_options): Handle it.
25091 * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
25092 * file-prefix-map.h: New file.
25093 (remap_debug_filename, add_debug_prefix_map): ...here.
25094 (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
25095 * final.c (debug_prefix_map, add_debug_prefix_map
25096 remap_debug_filename): Move to...
25097 * file-prefix-map.c: New file.
25098 (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
25099 generalize, get rid of alloca(), use strrchr() instead of strchr().
25100 (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
25101 Implement in terms of add_prefix_map().
25102 (remap_macro_filename, remap_debug_filename): Implement in term of
25104 * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
25105 * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
25106 * dbxout.c: Include file-prefix-map.h.
25107 * varasm.c: Likewise.
25108 * vmsdbgout.c: Likewise.
25109 * xcoffout.c: Likewise.
25110 * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
25111 * doc/cppopts.texi (-fmacro-prefix-map): Document.
25112 * doc/invoke.texi (-ffile-prefix-map): Document.
25113 (-fdebug-prefix-map): Update description.
25115 2018-01-18 Martin Liska <mliska@suse.cz>
25117 * config/i386/i386.c (indirect_thunk_name): Document that also
25119 (output_indirect_thunk): Document why both instructions
25120 (pause and lfence) are generated.
25122 2018-01-18 Richard Biener <rguenther@suse.de>
25124 PR tree-optimization/83887
25125 * graphite-scop-detection.c
25126 (scop_detection::get_nearest_dom_with_single_entry): Remove.
25127 (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
25128 (scop_detection::merge_sese): Re-implement with a flood-fill
25129 algorithm that properly finds a SESE region if it exists.
25131 2018-01-18 Jakub Jelinek <jakub@redhat.com>
25134 * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
25135 pointer_diff optimizations use view_convert instead of convert.
25137 2018-01-17 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
25139 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
25140 Generate different code for -mno-speculate-indirect-jumps.
25141 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
25142 (*call_indirect_aix<mode>): Disable for
25143 -mno-speculate-indirect-jumps.
25144 (*call_indirect_aix<mode>_nospec): New define_insn.
25145 (*call_value_indirect_aix<mode>): Disable for
25146 -mno-speculate-indirect-jumps.
25147 (*call_value_indirect_aix<mode>_nospec): New define_insn.
25148 (*sibcall_nonlocal_sysv<mode>): Generate different code for
25149 -mno-speculate-indirect-jumps.
25150 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
25152 2018-01-17 Michael Meissner <meissner@linux.vnet.ibm.com>
25154 * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
25155 long double type, set the flags for noting the default long double
25156 type, even if we don't pass or return a long double type.
25158 2018-01-17 Jan Hubicka <hubicka@ucw.cz>
25161 * ipa-inline.c (flatten_function): Do not overwrite final inlining
25164 2018-01-17 Will Schmidt <will_schmidt@vnet.ibm.com>
25166 * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
25167 support for merge[hl].
25168 (fold_mergehl_helper): New helper function.
25169 (tree-vector-builder.h): New #include for tree_vector_builder usage.
25170 * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
25171 (altivec_vmrglw_direct): Add xxmrglw insn.
25173 2018-01-17 Andrew Waterman <andrew@sifive.com>
25175 * config/riscv/riscv.c (riscv_conditional_register_usage): If
25176 UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
25178 2018-01-17 David Malcolm <dmalcolm@redhat.com>
25181 * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
25182 call the lto_location_cache before reading the
25183 DECL_SOURCE_LOCATION of the types.
25185 2018-01-17 Wilco Dijkstra <wdijkstr@arm.com>
25186 Richard Sandiford <richard.sandiford@linaro.org>
25188 * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
25189 * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
25190 (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
25191 SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
25192 * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
25194 * config/aarch64/constraints.md (aarch64_movti_operand):
25196 * config/aarch64/predicates.md (Uti): Add new constraint.
25198 2018-01-17 Carl Love <cel@us.ibm.com>
25200 * config/rs6000/vsx.md (define_expand xl_len_r,
25201 define_expand stxvl, define_expand *stxvl): Add match_dup argument.
25202 (define_insn): Add, match_dup 1 argument to define_insn stxvll and
25204 (define_expand, define_insn): Move the shift left from the
25205 define_insn to the define_expand for lxvl and stxvl instructions.
25206 * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
25207 and XL_LEN_R definitions to PURE.
25209 2018-01-17 Uros Bizjak <ubizjak@gmail.com>
25211 * config/i386/i386.c (indirect_thunk_name): Declare regno
25212 as unsigned int. Compare regno with INVALID_REGNUM.
25213 (output_indirect_thunk): Ditto.
25214 (output_indirect_thunk_function): Ditto.
25215 (ix86_code_end): Declare regno as unsigned int. Use INVALID_REGNUM
25216 in the call to output_indirect_thunk_function.
25218 2018-01-17 Richard Sandiford <richard.sandiford@linaro.org>
25220 PR middle-end/83884
25221 * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
25222 rather than the size of inner_type to determine the stack slot size
25223 when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
25225 2018-01-16 Sebastian Peryt <sebastian.peryt@intel.com>
25228 * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
25231 2018-01-16 Michael Meissner <meissner@linux.vnet.ibm.com>
25233 * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
25234 endian Linux systems to optionally enable multilibs for selecting
25235 the long double type if the user configured an explicit type.
25236 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
25237 have no long double multilibs if not defined.
25238 * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
25239 warn if the user used -mabi={ieee,ibm}longdouble and we built
25240 multilibs for long double.
25241 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
25242 appropriate multilib option.
25243 (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
25245 * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
25246 for building long double multilibs.
25247 * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
25249 2018-01-16 John David Anglin <danglin@gcc.gnu.org>
25251 * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
25254 * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
25256 * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
25259 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
25262 * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
25265 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
25267 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
25268 ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
25270 2018-01-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
25272 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
25273 different rtl trees depending on TARGET_64BIT.
25274 (rs6000_gen_lvx): Likewise.
25276 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
25278 * config/visium/visium.md (nop): Tweak comment.
25279 (hazard_nop): Likewise.
25281 2018-01-16 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
25283 * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
25284 -mspeculate-indirect-jumps.
25285 * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
25286 for -mno-speculate-indirect-jumps.
25287 (*call_indirect_elfv2<mode>_nospec): New define_insn.
25288 (*call_value_indirect_elfv2<mode>): Disable for
25289 -mno-speculate-indirect-jumps.
25290 (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
25291 (indirect_jump): Emit different RTL for
25292 -mno-speculate-indirect-jumps.
25293 (*indirect_jump<mode>): Disable for
25294 -mno-speculate-indirect-jumps.
25295 (*indirect_jump<mode>_nospec): New define_insn.
25296 (tablejump): Emit different RTL for
25297 -mno-speculate-indirect-jumps.
25298 (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
25299 (tablejumpsi_nospec): New define_expand.
25300 (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
25301 (tablejumpdi_nospec): New define_expand.
25302 (*tablejump<mode>_internal1): Disable for
25303 -mno-speculate-indirect-jumps.
25304 (*tablejump<mode>_internal1_nospec): New define_insn.
25305 * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
25308 2018-01-16 Artyom Skrobov tyomitch@gmail.com
25310 * caller-save.c (insert_save): Drop unnecessary parameter. All
25313 2018-01-16 Jakub Jelinek <jakub@redhat.com>
25314 Richard Biener <rguenth@suse.de>
25317 * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
25318 return early, inline manually is_gimple_sizepos. Make sure if we
25319 call gimplify_expr we don't end up with a gimple constant.
25320 * tree.c (variably_modified_type_p): Don't return true for
25321 is_gimple_constant (_t). Inline manually is_gimple_sizepos.
25322 * gimplify.h (is_gimple_sizepos): Remove.
25324 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
25326 PR tree-optimization/83857
25327 * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
25328 vectorizable_live_operation for pure SLP statements.
25329 (vectorizable_live_operation): Handle PHIs.
25331 2018-01-16 Richard Biener <rguenther@suse.de>
25333 PR tree-optimization/83867
25334 * tree-vect-stmts.c (vect_transform_stmt): Precompute
25335 nested_in_vect_loop_p since the scalar stmt may get invalidated.
25337 2018-01-16 Jakub Jelinek <jakub@redhat.com>
25340 * stor-layout.c (handle_warn_if_not_align): Use byte_position and
25341 multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
25342 If off is not INTEGER_CST, issue a may not be aligned warning
25343 rather than isn't aligned. Use isn%'t rather than isn't.
25344 * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
25346 <case MULT_EXPR>: Improve the case when bottom and one of the
25347 MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
25348 operand, in that case check if the other operand is multiple of
25349 bottom divided by the INTEGER_CST operand.
25351 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
25354 * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
25355 * config/pa/pa-protos.h (pa_function_arg_size): Declare.
25356 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
25357 pa_function_arg_size instead of FUNCTION_ARG_SIZE.
25358 * config/pa/pa.c (pa_function_arg_advance): Likewise.
25359 (pa_function_arg, pa_arg_partial_bytes): Likewise.
25360 (pa_function_arg_size): New function.
25362 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
25364 * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
25365 in a separate statement.
25367 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
25369 PR tree-optimization/83847
25370 * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
25371 group gathers and scatters.
25373 2018-01-16 Jakub Jelinek <jakub@redhat.com>
25375 PR rtl-optimization/86620
25376 * params.def (max-sched-ready-insns): Bump minimum value to 1.
25378 PR rtl-optimization/83213
25379 * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
25380 to last if both are JUMP_INSNs.
25382 PR tree-optimization/83843
25383 * gimple-ssa-store-merging.c
25384 (imm_store_chain_info::output_merged_store): Handle bit_not_p on
25385 store_immediate_info for bswap/nop orig_stores.
25387 2018-01-15 Andrew Waterman <andrew@sifive.com>
25389 * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
25391 <UDIV>: Increase cost if !TARGET_DIV.
25393 2018-01-15 Segher Boessenkool <segher@kernel.crashing.org>
25395 * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
25396 (define_attr "cr_logical_3op"): New.
25397 (cceq_ior_compare): Adjust.
25398 (cceq_ior_compare_complement): Adjust.
25399 (*cceq_rev_compare): Adjust.
25400 * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
25401 (is_cracked_insn): Adjust.
25402 (insn_must_be_first_in_group): Adjust.
25403 * config/rs6000/40x.md: Adjust.
25404 * config/rs6000/440.md: Adjust.
25405 * config/rs6000/476.md: Adjust.
25406 * config/rs6000/601.md: Adjust.
25407 * config/rs6000/603.md: Adjust.
25408 * config/rs6000/6xx.md: Adjust.
25409 * config/rs6000/7450.md: Adjust.
25410 * config/rs6000/7xx.md: Adjust.
25411 * config/rs6000/8540.md: Adjust.
25412 * config/rs6000/cell.md: Adjust.
25413 * config/rs6000/e300c2c3.md: Adjust.
25414 * config/rs6000/e500mc.md: Adjust.
25415 * config/rs6000/e500mc64.md: Adjust.
25416 * config/rs6000/e5500.md: Adjust.
25417 * config/rs6000/e6500.md: Adjust.
25418 * config/rs6000/mpc.md: Adjust.
25419 * config/rs6000/power4.md: Adjust.
25420 * config/rs6000/power5.md: Adjust.
25421 * config/rs6000/power6.md: Adjust.
25422 * config/rs6000/power7.md: Adjust.
25423 * config/rs6000/power8.md: Adjust.
25424 * config/rs6000/power9.md: Adjust.
25425 * config/rs6000/rs64.md: Adjust.
25426 * config/rs6000/titan.md: Adjust.
25428 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
25430 * config/i386/predicates.md (indirect_branch_operand): Rewrite
25431 ix86_indirect_branch_register logic.
25433 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
25435 * config/i386/constraints.md (Bs): Update
25436 ix86_indirect_branch_register check. Don't check
25437 ix86_indirect_branch_register with GOT_memory_operand.
25439 * config/i386/predicates.md (GOT_memory_operand): Don't check
25440 ix86_indirect_branch_register here.
25441 (GOT32_symbol_operand): Likewise.
25443 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
25445 * config/i386/predicates.md (constant_call_address_operand):
25446 Rewrite ix86_indirect_branch_register logic.
25447 (sibcall_insn_operand): Likewise.
25449 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
25451 * config/i386/constraints.md (Bs): Replace
25452 ix86_indirect_branch_thunk_register with
25453 ix86_indirect_branch_register.
25455 * config/i386/i386.md (indirect_jump): Likewise.
25456 (tablejump): Likewise.
25457 (*sibcall_memory): Likewise.
25458 (*sibcall_value_memory): Likewise.
25459 Peepholes of indirect call and jump via memory: Likewise.
25460 * config/i386/i386.opt: Likewise.
25461 * config/i386/predicates.md (indirect_branch_operand): Likewise.
25462 (GOT_memory_operand): Likewise.
25463 (call_insn_operand): Likewise.
25464 (sibcall_insn_operand): Likewise.
25465 (GOT32_symbol_operand): Likewise.
25467 2018-01-15 Jakub Jelinek <jakub@redhat.com>
25469 PR middle-end/83837
25470 * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
25471 type rather than type addr's type points to.
25472 (expand_omp_atomic_mutex): Likewise.
25473 (expand_omp_atomic): Likewise.
25475 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
25478 * config/i386/i386.c (output_indirect_thunk_function): Use
25479 ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
25480 for __x86_return_thunk.
25482 2018-01-15 Richard Biener <rguenther@suse.de>
25484 PR middle-end/83850
25485 * expmed.c (extract_bit_field_1): Fix typo.
25487 2018-01-15 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
25490 * config/arm/iterators.md (VF): New mode iterator.
25491 * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
25492 Remove integer-related logic from pattern.
25493 (neon_vabd<mode>_3): Likewise.
25495 2018-01-15 Jakub Jelinek <jakub@redhat.com>
25497 PR middle-end/82694
25498 * common.opt (fstrict-overflow): No longer an alias.
25499 (fwrapv-pointer): New option.
25500 * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
25501 also for pointer types based on flag_wrapv_pointer.
25502 * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
25503 opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
25504 opts->x_flag_wrapv got set.
25505 * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
25506 changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
25507 POINTER_TYPE_OVERFLOW_UNDEFINED.
25508 * match.pd: Likewise in address comparison pattern.
25509 * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
25511 2018-01-15 Richard Biener <rguenther@suse.de>
25514 * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
25515 from TYPE_FIELDS. Free TYPE_BINFO if not used by devirtualization.
25516 Reset type names to their identifier if their TYPE_DECL doesn't
25517 have linkage (and thus is used for ODR and devirt).
25518 (save_debug_info_for_decl): Remove.
25519 (save_debug_info_for_type): Likewise.
25520 (add_tree_to_fld_list): Adjust.
25521 * tree-pretty-print.c (dump_generic_node): Make dumping of
25522 type names more robust.
25524 2018-01-15 Richard Biener <rguenther@suse.de>
25526 * BASE-VER: Bump to 8.0.1.
25528 2018-01-14 Martin Sebor <msebor@redhat.com>
25531 * builtins.c (check_access): Avoid warning when the no-warning bit
25534 2018-01-14 Cory Fields <cory-nospam-@coryfields.com>
25536 * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
25537 * ira-color (allocno_hard_regs_compare): Likewise.
25539 2018-01-14 Nathan Rossi <nathan@nathanrossi.com>
25542 * config/microblaze/microblaze.c (microblaze_asm_output_ident):
25543 Use .pushsection/.popsection.
25545 2018-01-14 Martin Sebor <msebor@redhat.com>
25548 * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
25550 2018-01-14 Jakub Jelinek <jakub@redhat.com>
25552 * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
25553 entry from extra_headers.
25554 (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
25555 extra_headers, make the list bitwise identical to the i?86-*-* one.
25557 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
25559 * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
25560 -mcmodel=large with -mindirect-branch=thunk,
25561 -mindirect-branch=thunk-extern, -mfunction-return=thunk and
25562 -mfunction-return=thunk-extern.
25563 * doc/invoke.texi: Document -mcmodel=large is incompatible with
25564 -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
25565 -mfunction-return=thunk and -mfunction-return=thunk-extern.
25567 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
25569 * config/i386/i386.c (print_reg): Print the name of the full
25570 integer register without '%'.
25571 (ix86_print_operand): Handle 'V'.
25572 * doc/extend.texi: Document 'V' modifier.
25574 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
25576 * config/i386/constraints.md (Bs): Disallow memory operand for
25577 -mindirect-branch-register.
25579 * config/i386/predicates.md (indirect_branch_operand): Likewise.
25580 (GOT_memory_operand): Likewise.
25581 (call_insn_operand): Likewise.
25582 (sibcall_insn_operand): Likewise.
25583 (GOT32_symbol_operand): Likewise.
25584 * config/i386/i386.md (indirect_jump): Call convert_memory_address
25585 for -mindirect-branch-register.
25586 (tablejump): Likewise.
25587 (*sibcall_memory): Likewise.
25588 (*sibcall_value_memory): Likewise.
25589 Disallow peepholes of indirect call and jump via memory for
25590 -mindirect-branch-register.
25591 (*call_pop): Replace m with Bw.
25592 (*call_value_pop): Likewise.
25593 (*sibcall_pop_memory): Replace m with Bs.
25594 * config/i386/i386.opt (mindirect-branch-register): New option.
25595 * doc/invoke.texi: Document -mindirect-branch-register option.
25597 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
25599 * config/i386/i386-protos.h (ix86_output_function_return): New.
25600 * config/i386/i386.c (ix86_set_indirect_branch_type): Also
25601 set function_return_type.
25602 (indirect_thunk_name): Add ret_p to indicate thunk for function
25604 (output_indirect_thunk_function): Pass false to
25605 indirect_thunk_name.
25606 (ix86_output_indirect_branch_via_reg): Likewise.
25607 (ix86_output_indirect_branch_via_push): Likewise.
25608 (output_indirect_thunk_function): Create alias for function
25609 return thunk if regno < 0.
25610 (ix86_output_function_return): New function.
25611 (ix86_handle_fndecl_attribute): Handle function_return.
25612 (ix86_attribute_table): Add function_return.
25613 * config/i386/i386.h (machine_function): Add
25614 function_return_type.
25615 * config/i386/i386.md (simple_return_internal): Use
25616 ix86_output_function_return.
25617 (simple_return_internal_long): Likewise.
25618 * config/i386/i386.opt (mfunction-return=): New option.
25619 (indirect_branch): Mention -mfunction-return=.
25620 * doc/extend.texi: Document function_return function attribute.
25621 * doc/invoke.texi: Document -mfunction-return= option.
25623 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
25625 * config/i386/i386-opts.h (indirect_branch): New.
25626 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
25627 * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
25628 with local indirect jump when converting indirect call and jump.
25629 (ix86_set_indirect_branch_type): New.
25630 (ix86_set_current_function): Call ix86_set_indirect_branch_type.
25631 (indirectlabelno): New.
25632 (indirect_thunk_needed): Likewise.
25633 (indirect_thunk_bnd_needed): Likewise.
25634 (indirect_thunks_used): Likewise.
25635 (indirect_thunks_bnd_used): Likewise.
25636 (INDIRECT_LABEL): Likewise.
25637 (indirect_thunk_name): Likewise.
25638 (output_indirect_thunk): Likewise.
25639 (output_indirect_thunk_function): Likewise.
25640 (ix86_output_indirect_branch_via_reg): Likewise.
25641 (ix86_output_indirect_branch_via_push): Likewise.
25642 (ix86_output_indirect_branch): Likewise.
25643 (ix86_output_indirect_jmp): Likewise.
25644 (ix86_code_end): Call output_indirect_thunk_function if needed.
25645 (ix86_output_call_insn): Call ix86_output_indirect_branch if
25647 (ix86_handle_fndecl_attribute): Handle indirect_branch.
25648 (ix86_attribute_table): Add indirect_branch.
25649 * config/i386/i386.h (machine_function): Add indirect_branch_type
25650 and has_local_indirect_jump.
25651 * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
25653 (tablejump): Likewise.
25654 (*indirect_jump): Use ix86_output_indirect_jmp.
25655 (*tablejump_1): Likewise.
25656 (simple_return_indirect_internal): Likewise.
25657 * config/i386/i386.opt (mindirect-branch=): New option.
25658 (indirect_branch): New.
25661 (thunk-inline): Likewise.
25662 (thunk-extern): Likewise.
25663 * doc/extend.texi: Document indirect_branch function attribute.
25664 * doc/invoke.texi: Document -mindirect-branch= option.
25666 2018-01-14 Jan Hubicka <hubicka@ucw.cz>
25669 * ipa-inline.c (edge_badness): Tolerate roundoff errors.
25671 2018-01-14 Richard Sandiford <richard.sandiford@linaro.org>
25673 * ipa-inline.c (want_inline_small_function_p): Return false if
25674 inlining has already failed with CIF_FINAL_ERROR.
25675 (update_caller_keys): Call want_inline_small_function_p before
25677 (update_callee_keys): Likewise.
25679 2018-01-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
25681 * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
25683 (rs6000_quadword_masked_address_p): Likewise.
25684 (quad_aligned_load_p): Likewise.
25685 (quad_aligned_store_p): Likewise.
25686 (const_load_sequence_p): Add comment to describe the outer-most loop.
25687 (mimic_memory_attributes_and_flags): New function.
25688 (rs6000_gen_stvx): Likewise.
25689 (replace_swapped_aligned_store): Likewise.
25690 (rs6000_gen_lvx): Likewise.
25691 (replace_swapped_aligned_load): Likewise.
25692 (replace_swapped_load_constant): Capitalize argument name in
25693 comment describing this function.
25694 (rs6000_analyze_swaps): Add a third pass to search for vector loads
25695 and stores that access quad-word aligned addresses and replace
25696 with stvx or lvx instructions when appropriate.
25697 * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
25698 New function prototype.
25699 (rs6000_quadword_masked_address_p): Likewise.
25700 (rs6000_gen_lvx): Likewise.
25701 (rs6000_gen_stvx): Likewise.
25702 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
25703 VSX_D (V2DF, V2DI), modify this split to select lvx instruction
25704 when memory address is aligned.
25705 (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
25706 this split to select lvx instruction when memory address is aligned.
25707 (*vsx_le_perm_load_v8hi): Modify this split to select lvx
25708 instruction when memory address is aligned.
25709 (*vsx_le_perm_load_v16qi): Likewise.
25710 (four unnamed splitters): Modify to select the stvx instruction
25711 when memory is aligned.
25713 2018-01-13 Jan Hubicka <hubicka@ucw.cz>
25715 * predict.c (determine_unlikely_bbs): Handle correctly BBs
25716 which appears in the queue multiple times.
25718 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
25719 Alan Hayward <alan.hayward@arm.com>
25720 David Sherwood <david.sherwood@arm.com>
25722 * tree-vectorizer.h (vec_lower_bound): New structure.
25723 (_loop_vec_info): Add check_nonzero and lower_bounds.
25724 (LOOP_VINFO_CHECK_NONZERO): New macro.
25725 (LOOP_VINFO_LOWER_BOUNDS): Likewise.
25726 (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
25727 * tree-data-ref.h (dr_with_seg_len): Add access_size and align
25728 fields. Make seg_len the distance travelled, not including the
25730 (dr_direction_indicator): Declare.
25731 (dr_zero_step_indicator): Likewise.
25732 (dr_known_forward_stride_p): Likewise.
25733 * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
25735 (runtime_alias_check_p): Allow runtime alias checks with
25737 (operator ==): Compare access_size and align.
25738 (prune_runtime_alias_test_list): Rework for new distinction between
25739 the access_size and seg_len.
25740 (create_intersect_range_checks_index): Likewise. Cope with polynomial
25742 (get_segment_min_max): New function.
25743 (create_intersect_range_checks): Use it.
25744 (dr_step_indicator): New function.
25745 (dr_direction_indicator): Likewise.
25746 (dr_zero_step_indicator): Likewise.
25747 (dr_known_forward_stride_p): Likewise.
25748 * tree-loop-distribution.c (data_ref_segment_size): Return
25749 DR_STEP * (niters - 1).
25750 (compute_alias_check_pairs): Update call to the dr_with_seg_len
25752 * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
25753 (vect_preserves_scalar_order_p): New function, split out from...
25754 (vect_analyze_data_ref_dependence): ...here. Check for zero steps.
25755 (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
25756 (vect_vfa_access_size): New function.
25757 (vect_vfa_align): Likewise.
25758 (vect_compile_time_alias): Take access_size_a and access_b arguments.
25759 (dump_lower_bound): New function.
25760 (vect_check_lower_bound): Likewise.
25761 (vect_small_gap_p): Likewise.
25762 (vectorizable_with_step_bound_p): Likewise.
25763 (vect_prune_runtime_alias_test_list): Ignore cross-iteration
25764 depencies if the vectorization factor is 1. Convert the checks
25765 for nonzero steps into checks on the bounds of DR_STEP. Try using
25766 a bunds check for variable steps if the minimum required step is
25767 relatively small. Update calls to the dr_with_seg_len
25768 constructor and to vect_compile_time_alias.
25769 * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
25771 (vect_loop_versioning): Call it.
25772 * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
25774 (vect_estimate_min_profitable_iters): Account for any bounds checks.
25776 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
25777 Alan Hayward <alan.hayward@arm.com>
25778 David Sherwood <david.sherwood@arm.com>
25780 * doc/sourcebuild.texi (vect_scatter_store): Document.
25781 * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
25783 * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
25785 * genopinit.c (main): Add supports_vec_scatter_store and
25786 supports_vec_scatter_store_cached to target_optabs.
25787 * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
25788 IFN_MASK_SCATTER_STORE.
25789 * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
25791 * internal-fn.h (internal_store_fn_p): Declare.
25792 (internal_fn_stored_value_index): Likewise.
25793 * internal-fn.c (scatter_store_direct): New macro.
25794 (expand_scatter_store_optab_fn): New function.
25795 (direct_scatter_store_optab_supported_p): New macro.
25796 (internal_store_fn_p): New function.
25797 (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
25798 IFN_MASK_SCATTER_STORE.
25799 (internal_fn_mask_index): Likewise.
25800 (internal_fn_stored_value_index): New function.
25801 (internal_gather_scatter_fn_supported_p): Adjust operand numbers
25802 for scatter stores.
25803 * optabs-query.h (supports_vec_scatter_store_p): Declare.
25804 * optabs-query.c (supports_vec_scatter_store_p): New function.
25805 * tree-vectorizer.h (vect_get_store_rhs): Declare.
25806 * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
25807 true for scatter stores.
25808 (vect_gather_scatter_fn_p): Handle scatter stores too.
25809 (vect_check_gather_scatter): Consider using scatter stores if
25810 supports_vec_scatter_store_p.
25811 * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
25812 scatter stores too.
25813 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
25814 internal_fn_stored_value_index.
25815 (check_load_store_masking): Handle scatter stores too.
25816 (vect_get_store_rhs): Make public.
25817 (vectorizable_call): Use internal_store_fn_p.
25818 (vectorizable_store): Handle scatter store internal functions.
25819 (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
25820 when deciding whether the end of the group has been reached.
25821 * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
25822 * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
25823 (mask_scatter_store<mode>): New insns.
25825 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
25826 Alan Hayward <alan.hayward@arm.com>
25827 David Sherwood <david.sherwood@arm.com>
25829 * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
25830 * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
25831 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
25833 (vect_use_strided_gather_scatters_p): Take a masked_p argument.
25834 Use vect_truncate_gather_scatter_offset if we can't treat the
25835 operation as a normal gather load or scatter store.
25836 (get_group_load_store_type): Take the gather_scatter_info
25837 as argument. Try using a gather load or scatter store for
25838 single-element groups.
25839 (get_load_store_type): Update calls to get_group_load_store_type
25840 and vect_use_strided_gather_scatters_p.
25842 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
25843 Alan Hayward <alan.hayward@arm.com>
25844 David Sherwood <david.sherwood@arm.com>
25846 * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
25847 optional tree argument.
25848 * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
25850 (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
25851 but continue to use the current value as a fallback.
25852 (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
25853 to compare the updates.
25854 * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
25855 (get_load_store_type): Use it when handling a strided access.
25856 (vect_get_strided_load_store_ops): New function.
25857 (vect_get_data_ptr_increment): Likewise.
25858 (vectorizable_load): Handle strided gather loads. Always pass
25859 a step to vect_create_data_ref_ptr and bump_vector_ptr.
25861 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
25862 Alan Hayward <alan.hayward@arm.com>
25863 David Sherwood <david.sherwood@arm.com>
25865 * doc/md.texi (gather_load@var{m}): Document.
25866 (mask_gather_load@var{m}): Likewise.
25867 * genopinit.c (main): Add supports_vec_gather_load and
25868 supports_vec_gather_load_cached to target_optabs.
25869 * optabs-tree.c (init_tree_optimization_optabs): Use
25870 ggc_cleared_alloc to allocate target_optabs.
25871 * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
25872 * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
25874 * internal-fn.h (internal_load_fn_p): Declare.
25875 (internal_gather_scatter_fn_p): Likewise.
25876 (internal_fn_mask_index): Likewise.
25877 (internal_gather_scatter_fn_supported_p): Likewise.
25878 * internal-fn.c (gather_load_direct): New macro.
25879 (expand_gather_load_optab_fn): New function.
25880 (direct_gather_load_optab_supported_p): New macro.
25881 (direct_internal_fn_optab): New function.
25882 (internal_load_fn_p): Likewise.
25883 (internal_gather_scatter_fn_p): Likewise.
25884 (internal_fn_mask_index): Likewise.
25885 (internal_gather_scatter_fn_supported_p): Likewise.
25886 * optabs-query.c (supports_at_least_one_mode_p): New function.
25887 (supports_vec_gather_load_p): Likewise.
25888 * optabs-query.h (supports_vec_gather_load_p): Declare.
25889 * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
25890 and memory_type field.
25891 (NUM_PATTERNS): Bump to 15.
25892 * tree-vect-data-refs.c: Include internal-fn.h.
25893 (vect_gather_scatter_fn_p): New function.
25894 (vect_describe_gather_scatter_call): Likewise.
25895 (vect_check_gather_scatter): Try using internal functions for
25896 gather loads. Recognize existing calls to a gather load function.
25897 (vect_analyze_data_refs): Consider using gather loads if
25898 supports_vec_gather_load_p.
25899 * tree-vect-patterns.c (vect_get_load_store_mask): New function.
25900 (vect_get_gather_scatter_offset_type): Likewise.
25901 (vect_convert_mask_for_vectype): Likewise.
25902 (vect_add_conversion_to_patterm): Likewise.
25903 (vect_try_gather_scatter_pattern): Likewise.
25904 (vect_recog_gather_scatter_pattern): New pattern recognizer.
25905 (vect_vect_recog_func_ptrs): Add it.
25906 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
25907 internal_fn_mask_index and internal_gather_scatter_fn_p.
25908 (check_load_store_masking): Take the gather_scatter_info as an
25909 argument and handle gather loads.
25910 (vect_get_gather_scatter_ops): New function.
25911 (vectorizable_call): Check internal_load_fn_p.
25912 (vectorizable_load): Likewise. Handle gather load internal
25914 (vectorizable_store): Update call to check_load_store_masking.
25915 * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
25916 * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
25917 * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
25918 (aarch64_gather_scale_operand_d): New predicates.
25919 * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
25920 (mask_gather_load<mode>): New insns.
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 * optabs.def (fold_left_plus_optab): New optab.
25927 * doc/md.texi (fold_left_plus_@var{m}): Document.
25928 * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
25929 * internal-fn.c (fold_left_direct): Define.
25930 (expand_fold_left_optab_fn): Likewise.
25931 (direct_fold_left_optab_supported_p): Likewise.
25932 * fold-const-call.c (fold_const_fold_left): New function.
25933 (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
25934 * tree-parloops.c (valid_reduction_p): New function.
25935 (gather_scalar_reductions): Use it.
25936 * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
25937 (vect_finish_replace_stmt): Declare.
25938 * tree-vect-loop.c (fold_left_reduction_fn): New function.
25939 (needs_fold_left_reduction_p): New function, split out from...
25940 (vect_is_simple_reduction): ...here. Accept reductions that
25941 forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
25942 (vect_force_simple_reduction): Also store the reduction type in
25943 the assignment's STMT_VINFO_REDUC_TYPE.
25944 (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
25945 (merge_with_identity): New function.
25946 (vect_expand_fold_left): Likewise.
25947 (vectorize_fold_left_reduction): Likewise.
25948 (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION. Leave the
25949 scalar phi in place for it. Check for target support and reject
25950 cases that would reassociate the operation. Defer the transform
25951 phase to vectorize_fold_left_reduction.
25952 * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
25953 * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
25954 (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
25956 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
25958 * tree-if-conv.c (predicate_mem_writes): Remove redundant
25959 call to ifc_temp_var.
25961 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
25962 Alan Hayward <alan.hayward@arm.com>
25963 David Sherwood <david.sherwood@arm.com>
25965 * target.def (legitimize_address_displacement): Take the original
25966 offset as a poly_int.
25967 * targhooks.h (default_legitimize_address_displacement): Update
25969 * targhooks.c (default_legitimize_address_displacement): Likewise.
25970 * doc/tm.texi: Regenerate.
25971 * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
25972 as an argument, moving assert of ad->disp == ad->disp_term to...
25973 (process_address_1): ...here. Update calls to base_plus_disp_to_reg.
25974 Try calling targetm.legitimize_address_displacement before expanding
25975 the address rather than afterwards, and adjust for the new interface.
25976 * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
25977 Match the new hook interface. Handle SVE addresses.
25978 * config/sh/sh.c (sh_legitimize_address_displacement): Make the
25979 new hook interface.
25981 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
25983 * Makefile.in (OBJS): Add early-remat.o.
25984 * target.def (select_early_remat_modes): New hook.
25985 * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
25986 * doc/tm.texi: Regenerate.
25987 * targhooks.h (default_select_early_remat_modes): Declare.
25988 * targhooks.c (default_select_early_remat_modes): New function.
25989 * timevar.def (TV_EARLY_REMAT): New timevar.
25990 * passes.def (pass_early_remat): New pass.
25991 * tree-pass.h (make_pass_early_remat): Declare.
25992 * early-remat.c: New file.
25993 * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
25995 (TARGET_SELECT_EARLY_REMAT_MODES): Define.
25997 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
25998 Alan Hayward <alan.hayward@arm.com>
25999 David Sherwood <david.sherwood@arm.com>
26001 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
26002 vfm1 with a bound_epilog parameter.
26003 (vect_do_peeling): Update calls accordingly, and move the prologue
26004 call earlier in the function. Treat the base bound_epilog as 0 for
26005 fully-masked loops and retain vf - 1 for other loops. Add 1 to
26006 this base when peeling for gaps.
26007 * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
26008 with fully-masked loops.
26009 (vect_estimate_min_profitable_iters): Handle the single peeled
26010 iteration in that case.
26012 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26013 Alan Hayward <alan.hayward@arm.com>
26014 David Sherwood <david.sherwood@arm.com>
26016 * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
26017 single-element interleaving even if the size is not a power of 2.
26018 * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
26019 accesses for single-element interleaving if the group size is
26022 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26023 Alan Hayward <alan.hayward@arm.com>
26024 David Sherwood <david.sherwood@arm.com>
26026 * doc/md.texi (fold_extract_last_@var{m}): Document.
26027 * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
26028 * optabs.def (fold_extract_last_optab): New optab.
26029 * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
26030 * internal-fn.c (fold_extract_direct): New macro.
26031 (expand_fold_extract_optab_fn): Likewise.
26032 (direct_fold_extract_optab_supported_p): Likewise.
26033 * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
26034 * tree-vect-loop.c (vect_model_reduction_cost): Handle
26035 EXTRACT_LAST_REDUCTION.
26036 (get_initial_def_for_reduction): Do not create an initial vector
26037 for EXTRACT_LAST_REDUCTION reductions.
26038 (vectorizable_reduction): Leave the scalar phi in place for
26039 EXTRACT_LAST_REDUCTIONs. Try using EXTRACT_LAST_REDUCTION
26040 ahead of INTEGER_INDUC_COND_REDUCTION. Do not check for an
26041 epilogue code for EXTRACT_LAST_REDUCTION and defer the
26042 transform phase to vectorizable_condition.
26043 * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
26045 (vect_finish_stmt_generation): ...here.
26046 (vect_finish_replace_stmt): New function.
26047 (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
26048 * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
26050 * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
26052 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26053 Alan Hayward <alan.hayward@arm.com>
26054 David Sherwood <david.sherwood@arm.com>
26056 * doc/md.texi (extract_last_@var{m}): Document.
26057 * optabs.def (extract_last_optab): New optab.
26058 * internal-fn.def (EXTRACT_LAST): New internal function.
26059 * internal-fn.c (cond_unary_direct): New macro.
26060 (expand_cond_unary_optab_fn): Likewise.
26061 (direct_cond_unary_optab_supported_p): Likewise.
26062 * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
26063 loops using EXTRACT_LAST.
26064 * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
26065 (extract_last_<mode>): ...this optab.
26066 (vec_extract<mode><Vel>): Update accordingly.
26068 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26069 Alan Hayward <alan.hayward@arm.com>
26070 David Sherwood <david.sherwood@arm.com>
26072 * target.def (empty_mask_is_expensive): New hook.
26073 * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
26074 * doc/tm.texi: Regenerate.
26075 * targhooks.h (default_empty_mask_is_expensive): Declare.
26076 * targhooks.c (default_empty_mask_is_expensive): New function.
26077 * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
26078 if the target says that empty masks are expensive.
26079 * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
26081 (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
26083 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26084 Alan Hayward <alan.hayward@arm.com>
26085 David Sherwood <david.sherwood@arm.com>
26087 * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
26088 (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
26089 (vect_use_loop_mask_for_alignment_p): New function.
26090 (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
26091 * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
26092 niters_skip argument. Make sure that the first niters_skip elements
26093 of the first iteration are inactive.
26094 (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
26095 Update call to vect_set_loop_masks_directly.
26096 (get_misalign_in_elems): New function, split out from...
26097 (vect_gen_prolog_loop_niters): ...here.
26098 (vect_update_init_of_dr): Take a code argument that specifies whether
26099 the adjustment should be added or subtracted.
26100 (vect_update_init_of_drs): Likewise.
26101 (vect_prepare_for_masked_peels): New function.
26102 (vect_do_peeling): Skip prologue peeling if we're using a mask
26103 instead. Update call to vect_update_inits_of_drs.
26104 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
26106 (vect_analyze_loop_2): Allow fully-masked loops with peeling for
26107 alignment. Do not include the number of peeled iterations in
26108 the minimum threshold in that case.
26109 (vectorizable_induction): Adjust the start value down by
26110 LOOP_VINFO_MASK_SKIP_NITERS iterations.
26111 (vect_transform_loop): Call vect_prepare_for_masked_peels.
26112 Take the number of skipped iterations into account when calculating
26114 * tree-vect-stmts.c (vect_gen_while_not): New function.
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/sourcebuild.texi (vect_fully_masked): Document.
26121 * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
26122 default value to 0.
26123 * tree-vect-loop.c (vect_analyze_loop_costing): New function,
26125 (vect_analyze_loop_2): ...here. Don't check the vectorization
26126 factor against the number of loop iterations if the loop is
26129 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26130 Alan Hayward <alan.hayward@arm.com>
26131 David Sherwood <david.sherwood@arm.com>
26133 * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
26134 (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
26135 (dump_groups): Update accordingly.
26136 (iv_use::mem_type): New member variable.
26137 (address_p): New function.
26138 (record_use): Add a mem_type argument and initialize the new
26140 (record_group_use): Add a mem_type argument. Use address_p.
26141 Remove obsolete null checks of base_object. Update call to record_use.
26142 (find_interesting_uses_op): Update call to record_group_use.
26143 (find_interesting_uses_cond): Likewise.
26144 (find_interesting_uses_address): Likewise.
26145 (get_mem_type_for_internal_fn): New function.
26146 (find_address_like_use): Likewise.
26147 (find_interesting_uses_stmt): Try find_address_like_use before
26148 calling find_interesting_uses_op.
26149 (addr_offset_valid_p): Use the iv mem_type field as the type
26150 of the addressed memory.
26151 (add_autoinc_candidates): Likewise.
26152 (get_address_cost): Likewise.
26153 (split_small_address_groups_p): Use address_p.
26154 (split_address_groups): Likewise.
26155 (add_iv_candidate_for_use): Likewise.
26156 (autoinc_possible_for_pair): Likewise.
26157 (rewrite_groups): Likewise.
26158 (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
26159 (determine_group_iv_cost): Update after split of USE_ADDRESS.
26160 (get_alias_ptr_type_for_ptr_address): New function.
26161 (rewrite_use_address): Rewrite address uses in calls that were
26162 identified by find_address_like_use.
26164 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26165 Alan Hayward <alan.hayward@arm.com>
26166 David Sherwood <david.sherwood@arm.com>
26168 * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
26170 * gimple-expr.h (is_gimple_addressable: Likewise.
26171 * gimple-expr.c (is_gimple_address): Likewise.
26172 * internal-fn.c (expand_call_mem_ref): New function.
26173 (expand_mask_load_optab_fn): Use it.
26174 (expand_mask_store_optab_fn): Likewise.
26176 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26177 Alan Hayward <alan.hayward@arm.com>
26178 David Sherwood <david.sherwood@arm.com>
26180 * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
26181 (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
26182 (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
26183 (cond_umax@var{mode}): Document.
26184 * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
26185 (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
26186 (cond_umin_optab, cond_umax_optab): New optabs.
26187 * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
26188 (COND_IOR, COND_XOR): New internal functions.
26189 * internal-fn.h (get_conditional_internal_fn): Declare.
26190 * internal-fn.c (cond_binary_direct): New macro.
26191 (expand_cond_binary_optab_fn): Likewise.
26192 (direct_cond_binary_optab_supported_p): Likewise.
26193 (get_conditional_internal_fn): New function.
26194 * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
26195 Cope with reduction statements that are vectorized as calls rather
26197 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
26198 * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
26199 (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
26200 (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
26201 (UNSPEC_COND_EOR): New unspecs.
26202 (optab): Add mappings for them.
26203 (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
26204 (sve_int_op, sve_fp_op): New int attributes.
26206 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26207 Alan Hayward <alan.hayward@arm.com>
26208 David Sherwood <david.sherwood@arm.com>
26210 * optabs.def (while_ult_optab): New optab.
26211 * doc/md.texi (while_ult@var{m}@var{n}): Document.
26212 * internal-fn.def (WHILE_ULT): New internal function.
26213 * internal-fn.h (direct_internal_fn_supported_p): New override
26214 that takes two types as argument.
26215 * internal-fn.c (while_direct): New macro.
26216 (expand_while_optab_fn): New function.
26217 (convert_optab_supported_p): Likewise.
26218 (direct_while_optab_supported_p): New macro.
26219 * wide-int.h (wi::udiv_ceil): New function.
26220 * tree-vectorizer.h (rgroup_masks): New structure.
26221 (vec_loop_masks): New typedef.
26222 (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
26223 and fully_masked_p.
26224 (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
26225 (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
26226 (vect_max_vf): New function.
26227 (slpeel_make_loop_iterate_ntimes): Delete.
26228 (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
26229 (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
26230 (vect_record_loop_mask, vect_get_loop_mask): Likewise.
26231 * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
26232 internal-fn.h, stor-layout.h and optabs-query.h.
26233 (vect_set_loop_mask): New function.
26234 (add_preheader_seq): Likewise.
26235 (add_header_seq): Likewise.
26236 (interleave_supported_p): Likewise.
26237 (vect_maybe_permute_loop_masks): Likewise.
26238 (vect_set_loop_masks_directly): Likewise.
26239 (vect_set_loop_condition_masked): Likewise.
26240 (vect_set_loop_condition_unmasked): New function, split out from
26241 slpeel_make_loop_iterate_ntimes.
26242 (slpeel_make_loop_iterate_ntimes): Rename to..
26243 (vect_set_loop_condition): ...this. Use vect_set_loop_condition_masked
26244 for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
26245 (vect_do_peeling): Update call accordingly.
26246 (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
26248 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
26249 mask_compare_type, can_fully_mask_p and fully_masked_p.
26250 (release_vec_loop_masks): New function.
26251 (_loop_vec_info): Use it to free the loop masks.
26252 (can_produce_all_loop_masks_p): New function.
26253 (vect_get_max_nscalars_per_iter): Likewise.
26254 (vect_verify_full_masking): Likewise.
26255 (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
26256 retries, and free the mask rgroups before retrying. Check loop-wide
26257 reasons for disallowing fully-masked loops. Make the final decision
26258 about whether use a fully-masked loop or not.
26259 (vect_estimate_min_profitable_iters): Do not assume that peeling
26260 for the number of iterations will be needed for fully-masked loops.
26261 (vectorizable_reduction): Disable fully-masked loops.
26262 (vectorizable_live_operation): Likewise.
26263 (vect_halve_mask_nunits): New function.
26264 (vect_double_mask_nunits): Likewise.
26265 (vect_record_loop_mask): Likewise.
26266 (vect_get_loop_mask): Likewise.
26267 (vect_transform_loop): Handle the case in which the final loop
26268 iteration might handle a partial vector. Call vect_set_loop_condition
26269 instead of slpeel_make_loop_iterate_ntimes.
26270 * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
26271 (check_load_store_masking): New function.
26272 (prepare_load_store_mask): Likewise.
26273 (vectorizable_store): Handle fully-masked loops.
26274 (vectorizable_load): Likewise.
26275 (supportable_widening_operation): Use vect_halve_mask_nunits for
26277 (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
26278 (vect_gen_while): New function.
26279 * config/aarch64/aarch64.md (umax<mode>3): New expander.
26280 (aarch64_uqdec<mode>): New insn.
26282 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26283 Alan Hayward <alan.hayward@arm.com>
26284 David Sherwood <david.sherwood@arm.com>
26286 * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
26287 (reduc_xor_scal_optab): New optabs.
26288 * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
26289 (reduc_xor_scal_@var{m}): Document.
26290 * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
26291 * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
26292 internal functions.
26293 * fold-const-call.c (fold_const_call): Handle them.
26294 * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
26295 internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
26296 * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
26297 (*reduc_<bit_reduc>_scal_<mode>): New patterns.
26298 * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
26299 (UNSPEC_XORV): New unspecs.
26300 (optab): Add entries for them.
26301 (BITWISEV): New int iterator.
26302 (bit_reduc_op): New int attributes.
26304 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26305 Alan Hayward <alan.hayward@arm.com>
26306 David Sherwood <david.sherwood@arm.com>
26308 * doc/md.texi (vec_shl_insert_@var{m}): New optab.
26309 * internal-fn.def (VEC_SHL_INSERT): New internal function.
26310 * optabs.def (vec_shl_insert_optab): New optab.
26311 * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
26312 (duplicate_and_interleave): Likewise.
26313 * tree-vect-loop.c: Include internal-fn.h.
26314 (neutral_op_for_slp_reduction): New function, split out from
26315 get_initial_defs_for_reduction.
26316 (get_initial_def_for_reduction): Handle option 2 for variable-length
26317 vectors by loading the neutral value into a vector and then shifting
26318 the initial value into element 0.
26319 (get_initial_defs_for_reduction): Replace the code argument with
26320 the neutral value calculated by neutral_op_for_slp_reduction.
26321 Use gimple_build_vector for constant-length vectors.
26322 Use IFN_VEC_SHL_INSERT for variable-length vectors if all
26323 but the first group_size elements have a neutral value.
26324 Use duplicate_and_interleave otherwise.
26325 (vect_create_epilog_for_reduction): Take a neutral_op parameter.
26326 Update call to get_initial_defs_for_reduction. Handle SLP
26327 reductions for variable-length vectors by creating one vector
26328 result for each scalar result, with the elements associated
26329 with other scalar results stubbed out with the neutral value.
26330 (vectorizable_reduction): Call neutral_op_for_slp_reduction.
26331 Require IFN_VEC_SHL_INSERT for double reductions on
26332 variable-length vectors, or SLP reductions that have
26333 a neutral value. Require can_duplicate_and_interleave_p
26334 support for variable-length unchained SLP reductions if there
26335 is no neutral value, such as for MIN/MAX reductions. Also require
26336 the number of vector elements to be a multiple of the number of
26337 SLP statements when doing variable-length unchained SLP reductions.
26338 Update call to vect_create_epilog_for_reduction.
26339 * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
26340 and remove initial values.
26341 (duplicate_and_interleave): Make public.
26342 * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
26343 * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
26345 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26346 Alan Hayward <alan.hayward@arm.com>
26347 David Sherwood <david.sherwood@arm.com>
26349 * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
26350 (can_duplicate_and_interleave_p): New function.
26351 (vect_get_and_check_slp_defs): Take the vector of statements
26352 rather than just the current one. Remove excess parentheses.
26353 Restriction rejectinon of vect_constant_def and vect_external_def
26354 for variable-length vectors to boolean types, or types for which
26355 can_duplicate_and_interleave_p is false.
26356 (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
26357 (duplicate_and_interleave): New function.
26358 (vect_get_constant_vectors): Use gimple_build_vector for
26359 constant-length vectors and suitable variable-length constant
26360 vectors. Use duplicate_and_interleave for other variable-length
26361 vectors. Don't defer the update when inserting new statements.
26363 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26364 Alan Hayward <alan.hayward@arm.com>
26365 David Sherwood <david.sherwood@arm.com>
26367 * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
26368 min_profitable_iters doesn't go negative.
26370 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26371 Alan Hayward <alan.hayward@arm.com>
26372 David Sherwood <david.sherwood@arm.com>
26374 * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
26375 (vec_mask_store_lanes@var{m}@var{n}): Likewise.
26376 * optabs.def (vec_mask_load_lanes_optab): New optab.
26377 (vec_mask_store_lanes_optab): Likewise.
26378 * internal-fn.def (MASK_LOAD_LANES): New internal function.
26379 (MASK_STORE_LANES): Likewise.
26380 * internal-fn.c (mask_load_lanes_direct): New macro.
26381 (mask_store_lanes_direct): Likewise.
26382 (expand_mask_load_optab_fn): Handle masked operations.
26383 (expand_mask_load_lanes_optab_fn): New macro.
26384 (expand_mask_store_optab_fn): Handle masked operations.
26385 (expand_mask_store_lanes_optab_fn): New macro.
26386 (direct_mask_load_lanes_optab_supported_p): Likewise.
26387 (direct_mask_store_lanes_optab_supported_p): Likewise.
26388 * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
26390 (vect_load_lanes_supported): Likewise.
26391 * tree-vect-data-refs.c (strip_conversion): New function.
26392 (can_group_stmts_p): Likewise.
26393 (vect_analyze_data_ref_accesses): Use it instead of checking
26394 for a pair of assignments.
26395 (vect_store_lanes_supported): Take a masked_p parameter.
26396 (vect_load_lanes_supported): Likewise.
26397 * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
26398 vect_store_lanes_supported and vect_load_lanes_supported.
26399 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
26400 * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
26401 parameter. Don't allow gaps for masked accesses.
26402 Use vect_get_store_rhs. Update calls to vect_store_lanes_supported
26403 and vect_load_lanes_supported.
26404 (get_load_store_type): Take a masked_p parameter and update
26405 call to get_group_load_store_type.
26406 (vectorizable_store): Update call to get_load_store_type.
26407 Handle IFN_MASK_STORE_LANES.
26408 (vectorizable_load): Update call to get_load_store_type.
26409 Handle IFN_MASK_LOAD_LANES.
26411 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26412 Alan Hayward <alan.hayward@arm.com>
26413 David Sherwood <david.sherwood@arm.com>
26415 * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
26417 * config/aarch64/aarch64-protos.h
26418 (aarch64_sve_struct_memory_operand_p): Declare.
26419 * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
26420 (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
26421 (VPRED, vpred): Handle SVE structure modes.
26422 * config/aarch64/constraints.md (Utx): New constraint.
26423 * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
26424 (aarch64_sve_struct_nonimmediate_operand): New predicates.
26425 * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
26426 * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
26427 (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
26428 structure modes. Split into pieces after RA.
26429 (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
26430 (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
26432 * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
26433 SVE structure modes.
26434 (aarch64_classify_address): Likewise.
26435 (sizetochar): Move earlier in file.
26436 (aarch64_print_operand): Handle SVE register lists.
26437 (aarch64_array_mode): New function.
26438 (aarch64_sve_struct_memory_operand_p): Likewise.
26439 (TARGET_ARRAY_MODE): Redefine.
26441 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26442 Alan Hayward <alan.hayward@arm.com>
26443 David Sherwood <david.sherwood@arm.com>
26445 * target.def (array_mode): New target hook.
26446 * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
26447 * doc/tm.texi: Regenerate.
26448 * hooks.h (hook_optmode_mode_uhwi_none): Declare.
26449 * hooks.c (hook_optmode_mode_uhwi_none): New function.
26450 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
26451 targetm.array_mode.
26452 * stor-layout.c (mode_for_array): Likewise. Support polynomial
26455 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26456 Alan Hayward <alan.hayward@arm.com>
26457 David Sherwood <david.sherwood@arm.com>
26459 * fold-const.c (fold_binary_loc): Check the argument types
26460 rather than the result type when testing for a vector operation.
26462 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26464 * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
26465 * doc/tm.texi: Regenerate.
26467 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26468 Alan Hayward <alan.hayward@arm.com>
26469 David Sherwood <david.sherwood@arm.com>
26471 * doc/invoke.texi (-msve-vector-bits=): Document new option.
26472 (sve): Document new AArch64 extension.
26473 * doc/md.texi (w): Extend the description of the AArch64
26474 constraint to include SVE vectors.
26475 (Upl, Upa): Document new AArch64 predicate constraints.
26476 * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
26478 * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
26479 (msve-vector-bits=): New option.
26480 * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
26481 SVE when these are disabled.
26482 (sve): New extension.
26483 * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
26484 modes. Adjust their number of units based on aarch64_sve_vg.
26485 (MAX_BITSIZE_MODE_ANY_MODE): Define.
26486 * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
26487 aarch64_addr_query_type.
26488 (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
26489 (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
26490 (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
26491 (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
26492 (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
26493 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
26494 (aarch64_simd_imm_zero_p): Delete.
26495 (aarch64_check_zero_based_sve_index_immediate): Declare.
26496 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
26497 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
26498 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
26499 (aarch64_sve_float_mul_immediate_p): Likewise.
26500 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
26501 rather than an rtx.
26502 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
26503 (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
26504 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
26505 (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
26506 (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
26507 (aarch64_regmode_natural_size): Likewise.
26508 * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
26509 (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
26511 (AARCH64_ISA_SVE, TARGET_SVE): New macros.
26512 (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
26513 for VG and the SVE predicate registers.
26514 (V_ALIASES): Add a "z"-prefixed alias.
26515 (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
26516 (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
26517 (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
26518 (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
26519 (REG_CLASS_NAMES): Add entries for them.
26520 (REG_CLASS_CONTENTS): Likewise. Update ALL_REGS to include VG
26521 and the predicate registers.
26522 (aarch64_sve_vg): Declare.
26523 (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
26524 (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
26525 (REGMODE_NATURAL_SIZE): Define.
26526 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
26528 * config/aarch64/aarch64.c: Include cfgrtl.h.
26529 (simd_immediate_info): Add a constructor for series vectors,
26530 and an associated step field.
26531 (aarch64_sve_vg): New variable.
26532 (aarch64_dbx_register_number): Handle VG and the predicate registers.
26533 (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
26534 (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
26535 (VEC_ANY_DATA, VEC_STRUCT): New constants.
26536 (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
26537 (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
26538 (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
26539 (aarch64_get_mask_mode): New functions.
26540 (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
26541 and FP_LO_REGS. Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
26542 (aarch64_hard_regno_mode_ok): Handle VG. Also handle the SVE
26543 predicate modes and predicate registers. Explicitly restrict
26544 GPRs to modes of 16 bytes or smaller. Only allow FP registers
26545 to store a vector mode if it is recognized by
26546 aarch64_classify_vector_mode.
26547 (aarch64_regmode_natural_size): New function.
26548 (aarch64_hard_regno_caller_save_mode): Return the original mode
26550 (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
26551 (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
26552 (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
26553 (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
26555 (aarch64_add_offset): Add a temp2 parameter. Assert that temp1
26556 does not overlap dest if the function is frame-related. Handle
26558 (aarch64_split_add_offset): New function.
26559 (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
26560 them aarch64_add_offset.
26561 (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
26562 and update call to aarch64_sub_sp.
26563 (aarch64_add_cfa_expression): New function.
26564 (aarch64_expand_prologue): Pass extra temporary registers to the
26565 functions above. Handle the case in which we need to emit new
26566 DW_CFA_expressions for registers that were originally saved
26567 relative to the stack pointer, but now have to be expressed
26568 relative to the frame pointer.
26569 (aarch64_output_mi_thunk): Pass extra temporary registers to the
26571 (aarch64_expand_epilogue): Likewise. Prevent inheritance of
26572 IP0 and IP1 values for SVE frames.
26573 (aarch64_expand_vec_series): New function.
26574 (aarch64_expand_sve_widened_duplicate): Likewise.
26575 (aarch64_expand_sve_const_vector): Likewise.
26576 (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
26577 Handle SVE constants. Use emit_move_insn to move a force_const_mem
26578 into the register, rather than emitting a SET directly.
26579 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
26580 (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
26581 (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
26582 (offset_9bit_signed_scaled_p): New functions.
26583 (aarch64_replicate_bitmask_imm): New function.
26584 (aarch64_bitmask_imm): Use it.
26585 (aarch64_cannot_force_const_mem): Reject expressions involving
26586 a CONST_POLY_INT. Update call to aarch64_classify_symbol.
26587 (aarch64_classify_index): Handle SVE indices, by requiring
26588 a plain register index with a scale that matches the element size.
26589 (aarch64_classify_address): Handle SVE addresses. Assert that
26590 the mode of the address is VOIDmode or an integer mode.
26591 Update call to aarch64_classify_symbol.
26592 (aarch64_classify_symbolic_expression): Update call to
26593 aarch64_classify_symbol.
26594 (aarch64_const_vec_all_in_range_p): New function.
26595 (aarch64_print_vector_float_operand): Likewise.
26596 (aarch64_print_operand): Handle 'N' and 'C'. Use "zN" rather than
26597 "vN" for FP registers with SVE modes. Handle (const ...) vectors
26598 and the FP immediates 1.0 and 0.5.
26599 (aarch64_print_address_internal): Handle SVE addresses.
26600 (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
26601 (aarch64_regno_regclass): Handle predicate registers.
26602 (aarch64_secondary_reload): Handle big-endian reloads of SVE
26604 (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
26605 (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
26606 (aarch64_convert_sve_vector_bits): New function.
26607 (aarch64_override_options): Use it to handle -msve-vector-bits=.
26608 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
26609 rather than an rtx.
26610 (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
26611 Handle SVE vector and predicate modes. Accept VL-based constants
26612 that need only one temporary register, and VL offsets that require
26613 no temporary registers.
26614 (aarch64_conditional_register_usage): Mark the predicate registers
26615 as fixed if SVE isn't available.
26616 (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
26617 Return true for SVE vector and predicate modes.
26618 (aarch64_simd_container_mode): Take the number of bits as a poly_int64
26619 rather than an unsigned int. Handle SVE modes.
26620 (aarch64_preferred_simd_mode): Update call accordingly. Handle
26622 (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
26624 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
26625 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
26626 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
26627 (aarch64_sve_float_mul_immediate_p): New functions.
26628 (aarch64_sve_valid_immediate): New function.
26629 (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
26630 Explicitly reject structure modes. Check for INDEX constants.
26631 Handle PTRUE and PFALSE constants.
26632 (aarch64_check_zero_based_sve_index_immediate): New function.
26633 (aarch64_simd_imm_zero_p): Delete.
26634 (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
26635 vector modes. Accept constants in the range of CNT[BHWD].
26636 (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
26637 ask for an Advanced SIMD mode.
26638 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
26639 (aarch64_simd_vector_alignment): Handle SVE predicates.
26640 (aarch64_vectorize_preferred_vector_alignment): New function.
26641 (aarch64_simd_vector_alignment_reachable): Use it instead of
26643 (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
26644 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
26646 (MAX_VECT_LEN): Delete.
26647 (expand_vec_perm_d): Add a vec_flags field.
26648 (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
26649 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
26650 (aarch64_evpc_ext): Don't apply a big-endian lane correction
26652 (aarch64_evpc_rev): Rename to...
26653 (aarch64_evpc_rev_local): ...this. Use a predicated operation for SVE.
26654 (aarch64_evpc_rev_global): New function.
26655 (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
26656 (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
26658 (aarch64_evpc_sve_tbl): New function.
26659 (aarch64_expand_vec_perm_const_1): Update after rename of
26660 aarch64_evpc_rev. Handle SVE permutes too, trying
26661 aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
26662 than aarch64_evpc_tbl.
26663 (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
26664 (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
26665 (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
26666 (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
26667 (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
26668 (aarch64_expand_sve_vcond): New functions.
26669 (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
26670 of aarch64_vector_mode_p.
26671 (aarch64_dwarf_poly_indeterminate_value): New function.
26672 (aarch64_compute_pressure_classes): Likewise.
26673 (aarch64_can_change_mode_class): Likewise.
26674 (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
26675 (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
26676 (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
26677 (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
26678 (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
26679 (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
26680 * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
26681 (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
26683 (Dn, Dl, Dr): Accept const as well as const_vector.
26684 (Dz): Likewise. Compare against CONST0_RTX.
26685 * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
26686 of "vector" where appropriate.
26687 (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
26688 (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
26689 (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
26690 (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
26691 (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
26692 (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
26693 (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
26694 (v_int_equiv): Extend to SVE modes.
26695 (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
26697 (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
26698 (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
26699 (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
26700 (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
26701 (SVE_COND_FP_CMP): New int iterators.
26702 (perm_hilo): Handle the new unpack unspecs.
26703 (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
26705 * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
26706 (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
26707 (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
26708 (aarch64_equality_operator, aarch64_constant_vector_operand)
26709 (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
26710 (aarch64_sve_nonimmediate_operand): Likewise.
26711 (aarch64_sve_general_operand): Likewise.
26712 (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
26713 (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
26714 (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
26715 (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
26716 (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
26717 (aarch64_sve_float_arith_immediate): Likewise.
26718 (aarch64_sve_float_arith_with_sub_immediate): Likewise.
26719 (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
26720 (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
26721 (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
26722 (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
26723 (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
26724 (aarch64_sve_float_arith_operand): Likewise.
26725 (aarch64_sve_float_arith_with_sub_operand): Likewise.
26726 (aarch64_sve_float_mul_operand): Likewise.
26727 (aarch64_sve_vec_perm_operand): Likewise.
26728 (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
26729 (aarch64_mov_operand): Accept const_poly_int and const_vector.
26730 (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
26731 as well as const_vector.
26732 (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
26733 in file. Use CONST0_RTX and CONSTM1_RTX.
26734 (aarch64_simd_or_scalar_imm_zero): Likewise. Add match_codes.
26735 (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
26736 Use aarch64_simd_imm_zero.
26737 * config/aarch64/aarch64-sve.md: New file.
26738 * config/aarch64/aarch64.md: Include it.
26739 (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
26740 (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
26741 (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
26742 (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
26743 (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
26744 (sve): New attribute.
26745 (enabled): Disable instructions with the sve attribute unless
26747 (movqi, movhi): Pass CONST_POLY_INT operaneds through
26748 aarch64_expand_mov_immediate.
26749 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
26750 CNT[BHSD] immediates.
26751 (movti): Split CONST_POLY_INT moves into two halves.
26752 (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
26753 Split additions that need a temporary here if the destination
26754 is the stack pointer.
26755 (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
26756 (*add<mode>3_poly_1): New instruction.
26757 (set_clobber_cc): New expander.
26759 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26761 * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
26762 parameter and use it instead of GET_MODE_SIZE (innermode). Use
26763 inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
26764 Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
26765 GET_MODE_NUNITS (innermode). Also add a first_elem parameter.
26766 Change innermode from fixed_mode_size to machine_mode.
26767 (simplify_subreg): Update call accordingly. Handle a constant-sized
26768 subreg of a variable-length CONST_VECTOR.
26770 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26771 Alan Hayward <alan.hayward@arm.com>
26772 David Sherwood <david.sherwood@arm.com>
26774 * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
26775 (add_offset_to_base): New function, split out from...
26776 (create_mem_ref): ...here. When handling a scale other than 1,
26777 check first whether the address is valid without the offset.
26778 Add it into the base if so, leaving the index and scale as-is.
26780 2018-01-12 Jakub Jelinek <jakub@redhat.com>
26783 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
26784 fold_for_warn before checking if arg2 is INTEGER_CST.
26786 2018-01-12 Segher Boessenkool <segher@kernel.crashing.org>
26788 * config/rs6000/predicates.md (load_multiple_operation): Delete.
26789 (store_multiple_operation): Delete.
26790 * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
26791 * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
26792 * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
26793 guarded by TARGET_STRING.
26794 (rs6000_output_load_multiple): Delete.
26795 * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
26796 OPTION_MASK_STRING / TARGET_STRING handling.
26797 (print_operand) <'N', 'O'>: Add comment that these are unused now.
26798 (const rs6000_opt_masks) <"string">: Change mask to 0.
26799 * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
26800 (MASK_STRING): Delete.
26801 * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
26803 (load_multiple): Delete.
26810 (store_multiple): Delete.
26817 (movmemsi_8reg): Delete.
26818 (corresponding unnamed define_insn): Delete.
26819 (movmemsi_6reg): Delete.
26820 (corresponding unnamed define_insn): Delete.
26821 (movmemsi_4reg): Delete.
26822 (corresponding unnamed define_insn): Delete.
26823 (movmemsi_2reg): Delete.
26824 (corresponding unnamed define_insn): Delete.
26825 (movmemsi_1reg): Delete.
26826 (corresponding unnamed define_insn): Delete.
26827 * config/rs6000/rs6000.opt (mno-string): New.
26828 (mstring): Replace by deprecation warning stub.
26829 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
26831 2018-01-12 Jakub Jelinek <jakub@redhat.com>
26833 * regrename.c (regrename_do_replace): If replacing the same
26834 reg multiple times, try to reuse last created gen_raw_REG.
26837 * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
26838 main to workaround a bug in GDB.
26840 2018-01-12 Tom de Vries <tom@codesourcery.com>
26843 * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
26845 2018-01-12 Vladimir Makarov <vmakarov@redhat.com>
26847 PR rtl-optimization/80481
26848 * ira-color.c (get_cap_member): New function.
26849 (allocnos_conflict_by_live_ranges_p): Use it.
26850 (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
26851 (setup_slot_coalesced_allocno_live_ranges): Ditto.
26853 2018-01-12 Uros Bizjak <ubizjak@gmail.com>
26856 * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
26857 (*saddl_se_1): Ditto.
26858 (*ssubsi_1): Ditto.
26859 (*ssubl_se_1): Ditto.
26861 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
26863 * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
26864 rather than wi::to_widest for DR_INITs.
26865 * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
26866 wi::to_poly_offset rather than wi::to_offset for DR_INIT.
26867 (vect_analyze_data_ref_accesses): Require both DR_INITs to be
26869 (vect_analyze_group_access_1): Note that here.
26871 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
26873 * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
26874 polynomial type sizes.
26876 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
26878 * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
26879 poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
26880 (gimple_add_tmp_var): Likewise.
26882 2018-01-12 Martin Liska <mliska@suse.cz>
26884 * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
26885 (gimple_alloc_sizes): Likewise.
26886 (dump_gimple_statistics): Use PRIu64 in printf format.
26887 * gimple.h: Change uint64_t to int.
26889 2018-01-12 Martin Liska <mliska@suse.cz>
26891 * tree-core.h: Use uint64_t instead of int.
26892 * tree.c (tree_node_counts): Likewise.
26893 (tree_node_sizes): Likewise.
26894 (dump_tree_statistics): Use PRIu64 in printf format.
26896 2018-01-12 Martin Liska <mliska@suse.cz>
26898 * Makefile.in: As qsort_chk is implemented in vec.c, add
26899 vec.o to linkage of gencfn-macros.
26900 * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
26901 passing the info to record_node_allocation_statistics.
26902 (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
26904 * ggc-common.c (struct ggc_usage): Add operator== and use
26905 it in operator< and compare function.
26906 * mem-stats.h (struct mem_usage): Likewise.
26907 * vec.c (struct vec_usage): Remove operator< and compare
26908 function. Can be simply inherited.
26910 2018-01-12 Martin Jambor <mjambor@suse.cz>
26913 * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
26914 * tree-ssa-math-opts.c: Include domwalk.h.
26915 (convert_mult_to_fma_1): New function.
26916 (fma_transformation_info): New type.
26917 (fma_deferring_state): Likewise.
26918 (cancel_fma_deferring): New function.
26919 (result_of_phi): Likewise.
26920 (last_fma_candidate_feeds_initial_phi): Likewise.
26921 (convert_mult_to_fma): Added deferring logic, split actual
26922 transformation to convert_mult_to_fma_1.
26923 (math_opts_dom_walker): New type.
26924 (math_opts_dom_walker::after_dom_children): New method, body moved
26925 here from pass_optimize_widening_mul::execute, added deferring logic
26927 (pass_optimize_widening_mul::execute): Moved most of code to
26928 math_opts_dom_walker::after_dom_children.
26929 * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
26930 * config/i386/i386.c (ix86_option_override_internal): Added
26931 maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
26933 2018-01-12 Richard Biener <rguenther@suse.de>
26936 * dwarf2out.c (gen_variable_die): Do not reset old_die for
26937 inline instance vars.
26939 2018-01-12 Oleg Endo <olegendo@gcc.gnu.org>
26942 * config/rx/rx.c (rx_is_restricted_memory_address):
26943 Handle SUBREG case.
26945 2018-01-12 Richard Biener <rguenther@suse.de>
26947 PR tree-optimization/80846
26948 * target.def (split_reduction): New target hook.
26949 * targhooks.c (default_split_reduction): New function.
26950 * targhooks.h (default_split_reduction): Declare.
26951 * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
26952 target requests first reduce vectors by combining low and high
26954 * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
26955 (get_vectype_for_scalar_type_and_size): Export.
26956 * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
26957 * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
26958 * doc/tm.texi: Regenerate.
26959 * config/i386/i386.c (ix86_split_reduction): Implement
26960 TARGET_VECTORIZE_SPLIT_REDUCTION.
26962 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
26965 * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
26966 in PIC mode except for TARGET_VXWORKS_RTP.
26967 * config/sparc/sparc.c: Include cfgrtl.h.
26968 (TARGET_INIT_PIC_REG): Define.
26969 (TARGET_USE_PSEUDO_PIC_REG): Likewise.
26970 (sparc_pic_register_p): New predicate.
26971 (sparc_legitimate_address_p): Use it.
26972 (sparc_legitimize_pic_address): Likewise.
26973 (sparc_delegitimize_address): Likewise.
26974 (sparc_mode_dependent_address_p): Likewise.
26975 (gen_load_pcrel_sym): Remove 4th parameter.
26976 (load_got_register): Adjust call to above. Remove obsolete stuff.
26977 (sparc_expand_prologue): Do not call load_got_register here.
26978 (sparc_flat_expand_prologue): Likewise.
26979 (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
26980 (sparc_use_pseudo_pic_reg): New function.
26981 (sparc_init_pic_reg): Likewise.
26982 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
26983 (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
26985 2018-01-12 Christophe Lyon <christophe.lyon@linaro.org>
26987 * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
26988 Add item for branch_cost.
26990 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
26992 PR rtl-optimization/83565
26993 * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
26994 not extend the result to a larger mode for rotate operations.
26995 (num_sign_bit_copies1): Likewise.
26997 2018-01-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
27000 * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
27002 Use values-Xc.o for -pedantic.
27003 Link with values-xpg4.o for C90, values-xpg6.o otherwise.
27005 2018-01-12 Martin Liska <mliska@suse.cz>
27008 * ipa-devirt.c (final_warning_record::grow_type_warnings):
27010 (possible_polymorphic_call_targets): Use it.
27011 (ipa_devirt): Likewise.
27013 2018-01-12 Martin Liska <mliska@suse.cz>
27015 * profile-count.h (enum profile_quality): Use 0 as invalid
27016 enum value of profile_quality.
27018 2018-01-12 Chung-Ju Wu <jasonwucj@gmail.com>
27020 * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
27021 -mext-string options.
27023 2018-01-12 Richard Biener <rguenther@suse.de>
27025 * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
27026 DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
27027 * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
27029 * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
27031 2018-01-11 Michael Meissner <meissner@linux.vnet.ibm.com>
27033 * configure.ac (--with-long-double-format): Add support for the
27034 configuration option to change the default long double format on
27036 * config.gcc (powerpc*-linux*-*): Likewise.
27037 * configure: Regenerate.
27038 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
27039 double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
27040 used without modification.
27042 2018-01-11 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
27044 * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
27045 (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
27046 * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
27047 MISC_BUILTIN_SPEC_BARRIER.
27048 (rs6000_init_builtins): Likewise.
27049 * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
27051 (speculation_barrier): New define_insn.
27052 * doc/extend.texi: Document __builtin_speculation_barrier.
27054 2018-01-11 Jakub Jelinek <jakub@redhat.com>
27057 * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
27058 is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
27059 * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
27061 (ssescalarmodesuffix): Add 512-bit vectors. Use "d" or "q" for
27062 integral modes instead of "ss" and "sd".
27063 (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
27064 vectors with 32-bit and 64-bit elements.
27065 (vecdupssescalarmodesuffix): New mode attribute.
27066 (vec_dup<mode>): Use it.
27068 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
27071 * config/i386/i386.c (ix86_compute_frame_layout): Align stack
27072 frame if argument is passed on stack.
27074 2018-01-11 Jakub Jelinek <jakub@redhat.com>
27077 * ree.c (combine_reaching_defs): Optimize also
27078 reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
27079 reg2=any_extend(exp); reg1=reg2;, formatting fix.
27081 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
27083 PR middle-end/83189
27084 * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
27086 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
27088 PR middle-end/83718
27089 * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
27090 after they are computed.
27092 2018-01-11 Bin Cheng <bin.cheng@arm.com>
27094 PR tree-optimization/83695
27095 * gimple-loop-linterchange.cc
27096 (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
27097 reset cached scev information after interchange.
27098 (pass_linterchange::execute): Remove call to scev_reset_htab.
27100 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
27102 * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
27103 vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
27104 vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
27105 vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
27106 vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
27107 vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
27108 * config/arm/arm_neon_builtins.def (vfmal_lane_low,
27109 vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
27110 vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
27111 vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
27112 vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
27113 * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
27114 (V_lane_reg): Likewise.
27115 * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
27117 (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
27118 (vfmal_lane_low<mode>_intrinsic,
27119 vfmal_lane_low<vfmlsel2><mode>_intrinsic,
27120 vfmal_lane_high<vfmlsel2><mode>_intrinsic,
27121 vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
27122 vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
27123 vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
27124 vfmsl_lane_high<mode>_intrinsic): New define_insns.
27126 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
27128 * config/arm/arm-cpus.in (fp16fml): New feature.
27129 (ALL_SIMD): Add fp16fml.
27130 (armv8.2-a): Add fp16fml as an option.
27131 (armv8.3-a): Likewise.
27132 (armv8.4-a): Add fp16fml as part of fp16.
27133 * config/arm/arm.h (TARGET_FP16FML): Define.
27134 * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
27136 * config/arm/arm-modes.def (V2HF): Define.
27137 * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
27138 vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
27139 vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
27140 * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
27141 vfmsl_low, vfmsl_high): New set of builtins.
27142 * config/arm/iterators.md (PLUSMINUS): New code iterator.
27143 (vfml_op): New code attribute.
27144 (VFMLHALVES): New int iterator.
27145 (VFML, VFMLSEL): New mode attributes.
27146 (V_reg): Define mapping for V2HF.
27147 (V_hi, V_lo): New mode attributes.
27148 (VF_constraint): Likewise.
27149 (vfml_half, vfml_half_selector): New int attributes.
27150 * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
27152 (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
27153 vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
27155 * config/arm/t-arm-elf (v8_fps): Add fp16fml.
27156 * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
27157 * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
27158 * doc/invoke.texi (ARM Options): Document fp16fml. Update armv8.4-a
27160 * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
27161 Document new effective target and option set.
27163 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
27165 * config/arm/arm-cpus.in (armv8_4): New feature.
27166 (ARMv8_4a): New fgroup.
27167 (armv8.4-a): New arch.
27168 * config/arm/arm-tables.opt: Regenerate.
27169 * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
27170 * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
27171 * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
27172 Add matching rules for -march=armv8.4-a and extensions.
27173 * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
27175 2018-01-11 Oleg Endo <olegendo@gcc.gnu.org>
27178 * config/rx/rx.md (BW): New mode attribute.
27179 (sync_lock_test_and_setsi): Add mode suffix to insn output.
27181 2018-01-11 Richard Biener <rguenther@suse.de>
27183 PR tree-optimization/83435
27184 * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
27185 * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
27186 * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
27188 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
27189 Alan Hayward <alan.hayward@arm.com>
27190 David Sherwood <david.sherwood@arm.com>
27192 * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
27194 (aarch64_classify_address): Initialize it. Track polynomial offsets.
27195 (aarch64_print_address_internal): Use it to check for a zero offset.
27197 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
27198 Alan Hayward <alan.hayward@arm.com>
27199 David Sherwood <david.sherwood@arm.com>
27201 * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
27202 * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
27203 Return a poly_int64 rather than a HOST_WIDE_INT.
27204 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
27205 rather than a HOST_WIDE_INT.
27206 * config/aarch64/aarch64.h (aarch64_frame): Protect with
27207 HAVE_POLY_INT_H rather than HOST_WIDE_INT. Change locals_offset,
27208 hard_fp_offset, frame_size, initial_adjust, callee_offset and
27209 final_offset from HOST_WIDE_INT to poly_int64.
27210 * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
27211 to_constant when getting the number of units in an Advanced SIMD
27213 (aarch64_builtin_vectorized_function): Check for a constant number
27215 * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
27217 (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
27218 attribute instead of GET_MODE_NUNITS.
27219 * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
27220 (aarch64_class_max_nregs): Use the constant_lowest_bound of the
27221 GET_MODE_SIZE for fixed-size registers.
27222 (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
27223 (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
27224 (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
27225 (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
27226 (aarch64_print_operand, aarch64_print_address_internal)
27227 (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
27228 (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
27229 (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
27230 Handle polynomial GET_MODE_SIZE.
27231 (aarch64_hard_regno_caller_save_mode): Likewise. Return modes
27232 wider than SImode without modification.
27233 (tls_symbolic_operand_type): Use strip_offset instead of split_const.
27234 (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
27235 (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
27236 passing and returning SVE modes.
27237 (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
27238 rather than GEN_INT.
27239 (aarch64_emit_probe_stack_range): Take the size as a poly_int64
27240 rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
27241 (aarch64_allocate_and_probe_stack_space): Likewise.
27242 (aarch64_layout_frame): Cope with polynomial offsets.
27243 (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
27244 start_offset as a poly_int64 rather than a HOST_WIDE_INT. Track
27245 polynomial offsets.
27246 (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
27247 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
27248 poly_int64 rather than a HOST_WIDE_INT.
27249 (aarch64_get_separate_components, aarch64_process_components)
27250 (aarch64_expand_prologue, aarch64_expand_epilogue)
27251 (aarch64_use_return_insn_p): Handle polynomial frame offsets.
27252 (aarch64_anchor_offset): New function, split out from...
27253 (aarch64_legitimize_address): ...here.
27254 (aarch64_builtin_vectorization_cost): Handle polynomial
27255 TYPE_VECTOR_SUBPARTS.
27256 (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
27258 (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
27259 number of elements from the PARALLEL rather than the mode.
27260 (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
27261 rather than GET_MODE_BITSIZE.
27262 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
27263 (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
27264 (aarch64_expand_vec_perm_const_1): Handle polynomial
27265 d->perm.length () and d->perm elements.
27266 (aarch64_evpc_tbl): Likewise. Use nelt rather than GET_MODE_NUNITS.
27267 Apply to_constant to d->perm elements.
27268 (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
27269 polynomial CONST_VECTOR_NUNITS.
27270 (aarch64_move_pointer): Take amount as a poly_int64 rather
27272 (aarch64_progress_pointer): Avoid temporary variable.
27273 * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
27274 the mode attribute instead of GET_MODE.
27276 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
27277 Alan Hayward <alan.hayward@arm.com>
27278 David Sherwood <david.sherwood@arm.com>
27280 * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
27281 x exists before using it.
27282 (aarch64_add_constant_internal): Rename to...
27283 (aarch64_add_offset_1): ...this. Replace regnum with separate
27284 src and dest rtxes. Handle the case in which they're different,
27285 including when the offset is zero. Replace scratchreg with an rtx.
27286 Use 2 additions if there is no spare register into which we can
27287 move a 16-bit constant.
27288 (aarch64_add_constant): Delete.
27289 (aarch64_add_offset): Replace reg with separate src and dest
27290 rtxes. Take a poly_int64 offset instead of a HOST_WIDE_INT.
27291 Use aarch64_add_offset_1.
27292 (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
27293 an rtx rather than an int. Take the delta as a poly_int64
27294 rather than a HOST_WIDE_INT. Use aarch64_add_offset.
27295 (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
27296 (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
27297 aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
27298 (aarch64_expand_epilogue): Update calls to aarch64_add_offset
27299 and aarch64_add_sp.
27300 (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
27301 aarch64_add_constant.
27303 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
27305 * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
27306 Use scalar_float_mode.
27308 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
27310 * config/aarch64/aarch64-simd.md
27311 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
27312 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
27313 (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
27314 (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
27315 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
27316 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
27317 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
27318 (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
27319 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
27320 (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
27322 2018-01-11 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
27325 * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
27326 targ_options->x_arm_arch_string is non NULL.
27328 2018-01-11 Tamar Christina <tamar.christina@arm.com>
27330 * config/aarch64/aarch64.h
27331 (AARCH64_FL_FOR_ARCH8_4): Add AARCH64_FL_DOTPROD.
27333 2018-01-11 Sudakshina Das <sudi.das@arm.com>
27336 * expmed.c (emit_store_flag_force): Swap if const op0
27337 and change VOIDmode to mode of op0.
27339 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
27341 PR rtl-optimization/83761
27342 * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
27343 than bytes to mode_for_size.
27345 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
27347 PR middle-end/83189
27348 * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
27349 * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
27352 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
27354 PR middle-end/83575
27355 * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
27356 when in layout mode.
27357 (cfg_layout_finalize): Do not verify cfg before we are out of layout.
27358 * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
27361 2018-01-10 Michael Collison <michael.collison@arm.com>
27363 * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
27364 * config/aarch64/aarch64-option-extension.def: Add
27365 AARCH64_OPT_EXTENSION of 'fp16fml'.
27366 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
27367 (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
27368 * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
27369 * config/aarch64/constraints.md (Ui7): New constraint.
27370 * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
27371 (VFMLA_SEL_W): Ditto.
27374 (VFMLA16_LOW): New int iterator.
27375 (VFMLA16_HIGH): Ditto.
27376 (UNSPEC_FMLAL): New unspec.
27377 (UNSPEC_FMLSL): Ditto.
27378 (UNSPEC_FMLAL2): Ditto.
27379 (UNSPEC_FMLSL2): Ditto.
27380 (f16mac): New code attribute.
27381 * config/aarch64/aarch64-simd-builtins.def
27382 (aarch64_fmlal_lowv2sf): Ditto.
27383 (aarch64_fmlsl_lowv2sf): Ditto.
27384 (aarch64_fmlalq_lowv4sf): Ditto.
27385 (aarch64_fmlslq_lowv4sf): Ditto.
27386 (aarch64_fmlal_highv2sf): Ditto.
27387 (aarch64_fmlsl_highv2sf): Ditto.
27388 (aarch64_fmlalq_highv4sf): Ditto.
27389 (aarch64_fmlslq_highv4sf): Ditto.
27390 (aarch64_fmlal_lane_lowv2sf): Ditto.
27391 (aarch64_fmlsl_lane_lowv2sf): Ditto.
27392 (aarch64_fmlal_laneq_lowv2sf): Ditto.
27393 (aarch64_fmlsl_laneq_lowv2sf): Ditto.
27394 (aarch64_fmlalq_lane_lowv4sf): Ditto.
27395 (aarch64_fmlsl_lane_lowv4sf): Ditto.
27396 (aarch64_fmlalq_laneq_lowv4sf): Ditto.
27397 (aarch64_fmlsl_laneq_lowv4sf): Ditto.
27398 (aarch64_fmlal_lane_highv2sf): Ditto.
27399 (aarch64_fmlsl_lane_highv2sf): Ditto.
27400 (aarch64_fmlal_laneq_highv2sf): Ditto.
27401 (aarch64_fmlsl_laneq_highv2sf): Ditto.
27402 (aarch64_fmlalq_lane_highv4sf): Ditto.
27403 (aarch64_fmlsl_lane_highv4sf): Ditto.
27404 (aarch64_fmlalq_laneq_highv4sf): Ditto.
27405 (aarch64_fmlsl_laneq_highv4sf): Ditto.
27406 * config/aarch64/aarch64-simd.md:
27407 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
27408 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
27409 (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
27410 (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
27411 (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
27412 (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
27413 (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
27414 (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
27415 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
27416 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
27417 (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
27418 (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
27419 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
27420 (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
27421 (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
27422 (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
27423 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
27424 (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
27425 (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
27426 (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
27427 * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
27428 (vfmlsl_low_u32): Ditto.
27429 (vfmlalq_low_u32): Ditto.
27430 (vfmlslq_low_u32): Ditto.
27431 (vfmlal_high_u32): Ditto.
27432 (vfmlsl_high_u32): Ditto.
27433 (vfmlalq_high_u32): Ditto.
27434 (vfmlslq_high_u32): Ditto.
27435 (vfmlal_lane_low_u32): Ditto.
27436 (vfmlsl_lane_low_u32): Ditto.
27437 (vfmlal_laneq_low_u32): Ditto.
27438 (vfmlsl_laneq_low_u32): Ditto.
27439 (vfmlalq_lane_low_u32): Ditto.
27440 (vfmlslq_lane_low_u32): Ditto.
27441 (vfmlalq_laneq_low_u32): Ditto.
27442 (vfmlslq_laneq_low_u32): Ditto.
27443 (vfmlal_lane_high_u32): Ditto.
27444 (vfmlsl_lane_high_u32): Ditto.
27445 (vfmlal_laneq_high_u32): Ditto.
27446 (vfmlsl_laneq_high_u32): Ditto.
27447 (vfmlalq_lane_high_u32): Ditto.
27448 (vfmlslq_lane_high_u32): Ditto.
27449 (vfmlalq_laneq_high_u32): Ditto.
27450 (vfmlslq_laneq_high_u32): Ditto.
27451 * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
27452 (AARCH64_FL_FOR_ARCH8_4): New.
27453 (AARCH64_ISA_F16FML): New ISA flag.
27454 (TARGET_F16FML): New feature flag for fp16fml.
27455 (doc/invoke.texi): Document new fp16fml option.
27457 2018-01-10 Michael Collison <michael.collison@arm.com>
27459 * config/aarch64/aarch64-builtins.c:
27460 (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
27461 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
27462 (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
27463 * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
27464 (AARCH64_ISA_SHA3): New ISA flag.
27465 (TARGET_SHA3): New feature flag for sha3.
27466 * config/aarch64/iterators.md (sha512_op): New int attribute.
27467 (CRYPTO_SHA512): New int iterator.
27468 (UNSPEC_SHA512H): New unspec.
27469 (UNSPEC_SHA512H2): Ditto.
27470 (UNSPEC_SHA512SU0): Ditto.
27471 (UNSPEC_SHA512SU1): Ditto.
27472 * config/aarch64/aarch64-simd-builtins.def
27473 (aarch64_crypto_sha512hqv2di): New builtin.
27474 (aarch64_crypto_sha512h2qv2di): Ditto.
27475 (aarch64_crypto_sha512su0qv2di): Ditto.
27476 (aarch64_crypto_sha512su1qv2di): Ditto.
27477 (aarch64_eor3qv8hi): Ditto.
27478 (aarch64_rax1qv2di): Ditto.
27479 (aarch64_xarqv2di): Ditto.
27480 (aarch64_bcaxqv8hi): Ditto.
27481 * config/aarch64/aarch64-simd.md:
27482 (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
27483 (aarch64_crypto_sha512su0qv2di): Ditto.
27484 (aarch64_crypto_sha512su1qv2di): Ditto.
27485 (aarch64_eor3qv8hi): Ditto.
27486 (aarch64_rax1qv2di): Ditto.
27487 (aarch64_xarqv2di): Ditto.
27488 (aarch64_bcaxqv8hi): Ditto.
27489 * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
27490 (vsha512h2q_u64): Ditto.
27491 (vsha512su0q_u64): Ditto.
27492 (vsha512su1q_u64): Ditto.
27493 (veor3q_u16): Ditto.
27494 (vrax1q_u64): Ditto.
27495 (vxarq_u64): Ditto.
27496 (vbcaxq_u16): Ditto.
27497 * config/arm/types.md (crypto_sha512): New type attribute.
27498 (crypto_sha3): Ditto.
27499 (doc/invoke.texi): Document new sha3 option.
27501 2018-01-10 Michael Collison <michael.collison@arm.com>
27503 * config/aarch64/aarch64-builtins.c:
27504 (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
27505 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
27506 (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
27507 (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
27508 * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
27509 (AARCH64_ISA_SM4): New ISA flag.
27510 (TARGET_SM4): New feature flag for sm4.
27511 * config/aarch64/aarch64-simd-builtins.def
27512 (aarch64_sm3ss1qv4si): Ditto.
27513 (aarch64_sm3tt1aq4si): Ditto.
27514 (aarch64_sm3tt1bq4si): Ditto.
27515 (aarch64_sm3tt2aq4si): Ditto.
27516 (aarch64_sm3tt2bq4si): Ditto.
27517 (aarch64_sm3partw1qv4si): Ditto.
27518 (aarch64_sm3partw2qv4si): Ditto.
27519 (aarch64_sm4eqv4si): Ditto.
27520 (aarch64_sm4ekeyqv4si): Ditto.
27521 * config/aarch64/aarch64-simd.md:
27522 (aarch64_sm3ss1qv4si): Ditto.
27523 (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
27524 (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
27525 (aarch64_sm4eqv4si): Ditto.
27526 (aarch64_sm4ekeyqv4si): Ditto.
27527 * config/aarch64/iterators.md (sm3tt_op): New int iterator.
27528 (sm3part_op): Ditto.
27529 (CRYPTO_SM3TT): Ditto.
27530 (CRYPTO_SM3PART): Ditto.
27531 (UNSPEC_SM3SS1): New unspec.
27532 (UNSPEC_SM3TT1A): Ditto.
27533 (UNSPEC_SM3TT1B): Ditto.
27534 (UNSPEC_SM3TT2A): Ditto.
27535 (UNSPEC_SM3TT2B): Ditto.
27536 (UNSPEC_SM3PARTW1): Ditto.
27537 (UNSPEC_SM3PARTW2): Ditto.
27538 (UNSPEC_SM4E): Ditto.
27539 (UNSPEC_SM4EKEY): Ditto.
27540 * config/aarch64/constraints.md (Ui2): New constraint.
27541 * config/aarch64/predicates.md (aarch64_imm2): New predicate.
27542 * config/arm/types.md (crypto_sm3): New type attribute.
27543 (crypto_sm4): Ditto.
27544 * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
27545 (vsm3tt1aq_u32): Ditto.
27546 (vsm3tt1bq_u32): Ditto.
27547 (vsm3tt2aq_u32): Ditto.
27548 (vsm3tt2bq_u32): Ditto.
27549 (vsm3partw1q_u32): Ditto.
27550 (vsm3partw2q_u32): Ditto.
27551 (vsm4eq_u32): Ditto.
27552 (vsm4ekeyq_u32): Ditto.
27553 (doc/invoke.texi): Document new sm4 option.
27555 2018-01-10 Michael Collison <michael.collison@arm.com>
27557 * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
27558 * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
27559 (AARCH64_FL_FOR_ARCH8_4): New.
27560 (AARCH64_FL_V8_4): New flag.
27561 (doc/invoke.texi): Document new armv8.4-a option.
27563 2018-01-10 Michael Collison <michael.collison@arm.com>
27565 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
27566 (__ARM_FEATURE_AES): Define if TARGET_AES is true.
27567 (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
27568 * config/aarch64/aarch64-option-extension.def: Add
27569 AARCH64_OPT_EXTENSION of 'sha2'.
27570 (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
27571 (crypto): Disable sha2 and aes if crypto disabled.
27572 (crypto): Enable aes and sha2 if enabled.
27573 (simd): Disable sha2 and aes if simd disabled.
27574 * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
27576 (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
27577 (TARGET_SHA2): New feature flag for sha2.
27578 (TARGET_AES): New feature flag for aes.
27579 * config/aarch64/aarch64-simd.md:
27580 (aarch64_crypto_aes<aes_op>v16qi): Make pattern
27581 conditional on TARGET_AES.
27582 (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
27583 (aarch64_crypto_sha1hsi): Make pattern conditional
27585 (aarch64_crypto_sha1hv4si): Ditto.
27586 (aarch64_be_crypto_sha1hv4si): Ditto.
27587 (aarch64_crypto_sha1su1v4si): Ditto.
27588 (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
27589 (aarch64_crypto_sha1su0v4si): Ditto.
27590 (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
27591 (aarch64_crypto_sha256su0v4si): Ditto.
27592 (aarch64_crypto_sha256su1v4si): Ditto.
27593 (doc/invoke.texi): Document new aes and sha2 options.
27595 2018-01-10 Martin Sebor <msebor@redhat.com>
27597 PR tree-optimization/83781
27598 * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
27601 2018-01-11 Martin Sebor <msebor@gmail.com>
27602 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
27604 PR tree-optimization/83501
27605 PR tree-optimization/81703
27607 * tree-ssa-strlen.c (get_string_cst): Rename...
27608 (get_string_len): ...to this. Handle global constants.
27609 (handle_char_store): Adjust.
27611 2018-01-10 Kito Cheng <kito.cheng@gmail.com>
27612 Jim Wilson <jimw@sifive.com>
27614 * config/riscv/riscv-protos.h (riscv_output_return): New.
27615 * config/riscv/riscv.c (struct machine_function): New naked_p field.
27616 (riscv_attribute_table, riscv_output_return),
27617 (riscv_handle_fndecl_attribute, riscv_naked_function_p),
27618 (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
27619 (riscv_compute_frame_info): Only compute frame->mask if not a naked
27621 (riscv_expand_prologue): Add early return for naked function.
27622 (riscv_expand_epilogue): Likewise.
27623 (riscv_function_ok_for_sibcall): Return false for naked function.
27624 (riscv_set_current_function): New.
27625 (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
27626 (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
27627 * config/riscv/riscv.md (simple_return): Call riscv_output_return.
27628 * doc/extend.texi (RISC-V Function Attributes): New.
27630 2018-01-10 Michael Meissner <meissner@linux.vnet.ibm.com>
27632 * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
27633 check for 128-bit long double before checking TCmode.
27634 * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
27635 128-bit long doubles before checking TFmode or TCmode.
27636 (FLOAT128_IBM_P): Likewise.
27638 2018-01-10 Martin Sebor <msebor@redhat.com>
27640 PR tree-optimization/83671
27641 * builtins.c (c_strlen): Unconditionally return zero for the empty
27643 Use -Warray-bounds for warnings.
27644 * gimple-fold.c (get_range_strlen): Handle non-constant lengths
27645 for non-constant array indices with COMPONENT_REF, arrays of
27646 arrays, and pointers to arrays.
27647 (gimple_fold_builtin_strlen): Determine and set length range for
27648 non-constant character arrays.
27650 2018-01-10 Aldy Hernandez <aldyh@redhat.com>
27652 PR middle-end/81897
27653 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
27656 2018-01-10 Eric Botcazou <ebotcazou@adacore.com>
27658 * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
27660 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
27663 * config/rs6000/rs6000.c (print_operand) <'y'>: Use
27664 VECTOR_MEM_ALTIVEC_OR_VSX_P.
27665 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
27666 indexed_or_indirect_operand predicate.
27667 (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
27668 (*vsx_le_perm_load_v8hi): Likewise.
27669 (*vsx_le_perm_load_v16qi): Likewise.
27670 (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
27671 (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
27672 (*vsx_le_perm_store_v8hi): Likewise.
27673 (*vsx_le_perm_store_v16qi): Likewise.
27674 (eight unnamed splitters): Likewise.
27676 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
27678 * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
27679 * config/rs6000/emmintrin.h: Likewise.
27680 * config/rs6000/mmintrin.h: Likewise.
27681 * config/rs6000/xmmintrin.h: Likewise.
27683 2018-01-10 David Malcolm <dmalcolm@redhat.com>
27686 * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
27688 * tree.c (tree_nop_conversion): Return true for location wrapper
27690 (maybe_wrap_with_location): New function.
27691 (selftest::check_strip_nops): New function.
27692 (selftest::test_location_wrappers): New function.
27693 (selftest::tree_c_tests): Call it.
27694 * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
27695 (maybe_wrap_with_location): New decl.
27696 (EXPR_LOCATION_WRAPPER_P): New macro.
27697 (location_wrapper_p): New inline function.
27698 (tree_strip_any_location_wrapper): New inline function.
27700 2018-01-10 H.J. Lu <hongjiu.lu@intel.com>
27703 * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
27704 stack_realign_offset for the largest alignment of stack slot
27706 (ix86_find_max_used_stack_alignment): New function.
27707 (ix86_finalize_stack_frame_flags): Use it. Set
27708 max_used_stack_alignment if we don't realign stack.
27709 * config/i386/i386.h (machine_function): Add
27710 max_used_stack_alignment.
27712 2018-01-10 Christophe Lyon <christophe.lyon@linaro.org>
27714 * config/arm/arm.opt (-mbranch-cost): New option.
27715 * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
27718 2018-01-10 Segher Boessenkool <segher@kernel.crashing.org>
27721 * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
27722 load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
27724 2018-01-10 Richard Biener <rguenther@suse.de>
27727 * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
27728 early out so it also covers the case where we have a non-NULL
27731 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
27733 PR tree-optimization/83753
27734 * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
27735 for non-strided grouped accesses if the number of elements is 1.
27737 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
27740 * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
27741 * i386.h (TARGET_USE_GATHER): Define.
27742 * x86-tune.def (X86_TUNE_USE_GATHER): New.
27744 2018-01-10 Martin Liska <mliska@suse.cz>
27747 * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
27748 * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
27750 * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
27751 CLEANUP_NO_PARTITIONING is not set.
27753 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
27755 * doc/rtl.texi: Remove documentation of (const ...) wrappers
27756 for vectors, as a partial revert of r254296.
27757 * rtl.h (const_vec_p): Delete.
27758 (const_vec_duplicate_p): Don't test for vector CONSTs.
27759 (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
27760 * expmed.c (make_tree): Likewise.
27763 * common.md (E, F): Use CONSTANT_P instead of checking for
27765 * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
27766 checking for CONST_VECTOR.
27768 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
27770 PR middle-end/83575
27771 * predict.c (force_edge_cold): Handle in more sane way edges
27772 with no prediction.
27774 2018-01-09 Carl Love <cel@us.ibm.com>
27776 * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
27778 (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
27779 * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
27780 VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
27781 VMRGOW_V2DI, VMRGOW_V2DF. Remove definition for VMRGOW.
27782 * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
27783 P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW): Add definitions.
27784 * config/rs6000/rs6000-protos.h: Add extern defition for
27785 rs6000_generate_float2_double_code.
27786 * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
27788 * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
27789 (float2_v2df): Add define_expand.
27791 2018-01-09 Uros Bizjak <ubizjak@gmail.com>
27794 * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
27795 op_mode in the force_to_mode call.
27797 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
27799 * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
27800 instead of checking each element individually.
27801 (aarch64_evpc_uzp): Likewise.
27802 (aarch64_evpc_zip): Likewise.
27803 (aarch64_evpc_ext): Likewise.
27804 (aarch64_evpc_rev): Likewise.
27805 (aarch64_evpc_dup): Test the encoding for a single duplicated element,
27806 instead of checking each element individually. Return true without
27808 (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
27809 whether all selected elements come from the same input, instead of
27810 checking each element individually. Remove calls to gen_rtx_REG,
27811 start_sequence and end_sequence and instead assert that no rtl is
27814 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
27816 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
27817 order of HIGH and CONST checks.
27819 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
27821 * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
27822 if the destination isn't an SSA_NAME.
27824 2018-01-09 Richard Biener <rguenther@suse.de>
27826 PR tree-optimization/83668
27827 * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
27829 (canonicalize_loop_form): ... here, renamed from ...
27830 (canonicalize_loop_closed_ssa_form): ... this and amended to
27831 swap successor edges for loop exit blocks to make us use
27832 the RPO order we need for initial schedule generation.
27834 2018-01-09 Joseph Myers <joseph@codesourcery.com>
27836 PR tree-optimization/64811
27837 * match.pd: When optimizing comparisons with Inf, avoid
27838 introducing or losing exceptions from comparisons with NaN.
27840 2018-01-09 Martin Liska <mliska@suse.cz>
27843 * asan.c (shadow_mem_size): Add gcc_assert.
27845 2018-01-09 Georg-Johann Lay <avr@gjlay.de>
27847 Don't save registers in main().
27850 * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
27851 * config/avr/avr.opt (-mmain-is-OS_task): New target option.
27852 * config/avr/avr.c (avr_set_current_function): Don't error if
27853 naked, OS_task or OS_main are specified at the same time.
27854 (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
27856 (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
27858 * common/config/avr/avr-common.c (avr_option_optimization_table):
27859 Switch on -mmain-is-OS_task for optimizing compilations.
27861 2018-01-09 Richard Biener <rguenther@suse.de>
27863 PR tree-optimization/83572
27864 * graphite.c: Include cfganal.h.
27865 (graphite_transform_loops): Connect infinite loops to exit
27866 and remove fake edges at the end.
27868 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
27870 * ipa-inline.c (edge_badness): Revert accidental checkin.
27872 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
27875 * ipa-comdats.c (set_comdat_group): Only set comdat group of real
27876 symbols; not inline clones.
27878 2018-01-09 Jakub Jelinek <jakub@redhat.com>
27881 * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
27882 hard registers. Formatting fixes.
27884 PR preprocessor/83722
27885 * gcc.c (try_generate_repro): Pass
27886 &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
27887 &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
27890 2018-01-08 Monk Chiang <sh.chiang04@gmail.com>
27891 Kito Cheng <kito.cheng@gmail.com>
27893 * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
27894 (riscv_leaf_function_p): Delete.
27895 (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
27897 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
27899 * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
27901 (do_ifelse): New function.
27902 (do_isel): New function.
27903 (do_sub3): New function.
27904 (do_add3): New function.
27905 (do_load_mask_compare): New function.
27906 (do_overlap_load_compare): New function.
27907 (expand_compare_loop): New function.
27908 (expand_block_compare): Call expand_compare_loop() when appropriate.
27909 * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
27910 option description.
27911 (-mblock-compare-inline-loop-limit): New option.
27913 2018-01-08 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
27916 * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
27917 Reverse order of second and third operands in first alternative.
27918 * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
27919 of first and second elements in UNSPEC_VPERMR vector.
27920 (altivec_expand_vec_perm_le): Likewise.
27922 2018-01-08 Jeff Law <law@redhat.com>
27924 PR rtl-optimizatin/81308
27925 * tree-switch-conversion.c (cfg_altered): New file scoped static.
27926 (process_switch): If group_case_labels makes a change, then set
27928 (pass_convert_switch::execute): If a switch is converted, then
27929 set cfg_altered. Return TODO_cfg_cleanup if cfg_altered is true.
27931 PR rtl-optimization/81308
27932 * recog.c (split_all_insns): Conditionally cleanup the CFG after
27935 2018-01-08 Vidya Praveen <vidyapraveen@arm.com>
27937 PR target/83663 - Revert r255946
27938 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
27939 generation for cases where splatting a value is not useful.
27940 * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
27941 across a vec_duplicate and a paradoxical subreg forming a vector
27942 mode to a vec_concat.
27944 2018-01-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
27946 * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
27947 -march=armv8.3-a variants.
27948 * config/arm/t-multilib: Likewise.
27949 * config/arm/t-arm-elf: Likewise. Handle dotprod extension.
27951 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
27953 * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
27955 (cceq_ior_compare_complement): Give it a name so I can use it, and
27956 change boolean_or_operator predicate to boolean_operator so it can
27957 be used to generate a crand.
27958 (eqne): New code iterator.
27959 (bd/bd_neg): New code_attrs.
27960 (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
27961 a single define_insn.
27962 (<bd>tf_<mode>): A new insn pattern for the conditional form branch
27963 decrement (bdnzt/bdnzf/bdzt/bdzf).
27964 * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
27965 with the new names of the branch decrement patterns, and added the
27966 names of the branch decrement conditional patterns.
27968 2018-01-08 Richard Biener <rguenther@suse.de>
27970 PR tree-optimization/83563
27971 * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
27974 2018-01-08 Richard Biener <rguenther@suse.de>
27976 PR middle-end/83713
27977 * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
27979 2018-01-08 Richard Biener <rguenther@suse.de>
27981 PR tree-optimization/83685
27982 * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
27983 references to abnormals.
27985 2018-01-08 Richard Biener <rguenther@suse.de>
27988 * dwarf2out.c (output_indirect_strings): Handle empty
27989 skeleton_debug_str_hash.
27990 (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
27992 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
27994 * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
27995 (emit_store_direct): Likewise.
27996 (arc_trampoline_adjust_address): Likewise.
27997 (arc_asm_trampoline_template): New function.
27998 (arc_initialize_trampoline): Use asm_trampoline_template.
27999 (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
28000 * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
28001 * config/arc/arc.md (flush_icache): Delete pattern.
28003 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
28005 * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
28006 * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
28009 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
28012 * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
28013 by not USED_FOR_TARGET.
28014 (make_pass_resolve_sw_modes): Likewise.
28016 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
28018 * config/nios2/nios2.h (nios2_section_threshold): Guard by not
28021 2018-01-08 Richard Biener <rguenther@suse.de>
28023 PR middle-end/83580
28024 * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
28026 2018-01-08 Richard Biener <rguenther@suse.de>
28028 PR middle-end/83517
28029 * match.pd ((t * 2) / 2) -> t): Add missing :c.
28031 2018-01-06 Aldy Hernandez <aldyh@redhat.com>
28033 PR middle-end/81897
28034 * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
28035 basic blocks with a small number of successors.
28036 (convert_control_dep_chain_into_preds): Improve handling of
28038 (dump_predicates): Split apart into...
28039 (dump_pred_chain): ...here...
28040 (dump_pred_info): ...and here.
28041 (can_one_predicate_be_invalidated_p): Add debugging printfs.
28042 (can_chain_union_be_invalidated_p): Improve check for invalidation
28044 (uninit_uses_cannot_happen): Avoid unnecessary if
28045 convert_control_dep_chain_into_preds yielded nothing.
28047 2018-01-06 Martin Sebor <msebor@redhat.com>
28049 PR tree-optimization/83640
28050 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
28051 subtracting negative offset from size.
28052 (builtin_access::overlap): Adjust offset bounds of the access to fall
28053 within the size of the object if possible.
28055 2018-01-06 Richard Sandiford <richard.sandiford@linaro.org>
28057 PR rtl-optimization/83699
28058 * expmed.c (extract_bit_field_1): Restrict the vector usage of
28059 extract_bit_field_as_subreg to cases in which the extracted
28060 value is also a vector.
28062 * lra-constraints.c (process_alt_operands): Test for the equivalence
28063 substitutions when detecting a possible reload cycle.
28065 2018-01-06 Jakub Jelinek <jakub@redhat.com>
28068 * toplev.c (process_options): Don't enable debug_nonbind_markers_p
28069 by default if flag_selective_schedling{,2}. Formatting fixes.
28071 PR rtl-optimization/83682
28072 * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
28073 if it has non-VECTOR_MODE element mode.
28074 (vec_duplicate_p): Likewise.
28076 PR middle-end/83694
28077 * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
28078 and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
28080 2018-01-05 Jakub Jelinek <jakub@redhat.com>
28083 * config/i386/i386-builtin.def
28084 (__builtin_ia32_vgf2p8affineinvqb_v64qi,
28085 __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
28086 Require also OPTION_MASK_ISA_AVX512F in addition to
28087 OPTION_MASK_ISA_GFNI.
28088 (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
28089 __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
28090 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
28091 to OPTION_MASK_ISA_GFNI.
28092 (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
28093 OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
28094 OPTION_MASK_ISA_AVX512BW.
28095 (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
28096 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
28097 addition to OPTION_MASK_ISA_GFNI.
28098 (__builtin_ia32_vgf2p8affineinvqb_v16qi,
28099 __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
28100 Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
28101 to OPTION_MASK_ISA_GFNI.
28102 * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
28103 a requirement for all ISAs rather than any of them with a few
28105 (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
28107 (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
28108 bitmasks to be enabled with 3 exceptions, instead of requiring any
28109 enabled ISA with lots of exceptions.
28110 * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
28111 vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
28112 Change avx512bw in isa attribute to avx512f.
28113 * config/i386/sgxintrin.h: Add license boilerplate.
28114 * config/i386/vaesintrin.h: Likewise. Fix macro spelling __AVX512F
28115 to __AVX512F__ and __AVX512VL to __AVX512VL__.
28116 (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
28117 _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
28119 * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
28120 _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
28121 temporarily sse2 rather than sse if not enabled already.
28124 * config/i386/sse.md (VI248_VLBW): Rename to ...
28125 (VI248_AVX512VL): ... this. Don't guard V32HI with TARGET_AVX512BW.
28126 (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
28127 vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
28128 vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
28129 vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
28130 mode iterator instead of VI248_VLBW.
28132 2018-01-05 Jan Hubicka <hubicka@ucw.cz>
28134 * ipa-fnsummary.c (record_modified_bb_info): Add OP.
28135 (record_modified): Skip clobbers; add debug output.
28136 (param_change_prob): Use sreal frequencies.
28138 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
28140 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
28141 punt for user-aligned variables.
28143 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
28145 * tree-chrec.c (chrec_contains_symbols): Return true for
28148 2018-01-05 Sudakshina Das <sudi.das@arm.com>
28151 * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
28152 of (x|y) == x for BICS pattern.
28154 2018-01-05 Jakub Jelinek <jakub@redhat.com>
28156 PR tree-optimization/83605
28157 * gimple-ssa-strength-reduction.c: Include tree-eh.h.
28158 (find_candidates_dom_walker::before_dom_children): Ignore stmts that
28161 2018-01-05 Sebastian Huber <sebastian.huber@embedded-brains.de>
28163 * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
28164 * config/epiphany/rtems.h: New file.
28166 2018-01-04 Jakub Jelinek <jakub@redhat.com>
28167 Uros Bizjak <ubizjak@gmail.com>
28170 * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
28171 QIreg_operand instead of register_operand predicate.
28172 * config/i386/i386.c (ix86_rop_should_change_byte_p,
28173 set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
28174 comments instead of -fmitigate[-_]rop.
28176 2018-01-04 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
28179 * cgraphunit.c (symbol_table::compile): Switch to text_section
28180 before calling assembly_start debug hook.
28181 * run-rtl-passes.c (run_rtl_passes): Likewise.
28184 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
28186 * tree-vrp.c (extract_range_from_binary_expr_1): Check
28187 range_int_cst_p rather than !symbolic_range_p before calling
28188 extract_range_from_multiplicative_op_1.
28190 2018-01-04 Jeff Law <law@redhat.com>
28192 * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
28193 redundant test in assertion.
28195 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
28197 * doc/rtl.texi: Document machine_mode wrapper classes.
28199 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
28201 * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
28202 using tree_to_uhwi.
28204 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
28206 * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
28207 the VEC_PERM_EXPR fold to fail.
28209 2018-01-04 Jakub Jelinek <jakub@redhat.com>
28212 * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
28213 to switched_sections.
28215 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
28218 * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
28219 test for d.testing.
28221 2018-01-04 Peter Bergner <bergner@vnet.ibm.com>
28224 * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
28225 allow arguments in FP registers if TARGET_HARD_FLOAT is false.
28227 2018-01-04 Jakub Jelinek <jakub@redhat.com>
28230 * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
28231 is BLKmode and bitpos not zero or mode change is needed.
28233 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
28236 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
28239 2018-01-04 Uros Bizjak <ubizjak@gmail.com>
28242 * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
28243 instead of MULT rtx. Update all corresponding splitters.
28244 (*saddl_se): Ditto.
28245 (*ssub<modesuffix>): Ditto.
28246 (*ssubl_se): Ditto.
28247 (*cmp_sadd_di): Update split patterns.
28248 (*cmp_sadd_si): Ditto.
28249 (*cmp_sadd_sidi): Ditto.
28250 (*cmp_ssub_di): Ditto.
28251 (*cmp_ssub_si): Ditto.
28252 (*cmp_ssub_sidi): Ditto.
28253 * config/alpha/predicates.md (const23_operand): New predicate.
28254 * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
28255 Look for ASHIFT, not MULT inner operand.
28256 (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
28258 2018-01-04 Martin Liska <mliska@suse.cz>
28260 PR gcov-profile/83669
28261 * gcov.c (output_intermediate_file): Add version to intermediate
28263 * doc/gcov.texi: Document new field 'version' in intermediate
28264 file format. Fix location of '-k' option of gcov command.
28266 2018-01-04 Martin Liska <mliska@suse.cz>
28269 * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
28271 2018-01-04 Jakub Jelinek <jakub@redhat.com>
28273 * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
28275 2018-01-03 Martin Sebor <msebor@redhat.com>
28277 PR tree-optimization/83655
28278 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
28279 checking calls with invalid arguments.
28281 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28283 * tree-vect-stmts.c (vect_get_store_rhs): New function.
28284 (vectorizable_mask_load_store): Delete.
28285 (vectorizable_call): Return false for masked loads and stores.
28286 (vectorizable_store): Handle IFN_MASK_STORE. Use vect_get_store_rhs
28287 instead of gimple_assign_rhs1.
28288 (vectorizable_load): Handle IFN_MASK_LOAD.
28289 (vect_transform_stmt): Don't set is_store for call_vec_info_type.
28291 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28293 * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
28295 (vectorizable_mask_load_store): ...here.
28296 (vectorizable_load): ...and here.
28298 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28300 * tree-vect-stmts.c (vect_build_all_ones_mask)
28301 (vect_build_zero_merge_argument): New functions, split out from...
28302 (vectorizable_load): ...here.
28304 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28306 * tree-vect-stmts.c (vect_check_store_rhs): New function,
28308 (vectorizable_mask_load_store): ...here.
28309 (vectorizable_store): ...and here.
28311 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28313 * tree-vect-stmts.c (vect_check_load_store_mask): New function,
28315 (vectorizable_mask_load_store): ...here.
28317 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28319 * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
28320 (vect_model_store_cost): Take a vec_load_store_type instead of a
28322 * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
28323 (vect_model_store_cost): Take a vec_load_store_type instead of a
28325 (vectorizable_mask_load_store): Update accordingly.
28326 (vectorizable_store): Likewise.
28327 * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
28329 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28331 * tree-vect-loop.c (vect_transform_loop): Stub out scalar
28332 IFN_MASK_LOAD calls here rather than...
28333 * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
28335 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28336 Alan Hayward <alan.hayward@arm.com>
28337 David Sherwood <david.sherwood@arm.com>
28339 * expmed.c (extract_bit_field_1): For vector extracts,
28340 fall back to extract_bit_field_as_subreg if vec_extract
28343 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28344 Alan Hayward <alan.hayward@arm.com>
28345 David Sherwood <david.sherwood@arm.com>
28347 * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
28348 they are variable or constant sized.
28349 (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
28350 slots for constant-sized data.
28352 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28353 Alan Hayward <alan.hayward@arm.com>
28354 David Sherwood <david.sherwood@arm.com>
28356 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
28357 handling COND_EXPRs with boolean comparisons, try to find a better
28358 basis for the mask type than the boolean itself.
28360 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28362 * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
28363 is calculated and how it can be overridden.
28364 * genmodes.c (max_bitsize_mode_any_mode): New variable.
28365 (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
28367 (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
28370 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28371 Alan Hayward <alan.hayward@arm.com>
28372 David Sherwood <david.sherwood@arm.com>
28374 * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
28375 Remove the mode argument.
28376 (aarch64_simd_valid_immediate): Remove the mode and inverse
28378 * config/aarch64/iterators.md (bitsize): New iterator.
28379 * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
28380 (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
28381 * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
28382 aarch64_simd_valid_immediate.
28383 * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
28384 (aarch64_reg_or_bic_imm): Likewise.
28385 * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
28386 with an insn_type enum and msl with a modifier_type enum.
28387 Replace element_width with a scalar_mode. Change the shift
28388 to unsigned int. Add constructors for scalar_float_mode and
28389 scalar_int_mode elements.
28390 (aarch64_vect_float_const_representable_p): Delete.
28391 (aarch64_can_const_movi_rtx_p)
28392 (aarch64_simd_scalar_immediate_valid_for_move)
28393 (aarch64_simd_make_constant): Update call to
28394 aarch64_simd_valid_immediate.
28395 (aarch64_advsimd_valid_immediate_hs): New function.
28396 (aarch64_advsimd_valid_immediate): Likewise.
28397 (aarch64_simd_valid_immediate): Remove mode and inverse
28398 arguments. Rewrite to use the above. Use const_vec_duplicate_p
28399 to detect duplicated constants and use aarch64_float_const_zero_rtx_p
28400 and aarch64_float_const_representable_p on the result.
28401 (aarch64_output_simd_mov_immediate): Remove mode argument.
28402 Update call to aarch64_simd_valid_immediate and use of
28403 simd_immediate_info.
28404 (aarch64_output_scalar_simd_mov_immediate): Update call
28407 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28408 Alan Hayward <alan.hayward@arm.com>
28409 David Sherwood <david.sherwood@arm.com>
28411 * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
28412 (mode_nunits): Likewise CONST_MODE_NUNITS.
28413 * machmode.def (ADJUST_NUNITS): Document.
28414 * genmodes.c (mode_data::need_nunits_adj): New field.
28415 (blank_mode): Update accordingly.
28416 (adj_nunits): New variable.
28417 (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
28419 (emit_mode_size_inline): Set need_bytesize_adj for all modes
28420 listed in adj_nunits.
28421 (emit_mode_nunits_inline): Set need_nunits_adj for all modes
28422 listed in adj_nunits. Don't emit case statements for such modes.
28423 (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
28424 and CONST_MODE_PRECISION. Make CONST_MODE_SIZE expand to
28425 nothing if adj_nunits is nonnull.
28426 (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
28427 (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
28428 (emit_mode_fbit): Update use of print_maybe_const_decl.
28429 (emit_move_size): Likewise. Treat the array as non-const
28431 (emit_mode_adjustments): Handle adj_nunits.
28433 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28435 * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
28436 * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
28437 (VECTOR_MODES): Use it.
28438 (make_vector_modes): Take the prefix as an argument.
28440 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28441 Alan Hayward <alan.hayward@arm.com>
28442 David Sherwood <david.sherwood@arm.com>
28444 * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
28445 * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
28446 for MODE_VECTOR_BOOL.
28447 * machmode.def (VECTOR_BOOL_MODE): Document.
28448 * genmodes.c (VECTOR_BOOL_MODE): New macro.
28449 (make_vector_bool_mode): New function.
28450 (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
28452 * lto-streamer-in.c (lto_input_mode_table): Likewise.
28453 * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
28455 * stor-layout.c (int_mode_for_mode): Likewise.
28456 * tree.c (build_vector_type_for_mode): Likewise.
28457 * varasm.c (output_constant_pool_2): Likewise.
28458 * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
28459 CONSTM1_RTX (BImode) are the same thing. Initialize const_tiny_rtx
28460 for MODE_VECTOR_BOOL.
28461 * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
28462 of mode class checks.
28463 * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
28464 instead of a list of mode class checks.
28465 (expand_vector_scalar_condition): Likewise.
28466 (type_for_widest_vector_mode): Handle BImode as an inner mode.
28468 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28469 Alan Hayward <alan.hayward@arm.com>
28470 David Sherwood <david.sherwood@arm.com>
28472 * machmode.h (mode_size): Change from unsigned short to
28474 (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
28475 (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
28476 or if measurement_type is not polynomial.
28477 (fixed_size_mode::includes_p): Check for constant-sized modes.
28478 * genmodes.c (emit_mode_size_inline): Make mode_size_inline
28479 return a poly_uint16 rather than an unsigned short.
28480 (emit_mode_size): Change the type of mode_size from unsigned short
28481 to poly_uint16_pod. Use ZERO_COEFFS for the initializer.
28482 (emit_mode_adjustments): Cope with polynomial vector sizes.
28483 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
28485 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
28487 * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
28488 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
28489 * caller-save.c (setup_save_areas): Likewise.
28490 (replace_reg_with_saved_mem): Likewise.
28491 * calls.c (emit_library_call_value_1): Likewise.
28492 * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
28493 * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
28494 (gen_lowpart_for_combine): Likewise.
28495 * convert.c (convert_to_integer_1): Likewise.
28496 * cse.c (equiv_constant, cse_insn): Likewise.
28497 * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
28498 (cselib_subst_to_values): Likewise.
28499 * dce.c (word_dce_process_block): Likewise.
28500 * df-problems.c (df_word_lr_mark_ref): Likewise.
28501 * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
28502 * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
28503 (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
28504 (rtl_for_decl_location): Likewise.
28505 * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
28506 * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
28507 * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
28508 (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
28509 (expand_expr_real_1): Likewise.
28510 * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
28511 (pad_below): Likewise.
28512 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
28513 * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
28514 * ira.c (get_subreg_tracking_sizes): Likewise.
28515 * ira-build.c (ira_create_allocno_objects): Likewise.
28516 * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
28517 (ira_sort_regnos_for_alter_reg): Likewise.
28518 * ira-costs.c (record_operand_costs): Likewise.
28519 * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
28520 (resolve_simple_move): Likewise.
28521 * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
28522 (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
28523 (lra_constraints): Likewise.
28524 (CONST_POOL_OK_P): Reject variable-sized modes.
28525 * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
28526 (add_pseudo_to_slot, lra_spill): Likewise.
28527 * omp-low.c (omp_clause_aligned_alignment): Likewise.
28528 * optabs-query.c (get_best_extraction_insn): Likewise.
28529 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
28530 * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
28531 (expand_mult_highpart, valid_multiword_target_p): Likewise.
28532 * recog.c (offsettable_address_addr_space_p): Likewise.
28533 * regcprop.c (maybe_mode_change): Likewise.
28534 * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
28535 * regrename.c (build_def_use): Likewise.
28536 * regstat.c (dump_reg_info): Likewise.
28537 * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
28538 (find_reloads, find_reloads_subreg_address): Likewise.
28539 * reload1.c (eliminate_regs_1): Likewise.
28540 * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
28541 * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
28542 (simplify_binary_operation_1, simplify_subreg): Likewise.
28543 * targhooks.c (default_function_arg_padding): Likewise.
28544 (default_hard_regno_nregs, default_class_max_nregs): Likewise.
28545 * tree-cfg.c (verify_gimple_assign_binary): Likewise.
28546 (verify_gimple_assign_ternary): Likewise.
28547 * tree-inline.c (estimate_move_cost): Likewise.
28548 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
28549 * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
28550 (get_address_cost_ainc): Likewise.
28551 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
28552 (vect_supportable_dr_alignment): Likewise.
28553 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
28554 (vectorizable_reduction): Likewise.
28555 * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
28556 (vectorizable_operation, vectorizable_load): Likewise.
28557 * tree.c (build_same_sized_truth_vector_type): Likewise.
28558 * valtrack.c (cleanup_auto_inc_dec): Likewise.
28559 * var-tracking.c (emit_note_insn_var_location): Likewise.
28560 * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
28561 (ADDR_VEC_ALIGN): Likewise.
28563 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28564 Alan Hayward <alan.hayward@arm.com>
28565 David Sherwood <david.sherwood@arm.com>
28567 * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
28569 (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
28570 or if measurement_type is polynomial.
28571 * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
28572 * combine.c (make_extraction): Likewise.
28573 * dse.c (find_shift_sequence): Likewise.
28574 * dwarf2out.c (mem_loc_descriptor): Likewise.
28575 * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
28576 (extract_bit_field, extract_low_bits): Likewise.
28577 * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
28578 (optimize_bitfield_assignment_op, expand_assignment): Likewise.
28579 (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
28580 * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
28581 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
28582 * reload.c (find_reloads): Likewise.
28583 * reload1.c (alter_reg): Likewise.
28584 * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
28585 * targhooks.c (default_secondary_memory_needed_mode): Likewise.
28586 * tree-if-conv.c (predicate_mem_writes): Likewise.
28587 * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
28588 * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
28589 * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
28590 * valtrack.c (dead_debug_insert_temp): Likewise.
28591 * varasm.c (mergeable_constant_section): Likewise.
28592 * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
28594 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28595 Alan Hayward <alan.hayward@arm.com>
28596 David Sherwood <david.sherwood@arm.com>
28598 * expr.c (expand_assignment): Cope with polynomial mode sizes
28599 when assigning to a CONCAT.
28601 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28602 Alan Hayward <alan.hayward@arm.com>
28603 David Sherwood <david.sherwood@arm.com>
28605 * machmode.h (mode_precision): Change from unsigned short to
28607 (mode_to_precision): Return a poly_uint16 rather than an unsigned
28609 (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
28610 or if measurement_type is not polynomial.
28611 (HWI_COMPUTABLE_MODE_P): Turn into a function. Optimize the case
28612 in which the mode is already known to be a scalar_int_mode.
28613 * genmodes.c (emit_mode_precision): Change the type of mode_precision
28614 from unsigned short to poly_uint16_pod. Use ZERO_COEFFS for the
28616 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
28617 for GET_MODE_PRECISION.
28618 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
28619 for GET_MODE_PRECISION.
28620 * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
28622 (try_combine, find_split_point, combine_simplify_rtx): Likewise.
28623 (expand_field_assignment, make_extraction): Likewise.
28624 (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
28625 (get_last_value): Likewise.
28626 * convert.c (convert_to_integer_1): Likewise.
28627 * cse.c (cse_insn): Likewise.
28628 * expr.c (expand_expr_real_1): Likewise.
28629 * lra-constraints.c (simplify_operand_subreg): Likewise.
28630 * optabs-query.c (can_atomic_load_p): Likewise.
28631 * optabs.c (expand_atomic_load): Likewise.
28632 (expand_atomic_store): Likewise.
28633 * ree.c (combine_reaching_defs): Likewise.
28634 * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
28635 * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
28636 * tree.h (type_has_mode_precision_p): Likewise.
28637 * ubsan.c (instrument_si_overflow): Likewise.
28639 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28640 Alan Hayward <alan.hayward@arm.com>
28641 David Sherwood <david.sherwood@arm.com>
28643 * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
28644 polynomial numbers of units.
28645 (SET_TYPE_VECTOR_SUBPARTS): Likewise.
28646 (valid_vector_subparts_p): New function.
28647 (build_vector_type): Remove temporary shim and take the number
28648 of units as a poly_uint64 rather than an int.
28649 (build_opaque_vector_type): Take the number of units as a
28650 poly_uint64 rather than an int.
28651 * tree.c (build_vector_from_ctor): Handle polynomial
28652 TYPE_VECTOR_SUBPARTS.
28653 (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
28654 (uniform_vector_p, vector_type_mode, build_vector): Likewise.
28655 (build_vector_from_val): If the number of units is variable,
28656 use build_vec_duplicate_cst for constant operands and
28657 VEC_DUPLICATE_EXPR otherwise.
28658 (make_vector_type): Remove temporary is_constant ().
28659 (build_vector_type, build_opaque_vector_type): Take the number of
28660 units as a poly_uint64 rather than an int.
28661 (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
28663 * cfgexpand.c (expand_debug_expr): Likewise.
28664 * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
28665 (store_constructor, expand_expr_real_1): Likewise.
28666 (const_scalar_mask_from_tree): Likewise.
28667 * fold-const-call.c (fold_const_reduction): Likewise.
28668 * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
28669 (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
28670 (native_encode_vector, vec_cst_ctor_to_array): Likewise.
28671 (fold_relational_const): Likewise.
28672 (native_interpret_vector): Likewise. Change the size from an
28673 int to an unsigned int.
28674 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
28675 TYPE_VECTOR_SUBPARTS.
28676 (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
28677 (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
28678 duplicating a non-constant operand into a variable-length vector.
28679 * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
28680 TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
28681 * ipa-icf.c (sem_variable::equals): Likewise.
28682 * match.pd: Likewise.
28683 * omp-simd-clone.c (simd_clone_subparts): Likewise.
28684 * print-tree.c (print_node): Likewise.
28685 * stor-layout.c (layout_type): Likewise.
28686 * targhooks.c (default_builtin_vectorization_cost): Likewise.
28687 * tree-cfg.c (verify_gimple_comparison): Likewise.
28688 (verify_gimple_assign_binary): Likewise.
28689 (verify_gimple_assign_ternary): Likewise.
28690 (verify_gimple_assign_single): Likewise.
28691 * tree-pretty-print.c (dump_generic_node): Likewise.
28692 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
28693 (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
28694 * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
28695 (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
28696 (vect_shift_permute_load_chain): Likewise.
28697 * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
28698 (expand_vector_condition, optimize_vector_constructor): Likewise.
28699 (lower_vec_perm, get_compute_type): Likewise.
28700 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
28701 (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
28702 * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
28703 (vect_recog_mask_conversion_pattern): Likewise.
28704 * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
28705 (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
28706 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
28707 (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
28708 (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
28709 (vectorizable_shift, vectorizable_operation, vectorizable_store)
28710 (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
28711 (supportable_widening_operation): Likewise.
28712 (supportable_narrowing_operation): Likewise.
28713 * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
28715 * varasm.c (output_constant): Likewise.
28717 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28718 Alan Hayward <alan.hayward@arm.com>
28719 David Sherwood <david.sherwood@arm.com>
28721 * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
28722 so that both the length == 3 and length != 3 cases set up their
28723 own permute vectors. Add comments explaining why we know the
28724 number of elements is constant.
28725 (vect_permute_load_chain): Likewise.
28727 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28728 Alan Hayward <alan.hayward@arm.com>
28729 David Sherwood <david.sherwood@arm.com>
28731 * machmode.h (mode_nunits): Change from unsigned char to
28733 (ONLY_FIXED_SIZE_MODES): New macro.
28734 (pod_mode::measurement_type, scalar_int_mode::measurement_type)
28735 (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
28736 (complex_mode::measurement_type, fixed_size_mode::measurement_type):
28738 (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
28739 (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
28740 or if measurement_type is not polynomial.
28741 * genmodes.c (ZERO_COEFFS): New macro.
28742 (emit_mode_nunits_inline): Make mode_nunits_inline return a
28744 (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
28745 Use ZERO_COEFFS when emitting initializers.
28746 * data-streamer.h (bp_pack_poly_value): New function.
28747 (bp_unpack_poly_value): Likewise.
28748 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
28749 for GET_MODE_NUNITS.
28750 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
28751 for GET_MODE_NUNITS.
28752 * tree.c (make_vector_type): Remove temporary shim and make
28753 the real function take the number of units as a poly_uint64
28754 rather than an int.
28755 (build_vector_type_for_mode): Handle polynomial nunits.
28756 * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
28757 * emit-rtl.c (const_vec_series_p_1): Likewise.
28758 (gen_rtx_CONST_VECTOR): Likewise.
28759 * fold-const.c (test_vec_duplicate_folding): Likewise.
28760 * genrecog.c (validate_pattern): Likewise.
28761 * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
28762 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
28763 * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
28764 (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
28765 (expand_vec_cond_expr, expand_mult_highpart): Likewise.
28766 * rtlanal.c (subreg_get_info): Likewise.
28767 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
28768 (vect_grouped_load_supported): Likewise.
28769 * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
28770 * tree-vect-loop.c (have_whole_vector_shift): Likewise.
28771 * simplify-rtx.c (simplify_unary_operation_1): Likewise.
28772 (simplify_const_unary_operation, simplify_binary_operation_1)
28773 (simplify_const_binary_operation, simplify_ternary_operation)
28774 (test_vector_ops_duplicate, test_vector_ops): Likewise.
28775 (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
28776 instead of CONST_VECTOR_NUNITS.
28777 * varasm.c (output_constant_pool_2): Likewise.
28778 * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
28779 explicit-encoded elements in the XVEC for variable-length vectors.
28781 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28783 * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
28785 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28786 Alan Hayward <alan.hayward@arm.com>
28787 David Sherwood <david.sherwood@arm.com>
28789 * coretypes.h (fixed_size_mode): Declare.
28790 (fixed_size_mode_pod): New typedef.
28791 * builtins.h (target_builtins::x_apply_args_mode)
28792 (target_builtins::x_apply_result_mode): Change type to
28793 fixed_size_mode_pod.
28794 * builtins.c (apply_args_size, apply_result_size, result_vector)
28795 (expand_builtin_apply_args_1, expand_builtin_apply)
28796 (expand_builtin_return): Update accordingly.
28798 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28800 * cse.c (hash_rtx_cb): Hash only the encoded elements.
28801 * cselib.c (cselib_hash_rtx): Likewise.
28802 * expmed.c (make_tree): Build VECTOR_CSTs directly from the
28803 CONST_VECTOR encoding.
28805 2018-01-03 Jakub Jelinek <jakub@redhat.com>
28806 Jeff Law <law@redhat.com>
28809 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
28810 noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
28811 only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
28812 and add REG_CFA_ADJUST_CFA notes in that case to both insns.
28815 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
28816 explicitly probe *sp in a noreturn function if there were any callee
28817 register saves or frame pointer is needed.
28819 2018-01-03 Jakub Jelinek <jakub@redhat.com>
28822 * cfgexpand.c (expand_debug_expr): Return NULL if mode is
28823 BLKmode for ternary, binary or unary expressions.
28826 * var-tracking.c (delete_vta_debug_insn): New inline function.
28827 (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
28828 insns from get_insns () to NULL instead of each bb separately.
28829 Use delete_vta_debug_insn. No longer static.
28830 (vt_debug_insns_local, variable_tracking_main_1): Adjust
28831 delete_vta_debug_insns callers.
28832 * rtl.h (delete_vta_debug_insns): Declare.
28833 * final.c (rest_of_handle_final): Call delete_vta_debug_insns
28834 instead of variable_tracking_main.
28836 2018-01-03 Martin Sebor <msebor@redhat.com>
28838 PR tree-optimization/83603
28839 * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
28840 arguments past the endof the argument list in functions declared
28841 without a prototype.
28842 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
28843 Avoid checking when arguments are null.
28845 2018-01-03 Martin Sebor <msebor@redhat.com>
28848 * doc/extend.texi (attribute const): Fix a typo.
28849 * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
28850 issuing -Wsuggest-attribute for void functions.
28852 2018-01-03 Martin Sebor <msebor@redhat.com>
28854 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
28855 offset_int::from instead of wide_int::to_shwi.
28856 (maybe_diag_overlap): Remove assertion.
28857 Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
28858 * gimple-ssa-sprintf.c (format_directive): Same.
28859 (parse_directive): Same.
28860 (sprintf_dom_walker::compute_format_length): Same.
28861 (try_substitute_return_value): Same.
28863 2018-01-03 Jeff Law <law@redhat.com>
28865 PR middle-end/83654
28866 * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
28867 non-constant residual for zero at runtime and avoid probing in
28868 that case. Reorganize code for trailing problem to mirror handling
28871 2018-01-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
28873 PR tree-optimization/83501
28874 * tree-ssa-strlen.c (get_string_cst): New.
28875 (handle_char_store): Call get_string_cst.
28877 2018-01-03 Martin Liska <mliska@suse.cz>
28879 PR tree-optimization/83593
28880 * tree-ssa-strlen.c: Include tree-cfg.h.
28881 (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
28882 (strlen_dom_walker): Add new member variable m_cleanup_cfg.
28883 (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
28885 (strlen_dom_walker::before_dom_children): Call
28886 gimple_purge_dead_eh_edges. Dump tranformation with details
28888 (strlen_dom_walker::before_dom_children): Update call by adding
28889 new argument cleanup_eh.
28890 (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
28892 2018-01-03 Martin Liska <mliska@suse.cz>
28895 * cif-code.def (VARIADIC_THUNK): New enum value.
28896 * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
28899 2018-01-03 Jan Beulich <jbeulich@suse.com>
28901 * sse.md (mov<mode>_internal): Tighten condition for when to use
28902 vmovdqu<ssescalarsize> for TI and OI modes.
28904 2018-01-03 Jakub Jelinek <jakub@redhat.com>
28906 Update copyright years.
28908 2018-01-03 Martin Liska <mliska@suse.cz>
28911 * ipa-visibility.c (function_and_variable_visibility): Skip
28912 functions with noipa attribure.
28914 2018-01-03 Jakub Jelinek <jakub@redhat.com>
28916 * gcc.c (process_command): Update copyright notice dates.
28917 * gcov-dump.c (print_version): Ditto.
28918 * gcov.c (print_version): Ditto.
28919 * gcov-tool.c (print_version): Ditto.
28920 * gengtype.c (create_file): Ditto.
28921 * doc/cpp.texi: Bump @copying's copyright year.
28922 * doc/cppinternals.texi: Ditto.
28923 * doc/gcc.texi: Ditto.
28924 * doc/gccint.texi: Ditto.
28925 * doc/gcov.texi: Ditto.
28926 * doc/install.texi: Ditto.
28927 * doc/invoke.texi: Ditto.
28929 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28931 * vector-builder.h (vector_builder::m_full_nelts): Change from
28932 unsigned int to poly_uint64.
28933 (vector_builder::full_nelts): Update prototype accordingly.
28934 (vector_builder::new_vector): Likewise.
28935 (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
28936 (vector_builder::operator ==): Likewise.
28937 (vector_builder::finalize): Likewise.
28938 * int-vector-builder.h (int_vector_builder::int_vector_builder):
28939 Take the number of elements as a poly_uint64 rather than an
28941 * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
28942 from unsigned int to poly_uint64.
28943 (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
28944 (vec_perm_indices::new_vector): Likewise.
28945 (vec_perm_indices::length): Likewise.
28946 (vec_perm_indices::nelts_per_input): Likewise.
28947 (vec_perm_indices::input_nelts): Likewise.
28948 * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
28949 number of elements per input as a poly_uint64 rather than an
28950 unsigned int. Use the original encoding for variable-length
28951 vectors, rather than clamping each individual element.
28952 For the second and subsequent elements in each pattern,
28953 clamp the step and base before clamping their sum.
28954 (vec_perm_indices::series_p): Handle polynomial element counts.
28955 (vec_perm_indices::all_in_range_p): Likewise.
28956 (vec_perm_indices_to_tree): Likewise.
28957 (vec_perm_indices_to_rtx): Likewise.
28958 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
28959 * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
28960 (tree_vector_builder::new_binary_operation): Handle polynomial
28961 element counts. Return false if we need to know the number
28962 of elements at compile time.
28963 * fold-const.c (fold_vec_perm): Punt if the number of elements
28964 isn't known at compile time.
28966 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28968 * vec-perm-indices.h (vec_perm_builder): Change element type
28969 from HOST_WIDE_INT to poly_int64.
28970 (vec_perm_indices::element_type): Update accordingly.
28971 (vec_perm_indices::clamp): Handle polynomial element_types.
28972 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
28973 (vec_perm_indices::all_in_range_p): Likewise.
28974 (tree_to_vec_perm_builder): Check for poly_int64 trees rather
28976 * vector-builder.h (vector_builder::stepped_sequence_p): Handle
28977 polynomial vec_perm_indices element types.
28978 * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
28979 * fold-const.c (fold_vec_perm): Likewise.
28980 * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
28981 * tree-vect-generic.c (lower_vec_perm): Likewise.
28982 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
28983 * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
28984 element type to HOST_WIDE_INT.
28986 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28987 Alan Hayward <alan.hayward@arm.com>
28988 David Sherwood <david.sherwood@arm.com>
28990 * alias.c (addr_side_effect_eval): Take the size as a poly_int64
28991 rather than an int. Use plus_constant.
28992 (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
28993 Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
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 * calls.c (emit_call_1, expand_call): Change struct_value_size from
29000 a HOST_WIDE_INT to a poly_int64.
29002 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29003 Alan Hayward <alan.hayward@arm.com>
29004 David Sherwood <david.sherwood@arm.com>
29006 * calls.c (load_register_parameters): Cope with polynomial
29007 mode sizes. Require a constant size for BLKmode parameters
29008 that aren't described by a PARALLEL. If BLOCK_REG_PADDING
29009 forces a parameter to be padded at the lsb end in order to
29010 fill a complete number of words, require the parameter size
29011 to be ordered wrt UNITS_PER_WORD.
29013 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29014 Alan Hayward <alan.hayward@arm.com>
29015 David Sherwood <david.sherwood@arm.com>
29017 * reload1.c (spill_stack_slot_width): Change element type
29018 from unsigned int to poly_uint64_pod.
29019 (alter_reg): Treat mode sizes as polynomial.
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 * reload.c (complex_word_subreg_p): New function.
29026 (reload_inner_reg_of_subreg, push_reload): Use it.
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 * lra-constraints.c (process_alt_operands): Reject matched
29033 operands whose sizes aren't ordered.
29034 (match_reload): Refer to this check here.
29036 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29037 Alan Hayward <alan.hayward@arm.com>
29038 David Sherwood <david.sherwood@arm.com>
29040 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
29041 that the mode size is in the set {1, 2, 4, 8, 16}.
29043 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29044 Alan Hayward <alan.hayward@arm.com>
29045 David Sherwood <david.sherwood@arm.com>
29047 * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
29048 Use plus_constant instead of gen_rtx_PLUS.
29050 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29051 Alan Hayward <alan.hayward@arm.com>
29052 David Sherwood <david.sherwood@arm.com>
29054 * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
29055 * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
29056 * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
29057 * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
29058 * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
29059 * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
29060 * config/i386/i386-protos.h (ix86_push_rounding): Declare.
29061 * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
29062 * config/i386/i386.c (ix86_push_rounding): ...this new function.
29063 * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
29065 * config/m32c/m32c.c (m32c_push_rounding): Likewise.
29066 * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
29067 * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
29068 * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
29069 * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
29070 * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
29071 * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
29072 * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
29073 * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
29074 * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
29076 * expr.c (emit_move_resolve_push): Treat the input and result
29077 of PUSH_ROUNDING as a poly_int64.
29078 (emit_move_complex_push, emit_single_push_insn_1): Likewise.
29079 (emit_push_insn): Likewise.
29080 * lra-eliminations.c (mark_not_eliminable): Likewise.
29081 * recog.c (push_operand): Likewise.
29082 * reload1.c (elimination_effects): Likewise.
29083 * rtlanal.c (nonzero_bits1): Likewise.
29084 * calls.c (store_one_arg): Likewise. Require the padding to be
29085 known at compile time.
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 * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
29092 Use plus_constant instead of gen_rtx_PLUS.
29094 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29095 Alan Hayward <alan.hayward@arm.com>
29096 David Sherwood <david.sherwood@arm.com>
29098 * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
29099 rather than an int.
29101 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29102 Alan Hayward <alan.hayward@arm.com>
29103 David Sherwood <david.sherwood@arm.com>
29105 * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
29106 instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
29107 via stack temporaries. Treat the mode size as polynomial too.
29109 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29110 Alan Hayward <alan.hayward@arm.com>
29111 David Sherwood <david.sherwood@arm.com>
29113 * expr.c (expand_expr_real_2): When handling conversions involving
29114 unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
29115 multiplying int_size_in_bytes by BITS_PER_UNIT. Treat GET_MODE_BISIZE
29116 as a poly_uint64 too.
29118 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29119 Alan Hayward <alan.hayward@arm.com>
29120 David Sherwood <david.sherwood@arm.com>
29122 * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
29124 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29125 Alan Hayward <alan.hayward@arm.com>
29126 David Sherwood <david.sherwood@arm.com>
29128 * combine.c (can_change_dest_mode): Handle polynomial
29129 REGMODE_NATURAL_SIZE.
29130 * expmed.c (store_bit_field_1): Likewise.
29131 * expr.c (store_constructor): Likewise.
29132 * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
29133 and polynomial REGMODE_NATURAL_SIZE.
29134 (gen_lowpart_common): Likewise.
29135 * reginfo.c (record_subregs_of_mode): Likewise.
29136 * rtlanal.c (read_modify_subreg_p): Likewise.
29138 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29139 Alan Hayward <alan.hayward@arm.com>
29140 David Sherwood <david.sherwood@arm.com>
29142 * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
29143 numbers of elements.
29145 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29146 Alan Hayward <alan.hayward@arm.com>
29147 David Sherwood <david.sherwood@arm.com>
29149 * match.pd: Cope with polynomial numbers of vector elements.
29151 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29152 Alan Hayward <alan.hayward@arm.com>
29153 David Sherwood <david.sherwood@arm.com>
29155 * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
29156 in a POINTER_PLUS_EXPR.
29158 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29159 Alan Hayward <alan.hayward@arm.com>
29160 David Sherwood <david.sherwood@arm.com>
29162 * omp-simd-clone.c (simd_clone_subparts): New function.
29163 (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
29164 (ipa_simd_modify_function_body): Likewise.
29166 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29167 Alan Hayward <alan.hayward@arm.com>
29168 David Sherwood <david.sherwood@arm.com>
29170 * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
29171 (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
29172 (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
29173 (expand_vector_condition, vector_element): Likewise.
29174 (subparts_gt): New function.
29175 (get_compute_type): Use subparts_gt.
29176 (count_type_subparts): Delete.
29177 (expand_vector_operations_1): Use subparts_gt instead of
29178 count_type_subparts.
29180 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29181 Alan Hayward <alan.hayward@arm.com>
29182 David Sherwood <david.sherwood@arm.com>
29184 * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
29185 (vect_compile_time_alias): ...this new function. Do the calculation
29186 on poly_ints rather than trees.
29187 (vect_prune_runtime_alias_test_list): Update call accordingly.
29189 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29190 Alan Hayward <alan.hayward@arm.com>
29191 David Sherwood <david.sherwood@arm.com>
29193 * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
29195 (vect_schedule_slp_instance): Likewise.
29197 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29198 Alan Hayward <alan.hayward@arm.com>
29199 David Sherwood <david.sherwood@arm.com>
29201 * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
29202 constant and extern definitions for variable-length vectors.
29203 (vect_get_constant_vectors): Note that the number of units
29204 is known to be constant.
29206 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29207 Alan Hayward <alan.hayward@arm.com>
29208 David Sherwood <david.sherwood@arm.com>
29210 * tree-vect-stmts.c (vectorizable_conversion): Treat the number
29211 of units as polynomial. Choose between WIDE and NARROW based
29214 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29215 Alan Hayward <alan.hayward@arm.com>
29216 David Sherwood <david.sherwood@arm.com>
29218 * tree-vect-stmts.c (simd_clone_subparts): New function.
29219 (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
29221 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29222 Alan Hayward <alan.hayward@arm.com>
29223 David Sherwood <david.sherwood@arm.com>
29225 * tree-vect-stmts.c (vectorizable_call): Treat the number of
29226 vectors as polynomial. Use build_index_vector for
29227 IFN_GOMP_SIMD_LANE.
29229 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29230 Alan Hayward <alan.hayward@arm.com>
29231 David Sherwood <david.sherwood@arm.com>
29233 * tree-vect-stmts.c (get_load_store_type): Treat the number of
29234 units as polynomial. Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
29235 for variable-length vectors.
29236 (vectorizable_mask_load_store): Treat the number of units as
29237 polynomial, asserting that it is constant if the condition has
29238 already been enforced.
29239 (vectorizable_store, vectorizable_load): Likewise.
29241 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29242 Alan Hayward <alan.hayward@arm.com>
29243 David Sherwood <david.sherwood@arm.com>
29245 * tree-vect-loop.c (vectorizable_live_operation): Treat the number
29246 of units as polynomial. Punt if we can't tell at compile time
29247 which vector contains the final result.
29249 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29250 Alan Hayward <alan.hayward@arm.com>
29251 David Sherwood <david.sherwood@arm.com>
29253 * tree-vect-loop.c (vectorizable_induction): Treat the number
29254 of units as polynomial. Punt on SLP inductions. Use an integer
29255 VEC_SERIES_EXPR for variable-length integer reductions. Use a
29256 cast of such a series for variable-length floating-point
29259 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29260 Alan Hayward <alan.hayward@arm.com>
29261 David Sherwood <david.sherwood@arm.com>
29263 * tree.h (build_index_vector): Declare.
29264 * tree.c (build_index_vector): New function.
29265 * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
29266 of units as polynomial, forcibly converting it to a constant if
29267 vectorizable_reduction has already enforced the condition.
29268 (vect_create_epilog_for_reduction): Likewise. Use build_index_vector
29269 to create a {1,2,3,...} vector.
29270 (vectorizable_reduction): Treat the number of units as polynomial.
29271 Choose vectype_in based on the largest scalar element size rather
29272 than the smallest number of units. Enforce the restrictions
29275 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29276 Alan Hayward <alan.hayward@arm.com>
29277 David Sherwood <david.sherwood@arm.com>
29279 * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
29280 number of units as polynomial.
29282 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29283 Alan Hayward <alan.hayward@arm.com>
29284 David Sherwood <david.sherwood@arm.com>
29286 * target.h (vector_sizes, auto_vector_sizes): New typedefs.
29287 * target.def (autovectorize_vector_sizes): Return the vector sizes
29288 by pointer, using vector_sizes rather than a bitmask.
29289 * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
29290 * targhooks.c (default_autovectorize_vector_sizes): Likewise.
29291 * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
29293 * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
29294 * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
29295 * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
29296 * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
29297 * omp-general.c (omp_max_vf): Likewise.
29298 * omp-low.c (omp_clause_aligned_alignment): Likewise.
29299 * optabs-query.c (can_vec_mask_load_store_p): Likewise.
29300 * tree-vect-loop.c (vect_analyze_loop): Likewise.
29301 * tree-vect-slp.c (vect_slp_bb): Likewise.
29302 * doc/tm.texi: Regenerate.
29303 * tree-vectorizer.h (current_vector_size): Change from an unsigned int
29305 * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
29306 the vector size as a poly_uint64 rather than an unsigned int.
29307 (current_vector_size): Change from an unsigned int to a poly_uint64.
29308 (get_vectype_for_scalar_type): Update accordingly.
29309 * tree.h (build_truth_vector_type): Take the size and number of
29310 units as a poly_uint64 rather than an unsigned int.
29311 (build_vector_type): Add a temporary overload that takes
29312 the number of units as a poly_uint64 rather than an unsigned int.
29313 * tree.c (make_vector_type): Likewise.
29314 (build_truth_vector_type): Take the number of units as a poly_uint64
29315 rather than an unsigned int.
29317 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29318 Alan Hayward <alan.hayward@arm.com>
29319 David Sherwood <david.sherwood@arm.com>
29321 * target.def (get_mask_mode): Take the number of units and length
29322 as poly_uint64s rather than unsigned ints.
29323 * targhooks.h (default_get_mask_mode): Update accordingly.
29324 * targhooks.c (default_get_mask_mode): Likewise.
29325 * config/i386/i386.c (ix86_get_mask_mode): Likewise.
29326 * doc/tm.texi: Regenerate.
29328 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29329 Alan Hayward <alan.hayward@arm.com>
29330 David Sherwood <david.sherwood@arm.com>
29332 * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
29333 * omp-general.c (omp_max_vf): Likewise.
29334 * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
29335 (expand_omp_simd): Handle polynomial safelen.
29336 * omp-low.c (omplow_simd_context): Add a default constructor.
29337 (omplow_simd_context::max_vf): Change from int to poly_uint64.
29338 (lower_rec_simd_input_clauses): Update accordingly.
29339 (lower_rec_input_clauses): Likewise.
29341 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29342 Alan Hayward <alan.hayward@arm.com>
29343 David Sherwood <david.sherwood@arm.com>
29345 * tree-vectorizer.h (vect_nunits_for_cost): New function.
29346 * tree-vect-loop.c (vect_model_reduction_cost): Use it.
29347 * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
29348 (vect_analyze_slp_cost): Likewise.
29349 * tree-vect-stmts.c (vect_model_store_cost): Likewise.
29350 (vect_model_load_cost): Likewise.
29352 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29353 Alan Hayward <alan.hayward@arm.com>
29354 David Sherwood <david.sherwood@arm.com>
29356 * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
29357 (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
29358 from an unsigned int * to a poly_uint64_pod *.
29359 (calculate_unrolling_factor): New function.
29360 (vect_analyze_slp_instance): Use it. Track polynomial max_nunits.
29362 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29363 Alan Hayward <alan.hayward@arm.com>
29364 David Sherwood <david.sherwood@arm.com>
29366 * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
29367 from an unsigned int to a poly_uint64.
29368 (_loop_vec_info::slp_unrolling_factor): Likewise.
29369 (_loop_vec_info::vectorization_factor): Change from an int
29371 (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
29372 (vect_get_num_vectors): New function.
29373 (vect_update_max_nunits, vect_vf_for_cost): Likewise.
29374 (vect_get_num_copies): Use vect_get_num_vectors.
29375 (vect_analyze_data_ref_dependences): Change max_vf from an int *
29376 to an unsigned int *.
29377 (vect_analyze_data_refs): Change min_vf from an int * to a
29379 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
29380 than an unsigned HOST_WIDE_INT.
29381 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
29382 (vect_analyze_data_ref_dependence): Change max_vf from an int *
29383 to an unsigned int *.
29384 (vect_analyze_data_ref_dependences): Likewise.
29385 (vect_compute_data_ref_alignment): Handle polynomial vf.
29386 (vect_enhance_data_refs_alignment): Likewise.
29387 (vect_prune_runtime_alias_test_list): Likewise.
29388 (vect_shift_permute_load_chain): Likewise.
29389 (vect_supportable_dr_alignment): Likewise.
29390 (dependence_distance_ge_vf): Take the vectorization factor as a
29391 poly_uint64 rather than an unsigned HOST_WIDE_INT.
29392 (vect_analyze_data_refs): Change min_vf from an int * to a
29394 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
29395 vfm1 as a poly_uint64 rather than an int. Make the same change
29396 for the returned bound_scalar.
29397 (vect_gen_vector_loop_niters): Handle polynomial vf.
29398 (vect_do_peeling): Likewise. Update call to
29399 vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
29400 (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
29402 * tree-vect-loop.c (vect_determine_vectorization_factor)
29403 (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
29404 (vect_get_known_peeling_cost): Likewise.
29405 (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
29406 (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
29407 (vect_transform_loop): Likewise. Use the lowest possible VF when
29408 updating the upper bounds of the loop.
29409 (vect_min_worthwhile_factor): Make static. Return an unsigned int
29410 rather than an int.
29411 * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
29412 polynomial unroll factors.
29413 (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
29414 (vect_make_slp_decision): Likewise.
29415 (vect_supported_load_permutation_p): Likewise, and polynomial
29417 (vect_analyze_slp_cost): Handle polynomial vf.
29418 (vect_slp_analyze_node_operations): Likewise.
29419 (vect_slp_analyze_bb_1): Likewise.
29420 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
29421 than an unsigned HOST_WIDE_INT.
29422 * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
29423 (vectorizable_load): Handle polynomial vf.
29424 * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
29426 (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
29428 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29429 Alan Hayward <alan.hayward@arm.com>
29430 David Sherwood <david.sherwood@arm.com>
29432 * match.pd: Handle bit operations involving three constants
29433 and try to fold one pair.
29435 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29437 * tree-vect-loop-manip.c: Include gimple-fold.h.
29438 (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
29439 niters_maybe_zero parameters. Handle other cases besides a step of 1.
29440 (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
29441 Add a path that uses a step of VF instead of 1, but disable it
29443 (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
29444 and niters_no_overflow parameters. Update calls to
29445 slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
29446 Create a new SSA name if the latter choses to use a ste other
29447 than zero, and return it via niters_vector_mult_vf_var.
29448 * tree-vect-loop.c (vect_transform_loop): Update calls to
29449 vect_do_peeling, vect_gen_vector_loop_niters and
29450 slpeel_make_loop_iterate_ntimes.
29451 * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
29452 (vect_gen_vector_loop_niters): Update declarations after above changes.
29454 2018-01-02 Michael Meissner <meissner@linux.vnet.ibm.com>
29456 * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
29457 128-bit round to integer instructions.
29458 (ceil<mode>2): Likewise.
29459 (btrunc<mode>2): Likewise.
29460 (round<mode>2): Likewise.
29462 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
29464 * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
29465 unaligned VSX load/store on P8/P9.
29466 (expand_block_clear): Allow the use of unaligned VSX
29467 load/store on P8/P9.
29469 2018-01-02 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
29471 * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
29473 (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
29474 swap associated with both a load and a store.
29476 2018-01-02 Andrew Waterman <andrew@sifive.com>
29478 * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
29479 * config/riscv/riscv.md (clear_cache): Use it.
29481 2018-01-02 Artyom Skrobov <tyomitch@gmail.com>
29483 * web.c: Remove out-of-date comment.
29485 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
29487 * expr.c (fixup_args_size_notes): Check that any existing
29488 REG_ARGS_SIZE notes are correct, and don't try to re-add them.
29489 (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
29490 (emit_single_push_insn): ...here.
29492 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
29494 * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
29495 (const_vector_encoded_nelts): New function.
29496 (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
29497 (const_vector_int_elt, const_vector_elt): Declare.
29498 * emit-rtl.c (const_vector_int_elt_1): New function.
29499 (const_vector_elt): Likewise.
29500 * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
29501 of CONST_VECTOR_ELT.
29503 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
29505 * expr.c: Include rtx-vector-builder.h.
29506 (const_vector_mask_from_tree): Use rtx_vector_builder and operate
29507 directly on the tree encoding.
29508 (const_vector_from_tree): Likewise.
29509 * optabs.c: Include rtx-vector-builder.h.
29510 (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
29511 sequence of "u" values.
29512 * vec-perm-indices.c: Include rtx-vector-builder.h.
29513 (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
29514 directly on the vec_perm_indices encoding.
29516 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
29518 * doc/rtl.texi (const_vector): Describe new encoding scheme.
29519 * Makefile.in (OBJS): Add rtx-vector-builder.o.
29520 * rtx-vector-builder.h: New file.
29521 * rtx-vector-builder.c: Likewise.
29522 * rtl.h (rtx_def::u2): Add a const_vector field.
29523 (CONST_VECTOR_NPATTERNS): New macro.
29524 (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
29525 (CONST_VECTOR_DUPLICATE_P): Likewise.
29526 (CONST_VECTOR_STEPPED_P): Likewise.
29527 (CONST_VECTOR_ENCODED_ELT): Likewise.
29528 (const_vec_duplicate_p): Check for a duplicated vector encoding.
29529 (unwrap_const_vec_duplicate): Likewise.
29530 (const_vec_series_p): Check for a non-duplicated vector encoding.
29531 Say that the function only returns true for integer vectors.
29532 * emit-rtl.c: Include rtx-vector-builder.h.
29533 (gen_const_vec_duplicate_1): Delete.
29534 (gen_const_vector): Call gen_const_vec_duplicate instead of
29535 gen_const_vec_duplicate_1.
29536 (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
29537 (gen_const_vec_duplicate): Use rtx_vector_builder.
29538 (gen_const_vec_series): Likewise.
29539 (gen_rtx_CONST_VECTOR): Likewise.
29540 * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
29541 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
29542 Build a new vector rather than modifying a CONST_VECTOR in-place.
29543 (handle_special_swappables): Update call accordingly.
29544 * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
29545 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
29546 Build a new vector rather than modifying a CONST_VECTOR in-place.
29547 (handle_special_swappables): Update call accordingly.
29549 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
29551 * simplify-rtx.c (simplify_const_binary_operation): Use
29552 CONST_VECTOR_ELT instead of XVECEXP.
29554 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
29556 * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
29557 the selector elements to be different from the data elements
29558 if the selector is a VECTOR_CST.
29559 * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
29560 ssizetype for the selector.
29562 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
29564 * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
29565 before testing each element individually.
29566 * tree-vect-generic.c (lower_vec_perm): Likewise.
29568 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
29570 * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
29571 * selftest-run-tests.c (selftest::run_tests): Call it.
29572 * vector-builder.h (vector_builder::operator ==): New function.
29573 (vector_builder::operator !=): Likewise.
29574 * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
29575 (vec_perm_indices::all_from_input_p): New function.
29576 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
29577 (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
29578 * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
29579 instead of reading the VECTOR_CST directly. Detect whether both
29580 vector inputs are the same before constructing the vec_perm_indices,
29581 and update the number of inputs argument accordingly. Use the
29582 utility functions added above. Only construct sel2 if we need to.
29584 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
29586 * optabs.c (expand_vec_perm_var): Use an explicit encoding for
29587 the broadcast of the low byte.
29588 (expand_mult_highpart): Use an explicit encoding for the permutes.
29589 * optabs-query.c (can_mult_highpart_p): Likewise.
29590 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
29591 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
29592 (vectorizable_bswap): Likewise.
29593 * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
29594 explicit encoding for the power-of-2 permutes.
29595 (vect_permute_store_chain): Likewise.
29596 (vect_grouped_load_supported): Likewise.
29597 (vect_permute_load_chain): Likewise.
29599 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
29601 * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
29602 * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
29603 * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
29604 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
29605 * tree-vect-stmts.c (vectorizable_bswap): Likewise.
29606 (vect_gen_perm_mask_any): Likewise.
29608 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
29610 * int-vector-builder.h: New file.
29611 * vec-perm-indices.h: Include int-vector-builder.h.
29612 (vec_perm_indices): Redefine as an int_vector_builder.
29613 (auto_vec_perm_indices): Delete.
29614 (vec_perm_builder): Redefine as a stand-alone class.
29615 (vec_perm_indices::vec_perm_indices): New function.
29616 (vec_perm_indices::clamp): Likewise.
29617 * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
29618 (vec_perm_indices::new_vector): New function.
29619 (vec_perm_indices::new_expanded_vector): Update for new
29620 vec_perm_indices class.
29621 (vec_perm_indices::rotate_inputs): New function.
29622 (vec_perm_indices::all_in_range_p): Operate directly on the
29623 encoded form, without computing elided elements.
29624 (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
29625 encoding. Update for new vec_perm_indices class.
29626 * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
29627 the given vec_perm_builder.
29628 (expand_vec_perm_var): Update vec_perm_builder constructor.
29629 (expand_mult_highpart): Use vec_perm_builder instead of
29630 auto_vec_perm_indices.
29631 * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
29632 vec_perm_indices instead of auto_vec_perm_indices. Use a single
29633 or double series encoding as appropriate.
29634 * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
29635 vec_perm_indices instead of auto_vec_perm_indices.
29636 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
29637 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
29638 (vect_permute_store_chain): Likewise.
29639 (vect_grouped_load_supported): Likewise.
29640 (vect_permute_load_chain): Likewise.
29641 (vect_shift_permute_load_chain): Likewise.
29642 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
29643 (vect_transform_slp_perm_load): Likewise.
29644 (vect_schedule_slp_instance): Likewise.
29645 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
29646 (vectorizable_mask_load_store): Likewise.
29647 (vectorizable_bswap): Likewise.
29648 (vectorizable_store): Likewise.
29649 (vectorizable_load): Likewise.
29650 * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
29651 vec_perm_indices instead of auto_vec_perm_indices. Use
29652 tree_to_vec_perm_builder to read the vector from a tree.
29653 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
29654 vec_perm_builder instead of a vec_perm_indices.
29655 (have_whole_vector_shift): Use vec_perm_builder and
29656 vec_perm_indices instead of auto_vec_perm_indices. Leave the
29657 truncation to calc_vec_perm_mask_for_shift.
29658 (vect_create_epilog_for_reduction): Likewise.
29659 * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
29660 from auto_vec_perm_indices to vec_perm_indices.
29661 (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
29662 instead of changing individual elements.
29663 (aarch64_vectorize_vec_perm_const): Use new_vector to install
29664 the vector in d.perm.
29665 * config/arm/arm.c (expand_vec_perm_d::perm): Change
29666 from auto_vec_perm_indices to vec_perm_indices.
29667 (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
29668 instead of changing individual elements.
29669 (arm_vectorize_vec_perm_const): Use new_vector to install
29670 the vector in d.perm.
29671 * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
29672 Update vec_perm_builder constructor.
29673 (rs6000_expand_interleave): Likewise.
29674 * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
29675 (rs6000_expand_interleave): Likewise.
29677 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
29679 * optabs-query.c (can_vec_perm_var_p): Check whether lowering
29680 to qimode could truncate the indices.
29681 * optabs.c (expand_vec_perm_var): Likewise.
29683 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
29685 * Makefile.in (OBJS): Add vec-perm-indices.o.
29686 * vec-perm-indices.h: New file.
29687 * vec-perm-indices.c: Likewise.
29688 * target.h (vec_perm_indices): Replace with a forward class
29690 (auto_vec_perm_indices): Move to vec-perm-indices.h.
29691 * optabs.h: Include vec-perm-indices.h.
29692 (expand_vec_perm): Delete.
29693 (selector_fits_mode_p, expand_vec_perm_var): Declare.
29694 (expand_vec_perm_const): Declare.
29695 * target.def (vec_perm_const_ok): Replace with...
29696 (vec_perm_const): ...this new hook.
29697 * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
29698 (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
29699 * doc/tm.texi: Regenerate.
29700 * optabs.def (vec_perm_const): Delete.
29701 * doc/md.texi (vec_perm_const): Likewise.
29702 (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
29703 * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
29704 expand_vec_perm for constant permutation vectors. Assert that
29705 the mode of variable permutation vectors is the integer equivalent
29706 of the mode that is being permuted.
29707 * optabs-query.h (selector_fits_mode_p): Declare.
29708 * optabs-query.c: Include vec-perm-indices.h.
29709 (selector_fits_mode_p): New function.
29710 (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
29711 is defined, instead of checking whether the vec_perm_const_optab
29712 exists. Use targetm.vectorize.vec_perm_const instead of
29713 targetm.vectorize.vec_perm_const_ok. Check whether the indices
29714 fit in the vector mode before using a variable permute.
29715 * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
29716 vec_perm_indices instead of an rtx.
29717 (expand_vec_perm): Replace with...
29718 (expand_vec_perm_const): ...this new function. Take the selector
29719 as a vec_perm_indices rather than an rtx. Also take the mode of
29720 the selector. Update call to shift_amt_for_vec_perm_mask.
29721 Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
29722 Use vec_perm_indices::new_expanded_vector to expand the original
29723 selector into bytes. Check whether the indices fit in the vector
29724 mode before using a variable permute.
29725 (expand_vec_perm_var): Make global.
29726 (expand_mult_highpart): Use expand_vec_perm_const.
29727 * fold-const.c: Includes vec-perm-indices.h.
29728 * tree-ssa-forwprop.c: Likewise.
29729 * tree-vect-data-refs.c: Likewise.
29730 * tree-vect-generic.c: Likewise.
29731 * tree-vect-loop.c: Likewise.
29732 * tree-vect-slp.c: Likewise.
29733 * tree-vect-stmts.c: Likewise.
29734 * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
29736 * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
29737 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
29738 (aarch64_vectorize_vec_perm_const_ok): Fuse into...
29739 (aarch64_vectorize_vec_perm_const): ...this new function.
29740 (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
29741 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
29742 * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
29743 * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
29744 * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
29745 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
29746 (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
29748 (arm_vectorize_vec_perm_const): ...this new function. Explicitly
29749 check for NEON modes.
29750 * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
29751 * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
29752 * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
29753 (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
29755 (ix86_vectorize_vec_perm_const): ...this new function. Incorporate
29756 the old VEC_PERM_CONST conditions.
29757 * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
29758 * config/ia64/vect.md (vec_perm_const<mode>): Delete.
29759 * config/ia64/ia64.c (ia64_expand_vec_perm_const)
29760 (ia64_vectorize_vec_perm_const_ok): Merge into...
29761 (ia64_vectorize_vec_perm_const): ...this new function.
29762 * config/mips/loongson.md (vec_perm_const<mode>): Delete.
29763 * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
29764 * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
29765 * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
29766 * config/mips/mips.c (mips_expand_vec_perm_const)
29767 (mips_vectorize_vec_perm_const_ok): Merge into...
29768 (mips_vectorize_vec_perm_const): ...this new function.
29769 * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
29770 * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
29771 * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
29772 * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
29773 * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
29774 (rs6000_expand_vec_perm_const): Delete.
29775 * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
29777 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
29778 (altivec_expand_vec_perm_const_le): Take each operand individually.
29779 Operate on constant selectors rather than rtxes.
29780 (altivec_expand_vec_perm_const): Likewise. Update call to
29781 altivec_expand_vec_perm_const_le.
29782 (rs6000_expand_vec_perm_const): Delete.
29783 (rs6000_vectorize_vec_perm_const_ok): Delete.
29784 (rs6000_vectorize_vec_perm_const): New function.
29785 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
29786 an element count and rtx array.
29787 (rs6000_expand_extract_even): Update call accordingly.
29788 (rs6000_expand_interleave): Likewise.
29789 * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
29790 * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
29791 * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
29792 * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
29793 (rs6000_expand_vec_perm_const): Delete.
29794 * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
29795 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
29796 (altivec_expand_vec_perm_const_le): Take each operand individually.
29797 Operate on constant selectors rather than rtxes.
29798 (altivec_expand_vec_perm_const): Likewise. Update call to
29799 altivec_expand_vec_perm_const_le.
29800 (rs6000_expand_vec_perm_const): Delete.
29801 (rs6000_vectorize_vec_perm_const_ok): Delete.
29802 (rs6000_vectorize_vec_perm_const): New function. Remove stray
29803 reference to the SPE evmerge intructions.
29804 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
29805 an element count and rtx array.
29806 (rs6000_expand_extract_even): Update call accordingly.
29807 (rs6000_expand_interleave): Likewise.
29808 * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
29809 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
29811 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
29813 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
29815 * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
29816 vector mode and that that mode matches the mode of the data
29818 (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
29819 out into expand_vec_perm_var. Do all CONST_VECTOR handling here,
29820 directly using expand_vec_perm_1 when forcing selectors into
29822 (expand_vec_perm_var): New function, split out from expand_vec_perm.
29824 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
29826 * optabs-query.h (can_vec_perm_p): Delete.
29827 (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
29828 * optabs-query.c (can_vec_perm_p): Split into...
29829 (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
29830 (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
29831 particular selector is valid.
29832 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
29833 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
29834 (vect_grouped_load_supported): Likewise.
29835 (vect_shift_permute_load_chain): Likewise.
29836 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
29837 (vect_transform_slp_perm_load): Likewise.
29838 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
29839 (vectorizable_bswap): Likewise.
29840 (vect_gen_perm_mask_checked): Likewise.
29841 * fold-const.c (fold_ternary_loc): Likewise. Don't take
29842 implementations of variable permutation vectors into account
29843 when deciding which selector to use.
29844 * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
29845 vec_perm_const_optab is supported; instead use can_vec_perm_const_p
29846 with a false third argument.
29847 * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
29848 to test whether the constant selector is valid and can_vec_perm_var_p
29849 to test whether a variable selector is valid.
29851 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
29853 * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
29854 * optabs-query.c (can_vec_perm_p): Likewise.
29855 * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
29856 instead of vec_perm_indices.
29857 * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
29858 (vect_gen_perm_mask_checked): Likewise,
29859 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
29860 (vect_gen_perm_mask_checked): Likewise,
29862 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
29864 * optabs-query.h (qimode_for_vec_perm): Declare.
29865 * optabs-query.c (can_vec_perm_p): Split out qimode search to...
29866 (qimode_for_vec_perm): ...this new function.
29867 * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
29869 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
29871 * rtlanal.c (canonicalize_condition): Return 0 if final rtx
29872 does not have a conditional at the top.
29874 2018-01-02 Richard Biener <rguenther@suse.de>
29876 * ipa-inline.c (big_speedup_p): Fix expression.
29878 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
29881 * config/i386/x86-tune-costs.h: Increase cost of integer load costs
29884 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
29888 * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
29889 cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
29890 and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
29891 cond_taken_branch_cost 3->4.
29893 2018-01-01 Jakub Jelinek <jakub@redhat.com>
29895 PR tree-optimization/83581
29896 * tree-loop-distribution.c (pass_loop_distribution::execute): Return
29897 TODO_cleanup_cfg if any changes have been made.
29899 PR middle-end/83608
29900 * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
29901 convert_modes if target mode has the right side, but different mode
29904 PR middle-end/83609
29905 * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
29906 last argument when extracting from CONCAT. If either from_real or
29907 from_imag is NULL, use expansion through memory. If result is not
29908 a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
29909 the parts directly to inner mode, if even that fails, use expansion
29912 PR middle-end/83623
29913 * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
29914 check for bswap in mode rather than HImode and use that in expand_unop
29917 Copyright (C) 2018 Free Software Foundation, Inc.
29919 Copying and distribution of this file, with or without modification,
29920 are permitted in any medium without royalty provided the copyright
29921 notice and this notice are preserved.