1 2018-10-31 Richard Biener <rguenther@suse.de>
5 * tree-outof-ssa.c (insert_backedge_copies): Restrict
6 copy generation to useful cases. Place the copy before
7 the definition of the backedge value when possible.
9 2018-10-31 Claudiu Zissulescu <claziss@synopsys.com>
11 * config/arc/arc-arch.h (ARC_TUNE_ARC7XX): New tune value.
12 * config/arc/arc.c (arc_active_insn): New function.
13 (check_store_cacheline_hazard): Likewise.
14 (workaround_arc_anomaly): Use check_store_cacheline_hazard.
15 (arc_override_options): Disable delay slot scheduler for older
17 (arc_store_addr_hazard_p): New implementation, old one renamed to
19 (arc_store_addr_hazard_internal_p): Renamed.
20 (arc_reorg): Don't combine into brcc instructions which are part
21 of hardware hazard solution.
22 * config/arc/arc.md (attr tune): Consider new arc7xx tune value.
23 (tune_arc700): Likewise.
24 * config/arc/arc.opt (arc7xx): New tune value.
25 * config/arc/arc700.md: Improve A7 scheduler.
27 2018-10-31 Claudiu Zissulescu <claziss@synopsys.com>
29 * config/arc/arc.c (arc_override_options): Remove
30 TARGET_COMPACT_CASESI.
31 * config/arc/arc.h (ASM_OUTPUT_ADDR_DIFF_ELT): Update.
32 (CASE_VECTOR_MODE): Likewise.
33 (CASE_VECTOR_PC_RELATIVE): Likewise.
34 (CASE_VECTOR_SHORTEN_MODE): Likewise.
35 (CASE_VECTOR_SHORTEN_MODE1): Delete.
36 (ADDR_VEC_ALIGN): Update.
37 (ASM_OUTPUT_CASE_LABEL): Undefine.
38 (ASM_OUTPUT_BEFORE_CASE_LABEL): Undefine.
39 (TARGET_BI_BIH): Define.
40 (DEFAULT_BRANCH_INDEX): Likewise.
41 * config/arc/arc.md (casesi): Rework to accept BI/BIH
42 instructions, remove compact_casesi use case.
43 (casesi_compact_jump): Remove.
44 (casesi_dispatch): New pattern.
45 * config/arc/arc.opt: Add mbranch-index option. Deprecate
46 compact_casesi option.
47 * doc/invoke.texi: Document mbranch-index option.
49 2018-10-31 Claudiu Zissulescu <claziss@synopsys.com>
51 * config/arc/arc.c (arc_get_tp): Remove function.
52 (arc_emit_call_tls_get_addr): Likewise.
53 (arc_call_tls_get_addr): New function.
54 (arc_legitimize_tls_address): Make use of arc_call_tls_get_addr.
55 * config/arc/arc.md (tls_load_tp_soft): Remove.
56 (tls_gd_get_addr): Likewise.
58 2018-10-31 Claudiu Zissulescu <claziss@synopsys.com>
60 * config/arc/arc.md (mulsi3): Remove call to mulsi_600_lib.
61 (mulsi3_600_lib): Remove pattern.
62 (umulsi3_highpart_600_lib_le): Likewise.
63 (umulsi3_highpart): Remove call to umulsi3_highpart_600_lib_le.
64 (umulsidi3): Remove call to umulsidi3_600_lib.
65 (umulsidi3_600_lib): Remove pattern.
66 (peephole2): Remove peephole using the above deprecated patterns.
68 2018-10-31 Thomas Preud'homme <thomas.preudhomme@linaro.org>
71 * config/arm/arm.c (arm_option_check_internal): Disable the combined
72 use of -mslow-flash-data and -mword-relocations.
73 (arm_option_override): Enable -mword-relocations if -fpic or -fPIC.
74 * config/arm/arm.md (SYMBOL_REF MOVT splitter): Stop checking for
76 * doc/invoke.texi (-mword-relocations): Mention conflict with
78 (-mslow-flash-data): Reciprocally.
80 2018-10-31 Richard Henderson <richard.henderson@linaro.org>
82 * config/aarch64/aarch64.c (aarch64_hard_regno_mode_ok): Force
83 16-byte modes held in GP registers to use an even regno.
85 * config/aarch64/aarch64.c (aarch64_emit_bic): Remove.
86 (aarch64_atomic_ldop_supported_p): Remove.
87 (aarch64_gen_atomic_ldop): Remove.
88 * config/aarch64/atomic.md (atomic_<atomic_optab><ALLI>):
89 Fully expand LSE operations here.
90 (atomic_fetch_<atomic_optab><ALLI>): Likewise.
91 (atomic_<atomic_optab>_fetch<ALLI>): Likewise.
92 (aarch64_atomic_<ATOMIC_LDOP><ALLI>_lse): Drop atomic_op iterator
93 and use ATOMIC_LDOP instead; use register_operand for the input;
94 drop the split and emit insns directly.
95 (aarch64_atomic_fetch_<ATOMIC_LDOP><ALLI>_lse): Likewise.
96 (aarch64_atomic_<atomic_op>_fetch<ALLI>_lse): Remove.
97 (@aarch64_atomic_load<ATOMIC_LDOP><ALLI>): Remove.
99 * config/aarch64/aarch64.c (aarch64_emit_atomic_swap): Remove.
100 (aarch64_gen_atomic_ldop): Don't call it.
101 * config/aarch64/atomics.md (atomic_exchange<ALLI>):
102 Use aarch64_reg_or_zero.
103 (aarch64_atomic_exchange<ALLI>): Likewise.
104 (aarch64_atomic_exchange<ALLI>_lse): Remove split; remove & from
105 operand 0; use aarch64_reg_or_zero for input; merge ...
106 (@aarch64_atomic_swp<ALLI>): ... this and remove.
108 * config/aarch64/aarch64.c (aarch64_gen_compare_reg_maybe_ze): New.
109 (aarch64_split_compare_and_swap): Use it.
110 (aarch64_expand_compare_and_swap): Likewise. Remove convert_modes;
111 test oldval against the proper predicate.
112 * config/aarch64/atomics.md (@atomic_compare_and_swap<ALLI>):
113 Use nonmemory_operand for expected.
114 (cas_short_expected_pred): New.
115 (@aarch64_compare_and_swap<SHORT>): Use it; use "rn" not "rI" to match.
116 (@aarch64_compare_and_swap<GPI>): Use "rn" not "rI" for expected.
117 * config/aarch64/predicates.md (aarch64_plushi_immediate): New.
118 (aarch64_plushi_operand): New.
120 * config/aarch64/aarch64.c (aarch64_expand_compare_and_swap):
121 Force oldval into the rval register for TARGET_LSE; emit the compare
122 during initial expansion so that it may be deleted if unused.
123 (aarch64_gen_atomic_cas): Remove.
124 * config/aarch64/atomics.md (@aarch64_compare_and_swap<SHORT>_lse):
125 Change =&r to +r for operand 0; use match_dup for operand 2;
126 remove is_weak and mod_f operands as unused. Drop the split
128 (@aarch64_atomic_cas<SHORT>): ... this pattern's output; remove.
129 (@aarch64_compare_and_swap<GPI>_lse): Similarly.
130 (@aarch64_atomic_cas<GPI>): Similarly.
132 2018-10-31 Richard Biener <rguenther@suse.de>
134 * tree-eh.c (replace_trapping_overflow): Simplify ABS_EXPR case
137 2018-10-31 Sameera Deshpande <sameera.deshpande@linaro.org>
139 * config/aarch64/aarch64-cores.def (saphira): Use saphira pipeline.
140 * config/aarch64/aarch64.md: Include saphira.md
141 * config/aarch64/saphira.md: New file for pipeline description.
143 2018-10-30 Martin Sebor <msebor@redhat.com>
146 * gimple-ssa-sprintf.c (format_directive): Use %G to include
148 (sprintf_dom_walker::compute_format_length):
149 Avoid setting POSUNDER4K here.
150 (get_destination_size): Handle null argument values.
151 (get_user_idx_format): New function.
152 (sprintf_dom_walker::handle_gimple_call): Handle all printf-like
153 functions, including user-defined with attribute format printf.
154 Use %G to include inlining context.
157 2018-10-30 Jan Hubicka <jh@suse.cz>
159 * params.def (lto-partitions): Bump from 32 to 128.
161 2018-10-30 Jan Hubicka <jh@suse.cz>
164 (free_lang_data_d, add_tree_to_fld_list, fld_worklist_push): Move
166 (free_lang_data_in_type): Forward declare.
167 (fld_type_variant_equal_p): New function.
168 (fld_type_variant): New function
169 (fld_incomplete_types): New hash.
170 (fld_incomplete_type_of): New function
171 (fld_simplfied-type): New function.
172 (free_lang_data_in_decl): Add fld parameter; simplify type of FIELD_DECL
173 (free_lang_data): Allocate and free fld_incomplete_type; update call
174 of free_lang_data_in_decl.
176 2018-10-30 Eric Botcazou <ebotcazou@adacore.com>
178 * gcov.c (output_lines): Remove duplicate line.
180 2018-10-30 Aaron Sawdey <acsawdey@linux.ibm.com>
182 * config/rs6000/rs6000.md (bswapdi2): Force address into register
183 if not in indexed or indirect form.
184 (bswapdi2_load): Change predicate to indexed_or_indirect_operand.
185 (bswapdi2_store): Ditto.
186 * config/rs6000/rs6000.c (rs6000_force_indexed_or_indirect_mem): New
188 * config/rs6000/rs6000-protos.h (rs6000_force_indexed_or_indirect_mem):
189 Prototype for helper function.
191 2018-10-30 Martin Sebor <msebor@redhat.com>
193 * doc/extend.texi (optimize): Clarify/expand attribute documentation.
194 (target, pragma GCC optimize, pragma GCC target): Ditto.
196 2018-10-30 Jonathan Wakely <jwakely@redhat.com>
198 * doc/extend.texi: Fix prototype and description of
199 __builtin_expect_with_probability.
201 2018-10-30 Michael Ploujnikov <michael.ploujnikov@oracle.com>
203 * cgraph.h (clone_function_name_1): Replaced by new
204 clone_function_name_numbered that takes name as string; for
205 privatize_symbol_name_1 use only.
206 (clone_function_name): Renamed to
207 clone_function_name_numbered to be explicit about numbering.
208 (clone_function_name): New two-argument function that does
209 not number its output.
210 (clone_function_name): New three-argument function that
211 takes a number to append to its output.
212 * cgraphclones.c (duplicate_thunk_for_node):
213 (clone_function_name_1): Renamed.
214 (clone_function_name_numbered): Two new functions.
215 (clone_function_name): Improved documentation.
216 (cgraph_node::create_virtual_clone): Use clone_function_name_numbered.
217 * config/rs6000/rs6000.c (make_resolver_func): Ditto.
218 * final.c (final_scan_insn_1): Use the new clone_function_name
220 * multiple_target.c (create_dispatcher_calls): Ditto.
221 (create_target_clone): Ditto.
222 * omp-expand.c (grid_expand_target_grid_body): Ditto.
223 * omp-low.c (create_omp_child_function_name): Ditto.
224 * omp-simd-clone.c (simd_clone_create): Ditto.
225 * symtab.c (simd_symtab_node::noninterposable_alias): Use the
226 new clone_function_name without numbering.
228 2018-10-30 Richard Earnshaw <rearnsha@arm.com>
230 * alloc-pool.h (base_pool_allocator <TBlockAllocator>::initialize):
231 Assert that the allocation size is not zero.
233 2018-10-30 Richard Biener <rguenther@suse.de>
235 PR tree-optimization/87800
236 * tree-vect-slp.c (vect_build_slp_tree_2): Reject any
237 non-induction or reduction PHIs.
239 2018-10-30 Sameera Deshpande <sameera.deshpande@linaro.org
241 * config/aarch64/falkor-tag-collision-avoidance.c
242 (execute_tag_collision_avoidance): Call df_note_add_problem.
244 2018-10-30 Martin Liska <mliska@suse.cz>
246 * doc/extend.texi: Fix typo in documentation
247 of __builtin_expect_with_probability.
249 2018-10-29 David Malcolm <dmalcolm@redhat.com>
252 * input.c (get_substring_ranges_for_loc): Detect if
253 linemap_resolve_location gives us a NULL map, and reject
256 2018-10-29 Iain Buclaw <ibuclaw@gdcproject.org>
258 * config.gcc (xstormy16-*-elf): Set tm_d_file.
260 2018-10-29 David Malcolm <dmalcolm@redhat.com>
261 Martin Sebor <msebor@redhat.com>
262 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
264 * doc/ux.texi (Quoting): New subsection, adapted from material at
265 https://gcc.gnu.org/wiki/DiagnosticsGuidelines written by
266 MartinSebor and ManuelLopezIbanez.
267 (Fix-it hints): Note that fix-it hints shouldn't be marked for
270 2018-10-29 Kugan Vivekanandarajah <kuganv@linaro.org>
273 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Fix niter
276 2018-10-29 Paul A. Clarke <pc@us.ibm.com>
278 * gcc.target/powerpc/ssse3-check.h: Remove inaccurate comment.
280 2018-10-29 Paul Koning <ni1d@arrl.net>
282 * doc/rtl.texi (CONST_WIDE_INT_ELT): Give correct macro name.
284 2018-10-29 Paul A. Clarke <pc@us.ibm.com>
286 * gcc/config/rs6000/mmintrin.h (_mm_packs_pi16, _mm_packs_pi32,
287 _mm_packs_pu16, _mm_unpackhi_pi8, _mm_unpacklo_pi8, _mm_add_pi8,
288 _mm_add_pi16, _mm_add_pi32, _mm_sub_pi8, _mm_sub_pi16, _mm_sub_pi32,
289 _mm_cmpgt_pi8, _mm_cmpeq_pi16, _mm_cmpgt_pi16, _mm_cmpeq_pi32,
290 _mm_cmpgt_pi32, _mm_adds_pi8, _mm_adds_pi16, _mm_adds_pu8,
291 _mm_adds_pu16, _mm_subs_pi8, _mm_subs_pi16, _mm_subs_pu8,
292 _mm_subs_pu16, _mm_madd_pi16, _mm_mulhi_pi16, _mm_mullo_pi16,
293 _mm_sll_pi16, _mm_sra_pi16, _mm_srl_pi16, _mm_set1_pi16, _mm_set1_pi8):
294 Change 'vector' to '__vector'.
295 * gcc/config/rs6000/xmmintrin.h (_mm_cvtps_pi32, _mm_cvttps_pi32,
296 _mm_cvtps_pi16, _mm_cvtps_pi8, _mm_max_pi16, _mm_max_pu8, _mm_min_pi16,
297 _mm_min_pu8, _mm_mulhi_pu16, _mm_shuffle_pi16, _mm_avg_pu8,
298 _mm_avg_pu16): Likewise. And, whitespace corrections.
300 2018-10-29 Richard Biener <rguenther@suse.de>
302 PR tree-optimization/87785
303 * tree-vect-slp.c (vect_gather_slp_loads): Only gather
306 2018-10-29 Olivier Hainque <hainque@adacore.com>
308 * VXWORKS_NET_LIBS_RTP: New macro, network part of VXWORKS_LIBS_RTP.
310 2018-10-29 Olivier Hainque <hainque@adacore.com>
312 * config/vxworks.h (VXWORKS_PERSONALITY): New VxWorks
313 ports configuration macro, defaults to "gnu".
314 (VXWORKS_OS_CPP_BUILTINS): Use it. Feed TOOL and
315 TOOL_FAMILY instead of _VX_TOOL/_VXTOOL_FAMILY.
317 2018-10-29 Olivier Hainque <hainque@adacore.com>
319 * config/vxworks.h (CLEAR_INSN_CACHE): #undef before #define.
321 2018-10-29 Richard Biener <rguenther@suse.de>
323 PR tree-optimization/87790
324 * tree-vect-slp.c (vect_mark_slp_stmts): Simplify.
325 (vect_make_slp_decision): Adjust.
326 (vect_slp_analyze_bb_1): Likewise.
327 (vect_detect_hybrid_slp_stmts): Properly union SLP type over
330 2018-10-29 Richard Biener <rguenther@suse.de>
332 PR tree-optimization/87785
333 * tree-vect-slp.c (vect_build_slp_tree_2): Remove loads argument
335 (vect_build_slp_tree): Likewise.
336 (vect_gather_slp_loads): New function.
337 (vect_analyze_slp_instance): Gather loads separately from the
340 2018-10-29 Martin Liska <mliska@suse.cz>
342 * Makefile.in: Make dependency to json.o.
343 * doc/gcov.texi: Document new JSON format, remove
344 old intermediate format documentation.
345 * gcov.c (struct function_info): Come up with m_name and
347 (function_info::function_info): Initialize it.
348 (function_info::~function_info): Release it.
349 (main): Rename flag_intermediate_format to flag_json_format.
350 (print_usage): Describe --json-format.
351 (process_args): Set flag_json_format.
352 (output_intermediate_line): Remove.
353 (output_intermediate_json_line): Likewise.
354 (get_gcov_intermediate_filename): Return new extension
356 (output_intermediate_file): Implement JSON emission.
357 (output_json_intermediate_file): Implement JSON emission.
358 (generate_results): Use ::get_name for function name.
359 Handle JSON output file.
360 (read_graph_file): Use ::get_name instead of cplus_demangle.
361 (read_count_file): Likewise.
362 (solve_flow_graph): Likewise.
363 (add_line_counts): Likewise.
364 (accumulate_line_counts): Use new flag_json_format.
365 (output_function_details): Use ::get_name instead of cplus_demangle.
366 (output_lines): Likewise.
367 * json.cc (test_writing_literals): Add new tests.
368 * json.h (class literal): Add new boolean constructor.
370 2018-10-29 Segher Boessenkool <segher@kernel.crashing.org>
372 PR rtl-optimization/87701
373 PR rtl-optimization/87780
374 * combine.c (make_more_copies): Rewrite.
376 2018-10-28 Kugan Vivekanandarajah <kuganv@linaro.org>
378 * doc/generic.texi (ABSU_EXPR): Document.
379 * match.pd (absu(x)*absu(x) -> x*x): Handle.
380 (absu(absu(X)) -> absu(X)): Likewise.
381 (absu(-X) -> absu(X)): Likewise.
382 (absu(X) where X is nonnegative -> X): Likewise.
384 2018-10-28 Iain Buclaw <ibuclaw@gdcproject.org>
386 * Makefile.in (tm_d_file_list, tm_d_include_list): New variables.
387 (TM_D_H, D_TARGET_DEF, D_TARGET_H, D_TARGET_OBJS): New variables.
388 (tm_d.h, cs-tm_d.h, default-d.o): New rules.
389 (d/d-target-hooks-def.h, s-d-target-hooks-def-h): New rules.
390 (s-tm-texi): Also check timestamp on d-target.def.
391 (generated_files): Add TM_D_H and d-target-hooks-def.h.
392 (build/genhooks.o): Also depend on D_TARGET_DEF.
393 * config.gcc (tm_d_file, d_target_objs, target_has_targetdm): New
395 * config/aarch64/aarch64-d.c: New file.
396 * config/aarch64/aarch64-linux.h (GNU_USER_TARGET_D_CRITSEC_SIZE):
398 * config/aarch64/aarch64-protos.h (aarch64_d_target_versions): New
400 * config/aarch64/aarch64.h (TARGET_D_CPU_VERSIONS): Define.
401 * config/aarch64/t-aarch64 (aarch64-d.o): New rule.
402 * config/arm/arm-d.c: New file.
403 * config/arm/arm-protos.h (arm_d_target_versions): New prototype.
404 * config/arm/arm.h (TARGET_D_CPU_VERSIONS): Define.
405 * config/arm/linux-eabi.h (EXTRA_TARGET_D_OS_VERSIONS): Define.
406 * config/arm/t-arm (arm-d.o): New rule.
407 * config/default-d.c: New file.
408 * config/glibc-d.c: New file.
409 * config/gnu.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
410 * config/i386/i386-d.c: New file.
411 * config/i386/i386-protos.h (ix86_d_target_versions): New prototype.
412 * config/i386/i386.h (TARGET_D_CPU_VERSIONS): Define.
413 * config/i386/linux-common.h (EXTRA_TARGET_D_OS_VERSIONS): Define.
414 (GNU_USER_TARGET_D_CRITSEC_SIZE): Define.
415 * config/i386/t-i386 (i386-d.o): New rule.
416 * config/kfreebsd-gnu.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
417 * config/kopensolaris-gnu.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
418 * config/linux-android.h (ANDROID_TARGET_D_OS_VERSIONS): Define.
419 * config/linux.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
420 * config/mips/linux-common.h (EXTRA_TARGET_D_OS_VERSIONS): Define.
421 * config/mips/mips-d.c: New file.
422 * config/mips/mips-protos.h (mips_d_target_versions): New prototype.
423 * config/mips/mips.h (TARGET_D_CPU_VERSIONS): Define.
424 * config/mips/t-mips (mips-d.o): New rule.
425 * config/powerpcspe/linux.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
426 * config/powerpcspe/linux64.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
427 * config/powerpcspe/powerpcspe-d.c: New file.
428 * config/powerpcspe/powerpcspe-protos.h (rs6000_d_target_versions):
430 * config/powerpcspe/powerpcspe.c (rs6000_output_function_epilogue):
431 Support GNU D by using 0 as the language type.
432 * config/powerpcspe/powerpcspe.h (TARGET_D_CPU_VERSIONS): Define.
433 * config/powerpcspe/t-powerpcspe (powerpcspe-d.o): New rule.
434 * config/riscv/riscv-d.c: New file.
435 * config/riscv/riscv-protos.h (riscv_d_target_versions): New
437 * config/riscv/riscv.h (TARGET_D_CPU_VERSIONS): Define.
438 * config/riscv/t-riscv (riscv-d.o): New rule.
439 * config/rs6000/linux.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
440 * config/rs6000/linux64.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
441 * config/rs6000/rs6000-d.c: New file.
442 * config/rs6000/rs6000-protos.h (rs6000_d_target_versions): New
444 * config/rs6000/rs6000.c (rs6000_output_function_epilogue):
445 Support GNU D by using 0 as the language type.
446 * config/rs6000/rs6000.h (TARGET_D_CPU_VERSIONS): Define.
447 * config/rs6000/t-rs6000 (rs6000-d.o): New rule.
448 * config/s390/s390-d.c: New file.
449 * config/s390/s390-protos.h (s390_d_target_versions): New prototype.
450 * config/s390/s390.h (TARGET_D_CPU_VERSIONS): Define.
451 * config/s390/t-s390 (s390-d.o): New rule.
452 * config/sparc/sparc-d.c: New file.
453 * config/sparc/sparc-protos.h (sparc_d_target_versions): New
455 * config/sparc/sparc.h (TARGET_D_CPU_VERSIONS): Define.
456 * config/sparc/t-sparc (sparc-d.o): New rule.
457 * config/t-glibc (glibc-d.o): New rule.
458 * configure: Regenerated.
459 * configure.ac (tm_d_file): New variable.
460 (tm_d_file_list, tm_d_include_list, d_target_objs): Add substitutes.
461 * doc/contrib.texi (Contributors): Add self for the D frontend.
462 * doc/frontends.texi (G++ and GCC): Mention D as a supported language.
463 * doc/install.texi (Configuration): Mention libphobos as an option for
464 --enable-shared. Mention d as an option for --enable-languages.
465 (Testing): Mention check-d as a target.
466 * doc/invoke.texi (Overall Options): Mention .d, .dd, and .di as file
467 name suffixes. Mention d as a -x option.
468 * doc/sourcebuild.texi (Top Level): Mention libphobos.
469 * doc/standards.texi (Standards): Add section on D language.
470 * doc/tm.texi: Regenerated.
471 * doc/tm.texi.in: Add @node for D language and ABI, and @hook for
472 TARGET_CPU_VERSIONS, TARGET_D_OS_VERSIONS, and TARGET_D_CRITSEC_SIZE.
473 * dwarf2out.c (is_dlang): New function.
474 (gen_compile_unit_die): Use DW_LANG_D for D.
475 (declare_in_namespace): Return module die for D, instead of adding
476 extra declarations into the namespace.
477 (gen_namespace_die): Generate DW_TAG_module for D.
478 (gen_decl_die): Handle CONST_DECLSs for D.
479 (dwarf2out_decl): Likewise.
480 (prune_unused_types_walk_local_classes): Handle DW_tag_interface_type.
481 (prune_unused_types_walk): Handle DW_tag_interface_type same as other
483 * gcc.c (default_compilers): Add entries for .d, .dd and .di.
484 * genhooks.c: Include d/d-target.def.
486 2018-10-28 Iain Sandoe <iain@sandoe.co.uk>
489 * config/rs6000/darwin.h (STACK_BOUNDARY): New.
490 (RS6000_STARTING_FRAME_OFFSET): Adjust to preserve 16byte alignment.
491 (STACK_DYNAMIC_OFFSET): Likewise.
493 2018-10-27 Sandra Loosemore <sandra@codesourcery.com>
496 * config/nios2/nios2.c (nios2_valid_target_attribute_rec): Fix
499 2018-10-26 Tulio Magno Quites Machado Filho <tuliom@linux.ibm.com>
501 * doc/extend.texi (PowerPC builtins): Fix __builtin_unpack_ibm128
502 return type and other typos.
504 2018-10-26 Aaron Sawdey <acsawdey@linux.ibm.com>
506 * config/rs6000/rs6000-string.c (expand_strncmp_gpr_sequence): Change to
507 a shorter sequence with fewer branches.
508 (emit_final_str_compare_gpr): Ditto.
510 2018-10-26 Paul A. Clarke <pc@us.ibm.com>
512 * config/rs6000/tmmintrin.h: New file.
513 * config.gcc (powerpc*-*-*): Add tmmintrin.h to extra_headers.
515 2018-10-26 Paul A. Clarke <pc@us.ibm.com>
517 * config/rs6000/mmintrin.h: Enable 32bit compilation.
518 * config/rs6000/xmmintrin.h: Likewise.
520 2018-10-26 Paul A. Clarke <pc@us.ibm.com>
522 * config/rs6000/xmmintrin.h (_mm_extract_pi16): Fix for big-endian.
524 2018-10-26 Richard Biener <rguenther@suse.de>
526 * tree-vect-slp.c (vect_mark_slp_stmts): Add visited hash_set
528 (vect_mark_slp_stmts_relevant): Likewise.
529 (vect_detect_hybrid_slp_stmts): Likewise.
530 (vect_bb_slp_scalar_cost): Likewise.
531 (vect_remove_slp_scalar_calls): Likewise.
533 2018-10-26 Jan Hubicka <jh@suse.cz>
535 * ipa-devirt.c (odr_subtypes_equivalent_p): Fix recursion.
536 (warn_types_mismatch): Fix walk of DECL_NAME.
537 (odr_types_equivalent_p): Fix overactive assert.
539 2018-10-26 Richard Biener <rguenther@suse.de>
541 PR tree-optimization/87105
542 * tree-vectorizer.h (_slp_tree::refcnt): New member.
543 * tree-vect-slp.c (vect_free_slp_tree): Decrement and honor
545 (vect_create_new_slp_node): Initialize refcnt to one.
547 (scalar_stmts_set_t, bst_fail): Remove.
548 (vect_build_slp_tree_2): Add bst_map argument and adjust calls.
549 (vect_build_slp_tree): Add bst_map argument and lookup
550 already created SLP nodes.
551 (vect_print_slp_tree): Handle a SLP graph, print SLP node
553 (vect_slp_rearrange_stmts): Handle a SLP graph.
554 (vect_analyze_slp_instance): Adjust and free SLP nodes from
555 the CSE map. Fix indenting.
556 (vect_schedule_slp_instance): Add short-cut.
558 2018-10-26 Martin Liska <mliska@suse.cz>
561 * ipa-prop.c (struct ipa_vr_ggc_hash_traits): Hash with
562 addr_expr and not with pointers.
564 2018-10-26 Jan Hubicka <jh@suse.cz>
566 * tree.c (free_lang_data_in_type): Only check main variants.
567 * ipa-devirt.c (warn_odr): Make static.
568 (types_same_for_odr): Drop strict variant.
569 (types_odr_comparable): Likewise.
570 (odr_or_derived_type_p): Look for main variants.
571 (odr_name_hasher::equal): Cleanup comment.
572 (odr_subtypes_equivalent): Add warn and warned arguments; check main
574 (type_variants_equivalent_p): break out from ...
575 (odr_types_equivalent): ... here; go for main variants where needed.
576 (warn_odr): ... here; turn static.
577 (warn_types_mismatch): Compare mangled names of main variants.
578 * ipa-utils.h (types_odr_comparable): Drop strict parameter.
579 (type_with_linkage_p): Sanity check that we look at main variant.
580 * lto.c (lto_read_decls): Only consider main variant to be ODR type.
581 * tree.h (types_same_for_odr): Drop strict argument.
583 2018-10-26 Richard Biener <rguenther@suse.de>
585 PR tree-optimization/87746
586 * tree-vect-data-refs.c (vect_update_misalignment_for_peel):
587 Simplify and fix WRT strided store groups with size not
588 equal to step in element count.
589 (vect_analyze_group_access_1): Dump the whole group.
591 2018-10-25 Carl Love <cel@us.ibm.com>
593 * config/rs6000/rs6000-c.c (P9V_BUILTIN_VEC_VSCEDPGT,
594 P9V_BUILTIN_VEC_VSCEDPLT, P9V_BUILTIN_VEC_VSCEDPEQ,
595 P9V_BUILTIN_VEC_VSCEDPUO): Rename base overloaded name. Add quad
596 precicion entry for each overloaded builtin.
597 * config/rs6000/rs6000-builtin.def (VSCEDPGT, VSCEDPLT, VSCEDPEQ,
598 VSCEDPUO): Rename overloaded name.
599 (VSCEDPGT, VSCEQPGT, VSCEDPLT, VSCEQPLT, VSCEDPEQ, VSCEQPEQ,
600 VSCEDPUO, VSCEQPUO): Add defitions for overloaded builtins.
601 * config/rs6000/vsx.md (xscmpexpqp_<code>_<mode>): Add
602 define_expand for xscmpexqp instruction.
603 (*xscmpexpqp): Add define_insn for the xscmpexqp instruction.
605 2018-10-25 Bill Schmidt <wschmidt@linux.ibm.com>
606 Jinsong Ji <jji@us.ibm.com>
608 * config/rs6000/emmintrin.h (_mm_slli_epi16): Replace deprecated
609 function with vec_sl.
610 (_mm_slli_epi32): Likewise.
611 (_mm_slli_epi64): Likewise.
612 (_mm_srai_epi16): Replace deprecated function with vec_sra.
613 (_mm_srai_epi32): Likewise.
614 (_mm_srli_epi16): Replace deprecated function with vec_sr.
615 (_mm_srli_epi32): Likewise.
616 (_mm_srli_epi64): Likewise.
617 (_mm_sll_epi16): Replace deprecated function with vec_sl.
618 (_mm_sll_epi32): Likewise.
619 (_mm_sll_epi64): Likewise.
620 (_mm_sra_epi16): Replace deprecated function with vec_sra.
621 (_mm_sra_epi32): Likewise.
622 (_mm_srl_epi16): Replace deprecated function with vec_sr.
623 (_mm_srl_epi32): Likewise.
624 (_mm_srl_epi64): Likewise.
626 2018-10-25 Bill Schmidt <wschmidt@linux.ibm.com>
627 Jinsong Ji <jji@us.ibm.com>
629 * gcc/config/rs6000/emmintrin.h (_mm_sll_epi16): Replace
630 comparison operators with vec_cmp* for compatibility due to
631 unfortunate history; clean up formatting and use types more
633 (_mm_sll_epi32): Likewise.
634 (_mm_sll_epi64): Likewise.
635 (_mm_srl_epi16): Likewise.
636 (_mm_srl_epi32): Likewise.
637 (_mm_srl_epi64): Likewise.
639 2018-10-25 Bill Schmidt <wschmidt@linux.ibm.com>
640 Jinsong Ji <jji@us.ibm.com>
642 * config/rs6000/emmintrin.h (_mm_sll_epi64): Remove wrong cast.
643 * config/rs6000/xmmintrin.h (_mm_min_ps): Change m's type to
644 __vector __bool int. Use vec_cmpgt in preference to deprecated
645 function vec_vcmpgtfp.
646 (_mm_max_ps): Likewise.
648 2018-10-25 Jeff Law <law@redhat.com>
650 * config/rl78/rl78.c (insn_ok_now): Always re-recognize the insn
653 2018-10-25 Martin Sebor <msebor@redhat.com>
655 * doc/extend.texi (aligned): Expand attribute description.
656 (Alignment): Rename section. Discuss function arguments.
658 2018-10-25 Jan Hubicka <jh@suse.cz>
660 * ipa-devirt.c (main_odr_variant): Remove.
661 (hash_odr_name, types_same_for_odr, types_odr_comparable,
662 odr_name_hasher::equal, odr_subtypes_equivalent_p):
663 Drop use of main_odr_variant.
664 (add_type_duplicate): Silence confused warnings on integer types.
665 (get_odr_type): Always look for main variant.
666 (register_odr_type): Simplify.
668 2018-10-25 Richard Biener <rguenther@suse.de>
670 * tree-vect-data-refs.c (vect_analyze_data_ref_accesses):
671 Initialize ng to silence error with release checking bootstrap.
673 2018-10-25 Richard Biener <rguenther@suse.de>
675 * tree-if-conv.c: Include tree-ssa-sccvn.h.
676 (tree_if_conversion): Run CSE on the if-converted loop body.
678 2018-10-25 Ilya Leoshkevich <iii@linux.ibm.com>
680 * config/s390/constraints.md (ZL): New constraint.
681 * config/s390/s390.c (legitimate_pic_operand_p): Accept LARL
683 * config/s390/s390.md (movdi_larl): Remove.
684 (movdi_64): Add the LARL alternative.
686 2018-10-25 Ilya Leoshkevich <iii@linux.ibm.com>
689 * rtl.c (RTX_CODE_HWINT_P_1): New helper macro.
690 (RTX_CODE_HWINT_P): New macro.
691 (rtx_code_size): Use RTX_CODE_HWINT_P ().
693 2018-10-25 Jan Hubicka <jh@suse.cz>
695 * ipa-devirt.c (odr_types_equivalent_p): Do not ICE if one of types
698 2018-10-25 Richard Biener <rguenther@suse.de>
700 PR tree-optimization/87665
701 PR tree-optimization/87745
702 * tree-vectorizer.h (get_earlier_stmt): Remove.
703 (get_later_stmt): Pick up UID from the original non-pattern stmt.
705 2018-10-25 Sam Tebbs <sam.tebbs@arm.com>
707 * options.texi (Deprecated): Move list to Var section.
709 2018-10-24 Bill Schmidt <wschmidt@linux.ibm.com>
710 Jinsong Ji <jji@us.ibm.com>
712 * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Change deprecated
713 __vector long to __vector long long.
714 (_mm_cvtpd_ps): Likewise.
715 (_mm_cvttpd_epi32): Likewise.
716 (_mm_cvtpi32_pd): Likewise.
717 (_mm_unpackhi_epi64): Likewise.
718 (_mm_unpacklo_epi64): Likewise.
720 2018-10-24 Segher Boessenkool <segher@kernel.crashing.org>
722 PR rtl-optimization/87720
723 * combine.c (make_more_copies): Skip if the dest is pc_rtx.
725 2018-10-24 Alexandre Oliva <aoliva@redhat.com>
727 * gimple-ssa-isolate-paths.c
728 (find_implicit_erroneous_behavior): Do not change code if the
729 pass is running for warnings only.
730 (find_explicit_erroneous_behavior): Likewise.
732 2018-10-24 Michael Meissner <meissner@linux.ibm.com>
734 * config/rs6000/rs6000.c (TARGET_MANGLE_DECL_ASSEMBLER_NAME):
735 Define as rs6000_mangle_decl_assembler_name.
736 (rs6000_mangle_decl_assembler_name): If the user switched from IBM
737 long double to IEEE long double, switch the names of the long
738 double built-in functions to be <func>f128 instead of <func>l.
740 2018-10-24 Martin Sebor <msebor@redhat.com>
742 * doc/extend.texi (nonnull): List no-argument form. Reference
743 -fno-delete-null-pointer-checks and -fisolate-erroneous-paths-attribute.
745 2018-10-24 Richard Biener <rguenther@suse.de>
747 * tree-ssa-sccvn.c (do_rpo_vn): Free rpo_state.
749 2018-10-24 Martin Liska <mliska@suse.cz>
751 PR tree-optimization/84436
752 * tree-switch-conversion.c (switch_conversion::contains_same_values_p):
754 (switch_conversion::contains_linear_function_p): New.
755 (switch_conversion::build_one_array): Support linear
756 transformation on input.
757 * tree-switch-conversion.h (struct switch_conversion): Add
758 contains_linear_function_p declaration.
760 2018-10-24 Richard Biener <rguenther@suse.de>
762 * varasm.c (const_hash_1): Return hash of ADDR_EXPR
763 if its argument is CONSTANT_CLASS_P.
765 2018-10-11 Jan Hubicka <hubicka@ucw.cz>
767 * ipa-utils.h (type_with_linkage_p): No longer check for TYPE_STUB_DECL;
768 it is wrong for forward declarations.
770 2018-10-24 Ilya Leoshkevich <iii@linux.ibm.com>
772 * config/s390/s390.c (s390_check_qrst_address): Add the missing
773 SYMBOL_REF_P () check.
775 2018-10-24 Richard Biener <rguenther@suse.de>
777 PR tree-optimization/87105
778 * tree-vect-data-refs.c (vect_analyze_group_access_1): Adjust
780 (vect_analyze_data_ref_accesses): Handle duplicate loads and
781 stores by splitting the affected group after the fact.
782 * tree-vect-slp.c (vect_build_slp_tree_2): Dump when we
783 fail the SLP build because of size constraints.
785 2018-10-24 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
787 * configure.ac (gcc_cv_ld_aligned_shf_merge): New test.
788 * configure: Regenerate.
789 * config.in: Regenerate.
790 * varasm.c (mergeable_string_section): Use readonly_data_section
791 if linker doesn't support SHF_MERGE with alignment > 8.
792 (mergeable_constant_section): Likewise.
794 2018-10-24 Richard Biener <rguenther@suse.de>
796 PR tree-optimization/84013
797 * tree-ssa-structalias.c (struct msdi_data): New struct for
798 marshalling data to walk_stmt_load_store_ops.
799 (maybe_set_dependence_info): Refactor as callback for
800 walk_stmt_load_store_ops.
801 (compute_dependence_clique): Set restrict info on all stmt kinds.
803 2018-10-24 Martin Liska <mliska@suse.cz>
805 * cgraph.c (cgraph_node::dump):
806 Remove reduntant dumps and make tp_first_run dump more compact.
808 2018-10-24 Richard Biener <rguenther@suse.de>
810 PR tree-optimization/87665
811 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Adjust
814 2018-10-12 Jeff Law <law@redhat.com>
816 * config/h8300/h8300.c (h8300_expand_prologue): Fix stm generation
819 2018-10-23 Richard Biener <rguenther@suse.de>
821 * tree-vrp.c (add_assert_info): Guard dump_printf with
823 * gimple-ssa-evrp-analyze.c
824 (evrp_range_analyzer::record_ranges_from_incoming_edge):
825 Use value_range::ignore_equivs_equal_p.
827 2018-10-23 Richard Biener <rguenther@suse.de>
829 PR tree-optimization/87105
830 PR tree-optimization/87608
831 * passes.def (pass_all_early_optimizations): Add early phi-opt
833 * tree-ssa-phiopt.c (value_replacement): Ignore NOPs and predicts in
834 addition to debug stmts.
835 (tree_ssa_phiopt_worker): Add early_p argument, do only min/max
836 and abs replacement early.
837 * tree-cfg.c (gimple_empty_block_p): Likewise.
839 2018-10-23 Richard Earnshaw <rearnsha@arm.com>
842 * config.gcc (arm*-*-netbsdelf*): Default to StrongARM if no CPU
843 specified to configure.
844 (arm*-*-*): Use ARM7TDMI as the target CPU if no default provided.
846 2018-10-23 Richard Biener <rguenther@suse.de>
848 PR tree-optimization/87700
849 * tree-ssa-copy.c (set_copy_of_val): Fix change detection logic.
851 2018-10-23 Jakub Jelinek <jakub@redhat.com>
854 * config/i386/avx512vlintrin.h (_mm_mask_mullo_epi32): Change type of
855 second argument from __mmask16 to __mmask8.
856 * config/i386/avx512vlbwintrin.h (_mm_mask_packus_epi32,
857 _mm_mask_packs_epi32): Likewise.
858 * config/i386/avx512pfintrin.h (_mm512_mask_prefetch_i64scatter_ps):
860 (_mm512_mask_prefetch_i64scatter_pd): Likewise. Formatting fix.
862 2018-10-23 Richard Biener <rguenther@suse.de>
864 * tree-vect-stmts.c (vect_analyze_stmt): Fix typo in comment.
866 2018-10-23 Richard Biener <rguenther@suse.de>
868 PR tree-optimization/86144
869 * tree-vect-stmts.c (vect_analyze_stmt): Prefer -mveclibabi
872 2018-10-23 Richard Biener <rguenther@suse.de>
874 PR tree-optimization/87693
875 * tree-ssa-threadedge.c (thread_around_empty_blocks): Handle
876 the case we do not find the taken edge.
878 2018-10-22 Bill Schmidt <wschmidt@linux.ibm.com>
879 Jinsong Ji <jji@us.ibm.com>
881 * config/rs6000/emmintrin.h (_MM_SHUFFLE2): Comment cleanup.
882 (_mm_store_pd): Use unaligned vector type for pointer cast.
883 (_mm_maskmoveu_si128): Likewise.
884 * config/rs6000/xmmintrin.h (__m128_u): New typedef.
885 (_mm_store_ps): Use unaligned vector type for pointer cast.
887 2018-10-22 Paul Koning <ni1d@arrl.net>
889 * symtab.c (symtab_node::increase_alignment): Correct max
892 2018-10-22 Yury Gribov <tetra2005@gmail.com>
894 PR tree-optimization/87633
895 * match.pd: Do not generate unordered integer comparisons.
897 2018-10-22 Segher Boessenkool <segher@kernel.crashing.org>
899 PR rtl-optimization/87600
900 * combine.c: Add include of expr.h.
901 (cant_combine_insn_p): Do not combine moves from any hard non-fixed
902 register to a pseudo.
903 (make_more_copies): New function, add a copy to a new pseudo after
904 the moves from hard registers into pseudos.
905 (rest_of_handle_combine): Declare rebuild_jump_labels_after_combine
906 later. Call make_more_copies.
908 2018-10-22 Andrew Stubbs <ams@codesourcery.com>
910 * lra-constraints.c (process_alt_operands): New local array,
911 matching_early_clobber. Check matching_early_clobber before
912 decrementing reject, and set matching_early_clobber after.
914 2018-10-22 Segher Boessenkool <segher@kernel.crashing.org>
917 * config/rs6000/rs6000.c (print_operand_address): For unexpected RTL
918 call output_addr_const and hope for the best.
920 2018-10-22 Richard Biener <rguenther@suse.de>
922 * gimple-ssa-evrp-analyze.c
923 (evrp_range_analyzer::record_ranges_from_incoming_edge): Be
924 smarter about what ranges to use.
925 * tree-vrp.c (add_assert_info): Dump here.
926 (register_edge_assert_for_2): Instead of here at multiple but
929 * gcc.dg/tree-ssa/evrp12.c: New testcase.
930 * gcc.dg/predict-6.c: Adjust.
931 * gcc.dg/tree-ssa/vrp33.c: Disable EVRP.
932 * gcc.dg/tree-ssa/vrp02.c: Likewise.
933 * gcc.dg/tree-ssa/cunroll-9.c: Likewise.
935 2018-10-22 Steven Bosscher <steven@gcc.gnu.org>
936 Richard Biener <rguenther@suse.de>
938 * bitmap.h: Update data structure documentation, including a
939 description of bitmap views as either linked-lists or splay trees.
940 (struct bitmap_element_def): Update comments for splay tree bitmaps.
941 (struct bitmap_head_def): Likewise.
942 (bitmap_list_view, bitmap_tree_view): New prototypes.
943 (bitmap_initialize_stat): Initialize a bitmap_head's indx and
945 (bmp_iter_set_init): Assert the iterated bitmaps are in list form.
946 (bmp_iter_and_init, bmp_iter_and_compl_init): Likewise.
947 * bitmap.c (bitmap_elem_to_freelist): Unregister overhead of a
948 released bitmap element here.
949 (bitmap_element_free): Remove.
950 (bitmap_elt_clear_from): Work on splay tree bitmaps.
951 (bitmap_list_link_element): Renamed from bitmap_element_link. Move
952 this function similar ones such that linked-list bitmap implementation
953 functions are grouped.
954 (bitmap_list_unlink_element): Renamed from bitmap_element_unlink,
955 and moved for grouping.
956 (bitmap_list_insert_element_after): Renamed from
957 bitmap_elt_insert_after, and moved for grouping.
958 (bitmap_list_find_element): New function spliced from bitmap_find_bit.
959 (bitmap_tree_link_left, bitmap_tree_link_right,
960 bitmap_tree_rotate_left, bitmap_tree_rotate_right, bitmap_tree_splay,
961 bitmap_tree_link_element, bitmap_tree_unlink_element,
962 bitmap_tree_find_element): New functions for splay-tree bitmap
964 (bitmap_element_link, bitmap_element_unlink, bitmap_elt_insert_after):
965 Renamed and moved, see above entries.
966 (bitmap_tree_listify_from): New function to convert part of a splay
967 tree bitmap to a linked-list bitmap.
968 (bitmap_list_view): Convert a splay tree bitmap to linked-list form.
969 (bitmap_tree_view): Convert a linked-list bitmap to splay tree form.
970 (bitmap_find_bit): Remove.
971 (bitmap_clear, bitmap_clear_bit, bitmap_set_bit,
972 bitmap_single_bit_set_p, bitmap_first_set_bit, bitmap_last_set_bit):
973 Handle splay tree bitmaps.
974 (bitmap_copy, bitmap_count_bits, bitmap_and, bitmap_and_into,
975 bitmap_elt_copy, bitmap_and_compl, bitmap_and_compl_into,
976 bitmap_compl_and_into, bitmap_elt_ior, bitmap_ior, bitmap_ior_into,
977 bitmap_xor, bitmap_xor_into, bitmap_equal_p, bitmap_intersect_p,
978 bitmap_intersect_compl_p, bitmap_ior_and_compl,
979 bitmap_ior_and_compl_into, bitmap_set_range, bitmap_clear_range,
980 bitmap_hash): Reject trying to act on splay tree bitmaps. Make
981 corresponding changes to use linked-list specific bitmap_element
982 manipulation functions as applicable for efficiency.
983 (bitmap_tree_to_vec): New function.
984 (debug_bitmap_elt_file): New function split out from ...
985 (debug_bitmap_file): ... here. Handle splay tree bitmaps.
986 (bitmap_print): Likewise.
988 PR tree-optimization/63155
989 * tree-ssa-propagate.c (ssa_prop_init): Use tree-view for the
991 * tree-ssa-coalesce.c (coalesce_ssa_name): Populate used_in_copies
994 2018-10-22 Martin Liska <mliska@suse.cz>
996 PR tree-optimization/87686
998 2018-08-29 Martin Liska <mliska@suse.cz>
1000 * tree-switch-conversion.c (switch_conversion::expand):
1001 Strenghten assumption about gswitch statements.
1003 2018-10-22 Martin Liska <mliska@suse.cz>
1005 * ipa-icf.c (sem_item::compare_attributes): Remove.
1006 (sem_item::compare_referenced_symbol_properties): Use
1007 attribute_list_equal instead.
1008 (sem_function::equals_wpa): Likewise.
1009 * ipa-icf.h: Remove compare_attributes.
1011 2018-10-22 Richard Biener <rguenther@suse.de>
1014 * mem-stats.h (mem_usage::operator==): Fix pasto.
1016 2018-10-22 Richard Biener <rguenther@suse.de>
1018 PR tree-optimization/87640
1019 * tree-vrp.c (set_value_range_with_overflow): Decompose
1021 (extract_range_from_binary_expr_1): Adjust.
1023 2018-10-22 Martin Jambor <mjambor@suse.cz>
1025 * tree-eh.h (stmt_could_throw_p): Add function parameter.
1026 (stmt_can_throw_external): Likewise.
1027 (stmt_can_throw_internal): Likewise.
1028 * tree-eh.c (lower_eh_constructs_2): Pass cfun to stmt_could_throw_p.
1029 (lower_eh_constructs_2): Likewise.
1030 (stmt_could_throw_p): Add fun parameter, use it instead of cfun.
1031 (stmt_can_throw_external): Likewise.
1032 (stmt_can_throw_internal): Likewise.
1033 (maybe_clean_eh_stmt_fn): Pass cfun to stmt_could_throw_p.
1034 (maybe_clean_or_replace_eh_stmt): Pass cfun to stmt_could_throw_p.
1035 (maybe_duplicate_eh_stmt_fn): Pass new_fun to stmt_could_throw_p.
1036 (maybe_duplicate_eh_stmt): Pass cfun to stmt_could_throw_p.
1037 (pass_lower_eh_dispatch::execute): Pass cfun to
1038 stmt_can_throw_external.
1039 (cleanup_empty_eh): Likewise.
1040 (verify_eh_edges): Pass cfun to stmt_could_throw_p.
1041 * cgraph.c (cgraph_edge::set_call_stmt): Pass a function to
1042 stmt_can_throw_external instead of pushing it to cfun.
1043 (symbol_table::create_edge): Likewise.
1044 * gimple-fold.c (fold_builtin_atomic_compare_exchange): Pass cfun to
1045 stmt_can_throw_internal.
1046 * gimple-ssa-evrp.c (evrp_dom_walker::before_dom_children): Pass cfun
1047 to stmt_could_throw_p.
1048 * gimple-ssa-store-merging.c (handled_load): Pass cfun to
1049 stmt_can_throw_internal.
1050 (pass_store_merging::execute): Likewise.
1051 * gimple-ssa-strength-reduction.c
1052 (find_candidates_dom_walker::before_dom_children): Pass cfun to
1054 * gimplify-me.c (gimple_regimplify_operands): Pass cfun to
1055 stmt_can_throw_internal.
1056 * ipa-pure-const.c (check_call): Pass cfun to stmt_could_throw_p and
1057 to stmt_can_throw_external.
1058 (check_stmt): Pass cfun to stmt_could_throw_p.
1059 (check_stmt): Pass cfun to stmt_can_throw_external.
1060 (pass_nothrow::execute): Likewise.
1061 * trans-mem.c (expand_call_tm): Pass cfun to stmt_can_throw_internal.
1062 * tree-cfg.c (is_ctrl_altering_stmt): Pass cfun to
1063 stmt_can_throw_internal.
1064 (verify_gimple_in_cfg): Pass cfun to stmt_could_throw_p.
1065 (stmt_can_terminate_bb_p): Pass cfun to stmt_can_throw_external.
1066 (gimple_purge_dead_eh_edges): Pass cfun to stmt_can_throw_internal.
1067 * tree-complex.c (expand_complex_libcall): Pass cfun to
1068 stmt_could_throw_p and to stmt_can_throw_internal.
1069 (expand_complex_multiplication): Pass cfun to stmt_can_throw_internal.
1070 * tree-inline.c (copy_edges_for_bb): Likewise.
1071 (maybe_move_debug_stmts_to_successors): Likewise.
1072 * tree-outof-ssa.c (ssa_is_replaceable_p): Pass cfun to
1074 * tree-parloops.c (oacc_entry_exit_ok_1): Likewise.
1075 * tree-sra.c (scan_function): Pass cfun to stmt_can_throw_external.
1076 * tree-ssa-alias.c (stmt_kills_ref_p): Pass cfun to
1077 stmt_can_throw_internal.
1078 * tree-ssa-ccp.c (optimize_atomic_bit_test_and): Likewise.
1079 * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Pass cfun to
1081 (mark_aliased_reaching_defs_necessary_1): Pass cfun to
1082 stmt_can_throw_internal.
1083 * tree-ssa-forwprop.c (pass_forwprop::execute): Likewise.
1084 * tree-ssa-loop-im.c (movement_possibility): Pass cfun to
1086 * tree-ssa-loop-ivopts.c (find_givs_in_stmt_scev): Likewise.
1087 (add_autoinc_candidates): Pass cfun to stmt_can_throw_internal.
1088 * tree-ssa-math-opts.c (pass_cse_reciprocals::execute): Likewise.
1089 (convert_mult_to_fma_1): Likewise.
1090 (convert_to_divmod): Likewise.
1091 * tree-ssa-phiprop.c (propagate_with_phi): Likewise.
1092 * tree-ssa-pre.c (compute_avail): Pass cfun to stmt_could_throw_p.
1093 * tree-ssa-propagate.c
1094 (substitute_and_fold_dom_walker::before_dom_children): Likewise.
1095 * tree-ssa-reassoc.c (suitable_cond_bb): Likewise.
1096 (maybe_optimize_range_tests): Likewise.
1097 (linearize_expr_tree): Likewise.
1098 (reassociate_bb): Likewise.
1099 * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
1100 * tree-ssa-scopedtables.c (hashable_expr_equal_p): Likewise.
1101 * tree-ssa-strlen.c (adjust_last_stmt): Likewise.
1102 (handle_char_store): Likewise.
1103 * tree-vect-data-refs.c (vect_find_stmt_data_reference): Pass cfun to
1104 stmt_can_throw_internal.
1105 * tree-vect-patterns.c (check_bool_pattern): Pass cfun to
1107 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
1108 (vectorizable_call): Pass cfun to stmt_can_throw_internal.
1109 (vectorizable_simd_clone_call): Likewise.
1110 * value-prof.c (gimple_ic): Pass cfun to stmt_could_throw_p.
1111 (gimple_stringop_fixed_value): Likewise.
1113 2018-10-22 Ilya Leoshkevich <iii@linux.ibm.com>
1115 * config/s390/s390.c (s390_loadrelative_operand_p): Accept
1116 literal pool references.
1117 (s390_check_qrst_address): Adapt to the new behavior of
1118 s390_loadrelative_operand_p ().
1120 2018-10-22 H.J. Lu <hongjiu.lu@intel.com>
1123 * config/i386/sse.md (*andnot<mode>3_bcst): New.
1125 2018-10-22 H.J. Lu <hongjiu.lu@intel.com>
1128 * config/i386/sse.md (*<code><mode>3_bcst): New.
1130 2018-10-22 H.J. Lu <hongjiu.lu@intel.com>
1133 * config/i386/sse.md (avx512bcst): Updated for V4SI, V2DI, V8SI,
1134 V4DI, V16SI and V8DI.
1135 (*sub<mode>3<mask_name>_bcst): New.
1136 (*add<mode>3<mask_name>_bcst): Likewise.
1138 2018-10-21 Bill Schmidt <wschmidt@linux.ibm.com>
1139 Jinsong Ji <jji@us.ibm.com>
1141 * config/rs6000/emmintrin.h (_mm_movemask_pd): Replace __vector
1142 __m64 with __vector unsigned long long for compatibility.
1143 (_mm_movemask_epi8): Likewise.
1144 * config/rs6000/xmmintrin.h (_mm_cvtps_pi32): Likewise.
1145 (_mm_cvttps_pi32): Likewise.
1146 (_mm_cvtpi32_ps): Likewise.
1147 (_mm_cvtps_pi16): Likewise.
1148 (_mm_loadh_pi): Likewise.
1149 (_mm_storeh_pi): Likewise.
1150 (_mm_movehl_ps): Likewise.
1151 (_mm_movelh_ps): Likewise.
1152 (_mm_loadl_pi): Likewise.
1153 (_mm_storel_pi): Likewise.
1154 (_mm_movemask_ps): Likewise.
1155 (_mm_shuffle_pi16): Likewise.
1157 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
1160 * config/i386/avx512fintrin.h (_mm512_fnmsub_round_pd): Use
1161 __builtin_ia32_vfnmsubpd512_mask.
1162 (_mm512_mask_fnmsub_round_pd): Likewise.
1163 (_mm512_fnmsub_pd): Likewise.
1164 (_mm512_mask_fnmsub_pd): Likewise.
1165 (_mm512_maskz_fnmsub_round_pd): Use
1166 __builtin_ia32_vfnmsubpd512_maskz.
1167 (_mm512_maskz_fnmsub_pd): Likewise.
1168 (_mm512_fnmsub_round_ps): Use __builtin_ia32_vfnmsubps512_mask.
1169 (_mm512_mask_fnmsub_round_ps): Likewise.
1170 (_mm512_fnmsub_ps): Likewise.
1171 (_mm512_mask_fnmsub_ps): Likewise.
1172 (_mm512_maskz_fnmsub_round_ps): Use
1173 __builtin_ia32_vfnmsubps512_maskz.
1174 (_mm512_maskz_fnmsub_ps): Likewise.
1175 * config/i386/avx512vlintrin.h (_mm256_mask_fnmsub_pd): Use
1176 __builtin_ia32_vfnmsubpd256_mask.
1177 (_mm256_maskz_fnmsub_pd): Use __builtin_ia32_vfnmsubpd256_maskz.
1178 (_mm_mask_fnmsub_pd): Use __builtin_ia32_vfmaddpd128_mask
1179 (_mm_maskz_fnmsub_pd): Use __builtin_ia32_vfnmsubpd128_maskz.
1180 (_mm256_mask_fnmsub_ps): Use __builtin_ia32_vfnmsubps256_mask.
1181 (_mm256_mask_fnmsub_ps): Use __builtin_ia32_vfnmsubps256_mask.
1182 (_mm256_maskz_fnmsub_ps): Use __builtin_ia32_vfnmsubps256_maskz.
1183 (_mm_mask_fnmsub_ps): Use __builtin_ia32_vfnmsubps128_mask.
1184 (_mm_maskz_fnmsub_ps): Use __builtin_ia32_vfnmsubps128_maskz.
1185 * config/i386/fmaintrin.h (_mm_fnmsub_pd): Use
1186 __builtin_ia32_vfnmsubpd.
1187 (_mm256_fnmsub_pd): Use __builtin_ia32_vfnmsubpd256.
1188 (_mm_fnmsub_ps): Use __builtin_ia32_vfnmsubps.
1189 (_mm256_fnmsub_ps): Use __builtin_ia32_vfnmsubps256.
1190 (_mm_fnmsub_sd): Use __builtin_ia32_vfnmsubsd3.
1191 (_mm_fnmsub_ss): Use __builtin_ia32_vfnmsubss3.
1192 * config/i386/i386-builtin.def: Add
1193 __builtin_ia32_vfnmsubpd256_mask,
1194 __builtin_ia32_vfnmsubpd256_maskz,
1195 __builtin_ia32_vfnmsubpd128_mask,
1196 __builtin_ia32_vfnmsubpd128_maskz,
1197 __builtin_ia32_vfnmsubps256_mask,
1198 __builtin_ia32_vfnmsubps256_maskz,
1199 __builtin_ia32_vfnmsubps128_mask,
1200 __builtin_ia32_vfnmsubps128_maskz,
1201 __builtin_ia32_vfnmsubpd512_mask,
1202 __builtin_ia32_vfnmsubpd512_maskz,
1203 __builtin_ia32_vfnmsubps512_mask,
1204 __builtin_ia32_vfnmsubps512_maskz, __builtin_ia32_vfnmsubss3,
1205 __builtin_ia32_vfnmsubsd3, __builtin_ia32_vfnmsubps,
1206 __builtin_ia32_vfnmsubpd, __builtin_ia32_vfnmsubps256 and.
1207 __builtin_ia32_vfnmsubpd256.
1208 * config/i386/sse.md (fma4i_fnmsub_<mode>): New.
1209 (<avx512>_fnmsub_<mode>_maskz<round_expand_name>): Likewise.
1210 (*<sd_mask_codefor>fma_fnmsub_<mode><sd_maskz_name>_bcst_1):
1212 (*<sd_mask_codefor>fma_fnmsub_<mode><sd_maskz_name>_bcst_2):
1214 (*<sd_mask_codefor>fma_fnmsub_<mode><sd_maskz_name>_bcst_3):
1216 (fmai_vmfnmsub_<mode><round_name>): Likewise.
1218 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
1221 * config/i386/avx512fintrin.h (_mm512_fnmadd_round_pd): Use
1222 __builtin_ia32_vfnmaddpd512_mask.
1223 (_mm512_mask_fnmadd_round_pd): Likewise.
1224 (_mm512_fnmadd_pd): Likewise.
1225 (_mm512_mask_fnmadd_pd): Likewise.
1226 (_mm512_maskz_fnmadd_round_pd): Use
1227 __builtin_ia32_vfnmaddpd512_maskz.
1228 (_mm512_maskz_fnmadd_pd): Likewise.
1229 (_mm512_fnmadd_round_ps): Use __builtin_ia32_vfnmaddps512_mask.
1230 (_mm512_mask_fnmadd_round_ps): Likewise.
1231 (_mm512_fnmadd_ps): Likewise.
1232 (_mm512_mask_fnmadd_ps): Likewise.
1233 (_mm512_maskz_fnmadd_round_ps): Use
1234 __builtin_ia32_vfnmaddps512_maskz.
1235 (_mm512_maskz_fnmadd_ps): Likewise.
1236 * config/i386/avx512vlintrin.h (_mm256_mask_fnmadd_pd): Use
1237 __builtin_ia32_vfnmaddpd256_mask.
1238 (_mm256_maskz_fnmadd_pd): Use __builtin_ia32_vfnmaddpd256_maskz.
1239 (_mm_mask_fnmadd_pd): Use __builtin_ia32_vfmaddpd128_mask
1240 (_mm_maskz_fnmadd_pd): Use __builtin_ia32_vfnmaddpd128_maskz.
1241 (_mm256_mask_fnmadd_ps): Use __builtin_ia32_vfnmaddps256_mask.
1242 (_mm256_mask_fnmadd_ps): Use __builtin_ia32_vfnmaddps256_mask.
1243 (_mm256_maskz_fnmadd_ps): Use __builtin_ia32_vfnmaddps256_maskz.
1244 (_mm_mask_fnmadd_ps): Use __builtin_ia32_vfnmaddps128_mask.
1245 (_mm_maskz_fnmadd_ps): Use __builtin_ia32_vfnmaddps128_maskz.
1246 * config/i386/fmaintrin.h (_mm_fnmadd_pd): Use
1247 __builtin_ia32_vfnmaddpd.
1248 (_mm256_fnmadd_pd): Use __builtin_ia32_vfnmaddpd256.
1249 (_mm_fnmadd_ps): Use __builtin_ia32_vfnmaddps.
1250 (_mm256_fnmadd_ps): Use __builtin_ia32_vfnmaddps256.
1251 (_mm_fnmadd_sd): Use __builtin_ia32_vfnmaddsd3.
1252 (_mm_fnmadd_ss): Use __builtin_ia32_vfnmaddss3.
1253 * config/i386/i386-builtin.def: Add
1254 __builtin_ia32_vfnmaddpd256_mask,
1255 __builtin_ia32_vfnmaddpd256_maskz,
1256 __builtin_ia32_vfnmaddpd128_mask,
1257 __builtin_ia32_vfnmaddpd128_maskz,
1258 __builtin_ia32_vfnmaddps256_mask,
1259 __builtin_ia32_vfnmaddps256_maskz,
1260 __builtin_ia32_vfnmaddps128_mask,
1261 __builtin_ia32_vfnmaddps128_maskz,
1262 __builtin_ia32_vfnmaddpd512_mask,
1263 __builtin_ia32_vfnmaddpd512_maskz,
1264 __builtin_ia32_vfnmaddps512_mask,
1265 __builtin_ia32_vfnmaddps512_maskz, __builtin_ia32_vfnmaddss3,
1266 __builtin_ia32_vfnmaddsd3, __builtin_ia32_vfnmaddps,
1267 __builtin_ia32_vfnmaddpd, __builtin_ia32_vfnmaddps256 and.
1268 __builtin_ia32_vfnmaddpd256.
1269 * config/i386/sse.md (fma4i_fnmadd_<mode>): New.
1270 (<avx512>_fnmadd_<mode>_maskz<round_expand_name>): Likewise.
1271 (*<sd_mask_codefor>fma_fnmadd_<mode><sd_maskz_name>_bcst_1):
1273 (*<sd_mask_codefor>fma_fnmadd_<mode><sd_maskz_name>_bcst_2):
1275 (*<sd_mask_codefor>fma_fnmadd_<mode><sd_maskz_name>_bcst_3):
1277 (fmai_vmfnmadd_<mode><round_name>): Likewise.
1279 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
1282 * config/i386/avx512fintrin.h (_mm512_fmsub_round_pd): Use
1283 __builtin_ia32_vfmsubpd512_mask.
1284 (_mm512_mask_fmsub_round_pd): Likewise.
1285 (_mm512_fmsub_pd): Likewise.
1286 (_mm512_mask_fmsub_pd): Likewise.
1287 (_mm512_maskz_fmsub_round_pd): Use
1288 __builtin_ia32_vfmsubpd512_maskz.
1289 (_mm512_maskz_fmsub_pd): Likewise.
1290 (_mm512_fmsub_round_ps): Use __builtin_ia32_vfmsubps512_mask.
1291 (_mm512_mask_fmsub_round_ps): Likewise.
1292 (_mm512_fmsub_ps): Likewise.
1293 (_mm512_mask_fmsub_ps): Likewise.
1294 (_mm512_maskz_fmsub_round_ps): Use
1295 __builtin_ia32_vfmsubps512_maskz.
1296 (_mm512_maskz_fmsub_ps): Likewise.
1297 * config/i386/avx512vlintrin.h (_mm256_mask_fmsub_pd): Use
1298 __builtin_ia32_vfmsubpd256_mask.
1299 (_mm256_maskz_fmsub_pd): Use __builtin_ia32_vfmsubpd256_maskz.
1300 (_mm_mask_fmsub_pd): Use __builtin_ia32_vfmaddpd128_mask
1301 (_mm_maskz_fmsub_pd): Use __builtin_ia32_vfmsubpd128_maskz.
1302 (_mm256_mask_fmsub_ps): Use __builtin_ia32_vfmsubps256_mask.
1303 (_mm256_mask_fmsub_ps): Use __builtin_ia32_vfmsubps256_mask.
1304 (_mm256_maskz_fmsub_ps): Use __builtin_ia32_vfmsubps256_maskz.
1305 (_mm_mask_fmsub_ps): Use __builtin_ia32_vfmsubps128_mask.
1306 (_mm_maskz_fmsub_ps): Use __builtin_ia32_vfmsubps128_maskz.
1307 * config/i386/fmaintrin.h (_mm_fmsub_pd): Use
1308 __builtin_ia32_vfmsubpd.
1309 (_mm256_fmsub_pd): Use __builtin_ia32_vfmsubpd256.
1310 (_mm_fmsub_ps): Use __builtin_ia32_vfmsubps.
1311 (_mm256_fmsub_ps): Use __builtin_ia32_vfmsubps256.
1312 (_mm_fmsub_sd): Use __builtin_ia32_vfmsubsd3.
1313 (_mm_fmsub_ss): Use __builtin_ia32_vfmsubss3.
1314 * config/i386/i386-builtin.def: Add
1315 __builtin_ia32_vfmsubpd256_mask,
1316 __builtin_ia32_vfmsubpd256_maskz,
1317 __builtin_ia32_vfmsubpd128_mask,
1318 __builtin_ia32_vfmsubpd128_maskz,
1319 __builtin_ia32_vfmsubps256_mask,
1320 __builtin_ia32_vfmsubps256_maskz,
1321 __builtin_ia32_vfmsubps128_mask,
1322 __builtin_ia32_vfmsubps128_maskz,
1323 __builtin_ia32_vfmsubpd512_mask,
1324 __builtin_ia32_vfmsubpd512_maskz,
1325 __builtin_ia32_vfmsubps512_mask,
1326 __builtin_ia32_vfmsubps512_maskz, __builtin_ia32_vfmsubss3,
1327 __builtin_ia32_vfmsubsd3, __builtin_ia32_vfmsubps,
1328 __builtin_ia32_vfmsubpd, __builtin_ia32_vfmsubps256 and.
1329 __builtin_ia32_vfmsubpd256.
1330 * config/i386/sse.md (fma4i_fmsub_<mode>): New.
1331 (<avx512>_fmsub_<mode>_maskz<round_expand_name>): Likewise.
1332 (*<sd_mask_codefor>fma_fmsub_<mode><sd_maskz_name>_bcst_1):
1334 (*<sd_mask_codefor>fma_fmsub_<mode><sd_maskz_name>_bcst_2):
1336 (*<sd_mask_codefor>fma_fmsub_<mode><sd_maskz_name>_bcst_3):
1338 (fmai_vmfmsub_<mode><round_name>): Likewise.
1340 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
1342 * config/i386/sse.md (*<plusminus_insn><mode>3<mask_name>_bcst_1):
1343 Remove plus. Renamed to ...
1344 (*sub<mode>3<mask_name>_bcst): This.
1345 (*add<mode>3<mask_name>_bcst_2): Renamede to ...
1346 (*add<mode>3<mask_name>_bcst): This.
1348 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
1351 * config/i386/sse.md (*mul<mode>3<mask_name>_bcst): New.
1353 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
1356 * i386/avx512vlintrin.h (_mm256_or_epi32): New.
1357 (_mm_or_epi32): Likewise.
1358 (_mm256_xor_epi32): Likewise.
1359 (_mm_xor_epi32): Likewise.
1360 (_mm256_or_epi64): Likewise.
1361 (_mm_or_epi64): Likewise.
1362 (_mm256_xor_epi64): Likewise.
1363 (_mm_xor_epi64): Likewise.
1365 2018-10-20 H.J. Lu <hongjiu.lu@intel.com>
1368 * config/i386/sse.md (*<avx512>_div<mode>3<mask_name>_bcst): New.
1370 2018-10-20 Jakub Jelinek <jakub@redhat.com>
1373 * varasm.c (decode_addr_const): Handle COMPOUND_LITERAL_EXPR.
1375 2018-10-20 Andreas Schwab <schwab@linux-m68k.org>
1377 * doc/ux.texi: Move @section directly after @node.
1379 2018-10-19 Jakub Jelinek <jakub@redhat.com>
1383 * omp-low.c (check_omp_nesting_restrictions): Diagnose ordered without
1384 depend closely nested inside of loop with ordered clause with
1387 2018-10-19 David Malcolm <dmalcolm@redhat.com>
1389 * Makefile.in (TEXI_GCCINT_FILES): Add ux.texi.
1390 * doc/gccint.texi: Include ux.texi and use it in top-level menu.
1391 * doc/ux.texi: New file.
1393 2018-10-19 Segher Boessenkool <segher@kernel.crashing.org>
1395 * config/rs6000/rs6000.h (REG_ALLOC_ORDER): Move 68 (that is, CR0) to
1396 be the first CR field allocated.
1398 2018-10-19 Richard Biener <rguenther@suse.de>
1401 * config/i386/i386.c (ix86_builtin_vectorization_cost): Use
1402 TYPE_VECTOR_SUBPARTS and avoid relying on vector mode.
1404 2018-10-19 H.J. Lu <hongjiu.lu@intel.com>
1407 * config/i386/sse.md
1408 (*<plusminus_insn><mode>3<mask_name>_bcst_1): New.
1409 (*add<mode>3<mask_name>_bcst_2): Likewise.
1411 2018-10-19 H.J. Lu <hongjiu.lu@intel.com>
1413 * config/i386/sse.md
1414 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_1):
1415 Replace nonimmediate_operand with register_operand.
1416 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_2):
1418 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_3):
1421 2018-10-19 Ilya Leoshkevich <iii@linux.ibm.com>
1423 PR rtl-optimization/87596
1424 * lra-constraints.c (spill_hard_reg_in_range): Use INSN_P () +
1425 lra_get_insn_recog_data () instead of lra_insn_recog_data[]
1426 for instructions in FROM..TO range.
1428 2018-10-19 Eric Botcazou <ebotcazou@adacore.com>
1430 * cfgexpand.c (expand_one_var): Use specific wording in error message
1431 for non-local frame variables.
1432 * stor-layout.c (layout_decl): Do not issue a warning for them.
1434 2018-10-19 Robin Dapp <rdapp@linux.ibm.com>
1436 * haifa-sched.c (priority): Add force_recompute parameter.
1437 (apply_replacement): Call priority () with force_recompute = true.
1438 (restore_pattern): Likewise.
1440 2018-10-18 H.J. Lu <hongjiu.lu@intel.com>
1442 * simplify-rtx.c (simplify_subreg): Limit mask of vec_merge to
1443 HOST_BITS_PER_WIDE_INT.
1444 (test_vector_ops_duplicate): Likewise.
1446 2018-10-18 H.J. Lu <hongjiu.lu@intel.com>
1449 * config/i386/sse.md (VF_AVX512): New.
1450 (avx512bcst): Likewise.
1451 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_1):
1453 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_2):
1455 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_3):
1458 2018-10-18 Jonathan Wakely <jwakely@redhat.com>
1460 * doc/invoke.texi (-dumpversion): Improve grammar.
1461 (-dumpfullversion): Make more consistent with -dumpversion.
1463 2018-10-18 Uros Bizjak <ubizjak@gmail.com>
1465 * config/i386/i386.c (ix86_emit_fp_unordered_jump):
1466 Set JUMP_LABEL to the jump insn.
1467 (ix86_emit_i387_log1p): Use ix86_expand_branch to expand branch.
1468 Predict emitted jump and add label to jump insn.
1470 2018-10-18 David Malcolm <dmalcolm@redhat.com>
1472 PR tree-optimization/87562
1473 * input.c (get_substring_ranges_for_loc): Use
1474 LRK_SPELLING_LOCATION rather than LRK_MACRO_EXPANSION_POINT when
1475 getting the linemap for the endpoint. Verify that it's either
1476 in the same linemap as the start point's spelling location, or
1477 at least in the same file.
1479 2018-10-18 Richard Biener <rguenther@suse.de>
1481 * config/i386/i386.c (ix86_builtin_vectorization_cost): Do not
1482 feed width-specific load/store costs through ix86_vec_cost.
1483 * config/i386/x86-tune-costs.h (athlon_cost): Adjust.
1484 (k8_cost): Likewise.
1485 (bdver_cost): Likewise.
1486 (znver1_cost): Likewise.
1487 (btver1_cost): Likewise.
1488 (btver2_cost): Likewise.
1490 2018-10-18 H.J. Lu <hongjiu.lu@intel.com>
1492 * simplify-rtx.c (simplify_subreg): Call simplify_gen_subreg
1493 to simplify subreg of vec_merge.
1495 2018-10-18 Richard Biener <rguenther@suse.de>
1497 * config/i386/i386.c: Fix costing of vector FMA.
1499 2018-10-18 Richard Biener <rguenther@suse.de>
1501 * config/i386/i386.c (ix86_vec_cost): Remove !parallel path
1503 (ix86_builtin_vectorization_cost): For vec_construct properly
1504 cost insertion into SSE regs.
1505 (...): Adjust calls to ix86_vec_cost.
1507 2018-10-18 Richard Biener <rguenther@suse.de>
1511 2018-02-07 Richard Biener <rguenther@suse.de>
1513 PR tree-optimization/84204
1514 * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
1517 2018-10-18 H.J. Lu <hongjiu.lu@intel.com>
1520 * simplify-rtx.c (simplify_subreg): Simplify subreg of vec_merge
1522 (test_vector_ops_duplicate): Add test for a scalar subreg of a
1523 VEC_MERGE of a VEC_DUPLICATE.
1525 2018-10-17 Joseph Myers <joseph@codesourcery.com>
1527 * doc/cpp.texi (__STDC_VERSION__): Document C2X handling.
1528 * doc/invoke.texi (-std=c2x, -std=gnu2x): Document new options.
1529 * doc/standards.texi (C Language): Document C2X.
1530 * dwarf2out.c (highest_c_language), config/rl78/rl78.c
1531 (rl78_option_override): Handle "GNU C2X" language name.
1533 2018-10-17 Joseph Myers <joseph@codesourcery.com>
1535 * doc/invoke.texi (-std=c17), doc/standards.texi (C Language):
1536 Document C17 as published in 2018.
1538 2018-10-17 Eric Botcazou <ebotcazou@adacore.com>
1541 * fold-const.c (fold_truth_andor_1): If the right side is not constant,
1542 bail out if both sides do not have the same storage order.
1544 2018-10-17 Aldy Hernandez <aldyh@redhat.com>
1546 * bitmap.c (bitmap_head::dump): New.
1547 * bitmap.h (bitmap_head): Add dump().
1548 * gimple-ssa-evrp-analyze.c
1549 (evrp_range_analyzer::try_find_new_range): Adjust for value_range API.
1550 (evrp_range_analyzer::set_ssa_range_info): Same.
1551 (evrp_range_analyzer::record_ranges_from_phis): Same.
1552 (evrp_range_analyzer::record_ranges_from_stmt): Same.
1553 * gimple-ssa-evrp.c (evrp_dom_walker::before_dom_children): Same.
1554 * gimple-ssa-sprintf.c (get_int_range): Same.
1555 (format_integer): Same.
1556 (sprintf_dom_walker::handle_gimple_call): Same.
1557 * ipa-cp.c (ipcp_vr_lattice::meet_with_1): Same.
1558 (ipcp_vr_lattice::top_p): Same.
1559 (ipcp_vr_lattice::bottom_p): Same.
1560 (ipcp_vr_lattice::set_to_bottom): Same.
1561 (ipa_vr_operation_and_type_effects): Same.
1562 (propagate_vr_across_jump_function): Same.
1563 (ipcp_store_vr_results): Same.
1564 * ipa-prop.c (struct ipa_vr_ggc_hash_traits): Same.
1565 (ipa_print_node_jump_functions_for_edge): Same.
1566 (ipa_get_value_range): Same.
1567 (ipa_compute_jump_functions_for_edge): Same.
1568 (ipa_write_jump_function): Same.
1569 * tree-ssa-dom.c (simplify_stmt_for_jump_threading): Same.
1570 * tree-ssa-threadedge.c (record_temporary_equivalences_from_phis):
1572 * vr-values.c (set_value_range_to_nonnegative): Same.
1573 (set_value_range_to_truthvalue): Same.
1574 (vr_values::get_value_range): Same.
1575 (vr_values::set_defs_to_varying): Same.
1576 (vr_values::update_value_range): Same.
1577 (symbolic_range_based_on_p): Same.
1578 (vr_values::op_with_boolean_value_range_p): Same.
1579 (vr_values::extract_range_for_var_from_comparison_expr): Same.
1580 (vr_values::extract_range_from_ssa_name): Same.
1581 (vr_values::extract_range_from_binary_expr): Same.
1582 (vr_values::extract_range_from_unary_expr): Same.
1583 (vr_values::extract_range_from_cond_expr): Same.
1584 (vr_values::extract_range_from_comparison): Same.
1585 (vr_values::check_for_binary_op_overflow): Same.
1586 (vr_values::extract_range_basic): Same.
1587 (vr_values::extract_range_from_assignment): Same.
1588 (compare_ranges): Same.
1589 (compare_range_with_value): Same.
1590 (vr_values::adjust_range_with_scev): Same.
1591 (vrp_valueize): Same.
1592 (vrp_valueize_1): Same.
1593 (vr_values::get_vr_for_comparison): Same.
1594 (vr_values::compare_name_with_value): Same.
1595 (vr_values::compare_names): Same.
1596 (vr_values::vrp_evaluate_conditional): Same.
1597 (find_case_label_ranges): Same.
1598 (vr_values::vrp_visit_switch_stmt): Same.
1599 (vr_values::extract_range_from_phi_node): Same.
1600 (vr_values::simplify_div_or_mod_using_ranges): Same.
1601 (vr_values::simplify_bit_ops_using_ranges): Same.
1602 (test_for_singularity): Same.
1603 (range_fits_type_p): Same.
1604 (vr_values::simplify_cond_using_ranges_1): Same.
1605 (vr_values::simplify_switch_using_ranges): Same.
1606 (vr_values::simplify_float_conversion_using_ranges): Same.
1607 (vr_values::two_valued_val_range_p): Same.
1608 (vr_values::add_equivalence): Move to value_range::equiv_add.
1609 * vr-values.h (vr_values::add_equivalence): Remove.
1610 (VR_INITIALIZER): Remove.
1611 * tree-vrp.c (value_range::set): New.
1612 (value_range::equiv_add): New.
1613 (value_range::value_range): New.
1614 (value_range::deep_copy): New.
1615 (value_range::check): New.
1616 (value_range::equal_p): New.
1617 (value_range::ignore_equivs_equal_p): New.
1618 (value_range::operator==): New.
1619 (value_range::operator!=): New.
1620 (value_range::symbolic_p): New.
1621 (value_range::numeric_p): New.
1622 (value_range::set_undefined): New.
1623 (value_range::set_varying): New.
1624 (value_range::may_contain_p): New.
1625 (value_range::equiv_clear): New.
1626 (value_range::singleton_p): New.
1627 (value_range::intersect): New.
1628 (value_range::dump): New.
1629 (value_range::set_and_canonicalize): New.
1630 (set_value_range): Adjust for value_range API.
1631 (set_value_range_to_undefined): Same.
1632 (set_value_range_to_varying): Same.
1633 (set_and_canonicalize_value_range): Same.
1634 (set_value_range_to_nonnull): Same.
1635 (set_value_range_to_null): Same.
1636 (range_is_null): Same.
1637 (range_is_nonnull): Same.
1638 (range_int_cst_p): Same.
1639 (range_int_cst_singleton_p): Same.
1640 (symbolic_range_p): Same.
1641 (range_includes_zero_p): Same.
1642 (value_range_constant_singleton): Same.
1643 (vrp_set_zero_nonzero_bits): Same.
1644 (ranges_from_anti_range): Same.
1645 (extract_range_into_wide_ints): Same.
1646 (extract_range_from_multiplicative_op): Same.
1647 (set_value_range_with_overflow): Same.
1648 (extract_range_from_binary_expr_1): Same.
1649 (extract_range_from_unary_expr): Same.
1650 (dump_value_range): Same.
1651 (debug_value_range): Same.
1652 (vrp_prop::check_array_ref): Same.
1653 (vrp_prop::check_mem_ref): Same.
1654 (vrp_prop::vrp_initialize): Same.
1655 (vrp_prop::visit_stmt): Same.
1656 (intersect_ranges): Same.
1657 (vrp_prop::visit_phi): Same.
1658 (vrp_prop::vrp_finalize): Same.
1659 (determine_value_range_1): Same.
1660 (determine_value_range): Same.
1661 (vrp_intersect_ranges_1): Rename to...
1662 (vrp_intersect_1): this.
1663 (vrp_intersect_ranges): Rename to...
1664 (value_range::intersect_helper): ...this.
1665 (vrp_meet_1): Rename to...
1666 (value_range::union_helper): ...this.
1667 (vrp_meet): Rename to...
1668 (value_range::union_): ...this.
1669 (copy_value_range): Remove.
1670 * tree-vrp.h (struct value_range): Rewrite into a proper class.
1671 (value_range::vrtype): New.
1672 (value_range::type): New.
1673 (value_range::equiv): New.
1674 (value_range::min): New.
1675 (value_range::max): New.
1676 (value_range::varying_p): New.
1677 (value_range::undefined_p): New.
1678 (value_range::null_p): New.
1679 (value_range::equiv_add): New.
1680 (copy_value_range): Remove.
1682 2018-10-17 David Malcolm <dmalcolm@redhat.com>
1684 * Makefile.in (SELFTEST_TARGETS): New.
1685 (selftest) Change from s-selftest-c to $(SELFTEST_TARGETS).
1686 (C_SELFTEST_FLAGS, C_SELFTEST_DEPS, s-selftest-c, selftest-c-gdb)
1687 (selftest-gdb, selftest-c-valgrind, selftest-valgrind): Move to
1689 (CPP_SELFTEST_FLAGS, CPP_SELFTEST_DEPS, s-selftest-c++)
1690 (selftest-c++-gdb, selftest-c++-valgrind): Move to
1692 * configure: Regenerate.
1693 * configure.ac (selftest_languages): New.
1695 2018-10-17 Aldy Hernandez <aldyh@redhat.com>
1697 * tree-vrp.c (extract_range_from_multiplicative_op): Remove
1698 overflow wraps argument.
1699 (extract_range_from_binary_expr_1): Do not pass overflow wraps to
1700 wide_int_range_multiplicative_op.
1701 * wide-int-range.cc (wide_int_range_mult_wrapping): Remove
1702 overflow wraps argument.
1703 (wide_int_range_multiplicative_op): Same.
1704 (wide_int_range_lshift): Same.
1705 (wide_int_range_div): Same.
1706 * wide-int-range.h (wide_int_range_multiplicative_op): Same.
1707 (wide_int_range_lshift): Same.
1708 (wide_int_range_div): Same.
1710 2018-10-17 Aldy Hernandez <aldyh@redhat.com>
1712 * wide-int-range.h (wide_int_range_shift_undefined_p): Adjust to
1713 use sign as argument.
1714 * tree-vrp.c (extract_range_from_binary_expr_1): Pass sign to
1715 wide_int_range_shift_undefined_p.
1717 2018-10-16 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
1719 * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>):
1721 (@despeculate_copy<ALLI_TI:mode>): ... This.
1722 * config/aarch64/aarch64.c (aarch64_speculation_safe_value): Remove
1725 2018-10-16 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1727 * config.gcc: Obsolete *-*-solaris2.10*.
1728 * doc/install.texi (Specific, *-*-solaris2*): Document it.
1730 2018-10-12 Jeff Law <law@redhat.com>
1732 * config/ft32/ft32.md (ft32_general_movsrc_operand): Disable
1733 reg + sym +- const_int addressing modes.
1735 2018-10-15 David Malcolm <dmalcolm@redhat.com>
1737 * common.opt (fdiagnostics-minimum-margin-width=): New option.
1738 * diagnostic-show-locus.c (layout::layout): Apply the minimum
1740 (layout::start_annotation_line): Only print up to 3 of the
1741 margin character, to avoid touching the left-hand side.
1742 (selftest::test_diagnostic_show_locus_fixit_lines): Update for
1743 minimum margin width, as set by test_diagnostic_context's ctor.
1744 (selftest::test_fixit_insert_containing_newline): Likewise.
1745 (selftest::test_fixit_insert_containing_newline_2): Likewise.
1746 (selftest::test_line_numbers_multiline_range): Clear
1747 dc.min_margin_width.
1748 * diagnostic.c (diagnostic_initialize): Initialize
1750 * diagnostic.h (struct diagnostic_context): Add field
1752 * doc/invoke.texi: Add -fdiagnostics-minimum-margin-width=.
1753 * opts.c (common_handle_option): Handle
1754 OPT_fdiagnostics_minimum_margin_width_.
1755 * selftest-diagnostic.c
1756 (selftest::test_diagnostic_context::test_diagnostic_context):
1757 Initialize min_margin_width to 6.
1758 * toplev.c (general_init): Initialize global_dc->min_margin_width.
1760 2018-10-15 David Malcolm <dmalcolm@redhat.com>
1762 * gcc-rich-location.h (gcc_rich_location::add_location_if_nearby):
1763 Fix usage of "error_at_rich_loc" in the comment.
1765 2018-10-15 Renlin Li <renlin.li@arm.com>
1768 * tree-vectorizer.c (try_vectorize_loop_1): Don't use
1769 if-conversioned loop when it contains ifn with types not
1770 supported by backend.
1771 * internal-fn.c (expand_direct_optab_fn): Add an assert.
1772 (direct_internal_fn_supported_p): New helper function.
1773 * internal-fn.h (direct_internal_fn_supported_p): Declare.
1775 2018-10-15 Jakub Jelinek <jakub@redhat.com>
1778 * common/config/i386/i386-common.c (OPTION_MASK_ISA_AVX512F_UNSET):
1779 Remove OPTION_MASK_ISA_AVX5124FMAPS_UNSET and
1780 OPTION_MASK_ISA_AVX5124VNNIW_UNSET.
1782 2018-10-15 Bin Cheng <bin.cheng@linux.alibaba.com>
1784 PR tree-optimization/87022
1785 * tree-loop-distribution.c (pg_add_dependence_edges): Check all
1786 bits in dist vector rather than the first one.
1788 2018-10-15 Richard Biener <rguenther@suse.de>
1791 * tree-ssa-structalias.c (struct vls_data): Add escaped_p member.
1792 (visit_loadstore): When a used restrict tag escaped verify that
1793 the points-to solution of "other" pointers do not include
1795 (compute_dependence_clique): If a used restrict tag escaped
1796 communicated that down to visit_loadstore.
1798 2018-10-15 Andreas Krebbel <krebbel@linux.ibm.com>
1800 * config/s390/s390.c (s390_expand_vec_init): Force vector element
1801 into reg if it isn't a general operand.
1803 2018-10-14 H.J. Lu <hongjiu.lu@intel.com>
1806 * config/i386/sse.md (*vec_dupv2di): Add register source to
1809 2018-10-14 H.J. Lu <hongjiu.lu@intel.com>
1812 * common/config/i386/i386-common.c (OPTION_MASK_ISA_AVX512F_UNSET):
1813 Add OPTION_MASK_ISA_AVX512IFMA_UNSET,
1814 OPTION_MASK_ISA_AVX5124FMAPS_UNSET and
1815 OPTION_MASK_ISA_AVX5124VNNIW_UNSET.
1817 2018-10-13 Eric Botcazou <ebotcazou@adacore.com>
1819 * dwarf2cfi.c (struct dw_trace_info): Add args_size_defined_for_eh.
1820 (notice_args_size): Set it in the current trace if no insn that can
1821 throw internally has been seen yet.
1822 (connect_traces): When connecting args_size between traces, allow the
1823 incoming values not to match if there is an insn setting it before the
1824 first insn that can throw internally; in that case, force the creation
1825 of a CFI note on this latter insn.
1827 2018-10-13 Jonathan Wakely <jwakely@redhat.com>
1829 * opt-problem.h (opt_wrapper): Use template-argument-list when naming
1830 the base class, because using the injected-class-name was not clearly
1831 specified until DR 176.
1833 2018-10-12 Paul Koning <ni1d@arrl.net>
1835 * config/pdp11/pdp11.md (doloop_end): New expander.
1836 (doloop_end_insn): renamed from "doloop_end".
1837 (addqi3): New pattern.
1838 (subqi3): New pattern.
1839 * config/pdp11/predicates.md (incdec_operand): New predicate.
1841 2018-10-12 Yury Gribov <tetra2005@gmail.com>
1844 * real.c (format_helper::can_represent_integral_type_p): New function
1845 * real.h (format_helper::can_represent_integral_type_p): Ditto.
1846 * match.pd: New pattern.
1848 2018-10-12 Alexandre Oliva <oliva@adacore.com>
1850 * configure.ac: Introduce --enable-large-address-aware
1851 to define MINGW_DEFAULT_LARGE_ADDR_AWARE.
1852 * doc/install.texi: Document it.
1853 * configure, config.in: Rebuilt.
1854 * config/i386/mingw32.h (LINK_SPEC_LARGE_ADDR_AWARE): Define,
1855 based on MINGW_DEFAULT_LARGE_ADDR_AWARE.
1856 (LINK_SPEC): Insert it.
1857 * config/i386/mingw-264.h: Likewise.
1859 * cygming.h (HAVE_GAS_ALIGNED_COMM): Fallback-define.
1861 2018-10-12 Peter Bergner <bergner@linux.ibm.com>
1863 PR rtl-optimization/87600
1864 * ira-lives (non_conflicting_reg_copy_p): Disable for non LRA targets.
1866 2018-10-12 Paul Koning <ni1d@arrl.net>
1868 * doc/md.texi (doloop_end): Document that the pattern code may
1869 need to check operand mode.
1871 2018-10-12 Wilco Dijkstra <wdijkstr@arm.com>
1873 * config/aarch64/aarch64.md (zero_extendsidi2_aarch64): Add alternatives
1874 to zero-extend between int and floating-point registers.
1875 (load_pair_zero_extendsidi2_aarch64): Add alternative for zero-extended
1876 ldp into floating-point registers. Add type and arch attributes.
1877 (zero_extend<SHORT:mode><GPI:mode>2_aarch64): Add arch attribute.
1878 Use f_loads for type attribute.
1880 2018-10-11 Martin Sebor <msebor@redhat.com>
1882 * doc/extend.texi (attribute packed): Correct typos.
1884 2018-10-11 Martin Sebor <msebor@redhat.com>
1886 * doc/extend.texi (attribute flatten): Mention interaction with
1889 2018-10-11 Jan Hubicka <hubicka@ucw.cz>
1892 * cgraphclones.c (cgraph_node::create_version_clone_with_body):
1893 Set new_decl virtual flag to zero.
1895 2018-10-11 Martin Sebor <msebor@redhat.com>
1898 * doc/extend.texi (attribute format_arg): Discuss using multiple
1899 attributes on a single function.
1901 2018-10-11 Giuliano Belinassi <giuliano.belinassi@usp.br>
1903 PR tree-optimization/86829
1904 * match.pd (sin (atan (x))): New simplification rules.
1905 (cos (atan (x))): Likewise.
1906 * real.c (build_sinatan_real): New function.
1907 * real.h (build_sinatan_real): Prototype.
1909 2018-10-11 Will Schmidt <will_schmidt@vnet.ibm.com>
1911 * config/rs6000/rs6000.c (map_to_integral_tree_type): New helper
1913 (fold_mergeeo_helper): New helper function.
1914 (rs6000_gimple_fold_builtin): Add hooks for vec_mergee and vec_mergeo
1915 intrinsics. Correct some whitespace indentation issues.
1917 2018-10-11 Wilco Dijkstra <wdijkstr@arm.com>
1920 * config/aarch64/aarch64.c (aarch64_mask_and_shift_for_ubfiz_p):
1921 Use HOST_WIDE_INT_1U for shift.
1923 2018-10-11 Doug Rupp <rupp@adacore.com>
1924 Olivier Hainque <hainque@adacore.com>
1926 * config/rs6000/vxworks.h (VXWORKS_RELAX_LINK_SPEC): New macro.
1927 Pass --relax to the linker for RTPs.
1928 (LINK_SPEC): Append VXWORKS_RELAX_LINK_SPEC.
1930 2018-10-11 Andrew Stubbs <ams@codesourcery.com>
1931 Jan Hubicka <jh@suse.cz>
1932 Martin Jambor <mjambor@suse.cz>
1934 * print-rtl.c (print_rtx_operand_codes_E_and_V): Print how many times
1935 the same elements are repeated rather than printing all of them.
1936 * read-rtl.c (rtx_reader::read_rtx_operand): Recognize and expand
1937 "repeated" elements.
1938 * read-rtl-function.c (test_loading_repeat): New function.
1939 (read_rtl_function_c_tests): Call test_loading_repeat.
1940 * rtl-tests.c (test_dumping_repeat): New function.
1941 (rtl_tests_c_tests): Call test_dumping_repeat.
1943 2018-10-11 Richard Biener <rguenther@suse.de>
1945 * config/i386/x86-tune-costs.h (bdver?_memcpy, bdver?_memset,
1946 bdver?_cost): Unify to ...
1947 (bdver_memcpy, bdver_memset, bdver_cost): ... this.
1948 * config/i386/i386.c (processor_cost_table): Adjust.
1950 2018-10-10 Eric Botcazou <ebotcazou@adacore.com>
1953 * cgraphunit.c (cgraph_node::expand_thunk): Force DECL_IGNORED_P on
1954 the thunk when expanding to GIMPLE.
1956 2018-10-10 Bernd Edlinger <bernd.edlinger@hotmail.de>
1958 * varasm.c (mergeable_string_section): Don't try to move zero-length
1959 strings to the merge section.
1961 2018-10-10 Uros Bizjak <ubizjak@gmail.com>
1964 * config/i386/mmx.md (const_vector 0 -> mem splitter): New splitter.
1966 2018-10-10 Jakub Jelinek <jakub@redhat.com>
1969 * config/i386/i386-builtin.def (IX86_BUILTIN_RDPMC): Move from args set
1970 to special_args set.
1972 2018-10-10 Richard Biener <rguenther@suse.de>
1974 * config/i386/sse.md (reduc_plus_scal_v8df, reduc_plus_scal_v4df,
1975 reduc_plus_scal_v2df, reduc_plus_scal_v16sf, reduc_plus_scal_v8sf,
1976 reduc_plus_scal_v4sf): Merge into pattern reducing to half width
1977 and recursing and pattern terminating the recursion on SSE
1978 vector width using ix86_expand_reduc.
1979 (reduc_sminmax_scal_<mode>): Split into part reducing to half
1980 width and recursing and SSE2 vector variant doing the final
1981 reduction with ix86_expand_reduc.
1982 (reduc_uminmax_scal_<mode>): Likewise for the AVX512 variants
1983 with terminating the recursion at AVX level, splitting that
1986 2018-10-09 David Malcolm <dmalcolm@redhat.com>
1988 * genmatch.c (error_cb): Rename to...
1989 (diagnostic_cb): ...this, converting int params to enums.
1990 (fatal_at): Update for renaming.
1991 (warning_at): Likewise.
1993 * input.c (selftest::ebcdic_execution_charset::apply):
1994 Update for renaming of...
1995 (selftest::ebcdic_execution_charset::on_error): ...this, renaming
1997 (selftest::ebcdic_execution_charset::on_diagnostic): ...this,
1998 converting level and reason to enums.
1999 (class selftest::lexer_error_sink): Rename to...
2000 (class selftest::lexer_test_options): ...this, renaming field
2001 "m_errors" to "m_diagnostics".
2002 (selftest::lexer_test_options::apply): Update for renaming of...
2003 (selftest::lexer_test_options::on_error): ...this, renaming to...
2004 (selftest::lexer_test_options::on_diagnostic): ...this
2005 converting level and reason to enums.
2006 (selftest::test_lexer_string_locations_raw_string_unterminated):
2007 Update for renamings.
2008 * opth-gen.awk (struct cpp_reason_option_codes_t): Use enum for
2011 2018-10-09 Paul A. Clarke <pc@us.ibm.com>
2013 * config.gcc (powerpc*-*-*): Add pmmintrin.h to extra_headers.
2014 * config/rs6000/pmmintrin.h: New file.
2016 2018-10-09 Eric Botcazou <ebotcazou@adacore.com>
2018 PR tree-optimization/86659
2019 * gimple-match.h (gimple_match_op constructors): Initialize reverse.
2021 2018-10-09 Richard Biener <rguenther@suse.de>
2023 PR tree-optimization/63155
2024 * tree-ssa-structalias.c: Include tree-ssa.h.
2025 (get_constraint_for_ssa_var): For undefs return nothing_id.
2026 (find_func_aliases): Cleanup PHI handling.
2028 2018-10-09 Richard Biener <rguenther@suse.de>
2030 * tree-vectorizer.c (dump_stmt_cost): Fix cut&paste missing
2033 2018-10-09 Martin Liska <mliska@suse.cz>
2035 * asan.c (asan_emit_stack_protection): If a stack variable
2036 is located in a same file as current function, then emit
2037 line info into variable definition string.
2039 2018-10-08 Eric Botcazou <ebotcazou@adacore.com>
2041 * print-rtl.c (rtx_writer::print_rtx_operand_code_i): Print column
2044 2018-10-08 Eric Botcazou <ebotcazou@adacore.com>
2046 * cgraphunit.c (cgraph_node::expand_thunk): Do not force DECL_IGNORED_P
2049 2018-10-08 Eric Botcazou <ebotcazou@adacore.com>
2051 PR tree-optimization/86659
2052 * gimple-match.h (struct gimple_match_op): Add reverse field.
2053 (gimple_match_op::set_op): New overloaded method.
2054 * gimple-match-head.c (maybe_build_generic_op) <BIT_FIELD_REF>: Set
2055 the REF_REVERSE_STORAGE_ORDER flag on the value.
2056 (gimple_simplify) <GIMPLE_ASSIGN>: For BIT_FIELD_REF, propagate the
2057 REF_REVERSE_STORAGE_ORDER flag and avoid simplifying if it is set.
2059 2018-10-08 Richard Sandiford <richard.sandiford@arm.com>
2062 * gimple-ssa-backprop.c (backprop::intersect_uses): Use
2063 FOR_EACH_IMM_USE_FAST instead of FOR_EACH_IMM_USE_STMT.
2065 2018-10-08 H.J. Lu <hongjiu.lu@intel.com>
2068 * config/i386/avx512fintrin.h (_mm512_mask_fmaddsub_round_pd):
2069 Defined with __builtin_ia32_vfmaddsubpd512_mask.
2071 2018-10-08 Richard Biener <rguenther@suse.de>
2073 * config/i386/x86-tune-costs.h (znver1_cost): Make AVX256 vector loads
2074 cost the same as AVX128 ones.
2076 2018-10-08 Paul Koning <ni1d@arrl.net>
2078 * config/pdp11/pdp11-protos.h (output_block_move): Remove.
2079 (expand_block_move): New function.
2080 * config/pdp11/pdp11.c (output_block_move): Remove.
2081 (expand_block_move): New function.
2082 * config/pdp11/pdp11.h (MOVE_RATIO): New definition.
2083 * config/pdp11/pdp11.md (movmemhi): Use expand_block_move.
2084 (*movmemhi1): Remove.
2086 2018-10-08 Robin Dapp <rdapp@linux.ibm.com>
2088 * config/s390/2827.md: Increase latencies for some FP instructions.
2090 2018-10-08 Richard Biener <rguenther@suse.de>
2092 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
2094 * tree-vectorizer.c (dump_stmt_cost): Add cost param and dump it.
2095 * tree-vectorizer.h (dump_stmt_cost): Adjust.
2096 (add_stmt_cost): Dump return value of the hook.
2098 2018-10-08 Richard Biener <rguenther@suse.de>
2100 PR tree-optimization/63155
2101 * tree-ssa-propagate.c (add_ssa_edge): Do cheap check first.
2102 (ssa_propagation_engine::ssa_propagate): Remove redundant
2103 bitmap bit clearing.
2105 2018-10-05 Peter Bergner <bergner@linux.ibm.com>
2107 PR rtl-optimization/86939
2108 PR rtl-optimization/87479
2109 * ira.h (non_conflicting_reg_copy_p): New prototype.
2110 * ira-lives.c (ignore_reg_for_conflicts): New static variable.
2111 (make_hard_regno_dead): Don't add conflicts for register
2112 ignore_reg_for_conflicts.
2113 (make_object_dead): Likewise.
2114 (non_conflicting_reg_copy_p): New function.
2115 (process_bb_node_lives): Set ignore_reg_for_conflicts for copies.
2116 Remove special conflict handling of REAL_PIC_OFFSET_TABLE_REGNUM.
2117 * lra-lives.c (ignore_reg_for_conflicts): New static variable.
2118 (make_hard_regno_dead): Don't add conflicts for register
2119 ignore_reg_for_conflicts. Remove special conflict handling of
2120 REAL_PIC_OFFSET_TABLE_REGNUM. Remove now unused argument
2121 check_pic_pseudo_p and update callers.
2122 (mark_pseudo_dead): Don't add conflicts for register
2123 ignore_reg_for_conflicts.
2124 (process_bb_lives): Set ignore_reg_for_conflicts for copies.
2126 2018-10-05 Andrew Waterman <andrew@sifive.com>
2127 Jim Wilson <jimw@sifive.com>
2129 * config/riscv/riscv.md (f<quiet_pattern>_quiet<ANYF:mode><X:mode>4):
2130 Add define_expand. Add ! HONOR_SNANS check to current pattern. Add
2131 new pattern using HONOR_SNANS that emits one extra instruction.
2133 2018-10-05 Segher Boessenkool <segher@kernel.crashing.org>
2135 * config/rs6000/rs6000.md (unnamed mfcr scc_comparison_operator
2136 patterns): Merge SI and DI patterns to a GPR pattern.
2137 (unnamed define_insn and define_split for record form of that): Merge
2138 to a single define_insn_and_split pattern.
2140 2018-10-05 David Malcolm <dmalcolm@redhat.com>
2143 * input.c (expand_location_to_spelling_point): Add param "aspect"
2144 and use rather than hardcoding LOCATION_ASPECT_CARET.
2145 (get_substring_ranges_for_loc): Handle the case of a single token
2146 within a macro expansion.
2147 * input.h (expand_location_to_spelling_point): Add "aspect" param,
2148 defaulting to LOCATION_ASPECT_CARET.
2150 2018-10-05 Paul Koning <ni1d@arrl.net>
2152 * config/pdp11/pdp11.c (TARGET_CXX_GUARD_TYPE): Define.
2153 (TARGET_CXX_CLASS_DATA_ALWAYS_COMDAT): Define.
2154 (TARGET_CXX_LIBRARY_RTTI_COMDAT): Define.
2155 (pdp11_guard_type): New function.
2157 2018-10-05 Paul Koning <ni1d@arrl.net>
2159 * config/pdp11/pdp11.h (FLOAT_TYPE_SIZE): Always 32.
2160 * config/pdp11/pdp11.opt (mfloat32): Remove.
2162 * doc/invoke.texi (pdp11 -mfloat32): Remove:
2163 (pdp11 -mfloat64): Remove.
2165 2018-10-05 Uros Bizjak <ubizjak@gmail.com>
2167 * config/i386/i386.md (*cmpxf_cc_i387): Remove pattern.
2168 (*cmp<mode>_cc_i387): Ditto.
2169 (*cmpu<mode>_cc_i387): Ditto.
2170 (*cmp<X87MODEF:mode>_<SWI24:mode>_cc_i387): Ditto.
2171 * config/i386/i386.c (ix86_expand_fp_compare): Remove
2173 <case IX86_FPCMP_SAHF>: Do not generate pattern with HImode clobber.
2174 Emit x86_sahf_1 pattern.
2175 (ix86_expand_compare): Update call to ix86_expand_fp_compare.
2176 (ix86_expand_carry_flag_compare): Ditto.
2178 2018-10-05 Uros Bizjak <ubizjak@gmail.com>
2180 * config/i386/i386.md (*cmpxf_i387): Change operand 2 predicate
2181 to reg_or_0_operand. Add "C" constraint.
2182 (*cmpxf_cc_i387): Ditto.
2183 (*cmp<mode>_i387): Change operand 2 predicate
2184 to nonimm_or_0_operand. Add "C" constraint.
2185 (*cmp<mode>_cc_i387): Ditto.
2186 (*cmp<mode>_0_i387): Remove insn pattern.
2187 (*cmp<mode>_0_cc_i387): Ditto.
2189 2018-10-05 Uros Bizjak <ubizjak@gmail.com>
2191 * config/i386/constraints.md ("C"): Do not depend on TARGET_SSE.
2192 * config/i386/predicates.md (nonimm_or_0_operand): Rename
2193 from vector_move_operand. Update all uses.
2195 2018-10-05 Martin Sebor <msebor@redhat.com>
2197 PR tree-optimization/87490
2198 * builtins.c (expand_builtin_strnlen): Handle a null data.decl
2201 2018-10-05 Richard Biener <rguenther@suse.de>
2203 PR tree-optimization/63155
2204 * tree-ssa-ccp.c (ccp_propagate::visit_phi): Avoid excess
2205 vertical space in dumpfiles.
2206 * tree-ssa-propagate.h
2207 (ssa_propagation_engine::process_ssa_edge_worklist): Remove.
2208 * tree-ssa-propagate.c (cfg_blocks_back): New global.
2209 (ssa_edge_worklist_back): Likewise.
2210 (curr_order): Likewise.
2211 (cfg_blocks_get): Remove abstraction.
2212 (cfg_blocks_add): Likewise.
2213 (cfg_blocks_empty_p): Likewise.
2214 (add_ssa_edge): Add to current or next worklist based on
2216 (add_control_edge): Likewise.
2217 (ssa_propagation_engine::process_ssa_edge_worklist): Fold
2219 (ssa_propagation_engine::ssa_propagate): ... here. Unify
2220 iteration from CFG and SSA edge worklist so we process
2221 everything in RPO order, prioritizing forward progress
2223 (ssa_prop_init): Allocate new worklists, do not dump
2225 (ssa_prop_fini): Free new worklists.
2227 2018-10-05 Richard Biener <rguenther@suse.de>
2229 * tree-core.h (tree_block::abstract_flag): Remove.
2230 (tree_block::block_num): Make full 32bits.
2231 * tree.def (BLOCK): Remove docs about BLOCK_ABSTRACT.
2232 * tree.h (BLOCK_ABSTRACT): Remove.
2233 * dwarf2out.c (gen_lexical_block_die): Remove dead code
2234 resulting from BLOCK_ABSTRACT being always false.
2235 (gen_inlined_subroutine_die): Likewise.
2236 (gen_block_die): Likewise.
2237 * tree.c (block_ultimate_origin): Likewise.
2238 * tree-pretty-print.c (dump_block_node): Remove code dealing
2239 with BLOCK_ABSTRACT.
2240 * tree-ssa-live.c (dump_scope_block): Likewise.
2241 * tree-streamer-in.c (unpack_ts_block_value_fields): Likewise.
2242 * tree-streamer-out.c (pack_ts_block_value_fields): Likewise.
2244 2018-10-05 Richard Biener <rguenther@suse.de>
2246 * config/i386/i386.c (ix86_add_stmt_cost): When scalar cost
2247 is asked for initialize mode to the component mode of the
2250 2018-10-05 H.J. Lu <hongjiu.lu@intel.com>
2253 * config/i386/gnu-user.h (ASM_SPEC): Don't pass -msse2avx to
2254 assembler for -mavx.
2255 * config/i386/gnu-user64.h (ASM_SPEC): Likewise.
2257 2018-10-05 Segher Boessenkool <segher@kernel.crashing.org>
2260 * config/rs6000/rs6000-builtin.def (RS6000_BUILTIN_SET_FPSCR_DRN): Use
2262 * config/rs6000/rs6000.md (rs6000_set_fpscr_rn): Require the operand
2263 to be DImode. When using mffscrn, force the operand to a register.
2265 2018-10-04 Uros Bizjak <ubizjak@gmail.com>
2267 * config/i386/i386.md (*fop_<X87MODEF:mode>_2_i387): Macroize insn
2268 from *fop_<MODEF:mode>_2_i387 and *fop_xf_2_i387 using
2269 X87MODEF mode iterator.
2270 (*fop_<X87MODEF:mode>_3_i387): Macroize insn from
2271 *fop_<MODEF:mode>_3_i387 and *fop_xf_3_i387 using
2272 X87MODEF mode iterator.
2274 2018-10-04 Vinay Kumar <vinay.kumar@blackfigtech.com>
2276 * doc/invoke.texi (-Wno-prio-ctor-dtor): Document new warning
2277 -Wno-prio-ctor-dtor.
2279 2018-10-04 David Malcolm <dmalcolm@redhat.com>
2281 * Makefile.in (OBJS): Add opt-problem.o.
2282 * dump-context.h: Include "selftest.h.
2283 (selftest::temp_dump_context): New forward decl.
2284 (class dump_context): Make friend of class
2285 selftest::temp_dump_context.
2286 (dump_context::dump_loc_immediate): New decl.
2287 (class dump_pretty_printer): Move here from dumpfile.c.
2288 (class temp_dump_context): Move to namespace selftest.
2289 (temp_dump_context::temp_dump_context): Add param
2290 "forcibly_enable_dumping".
2291 (selftest::verify_dumped_text):
2292 (ASSERT_DUMPED_TEXT_EQ): Move here from dumpfile.c.
2293 (selftest::verify_item):
2294 (ASSERT_IS_TEXT): Move here from dumpfile.c.
2295 (ASSERT_IS_TREE): Likewise.
2296 (ASSERT_IS_GIMPLE): Likewise.
2297 * dumpfile.c (dump_context::dump_loc): Move immediate dumping
2299 (dump_context::dump_loc_immediate): ...this new function.
2300 (class dump_pretty_printer): Move to dump-context.h.
2301 (dump_switch_p_1): Don't enable MSG_PRIORITY_REEMITTED.
2302 (opt_info_switch_p_1): Enable MSG_PRIORITY_REEMITTED.
2303 (temp_dump_context::temp_dump_context): Move to "selftest"
2304 namespace. Add param "forcibly_enable_dumping", and use it to
2305 conditionalize the use of m_pp;
2306 (selftest::verify_dumped_text): Make non-static.
2307 (ASSERT_DUMPED_TEXT_EQ): Move to dump-context.h.
2308 (selftest::verify_item): Make non-static.
2309 (ASSERT_IS_TEXT): Move to dump-context.h.
2310 (ASSERT_IS_TREE): Likewise.
2311 (ASSERT_IS_GIMPLE): Likewise.
2312 (selftest::test_capture_of_dump_calls): Pass "true" for new
2313 param of temp_dump_context.
2314 * dumpfile.h (enum dump_flag): Add MSG_PRIORITY_REEMITTED, adding
2315 it to MSG_ALL_PRIORITIES. Update values of TDF_COMPARE_DEBUG and
2317 * opt-problem.cc: New file.
2318 * opt-problem.h: New file.
2319 * optinfo-emit-json.cc
2320 (selftest::test_building_json_from_dump_calls): Pass "true" for
2321 new param of temp_dump_context.
2322 * optinfo.cc (optinfo_kind_to_dump_flag): New function.
2323 (optinfo::emit_for_opt_problem): New function.
2324 (optinfo::emit): Clarity which emit_item is used.
2325 * optinfo.h (optinfo::get_dump_location): New accessor.
2326 (optinfo::emit_for_opt_problem): New decl.
2327 (optinfo::emit): Make const.
2328 * selftest-run-tests.c (selftest::run_tests): Call
2329 selftest::opt_problem_cc_tests.
2330 * selftest.h (selftest::opt_problem_cc_tests): New decl.
2331 * tree-data-ref.c (dr_analyze_innermost): Convert return type from
2332 bool to opt_result, converting fprintf messages to
2333 opt_result::failure_at calls. Add "stmt" param for use by the
2335 (create_data_ref): Pass "stmt" to the dr_analyze_innermost call.
2336 (runtime_alias_check_p): Convert return type from bool to
2337 opt_result, converting dump_printf calls to
2338 opt_result::failure_at, using the statement DDR_A for their
2340 (find_data_references_in_stmt): Convert return type from bool to
2341 opt_result, converting "return false" to opt_result::failure_at
2343 * tree-data-ref.h: Include "opt-problem.h".
2344 (dr_analyze_innermost): Convert return type from bool to opt_result,
2345 and add a const gimple * param.
2346 (find_data_references_in_stmt): Convert return type from bool to
2348 (runtime_alias_check_p): Likewise.
2349 * tree-predcom.c (find_looparound_phi): Pass "init_stmt" to
2350 dr_analyze_innermost.
2351 * tree-vect-data-refs.c (vect_mark_for_runtime_alias_test):
2352 Convert return type from bool to opt_result, adding a message for
2353 the PARAM_VECT_MAX_VERSION_FOR_ALIAS_CHECKS zero case.
2354 (vect_analyze_data_ref_dependence): Convert return type from bool
2355 to opt_result. Change sense of return type from "false"
2356 effectively meaning "no problems" to "false" meaning a problem,
2357 so that "return false" becomes "return opt_result::success".
2358 Convert "return true" calls to opt_result::failure_at, using
2359 the location of statement A rather than vect_location.
2360 (vect_analyze_data_ref_dependences): Convert return type from bool
2362 (verify_data_ref_alignment): Likewise, converting dump_printf_loc
2363 calls to opt_result::failure_at, using the stmt location rather
2365 (vect_verify_datarefs_alignment): Convert return type from bool
2367 (vect_enhance_data_refs_alignment): Likewise. Split local "stat"
2368 into multiple more-tightly-scoped copies.
2369 (vect_analyze_data_refs_alignment): Convert return type from bool
2371 (vect_analyze_data_ref_accesses): Likewise, converting a
2372 "return false" to a "return opt_result::failure_at", adding a
2374 (vect_prune_runtime_alias_test_list): Convert return type from
2375 bool to opt_result, converting dump_printf_loc to
2376 opt_result::failure_at. Add a %G to show the pertinent statement,
2377 and use the stmt's location rather than vect_location.
2378 (vect_find_stmt_data_reference): Convert return type from
2379 bool to opt_result, converting dump_printf_loc to
2380 opt_result::failure_at, using stmt's location.
2381 (vect_analyze_data_refs): Convert return type from bool to
2382 opt_result. Convert "return false" to "return
2383 opt_result::failure_at", adding messages as needed.
2384 * tree-vect-loop.c (vect_determine_vf_for_stmt_1): Convert return
2385 type from bool to opt_result.
2386 (vect_determine_vf_for_stmt): Likewise.
2387 (vect_determine_vectorization_factor): Likewise, converting
2388 dump_printf_loc to opt_result::failure_at, using location of phi
2389 rather than vect_location.
2390 (vect_analyze_loop_form_1): Convert return type from bool to
2391 opt_result, converting dump_printf_loc calls, retaining the use of
2393 (vect_analyze_loop_form): Convert return type from loop_vec_info
2394 to opt_loop_vec_info.
2395 (vect_analyze_loop_operations): Convert return type from bool to
2396 opt_result, converting dump_printf_loc calls, using the location
2397 of phi/stmt rather than vect_location where available. Convert
2398 various "return false" to "return opt_result::failure_at" with
2399 "unsupported phi" messages.
2400 (vect_get_datarefs_in_loop): Convert return type from bool to
2401 opt_result. Add a message for the
2402 PARAM_LOOP_MAX_DATAREFS_FOR_DATADEPS failure.
2403 (vect_analyze_loop_2): Convert return type from bool to
2404 opt_result. Ensure "ok" is set to a opt_result::failure_at before
2405 each "goto again;", adding new messages where needed.
2406 Add "unsupported grouped {store|load}" messages.
2407 (vect_analyze_loop): Convert return type from loop_vec_info to
2409 * tree-vect-slp.c (vect_analyze_slp): Convert return type from
2411 * tree-vect-stmts.c (process_use): Likewise, converting
2412 dump_printf_loc call and using stmt location, rather than
2414 (vect_mark_stmts_to_be_vectorized): Likeise.
2415 (vect_analyze_stmt): Likewise, adding a %G.
2416 (vect_get_vector_types_for_stmt): Convert return type from bool to
2417 opt_result, converting dump_printf_loc calls and using stmt
2418 location, rather than vect_location.
2419 (vect_get_mask_type_for_stmt): Convert return type from tree to
2420 opt_tree, converting dump_printf_loc calls and using stmt location.
2421 * tree-vectorizer.c: Include "opt-problem.h.
2422 (try_vectorize_loop_1): Flag "Analyzing loop at" dump message as
2423 MSG_PRIORITY_INTERNALS. Convert local "loop_vinfo" from
2424 loop_vec_info to opt_loop_vec_info. If if fails, and dumping is
2425 enabled, use it to report at the top level "couldn't vectorize
2426 loop" followed by the problem.
2427 * tree-vectorizer.h (opt_loop_vec_info): New typedef.
2428 (vect_mark_stmts_to_be_vectorized): Convert return type from bool
2430 (vect_analyze_stmt): Likewise.
2431 (vect_get_vector_types_for_stmt): Likewise.
2432 (tree vect_get_mask_type_for_stmt): Likewise.
2433 (vect_analyze_data_ref_dependences): Likewise.
2434 (vect_enhance_data_refs_alignment): Likewise.
2435 (vect_analyze_data_refs_alignment): Likewise.
2436 (vect_verify_datarefs_alignment): Likewise.
2437 (vect_analyze_data_ref_accesses): Likewise.
2438 (vect_prune_runtime_alias_test_list): Likewise.
2439 (vect_find_stmt_data_reference): Likewise.
2440 (vect_analyze_data_refs): Likewise.
2441 (vect_analyze_loop): Convert return type from loop_vec_info to
2443 (vect_analyze_loop_form): Likewise.
2444 (vect_analyze_slp): Convert return type from bool to opt_result.
2446 2018-10-04 David Malcolm <dmalcolm@redhat.com>
2448 * doc/invoke.texi (-fopt-info): Document new "internals"
2450 * dump-context.h (dump_context::apply_dump_filter_p): New decl.
2451 * dumpfile.c (dump_options): Update for renaming of MSG_ALL to
2453 (optinfo_verbosity_options): Add "internals".
2454 (kind_as_string): Update for renaming of MSG_ALL to MSG_ALL_KINDS.
2455 (dump_context::apply_dump_filter_p): New member function.
2456 (dump_context::dump_loc): Use apply_dump_filter_p rather than
2457 explicitly masking the dump_kind.
2458 (dump_context::begin_scope): Increment the scope depth first. Use
2459 apply_dump_filter_p rather than explicitly masking the dump_kind.
2460 (dump_context::emit_item): Use apply_dump_filter_p rather than
2461 explicitly masking the dump_kind.
2462 (dump_dec): Likewise.
2463 (dump_hex): Likewise.
2464 (dump_switch_p_1): Default to MSG_ALL_PRIORITIES.
2465 (opt_info_switch_p_1): Default to MSG_PRIORITY_USER_FACING.
2466 (opt_info_switch_p): Update handling of default
2467 MSG_OPTIMIZED_LOCATIONS to cope with default of
2468 MSG_PRIORITY_USER_FACING.
2469 (dump_basic_block): Use apply_dump_filter_p rather than explicitly
2470 masking the dump_kind.
2471 (selftest::test_capture_of_dump_calls): Update test_dump_context
2472 instances to use MSG_ALL_KINDS | MSG_PRIORITY_USER_FACING rather
2473 than MSG_ALL. Generalize scope test to be run at all four
2474 combinations of with/without MSG_PRIORITY_USER_FACING and
2475 MSG_PRIORITY_INTERNALS, adding examples of explicit priority
2476 for each of the two values.
2477 * dumpfile.h (enum dump_flag): Add comment about the MSG_* flags.
2478 Rename MSG_ALL to MSG_ALL_KINDS. Add MSG_PRIORITY_USER_FACING,
2479 MSG_PRIORITY_INTERNALS, and MSG_ALL_PRIORITIES, updating the
2480 values for TDF_COMPARE_DEBUG and TDF_ALL_VALUES.
2481 (AUTO_DUMP_SCOPE): Add a note to the comment about the interaction
2482 with MSG_PRIORITY_*.
2483 * tree-vect-loop-manip.c (vect_loop_versioning): Mark versioning
2484 dump messages as MSG_PRIORITY_USER_FACING.
2485 * tree-vectorizer.h (DUMP_VECT_SCOPE): Add a note to the comment
2486 about the interaction with MSG_PRIORITY_*.
2488 2018-10-04 Bernd Edlinger <bernd.edlinger@hotmail.de>
2490 * varasm.c (output_constant): Add new parameter merge_strings.
2491 Make strings properly zero terminated in merge string sections.
2492 (mergeable_string_section): Don't fail if the last char is non-zero.
2493 (assemble_variable_contents): Handle merge string sections.
2494 (assemble_variable): Likewise.
2495 (assemble_constant_contents): Likewise.
2496 (output_constant_def_contents): Likewise.
2497 (output_constructor_array_range,
2498 output_constructor_regular_field): Adjust call to output_constant.
2499 (output_object_block): Adjust call to assemble_constant_contents
2500 and assemble_variable_contents.
2502 2018-10-04 Martin Liska <mliska@suse.cz>
2505 * cgraphunit.c (process_function_and_variable_attributes):
2506 Warn about a function with alias attribute and a body.
2508 2018-10-04 Martin Liska <mliska@suse.cz>
2511 * multiple_target.c (redirect_to_specific_clone): New function.
2512 (ipa_target_clone): Use it.
2513 * tree-inline.c: Fix comment.
2515 2018-10-04 David Malcolm <dmalcolm@redhat.com>
2517 * dumpfile.c (gcc::dump_manager::dump_manager): Initialize new
2519 (gcc::dump_manager::~dump_manager): Free m_optinfo_filename.
2520 (gcc::dump_manager::register_pass): New member function, adapted
2521 from loop body in gcc::pass_manager::register_pass, adding a
2522 call to update_dfi_for_opt_info.
2523 (gcc::dump_manager::opt_info_enable_passes): Store the
2524 -fopt-info options into the new fields. Move the loop
2526 (gcc::dump_manager::update_dfi_for_opt_info): ...this new member
2528 * dumpfile.h (struct opt_pass): New forward decl.
2529 (gcc::dump_manager::register_pass): New decl.
2530 (gcc::dump_manager::update_dfi_for_opt_info): New decl.
2531 (class gcc::dump_manager): Add fields "m_optgroup_flags",
2532 "m_optinfo_flags", and "m_optinfo_filename".
2533 * passes.c (gcc::pass_manager::register_pass): Move all of the
2534 dump-handling code to gcc::dump_manager::register_pass.
2536 2018-10-04 Peter Bergner <bergner@linux.ibm.com>
2538 PR rtl-optimization/87466
2539 * target.def (setjmp_preserves_nonvolatile_regs_p): New target hook.
2540 * doc/tm.texi.in (TARGET_SETJMP_PRESERVES_NONVOLATILE_REGS_P): New hook.
2541 * doc/tm.texi: Regenerate.
2542 * ira-lives.c (process_bb_node_lives): Use the new target hook.
2543 * lra-lives.c (process_bb_lives): Likewise.
2544 * config/rs6000/rs6000.c (TARGET_SETJMP_PRESERVES_NONVOLATILE_REGS_P):
2547 2018-10-04 Tamar Christina <tamar.christina@arm.com>
2549 * params.c (add_params): Fix initialization.
2551 2018-10-04 Martin Liska <mliska@suse.cz>
2553 PR gcov-profile/84107
2554 * tree-profile.c (init_ic_make_global_vars):
2555 Remove ic_void_ptr_var and ic_gcov_type_ptr_var.
2556 Come up with new ic_tuple* variables. Emit
2557 __gcov_indirect_call{,_topn} variables.
2558 (gimple_gen_ic_profiler): Access the variable
2560 (gimple_gen_ic_func_profiler): Access
2561 __gcov_indirect_call.callee field.
2562 (gimple_init_gcov_profiler): Use ptr_type_node.
2563 * value-prof.c (gimple_ic): Use ptr_type_node.
2565 2018-10-04 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2567 PR tree-optimization/85787
2568 * ipa-pure-const.c (malloc_candidate_p_1): Move most of malloc_candidate_p
2569 into this function and add support for detecting multiple phis.
2570 (DUMP_AND_RETURN): Move from malloc_candidate_p into top-level macro.
2572 2018-10-04 Martin Liska <mliska@suse.cz>
2575 * ipa-inline.c (inline_to_all_callers_1):
2576 Call ultimate_alias_target for node being inlined.
2578 2018-10-03 Jeff Law <law@redhat.com>
2580 * gimple-ssa-sprintf.c (format_string): Do not hardcode size of
2582 * tree.c (get_typenode_from_name): Moved from fortran/trans-types.c.
2583 * tree.h (get_typenode_from_name): Prototype.
2585 2018-10-03 Uros Bizjak <ubizjak@gmail.com>
2587 * config/i386/i386.md (*cmp<X87MODEF:mode>_<SWI24:mode>_i387):
2588 Change operand 2 predicate to nonimmediate_operand.
2589 (*cmp<X87MODEF:mode>_<SWI24:mode>_cc_i387): Ditto.
2591 2018-10-03 Martin Sebor <msebor@redhat.com>
2592 Jeff Law <law@redhat.com>
2594 * gimple-ssa-sprintf.c (struct fmtresult): Add new member and
2596 (get_string_length): Detect unterminated arrays.
2597 (format_string): Same.
2598 (format_directive): Warn about unterminated arrays.
2599 (handle_gimple_call): Mark statements with no_warning as needed.
2601 2018-10-03 Jim Wilson <jimw@sifive.com>
2603 * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): For ABI_ILP32E,
2604 also define __riscv_abi_rve. Delete trailing white space.
2606 2018-10-03 Paul Koning <ni1d@arrl.net>
2608 Enable LRA register allocator for PDP11.
2609 * config/pdp11/constraints.md (Q): Use define_memory_constraint.
2612 * config/pdp11/pdp11.c (pdp11_lra_p): New function.
2613 * config/pdp11/pdp11.opt (-mlra): New option.
2614 * doc/invoke.texi (PDP-11 Options): Document -mlra.
2616 2018-10-03 Uros Bizjak <ubizjak@gmail.com>
2618 * config/i386/i386.md (*<absneg:code>extendsfdf2): Remove.
2619 (*<absneg:code>extend<mode>xf2): Ditto.
2621 2018-10-03 Aldy Hernandez <aldyh@redhat.com>
2623 PR tree-optimization/87415
2624 * tree-vrp.c (set_value_range_with_overflow): Special case one bit
2627 2018-10-02 Jeff Law <law@redhat.com>
2629 * gimple-fold.c (get_range_strlen): Only set *nonstr when
2630 an unterminated string is discovered. Bubble up range
2631 even for unterminated strings.
2632 (gimple_fold_builtin_strlen): Do not fold if get_range_strlen
2633 indicates the string was not terminated via NONSTR.
2635 2018-10-03 Aldy Hernandez <aldyh@redhat.com>
2637 * tree-vrp.c (extract_range_from_unary_expr): Special case all
2638 pointer conversions.
2639 Do not do anything special for anti-ranges.
2641 2018-10-03 Jérôme Lambourg <lambourg@adacore.com>
2643 * config/arm/vxworks.h (ARM_TARGET2_DWARF_FORMAT): Adjust to
2644 DW_EH_PE_pcrel | DW_EH_PE_indirect for RTPs.
2646 2018-10-03 Martin Liska <mliska@suse.cz>
2648 PR gcov-profile/86109
2649 * coverage.c (coverage_begin_function): Do not
2650 mark lambdas as artificial.
2651 * tree-core.h (struct GTY): Remove tm_clone_flag
2652 and introduce new lambda_function.
2653 * tree.h (DECL_LAMBDA_FUNCTION): New macro.
2655 2018-10-02 Aaron Sawdey <acsawdey@linux.ibm.com>
2658 * config/rs6000/rs6000-string.c (expand_strn_compare): Check that both
2659 P8_VECTOR and VSX are enabled.
2661 2018-10-02 Andreas Krebbel <krebbel@linux.ibm.com>
2663 * config/s390/driver-native.c (s390_host_detect_local_cpu): Add
2664 0x3907 as CPU model number.
2666 2018-10-02 Andreas Krebbel <krebbel@linux.ibm.com>
2668 * common/config/s390/s390-common.c: Rename PF_ARCH12 to PF_Z14.
2669 * config/s390/s390.h (enum processor_flags): Rename PF_ARCH12 to
2670 PF_Z14. Rename TARGET_CPU_ARCH12 to TARGET_CPU_Z14,
2671 TARGET_CPU_ARCH12_P to TARGET_CPU_Z14_P, TARGET_ARCH12 to
2672 TARGET_Z14, and TARGET_ARCH12_P to TARGET_Z14_P.
2673 * config/s390/s390.md: Likewise. Rename also the cpu attribute
2674 value from arch12 to z14.
2676 2018-10-02 Uros Bizjak <ubizjak@gmail.com>
2678 * config/i386/i386.md (fxam<mode>2_i387_with_temp): Remove.
2680 (isinf<mode>2): Ditto.
2682 2018-10-02 Uros Bizjak <ubizjak@gmail.com>
2684 * config/i386/i386.c (ix86_emit_i387_round): Extend op1 to XFmode
2685 before emitting fxam. Perform calculations in XFmode.
2687 2018-10-02 Marc Glisse <marc.glisse@inria.fr>
2689 * match.pd (((X /[ex] A) +- B) * A): New transformation.
2691 2018-10-02 Marc Glisse <marc.glisse@inria.fr>
2694 * fold-const.c (fold_plusminus_mult_expr): Handle complex and vectors.
2695 * tree.c (signed_or_unsigned_type_for): Handle complex.
2697 2018-10-02 Jeff Law <law@redhat.com>
2699 * gimple-fold.c (get_range_strlen): Remove dead code.
2701 2018-10-02 Martin Sebor <msebor@redhat.com>
2702 Jeff Law <law@redhat.com>
2704 * builtins.c (unterminated_array): Add new arguments.
2705 If argument is not terminated, bubble up size and exact
2707 (expand_builtin_strnlen): Detect, avoid expanding
2708 and diagnose unterminated arrays.
2709 (c_strlen): Fill in offset of start of unterminated strings.
2710 * builtins.h (unterminated_array): Update prototype.
2712 2018-10-02 Richard Biener <rguenther@suse.de>
2714 * config/i386/sse.md (reduc_plus_scal_v4df): Avoid the use
2715 of haddv4df, first reduce to SSE width and exploit the fact
2716 that we only need element zero with the reduction result.
2717 (reduc_plus_scal_v2df): Likewise.
2719 2018-10-02 Eric Botcazou <ebotcazou@adacore.com>
2721 * dojump.h (do_jump): Delete.
2722 (do_jump_1): Likewise.
2723 (split_comparison): Move around.
2724 * dojump.c (do_jump): Make static.
2725 (do_jump_1): Likewise.
2726 (jumpifnot): Move around.
2727 (jumpifnot_1): Likewise.
2729 (jumpif_1): Likewise.
2730 * expr.c (expand_expr_real_1): Call jumpif[not] instead of do_jump.
2732 2018-10-02 Eric Botcazou <ebotcazou@adacore.com>
2734 * reorg.c (make_return_insns): Use emit_copy_of_insn_after for the
2735 insns in the delay slot and add_insn_after for the jump insn.
2737 2018-10-02 Richard Biener <rguenther@suse.de>
2739 * tree-inline.c (expand_call_inline): Use the location of
2740 the callee declaration for the inline-entry marker.
2741 * final.c (notice_source_line): Remove special-casing of
2742 NOTE_INSN_INLINE_ENTRY.
2744 2018-10-01 Carl Love <cel@us.ibm.com>
2747 * config/rs6000/rs6000-builtin.def (__builtin_mffsl): New.
2748 (__builtin_mtfsb0): New.
2749 (__builtin_mtfsb1): New.
2750 ( __builtin_set_fpscr_rn): New.
2751 (__builtin_set_fpscr_drn): New.
2752 * config/rs6000/rs6000.c (rs6000_expand_mtfsb_builtin): Add.
2753 (rs6000_expand_set_fpscr_rn_builtin): Add.
2754 (rs6000_expand_set_fpscr_drn_builtin): Add.
2755 (rs6000_expand_builtin): Add case statement entries for
2756 RS6000_BUILTIN_MTFSB0, RS6000_BUILTIN_MTFSB1,
2757 RS6000_BUILTIN_SET_FPSCR_RN, RS6000_BUILTIN_SET_FPSCR_DRN,
2758 RS6000_BUILTIN_MFFSL.
2759 (rs6000_init_builtins): Add ftype initialization and def_builtin
2760 calls for __builtin_mffsl, __builtin_mtfsb0, __builtin_mtfsb1,
2761 __builtin_set_fpscr_rn, __builtin_set_fpscr_drn.
2762 * config/rs6000.md (rs6000_mtfsb0, rs6000_mtfsb1, rs6000_mffscrn,
2763 rs6000_mffscdrn): Add define_insn.
2764 (rs6000_set_fpscr_rn, rs6000_set_fpscr_drn): Add define_expand.
2765 * doc/extend.texi: Add documentation for the builtins.
2767 2018-10-01 Richard Biener <rguenther@suse.de>
2769 PR tree-optimization/87465
2770 * tree-ssa-loop-ivcanon.c (tree_estimate_loop_size): Fix typo
2771 causing branch miscounts.
2773 2018-10-01 Tamar Christina <tamar.christina@arm.com>
2775 * common/config/aarch64/aarch64-common.c (TARGET_OPTION_DEFAULT_PARAM,
2776 aarch64_option_default_param): New.
2777 (params.h): Include.
2778 (TARGET_OPTION_VALIDATE_PARAM, aarch64_option_validate_param): New.
2779 * config/aarch64/aarch64.c (aarch64_override_options_internal): Simplify
2780 stack-clash protection validation code.
2782 2018-10-01 Tamar Christina <tamar.christina@arm.com>
2784 * params.c (validate_param): New.
2785 (add_params): Use it.
2786 (set_param_value): Refactor param validation into validate_param.
2787 (diagnostic.h): Include.
2788 * diagnostic.h (diagnostic_ready_p): New.
2790 2018-10-01 Tamar Christina <tamar.christina@arm.com>
2792 * params.c (set_param_value):
2793 Add index of parameter being validated.
2794 * common/common-target.def (option_validate_param): New.
2795 * common/common-targhooks.h (default_option_validate_param): New.
2796 * common/common-targhooks.c (default_option_validate_param): New.
2797 * doc/tm.texi.in (TARGET_OPTION_VALIDATE_PARAM): New.
2798 * doc/tm.texi: Regenerate.
2800 2018-10-01 Tamar Christina <tamar.christina@arm.com>
2803 * config/aarch64/aarch64.c (aarch64_override_options_internal):
2804 Add validation for stack-clash parameters and set defaults.
2806 2018-10-01 Tamar Christina <tamar.christina@arm.com>
2809 * configure.ac: Add stack-clash-protection-guard-size.
2810 * doc/install.texi: Document it.
2811 * config.in (DEFAULT_STK_CLASH_GUARD_SIZE): New.
2812 * params.def: Update comment for guard-size.
2813 (PARAM_STACK_CLASH_PROTECTION_GUARD_SIZE,
2814 PARAM_STACK_CLASH_PROTECTION_PROBE_INTERVAL): Update description.
2815 * configure: Regenerate.
2817 2018-10-01 Tamar Christina <tamar.christina@arm.com>
2820 * config/aarch64/aarch64.h (STACK_CLASH_MIN_BYTES_OUTGOING_ARGS,
2821 STACK_DYNAMIC_OFFSET): New.
2822 * config/aarch64/aarch64.c (aarch64_layout_frame):
2823 Update outgoing args size.
2824 (aarch64_stack_clash_protection_alloca_probe_range,
2825 TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE): New.
2827 2018-10-01 Tamar Christina <tamar.christina@arm.com>
2830 * explow.c (anti_adjust_stack_and_probe_stack_clash): Support custom
2832 * target.def (stack_clash_protection_alloca_probe_range): New.
2833 (stack_clash_protection_final_dynamic_probe): Remove.
2834 * targhooks.h (default_stack_clash_protection_alloca_probe_range) New.
2835 (default_stack_clash_protection_final_dynamic_probe): Remove.
2836 * targhooks.c: Likewise.
2837 * doc/tm.texi.in (TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE): New.
2838 (TARGET_STACK_CLASH_PROTECTION_FINAL_DYNAMIC_PROBE): Remove.
2839 * doc/tm.texi: Regenerate.
2841 2018-10-01 Tamar Christina <tamar.christina@arm.com>
2844 * config/aarch64/aarch64-protos.h (aarch64_output_probe_sve_stack_clash): New.
2845 * config/aarch64/aarch64.c (aarch64_output_probe_sve_stack_clash,
2846 aarch64_clamp_to_uimm12_shift): New.
2847 (aarch64_allocate_and_probe_stack_space): Add SVE specific section.
2848 * config/aarch64/aarch64.md (probe_sve_stack_clash): New.
2850 2018-10-01 Tamar Christina <tamar.christina@arm.com>
2853 * config/aarch64/aarch64.c (aarch64_layout_frame): Add assert.
2855 2018-10-01 Jeff Law <law@redhat.com>
2856 Richard Sandiford <richard.sandiford@linaro.org>
2857 Tamar Christina <tamar.christina@arm.com>
2860 * config/aarch64/aarch64.md
2861 (probe_stack_range): Add k (SP) constraint.
2862 * config/aarch64/aarch64.h (STACK_CLASH_CALLER_GUARD,
2863 STACK_CLASH_MAX_UNROLL_PAGES): New.
2864 * config/aarch64/aarch64.c (aarch64_output_probe_stack_range): Emit
2865 stack probes for stack clash.
2866 (aarch64_allocate_and_probe_stack_space): New.
2867 (aarch64_expand_prologue): Use it.
2868 (aarch64_expand_epilogue): Likewise and update IP regs re-use criteria.
2869 (aarch64_sub_sp): Add emit_move_imm optional param.
2871 2018-10-01 MCC CS <deswurstes@users.noreply.github.com>
2873 PR tree-optimization/87261
2874 * match.pd: Remove trailing whitespace.
2875 Add (x & y) | ~(x | y) -> ~(x ^ y),
2876 (~x | y) ^ (x ^ y) -> x | ~y and (x ^ y) | ~(x | y) -> ~(x & y)
2878 2018-10-01 Claudiu Zissulescu <claziss@synopsys.com>
2880 * config/arc/arc.md (*add_n): Clean up pattern, update instruction
2882 (ashlsi3_insn): Update instruction constraints.
2883 (ashrsi3_insn): Likewise.
2884 (rotrsi3): Likewise.
2885 (add_shift): Likewise.
2886 * config/arc/constraints.md (Csz): New 32 bit constraint. It
2887 avoids placing in the limm field small constants which, otherwise,
2888 could end into a small instruction.
2890 2018-10-01 Claudiu Zissulescu <claziss@synopsys.com>
2892 * config/arc/arc.md (maddsidi4_split): Don't use dmac if the
2893 destination register is not odd-even.
2894 (umaddsidi4_split): Likewise.
2896 2018-10-01 Richard Biener <rguenther@suse.de>
2898 * tree-inline.c (expand_call_inline): Store origin of fn
2899 in BLOCK_ABSTRACT_ORIGIN for the inline BLOCK.
2900 * tree.c (block_ultimate_origin): Simplify and do some
2903 2018-09-30 Uros Bizjak <ubizjak@gmail.com>
2905 * config/i386/mmx.md (EMMS): New int iterator.
2906 (emms): New int attribute.
2907 (mmx_<emms>): Macroize insn from *mmx_emms and *mmx_femms using
2908 EMMS int iterator. Explicitly declare clobbers.
2909 (mmx_emms): Remove expander.
2911 * config/i386/predicates.md (emms_operation): Remove predicate.
2912 (vzeroall_pattern): New predicate.
2913 (vzeroupper_pattern): Rename from vzeroupper_operation.
2914 * config/i386/i386.c (ix86_avx_u128_mode_after): Use
2915 vzeroupper_pattern and vzeroall_pattern predicates.
2917 2018-09-30 Peter Bergner <bergner@linux.ibm.com>
2919 PR rtl-optimization/86939
2920 * ira-lives.c (make_hard_regno_born): Rename from this...
2921 (make_hard_regno_live): ... to this. Remove update to conflict
2922 information. Update function comment.
2923 (make_hard_regno_dead): Add conflict information update. Update
2925 (make_object_born): Rename from this...
2926 (make_object_live): ... to this. Remove update to conflict information.
2927 Update function comment.
2928 (make_object_dead): Add conflict information update. Update function
2930 (mark_pseudo_regno_live): Call make_object_live.
2931 (mark_pseudo_regno_subword_live): Likewise.
2932 (mark_hard_reg_dead): Update function comment.
2933 (mark_hard_reg_live): Call make_hard_regno_live.
2934 (process_bb_node_lives): Likewise.
2935 * lra-lives.c (make_hard_regno_born): Rename from this...
2936 (make_hard_regno_live): ... to this. Remove update to conflict
2937 information. Remove now uneeded check_pic_pseudo_p argument.
2938 Update function comment.
2939 (make_hard_regno_dead): Add check_pic_pseudo_p argument and add update
2940 to conflict information. Update function comment.
2941 (mark_pseudo_live): Remove update to conflict information. Update
2943 (mark_pseudo_dead): Add conflict information update.
2944 (mark_regno_live): Call make_hard_regno_live.
2945 (mark_regno_dead): Call make_hard_regno_dead with new arguement.
2946 (process_bb_lives): Call make_hard_regno_live and make_hard_regno_dead.
2948 2018-09-29 H.J. Lu <hongjiu.lu@intel.com>
2951 * config/i386/i386.c (construct_container): Use TImode for
2952 BLKmode values in 2 integer registers.
2954 2018-09-29 Jeff Law <law@redhat.com>
2956 * builtins.c (unterminated_array): Pass in c_strlen_data * to
2957 c_strlen rather than just a tree *.
2958 (c_strlen): Change NONSTR argument to a c_strlen_data pointer.
2959 Update recursive calls appropriately. If caller did not provide a
2960 suitable data pointer, create a local one. When a non-terminated
2961 string is discovered, bubble up information about the string via the
2962 c_strlen_data object.
2963 * builtins.h (c_strlen): Update prototype.
2964 (c_strlen_data): New structure.
2965 * gimple-fold.c (get_range_strlen): Update calls to c_strlen.
2966 For a type 2 call, if c_strlen indicates a non-terminated string
2967 use the length of the non-terminated string.
2968 (gimple_fold_builtin_stpcpy): Update calls to c_strlen.
2970 2018-09-29 Jakub Jelinek <jakub@redhat.com>
2973 * config/i386/avx512fintrin.h (_mm512_abs_pd, _mm512_mask_abs_pd): Use
2974 __m512d type for __A argument rather than __m512.
2976 2018-09-28 John David Anglin <danglin@gcc.gnu.org>
2978 * match.pd (simple_comparison): Don't optimize if either operand is
2979 a function pointer when target needs function pointer canonicalization.
2981 2018-09-28 Segher Boessenkool <segher@kernel.crashing.org>
2983 * config/rs6000/driver-rs6000.c (asm_names): Adjust the entries for
2984 power5 .. power9 to remove indirection.
2985 * config/rs6000/rs6000.h (ASM_CPU_POWER5_SPEC, ASM_CPU_POWER6_SPEC,
2986 ASM_CPU_POWER7_SPEC, ASM_CPU_POWER8_SPEC, ASM_CPU_POWER9_SPEC,
2987 ASM_CPU_476_SPEC): Delete.
2988 (ASM_CPU_SPEC): Adjust.
2989 (EXTRA_SPECS): Delete asm_cpu_power5, asm_cpu_power6, asm_cpu_power7,
2990 asm_cpu_power8, asm_cpu_power9, asm_cpu_476.
2992 2018-09-28 Segher Boessenkool <segher@kernel.crashing.org>
2994 * config.in: Delete HAVE_AS_DCI.
2995 * config/powerpcspe/powerpcspe.h: Treat HAVE_AS_DCI as always true.
2996 * config/rs6000/rs6000.h: Ditto.
2997 * configure.ac: Delete HAVE_AS_DCI.
2998 * configure: Regenerate.
3000 2018-09-28 Segher Boessenkool <segher@kernel.crashing.org>
3002 * config.in (HAVE_AS_LWSYNC): Delete.
3003 * config/powerpcspe/powerpcspe.h (TARGET_LWSYNC_INSTRUCTION): Delete.
3004 * config/powerpcspe/sync.md (*lwsync): Always generate lwsync, never
3006 * config/rs6000/rs6000.h (TARGET_LWSYNC_INSTRUCTION): Delete.
3007 * config/rs6000/sync.md (*lwsync): Always generate lwsync, never do it
3009 * configure.ac: Delete HAVE_AS_LWSYNC.
3010 * configure: Regenerate.
3012 2018-09-28 Eric Botcazou <ebotcazou@adacore.com>
3013 Pierre-Marie de Rodat <derodat@adacore.com>
3015 * calls.c (expand_call): Try to do a tail call for thunks at -O0 too.
3016 * cgraph.h (struct cgraph_thunk_info): Add indirect_offset.
3017 (cgraph_node::create_thunk): Add indirect_offset parameter.
3018 (thunk_adjust): Likewise.
3019 * cgraph.c (cgraph_node::create_thunk): Add indirect_offset parameter
3020 and initialize the corresponding field with it.
3021 (cgraph_node::dump): Dump indirect_offset field.
3022 * cgraphclones.c (duplicate_thunk_for_node): Deal with indirect_offset.
3023 * cgraphunit.c (cgraph_node::analyze): Be prepared for external thunks.
3024 (thunk_adjust): Add indirect_offset parameter and deal with it.
3025 (cgraph_node::expand_thunk): Deal with the indirect_offset field and
3026 pass it to thunk_adjust. Do not call the target hook if it's non-zero
3027 or if the thunk is external or local. Fix formatting. Do not chain
3028 the RESULT_DECL to BLOCK_VARS. Pass the static chain to the target,
3029 if any, in the GIMPLE representation.
3030 * ipa-icf.c (sem_function::equals_wpa): Deal with indirect_offset.
3031 * lto-cgraph.c (lto_output_node): Write indirect_offset field.
3032 (input_node): Read indirect_offset field.
3033 * tree-inline.c (expand_call_inline): Pass indirect_offset field in the
3034 call to thunk_adjust.
3035 * tree-nested.c (struct nesting_info): Add thunk_p field.
3036 (create_nesting_tree): Set it.
3037 (convert_all_function_calls): Copy static chain from targets to thunks.
3038 (finalize_nesting_tree_1): Return early for thunks.
3039 (unnest_nesting_tree_1): Do not finalize thunks.
3040 (gimplify_all_functions): Do not gimplify thunks.
3042 2018-09-28 David Malcolm <dmalcolm@redhat.com>
3044 * opt-suggestions.c (option_proposer::build_option_suggestions):
3045 Release "option_values".
3047 2018-09-28 David Malcolm <dmalcolm@redhat.com>
3049 * coverage.c (get_coverage_counts): Convert problem-reporting dump
3050 messages from MSG_OPTIMIZED_LOCATIONS to MSG_MISSED_OPTIMIZATION.
3051 * dumpfile.c (kind_as_string): New function.
3052 (dump_loc): Rather than a hardcoded prefix of "note: ", use
3053 kind_as_string to vary the prefix based on dump_kind.
3054 (selftest::test_capture_of_dump_calls): Update for above.
3056 2018-09-28 Uros Bizjak <ubizjak@gmail.com>
3058 * config/i386/i386.h (SSE_REGNO): Fix check for FIRST_REX_SSE_REG.
3059 (GET_SSE_REGNO): Rename from SSE_REGNO. Update all uses for rename.
3061 2018-09-28 Uros Bizjak <ubizjak@gmail.com>
3063 * config/i386/i386.h (CC_REGNO): Remove FPSR_REG.
3064 * config/i386/i386.c (ix86_fixed_condition_code_regs): Use
3065 INVALID_REGNUM instead of FPSR_REG.
3066 (ix86_md_asm_adjust): Do not clobber FPSR_REG.
3067 * config/i386/i386.md: Update comment of FP compares.
3068 (fldenv): Do not clobber FPSR_REG.
3070 2018-09-28 Richard Biener <rguenther@suse.de>
3072 * tree.h (BLOCK_ORIGIN): New.
3073 * omp-expand.c (grid_expand_target_grid_body): Assign
3074 BLOCK_ORIGIN to BLOCK_ABSTRACT_ORIGIN.
3075 * tree-inline.c (remap_block): Likewise.
3076 * auto-profile.c (get_function_decl_from_block): Simplify
3077 by eliding the BLOCK_ABSTRACT_ORIGIN chasing.
3078 * langhooks.c (lhd_print_error_function): Likewise.
3079 * optinfo-emit-json.cc (optrecord_json_writer::inlining_chain_to):
3081 * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
3082 * tree.c (block_nonartificial_location): Likewise.
3083 (block_ultimate_origin): Likewise.
3084 * tree-pretty-print.c (percent_K_format): Likewise. Remove
3085 no longer needed LTO case.
3087 2018-09-28 Andrew Stubbs <ams@codesourcery.com>
3088 Jan Hubicka <jh@suse.cz>
3089 Martin Jambor <mjambor@suse.cz>
3091 * simplify-rtx.c (simplify_merge_mask): New function.
3092 (simplify_ternary_operation): Use it, also see if VEC_MERGEs with the
3093 same masks are used in op1 or op2.
3094 (test_vec_merge): New function.
3095 (test_vector_ops): Call test_vec_merge.
3097 2018-09-28 Eric Botcazou <ebotcazou@adacore.com>
3099 * config/sparc/sparc-protos.h (sparc_branch_cost): Declare.
3100 * config/sparc/sparc.h (BRANCH_COST): Call sparc_branch_cost.
3101 * config/sparc/sparc.c (struct processor_costs): Add branch_cost field.
3102 (cypress_costs): Set it.
3103 (supersparc_costs): Likewise.
3104 (hypersparc_costs): Likewise.
3105 (leon_cost): Likewise.
3106 (leon3_costs): Likewise.
3107 (sparclet_costs): Likewise.
3108 (ultrasparc_costs): Likewise.
3109 (ultrasparc_costs): Likewise.
3110 (niagara_costs): Likewise.
3111 (niagara2_costs): Likewise.
3112 (niagara3_costs): Likewise.
3113 (niagara4_costs): Likewise.
3114 (niagara7_costs): Likewise.
3115 (m8_costs): Likewise.
3116 (TARGET_CAN_FOLLOW_JUMP): Define.
3117 (pass_work_around_errata::gate): Minor tweak.
3118 (sparc_option_override): Remove MASK_FSMULD mask for V7 processors.
3119 Do not set both MASK_VIS4 and MASK_VIS4B for M8 processor.
3120 Automaitcally clear MASK_FSMULD mask for V7 processors.
3121 (sparc_can_follow_jump): New static function.
3122 (output_ubranch): Deal with CROSSING_JUMP_P.
3123 (sparc_use_sched_lookahead): Rewrite using switch statement.
3124 (sparc_issue_rate): Reorder.
3125 (sparc_branch_cost): New function.
3127 2018-09-27 Martin Sebor <msebor@redhat.com>
3129 * tree.h (tree_to_shwi): Add attribute nonnull and pure.
3130 (tree_to_poly_int64, tree_to_uhwi, tree_to_poly_uint64): Same.
3131 (int_fits_type_p): Same.
3133 2018-09-27 Uros Bizjak <ubizjak@gmail.com>
3135 * config/i386/i386.md (FPCR_REG): Remove.
3136 (UNSPEC_FLDCW): Remove.
3137 (x86_fnstcw_1): Use (const_int 0) instead of FPCR_REG.
3138 (x86_fldcw_1): Remove insn pattern.
3139 (fnstenv): Do not clobber FPCR_REG.
3141 * config/i386/i386.h (FIXED_REGISTERS) Remove fpsr register.
3142 (CALL_USED_REGISTERS): Ditto.
3143 (REG_ALLOC_ORDER): Ditto.
3144 (REG_CLASS_CONTENTS): Ditto.
3145 (HI_REGISTER_NAMES): Ditto.
3146 (ADDITIONAL_REGISTER_NAMES): Use defines instead
3147 of numerical constants.
3148 * config/i386/i386.c (regclass_map): Remove fpsr register.
3149 (dbx_register_map): Ditto.
3150 (dbx64_register_map): Ditto.
3151 (svr4_dbx_register_map): Ditto.
3152 (print_reg): Do not handle FPCR_REG.
3154 2018-09-27 Segher Boessenkool <segher@kernel.crashing.org>
3157 * config.in (HAVE_AS_CMPB, HAVE_AS_DFP, HAVE_AS_FPRND, HAVE_AS_MFPGPR,
3158 HAVE_AS_POPCNTB, HAVE_AS_POPCNTD, HAVE_AS_POWER8, HAVE_AS_POWER9):
3159 Delete, always treat as true.
3160 * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
3161 Ditto. Simplify remaining code.
3162 * config/powerpcspe/powerpcspe.h: Ditto.
3163 * config/rs6000/rs6000.c (rs6000_option_override_internal): Ditto.
3164 Simplify remaining code.
3165 (rs6000_expand_builtin): Ditto.
3166 * config/rs6000/rs6000.h: Ditto.
3167 * configure.ac: Ditto.
3168 * configure: Regenerate.
3170 2018-09-27 Martin Liska <mliska@suse.cz>
3172 * coverage.c (get_coverage_counts): Revert the formatting
3173 of missing profile opt info.
3175 2018-09-27 Richard Biener <rguenther@suse.de>
3179 * dwarf2out.c (set_block_origin_self): Do not mark outermost
3180 block as we do not output that.
3181 (gen_inlined_subroutine_die): Elide the originally outermost
3182 block, matching what we do for concrete instances.
3183 (decls_for_scope): Add parameter specifying whether to recurse
3186 2018-09-27 Andrew Stubbs <ams@codesourcery.com>
3187 Tom de Vries <tom@codesourcery.com>
3191 * expmed.c (emit_cstore): Fix handling of result_mode == BImode and
3192 STORE_FLAG_VALUE == 1.
3194 2018-09-27 Andreas Krebbel <krebbel@linux.ibm.com>
3196 * config/s390/s390.md (PPA_TX_ABORT, PPA_OOO_BARRIER): New
3197 constant definitions.
3198 ("tx_assist"): Replace magic number with PPA_TX_ABORT.
3199 ("*ppa"): Enable pattern also for -march=zEC12 -mno-htm.
3200 ("speculation_barrier"): New expander definition.
3202 2018-09-26 Indu Bhagat <indu.bhagat@oracle.com>
3204 PR gcov-profile/86957
3205 * common.opt: New warning option -Wmissing-profile.
3206 * coverage.c (get_coverage_counts): Add warning for missing .gcda file.
3207 * doc/invoke.texi: Document -Wmissing-profile.
3209 2018-09-26 Jim Wilson <jimw@sifive.com>
3211 * config/riscv/riscv.md (subsi3_extended2): Add J constraint.
3212 (negdi2, negsi2, negsi2_extended, negsi2_extended2): New.
3214 2018-09-26 Martin Sebor <msebor@redhat.com>
3216 * tree.c (zerop): Change return type to bool.
3217 (integer_zerop, integer_onep, integer_each_onep): Same.
3218 (integer_all_onesp, integer_minus_onep, integer_pow2p): Same.
3219 (integer_nonzerop, integer_truep, tree_ctz, real_zerop): Same.
3220 (real_onep, real_minus_onep, chain_index): Same.
3221 (print_type_hash_statistics, type_list_equal): Same.
3222 * tree.h (zerop): Same.
3223 (zerop, integer_zerop, integer_onep, integer_each_onep): Same.
3224 (integer_all_onesp, integer_minus_onep, integer_pow2p): Same.
3225 (integer_nonzerop, integer_truep, tree_ctz, real_zerop): Same.
3226 (real_onep, real_minus_onep, chain_index): Same.
3227 (print_type_hash_statistics, type_list_equal): Same.
3229 2018-09-26 Jim Wilson <jimw@sifive.com>
3231 * config/riscv/riscv.h (FUNCTION_ARG_REGNO_P): Fix comment.
3233 2018-09-26 Jakub Jelinek <jakub@redhat.com>
3236 * config/i386/i386.c: Include debug.h and dwarf2out.h.
3237 (output_indirect_thunk): Emit DW_CFA_def_cfa_offset after the
3240 2018-09-25 Andrew Stubbs <ams@codesourcery.com>
3242 * builtins.c (get_builtin_sync_mem): Force address mode conversion.
3244 2018-09-26 Uros Bizjak <ubizjak@gmail.com>
3246 * config/i386/i386.h (enum reg_class): Remove FP_TOP_SSE_REGS
3247 and FP_SECOND_SSE_REGS.
3248 (REG_CLASS_NAMES): Ditto.
3249 (REG_CLASS_CONTENTS): Ditto.
3250 * config/i386/i386.c (ix86_preferred_reload_class) Do not handle
3251 FP_TOP_SSE_REGS and FP_SECOND_SSE_REGS classes.
3252 (ix86_preferred_output_reload_class): Ditto.
3253 * config/i386/i386.md (fix_trunc<mode>_i387_fisttp): Change "=&1f"
3254 clobber constraint to "=&f".
3255 (fix_truncdi_i387): Ditto.
3256 (lrintxfdi2): Ditto.
3257 (fistdi2_<rounding>): Ditto.
3258 (fpremxf4_i387): Change "=u" constraint to "=f".
3259 (fprem1xf4_i387): Ditto.
3261 (fptanxf4_i387): Ditto.
3262 (fxtractxf3_i387): Ditto.
3263 (fscalexf4_i387): Ditto.
3264 (atan2xf3): Change "u" constraint to "f".
3265 (fyl2xxf3_i387): Ditto.
3266 (fyl2xp1xf3_i387): Ditto.
3268 2018-09-26 Uros Bizjak <ubizjak@gmail.com>
3271 * config/i386/i386.h (NUM_MODES_FOR_MODE_SWITCHING): Update
3272 for removed I387_MASK_PM entity.
3275 2018-09-26 Jeff Law <law@redhat.com>
3277 2018-09-26 Alexey Neyman <stilor@att.net>
3279 * graphite.h: Include <isl/id.h> and <isl/space.h>; these
3280 headers are no longer pulled in by <isl/val.h>.
3282 2018-09-26 Richard Biener <rguenther@suse.de>
3285 * dwarf2out.c (gen_lexical_block_die): Do not equate inline
3286 or concrete instance DIE to the tree. Create abstract origin
3287 attributes also for concrete instances.
3289 2018-09-26 Alexey Neyman <stilor@att.net>
3291 * graphite.h: Include <isl/id.h> and <isl/space.h>; these
3292 headers are no longer pulled in by <isl/val.h>.
3294 2018-09-26 Matthew Malcomson <matthew.malcomson@arm.com>
3296 * config/arm/arm.c (arm_split_compare_and_swap, arm_split_atomic_op):
3297 Use new helper functions.
3298 * config/arm/sync.md (atomic_load<mode>, atomic_store<mode>):
3299 Use new helper functions.
3300 * config/arm/aarch-common-protos.h (aarch_mm_needs_acquire,
3301 aarch_mm_needs_release): New declarations.
3302 * config/arm/aarch-common.c (aarch_mm_needs_acquire,
3303 aarch_mm_needs_release): New.
3305 2018-09-26 Eric Botcazou <ebotcazou@adacore.com>
3307 * config/arm/arm.c (arm_reorg): Skip Thumb reorg pass for thunks.
3308 (arm32_output_mi_thunk): Deal with long calls.
3310 2018-09-26 Richard Biener <rguenther@suse.de>
3314 * tree-inline.c (expand_call_inline): When the location
3315 of the call is UNKNOWN_LOCATION use DECL_SOURCE_LOCATION
3316 or BUILTINS_LOCATION for the BLOCK_SOURCE_LOCATION of
3317 the inserted BLOCK to make inlined_function_outer_scope_p
3319 * dwarf2out.c (add_call_src_coords_attributes): Do not add
3320 coords for reserved locations.
3322 2018-09-25 Segher Boessenkool <segher@kernel.crashing.org>
3324 * config/rs6000/rs6000.md (*movcc_internal1): Use set_attr_alternative.
3325 (*call_indirect_nonlocal_sysv<mode>): Ditto.
3326 (*call_value_indirect_nonlocal_sysv<mode>): Ditto.
3327 (*sibcall_nonlocal_sysv<mode>): Ditto.
3328 (*sibcall_value_nonlocal_sysv<mode>): Ditto.
3329 (<bd>_<mode>): Ditto.
3330 (<bd>tf_<mode>): Ditto.
3332 2018-09-25 Segher Boessenkool <segher@kernel.crashing.org>
3334 * config/rs6000/altivec.md (*altivec_mov<mode>): Write the output
3335 control string as a list of templates instead of as C code.
3336 (*altivec_movti): Ditto.
3337 * config/rs6000/darwin.md (movdf_low_di): Ditto.
3339 2018-09-25 Jim Wilson <jimw@sifive.com>
3341 * config/riscv/riscv.c (riscv_split_symbol): Mark auipc label as weak
3342 when target symbol is weak.
3344 2018-09-25 Bernd Edlinger <bernd.edlinger@hotmail.de>
3347 * builtins.c (unterminated_array): Simplify.
3348 * expr.c (string_constant): Handle SSA_NAME. Add more exceptions
3349 where pointer arithmetic is safe.
3351 2018-09-25 Segher Boessenkool <segher@kernel.crashing.org>
3354 * config/rs6000/altivec.md (altivec_vspltb): Use
3355 const_0_to_15_operand instead of u5bit_cint_operand.
3356 (*altivec_vspltb_internal): Ditto.
3357 (altivec_vspltb_direct): Ditto.
3358 (altivec_vsplth): Use const_0_to_7_operand instead of
3360 (*altivec_vsplth_internal): Ditto.
3361 (altivec_vsplth_direct): Ditto.
3362 (altivec_vspltw): Use const_0_to_3_operand instead of
3364 (*altivec_vspltw_internal): Ditto.
3365 (altivec_vspltw_direct): Ditto.
3366 (altivec_vspltsf): Ditto.
3367 (*altivec_vspltsf_internal): Ditto.
3368 * config/rs6000/rs6000.c (rs6000_expand_binop_builtin): Handle the
3369 various splats with the proper size immediate. Reorder the various
3370 cases by ascending size of immediate, and put all such together.
3372 2018-09-25 Richard Biener <rguenther@suse.de>
3375 * dwarf2out.c (add_AT_external_die_ref): Remove now redundant
3377 (maybe_create_die_with_external_ref): Do not create
3378 DW_TAG_imported_unit here.
3379 (add_abstract_origin_attribute): Handle external BLOCK refs.
3380 (dwarf2out_abstract_function): Simplify LTO case.
3381 (dwarf2out_early_finish): Create DW_TAG_imported_unit explicitely
3382 rather than using maybe_create_die_with_external_ref.
3384 2018-09-25 Uros Bizjak <ubizjak@gmail.com>
3387 * config/i386/i386.md (frndintxf2_mask_pm): Remove.
3388 (frndintxf2_mask_pm_i387): Ditto.
3389 (nearbyintxf2): Rewrite expander pattern to match rintxf2.
3390 Enable for !flag_trapping_math.
3391 (nearbyint<mode>2): Enable x87 modes for !flag_trapping_math.
3392 Enable SSE modes for TARGET_SSE4_1 and expand them with round insn.
3393 Change operand 1 predicate to nonimmediate_operand.
3394 (attr "i387_cw"): Remove mask_pm.
3395 * config/i386/i386.h (enum ix86_stack_slot): Remove SLOT_CW_MASK_PM.
3396 (enum ix86_entity): Remove I387_MASK_PM.
3397 * config/i386/i386.c (ix86_i387_mode_needed): Do not
3398 handle I387_MASK_PM.
3399 (ix86_mode_needed): Ditto.
3400 (ix86_mode_after): Ditto.
3401 (ix86_mode_entry): Ditto.
3402 (ix86_mode_exit): Ditto.
3403 (emit_i387_cw_initialization): Do not handle I387_CW_MASK_PM.
3405 2018-09-25 Jakub Jelinek <jakub@redhat.com>
3407 * vr-values.c (vr_values::vr_values): Initialize to_remove_edges and
3408 to_update_switch_stmts to vNULL instead of calling create on them
3411 2018-09-25 Richard Biener <rguenther@suse.de>
3413 PR tree-optimization/87402
3414 * tree-ssa-sccvn.c (SSA_VISITED): Remove unused function.
3415 (visit_phi): Re-instantiate handling of supposed to be VARYING
3416 but non-VARYING backedge value.
3418 2018-09-25 Richard Biener <rguenther@suse.de>
3421 * dwarf2out.c (struct sym_off_pair): New.
3422 (external_die_map): New global.
3423 (lookup_decl_die): When in LTO create DIEs lazily from the
3425 (lookup_block_die): New function, create DIEs lazily in LTO.
3426 (equate_block_to_die): New function.
3427 (dwarf2out_die_ref_for_decl): During WPA get the association
3428 from the external DIE map.
3429 (dwarf2out_register_external_die): Record mapping into the
3431 (maybe_create_die_with_external_ref): New function split out from
3432 DIE generation part of old dwarf2out_register_external_die.
3433 (add_abstract_origin_attribute): Do not return the DIE. When
3434 in LTO reference externals directly.
3435 (dwarf2out_abstract_function): When in LTO ignore calls for
3436 decls with external DIEs (already present abstract instances).
3437 (gen_call_site_die): Adjust.
3438 (add_high_low_attributes): Likewise.
3439 (gen_lexical_block_die): Likewise.
3440 (gen_inlined_subroutine_die): Likewie.
3441 (gen_block_die): Likewise.
3442 (dwarf2out_inline_entry): Likewise.
3443 (dwarf2out_early_finish): In LTRANS phase create DW_TAG_imported_unit
3446 2018-09-25 Martin Liska <mliska@suse.cz>
3448 * ipa-fnsummary.c (estimate_node_size_and_time): Scale by two
3449 integers and not by a float value.
3451 2018-09-25 Martin Liska <mliska@suse.cz>
3454 * dbgcnt.c (dbg_cnt_process_single_pair): Return false
3456 * dumpfile.c (dump_enable_all): Remove extra parenthesis.
3457 * gcov-tool.c: Declare the function with ATTRIBUTE_NORETURN.
3458 * godump.c (go_format_type): Remove extra parenthesis.
3460 2018-09-25 Martin Liska <mliska@suse.cz>
3462 * alias.c (set_dest_equal_p): Remove unused function.
3463 * config/i386/i386.c (def_builtin_pure2): Likewise.
3464 * diagnostic-show-locus.c (class layout): Remove
3466 (layout::layout): Likewise here.
3467 * dump-context.h (class temp_dump_context): Likewise.
3468 * dwarf2out.c (add_AT_fde_ref): Remove unused function.
3469 (add_AT_loclistsptr): Likewise.
3470 (add_AT_offset): Likewise.
3471 (get_AT_hi_pc): Likewise.
3472 (is_comdat_die): Likewise.
3473 (type_is_enum): Likewise.
3474 (ceiling): Likewise.
3475 (add_AT_vms_delta): Likewise.
3476 (is_class_die): Likewise.
3477 * edit-context.c (class line_event): Remove unused field.
3478 * graphite-sese-to-poly.c (tree_int_to_gmp): Remove
3480 * ipa-cp.c (ipa_get_vr_lat): Likewise.
3481 * lra-constraints.c (ok_for_index_p_nonstrict): Likewise.
3482 (ok_for_base_p_nonstrict): Likewise.
3483 * tree-chrec.c (is_not_constant_evolution): Likewise.
3484 (chrec_fold_poly_cst): Likewise.
3485 * tree-if-conv.c (has_pred_critical_p): Likewise.
3486 * tree-ssa-coalesce.c (print_exprs): Likewise.
3487 * tree-ssa-pre.c (bitmap_set_contains_expr): Likewise.
3488 * tree-ssa-uninit.c (is_and_or_or_p): Likewise.
3489 * tree-vrp.c (value_ranges_intersect_p): Likewise.
3490 (value_range_nonnegative_p): Likewise.
3492 2018-09-25 Martin Liska <mliska@suse.cz>
3494 * config/powerpcspe/powerpcspe.c (rs6000_output_function_epilogue):
3495 Do not handle "GNU Pascal".
3496 * config/rs6000/rs6000.c (rs6000_output_function_epilogue):
3498 * config/sparc/sparc.c (sparc_pass_by_reference): Remove Pascal
3499 from documentation. Likewise.
3500 * dbxout.c (dbxout_range_type): Likewise.
3501 * doc/cpp.texi: Likewise.
3502 * doc/extend.texi: Likewise.
3503 * doc/frontends.texi: Likewise.
3504 * doc/invoke.texi: Remove Pascal entry.
3505 * tree.def (CLEANUP_POINT_EXPR): Likewise.
3506 * doc/rtl.texi (MODE_FUNCTION): Remove not used entry.
3508 2018-09-25 Martin Liska <mliska@suse.cz>
3511 * doc/invoke.texi: Document all parameters and remove default
3514 2018-09-25 Ilya Leoshkevich <iii@linux.ibm.com>
3517 * rtl.c (rtx_code_size): Take into account that EQ_ATTR_ALT
3518 contains HOST_WIDE_INTs when computing its size.
3520 2018-09-24 Jim Wilson <jimw@sifive.com>
3523 * config/riscv/riscv.h (STACK_BOUNDARY): Test riscv_abi == ABI_ILP32E
3525 (ABI_STACK_BOUNDARY, MAX_ARGS_IN_REGISTERS): Likewise.
3527 2018-09-24 Andrew Pinski <apinski@marvell.com>
3529 * config/aarch64/aarch64.c (aarch_macro_fusion_pair_p): Don't
3530 access prev before checking it for NULLness in the
3531 AARCH64_FUSE_CMP_BRANCH case.
3533 2018-09-24 H.J. Lu <hongjiu.lu@intel.com>
3536 * config/i386/i386.c (rest_of_insert_endbranch): Set
3537 endbr_queued_at_entrance to true and don't insert ENDBR if
3538 x86_function_profiler will be called.
3539 (x86_function_profiler): Insert ENDBR if endbr_queued_at_entrance
3541 * config/i386/i386.h (machine_function): Add
3542 endbr_queued_at_entrance.
3544 2018-09-24 Ilya Leoshkevich <iii@linux.ibm.com>
3546 * genattrtab.c (mk_attr_alt): Use alternative_mask.
3547 (attr_rtx_1): Adjust caching to match the new EQ_ATTR_ALT field
3549 (check_attr_test): Use alternative_mask.
3550 (get_attr_value): Likewise.
3551 (compute_alternative_mask): Use alternative_mask and XWINT.
3552 (make_alternative_compare): Use alternative_mask.
3553 (attr_alt_subset_p): Use XWINT.
3554 (attr_alt_subset_of_compl_p): Likewise.
3555 (attr_alt_intersection): Use alternative_mask and XWINT.
3556 (attr_alt_union): Likewise.
3557 (attr_alt_complement): Use HOST_WIDE_INT and XWINT.
3558 (mk_attr_alt): Use alternative_mask and HOST_WIDE_INT.
3559 (simplify_test_exp): Use alternative_mask and XWINT.
3560 (write_test_expr): Use alternative_mask and XWINT, adjust bit
3561 number calculation to support 64 bits. Generate code that
3562 checks 64-bit masks.
3563 (main): Use alternative_mask.
3564 * rtl.def (EQ_ATTR_ALT): Change field types from ii to ww.
3566 2018-09-24 Ilya Leoshkevich <iii@linux.ibm.com>
3569 * config/s390/s390.c (s390_emit_epilogue): Do not use PARALLEL
3570 RETURN+USE when returning via %r14.
3572 2018-09-24 Martin Liska <mliska@suse.cz>
3574 * gcov.c (output_lines): Print colorization legend
3575 for both flag_use_colors and flag_use_hotness_colors.
3578 2018-09-24 Martin Liska <mliska@suse.cz>
3580 * coverage.c (get_coverage_counts): Use warning_at
3581 with current_function_decl location. Use %qD in warning
3584 2018-09-24 Martin Liska <mliska@suse.cz>
3586 * memory-block.h (memory_block_pool::release): Annotate with
3587 valgrind that the memory is not accessible.
3589 2018-09-24 Martin Liska <mliska@suse.cz>
3592 * asan.c: Make asan_handled_variables extern.
3594 * cfgexpand.c (expand_stack_vars): Make sure
3595 a representative is unpoison if another
3596 variable in the partition is handled by
3597 use-after-scope sanitization.
3599 2018-09-24 Richard Biener <rguenther@suse.de>
3601 PR tree-optimization/63155
3602 * tree-ssa-propagate.c (add_ssa_edge): Avoid adding PHIs to
3603 the worklist when the edge of the respective argument isn't
3606 2018-09-23 Uros Bizjak <ubizjak@gmail.com>
3608 * config/i386/i386.h (enum reg_class): Rename MASK_REGS to
3609 ALL_MASK_REGS and MASK_EVEX_REGS to MASK_REGS.
3610 (MASK_CLASS_P): Update for rename.
3611 (MAYBE_MASK_CLASS_P): Ditto.
3612 (REG_CLASS_NAMES): Update.
3613 (REG_CLASS_CONTENT): Update.
3614 * config/i386/i386.c (regclass_map): Update for MASK_REG
3615 and ALL_MASK_REGS rename.
3616 * config/i386/constraints.md (Yk): Update for rename.
3619 2018-09-23 Uros Bizjak <ubizjak@gmail.com>
3621 * config/i386/i386.h (enum reg_class): Remove
3622 EVEX_SSE_REGS and MOD4_SSE_REGS.
3623 (REG_CLASS_NAMES): Update.
3624 (REG_CLASS_CONTENT): Update.
3625 * config/i386/i386.c (regclass_map): Declare AVX-512 SSE
3626 registers as ALL_SSE_REGS.
3627 (ix86_additional_allocno_class_p): Remove.
3628 (TARGET_ADDITIONAL_ALLOCNO_CLASS_P): Remove.
3629 (ix86_register_priority): Lower priority of EVEX SSE registers.
3630 Use IN_RANGE macro where appropriate.
3631 (ix86_hard_regno_mode_ok): Merge AVX-5124FMAPS and
3632 AVX-5124VNNIW checks.
3633 (ix86_modes_tieable_p): Tie 512-bit SSE modes.
3634 * config/i386/sse.md (avx5124fmaddps_4fmaddps)
3635 (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddps_maskz)
3636 (avx5124fmaddps_4fmaddss, avx5124fmaddps_4fmaddss_mask)
3637 (avx5124fmaddps_4fmaddss_maskz, avx5124fmaddps_4fnmaddps)
3638 (avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddps_maskz)
3639 (avx5124fmaddps_4fnmaddss, avx5124fmaddps_4fnmaddss_mask)
3640 (avx5124fmaddps_4fnmaddss_maskz, avx5124vnniw_vp4dpwssd)
3641 (avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssd_maskz)
3642 (avx5124vnniw_vp4dpwssds, avx5124vnniw_vp4dpwssds_mask)
3643 (avx5124vnniw_vp4dpwssds_maskz): Use "v" instead of "Yh" constraint.
3644 * config/i386/constraints.md (Yh): Remove.
3646 2018-09-23 Uros Bizjak <ubizjak@gmail.com>
3648 * config/i386/i386.c (regclass_map): Declare integer REX registers
3651 2018-09-23 Gerald Pfeifer <gerald@pfeifer.com>
3653 * doc/service.texi (Service): Switch the fsf.org link to https.
3655 2018-09-22 Chung-Ju Wu <jasonwucj@gmail.com>
3658 * config/nds32/nds32.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3659 Define to speculation_safe_value_not_needed.
3661 2018-09-21 Florian Weimer <fweimer@redhat.com>
3664 * doc/extend.texi (Common Function Attributes): Mention that
3665 noreturn suppresses tail call optimization.
3667 2018-09-21 Jeff Law <law@redhat.com>
3669 * gimple-ssa-evrp.c (evrp_dom_walker::cleanup): Call
3670 vr_values::cleanup_edges_and_switches.
3671 * tree-vrp.c (to_remove_edges, to_update_switch_stmts): Moved into
3673 (identify_jump_threads): Remove EDGE_IGNORE handling.
3674 (execute_vrp): Move handling of to_remove_edges and
3675 to_update_switch_stmts into vr_values class member functions.
3676 * tree-vrp.h (switch_update, to_remove_edges): Remove declarations.
3677 (to_update_switch_stmts): Likewise.
3678 * vr-values.c: Include cfghooks.h.
3679 (vr_values::vr_values): Initialize to_remove_edges and
3680 to_update_switch_stmts.
3681 (vr_values::~vr_values): Verify to_remove_edges and
3682 to_update_switch_stmts are empty.
3683 (vr_values::simplify_switch_using_ranges): Set EDGE_IGNORE as needed.
3684 (vr_values::cleanup_edges_and_switches): New member function.
3685 * vr-values.h (vr_values): Add cleanup_edges_and_switches member
3686 function. Add new data members.
3688 2018-09-21 David Malcolm <dmalcolm@redhat.com>
3690 PR tree-optimization/87309
3691 * dumpfile.c (dump_context::begin_scope): Filter the dump_loc
3692 calls with pflags and alt_flags.
3693 (selftest::test_capture_of_dump_calls): Add test of interaction of
3694 MSG_OPTIMIZED_LOCATIONS with AUTO_DUMP_SCOPE.
3696 2018-09-21 Olivier Hainque <hainque@adacore.com>
3698 * config.gcc: Factorize and comment inclusion of vxworks-dummy.h.
3700 2018-09-21 Olivier Hainque <hainque@adacore.com>
3702 * config/vxworks.h (CLEAR_INSN_CACHE): #define to 1.
3704 2018-09-21 Olivier Hainque <hainque@adacore.com>
3706 * config/vxworks.h (VXWORKS_LIBGCC_SPEC): Remove -lc_internal.
3707 Merge block comment with the one ahead of VXWORKS_LIBS_RTP. Then:
3708 (VXWORKS_LIBS_RTP): Minor reordering.
3710 2018-09-21 Olivier Hainque <hainque@adacore.com>
3712 * config/vxworks.h (STARTFILE_PREFIX_SPEC): Define.
3713 (VXWORKS_LIBS_DIR_RTP): Remove definition and use.
3715 2018-09-21 Olivier Hainque <hainque@adacore.com>
3717 * config/vxworks.h (SIZE_TYPE): Account for TARGET_VXWORKS64.
3718 (PTRDIFF_TYPE): Likewise.
3720 2018-09-21 Olivier Hainque <hainque@adacore.com>
3722 * config.gcc: Enforce def of TARGET_VXWORKS64 to 1 from
3723 triplet, similar to support for VxWorks7.
3724 * config/vxworks-dummy.h: Provide a default definition
3725 of TARGET_VXWORKS64 to 0.
3727 2018-09-21 Olivier Hainque <hainque@adacore.com>
3729 * config/vxworks.h (TARGET_VXWORKS7): Move default definition ...
3730 * config/vxworks-dummy.h: here.
3732 2018-09-21 Olivier Hainque <hainque@adacore.com>
3734 * config.gcc: Prepend vxworks-dummy.h to tm_file for powerpc*
3736 2018-09-21 Shaokun Zhang <zhangshaokun@hisilicon.com>
3737 Bo Zhou <zbo.zhou@hisilicon.com>
3739 * config/aarch64/aarch64-cores.def (tsv110): New CPU.
3740 * config/aarch64/aarch64-tune.md: Regenerated.
3741 * doc/invoke.texi (AArch64 Options/-mtune): Add "tsv110".
3742 * config/aarch64/aarch64.c (tsv110_tunings): New tuning table.
3743 * config/aarch64/aarch64-cost-tables.h: Add "tsv110" extra costs.
3745 2018-09-21 Andrew Stubbs <ams@codesourcery.com>
3746 Julian Brown <julian@codesourcery.com>
3748 * builtins.c (get_builtin_sync_mem): Handle address spaces.
3750 2018-09-21 Eric Botcazou <ebotcazou@adacore.com>
3752 * config/rs6000/rs6000.c (rs6000_function_ok_for_sibcall): Return false
3753 if the call takes a static chain.
3755 2018-09-21 Martin Liska <mliska@suse.cz>
3757 * auto-profile.c (autofdo_source_profile::read): Do not
3759 (read_profile): Do not add working sets.
3760 (read_autofdo_file): Remove sum_all.
3761 (afdo_callsite_hot_enough_for_early_inline): Remove const
3763 * coverage.c (struct counts_entry): Remove gcov_summary.
3764 (read_counts_file): Read new GCOV_TAG_OBJECT_SUMMARY,
3765 do not support GCOV_TAG_PROGRAM_SUMMARY.
3766 (get_coverage_counts): Remove summary and expected
3768 * coverage.h (get_coverage_counts): Likewise.
3769 * doc/gcov-dump.texi: Remove -w option.
3770 * gcov-dump.c (dump_working_sets): Remove.
3771 (main): Do not support '-w' option.
3772 (print_usage): Likewise.
3773 (tag_summary): Likewise.
3774 * gcov-io.c (gcov_write_summary): Do not dump
3776 (gcov_read_summary): Likewise.
3777 (gcov_histo_index): Remove.
3778 (gcov_histogram_merge): Likewise.
3779 (compute_working_sets): Likewise.
3780 * gcov-io.h (GCOV_TAG_OBJECT_SUMMARY): Mark
3782 (GCOV_TAG_PROGRAM_SUMMARY): Mark it obsolete.
3783 (GCOV_TAG_SUMMARY_LENGTH): Adjust.
3784 (GCOV_HISTOGRAM_SIZE): Remove.
3785 (GCOV_HISTOGRAM_BITVECTOR_SIZE): Likewise.
3786 (struct gcov_summary): Simplify rapidly just
3787 to runs and sum_max fields.
3788 (gcov_histo_index): Remove.
3789 (NUM_GCOV_WORKING_SETS): Likewise.
3790 (compute_working_sets): Likewise.
3791 * gcov-tool.c (print_overlap_usage_message): Remove
3792 trailing empty line.
3793 * gcov.c (read_count_file): Read GCOV_TAG_OBJECT_SUMMARY.
3794 (output_lines): Remove program related line.
3795 * ipa-profile.c (ipa_profile): Do not consider GCOV histogram.
3796 * lto-cgraph.c (output_profile_summary): Do not stream GCOV
3798 (input_profile_summary): Do not read it.
3799 (merge_profile_summaries): And do not merge it.
3800 (input_symtab): Do not call removed function.
3801 * modulo-sched.c (sms_schedule): Do not print sum_max.
3802 * params.def (HOT_BB_COUNT_FRACTION): Reincarnate param that was
3803 removed when histogram method was invented.
3804 (HOT_BB_COUNT_WS_PERMILLE): Mention that it's used only in LTO
3806 * postreload-gcse.c (eliminate_partially_redundant_load): Fix
3808 * predict.c (get_hot_bb_threshold): Use HOT_BB_COUNT_FRACTION
3809 and dump selected value.
3810 * profile.c (add_working_set): Remove.
3811 (get_working_sets): Likewise.
3812 (find_working_set): Likewise.
3813 (get_exec_counts): Do not work with working sets.
3814 (read_profile_edge_counts): Do not inform as sum_max is removed.
3815 (compute_branch_probabilities): Likewise.
3816 (compute_value_histograms): Remove argument for call of
3817 get_coverage_counts.
3818 * profile.h: Do not make gcov_summary const.
3820 2018-09-21 Monk Chiang <sh.chiang04@gmail.com>
3822 * config.gcc (nds32*-*-*): Set TARGET_DEFAULT_TLSDESC_TRAMPOLINE=0.
3824 2018-09-21 Eric Botcazou <ebotcazou@adacore.com>
3826 PR tree-optimization/86990
3827 * gimple-ssa-store-merging.c (imm_store_chain_info:coalesce_immediate):
3828 Check that the entire merged store group is made of constants only for
3831 2018-09-20 Allan Sandfeld Jensen <allan.jensen@qt.io>
3833 * gcc.c (LINK_COMMAND_SPEC): Handle -r like -nostdlib.
3834 (VTABLE_VERIFICATION_SPEC): Likewise.
3835 (SANITIZER_EARLY_SPEC): Likewise.
3836 (SANITIZER_SPEC): Likewise.
3837 * config/darwin.h (LINK_COMMAND_SPEC): Likewise.
3838 * doc/invoke.texi (Link Options): Document -r.
3840 2018-09-20 Richard Biener <rguenther@suse.de>
3843 * gimplify.c (gimplify_expr): Retain alignment of
3844 addressable lvalue in dereference.
3846 2018-09-20 Alexandre Oliva <aoliva@redhat.com>
3849 * configure.ac: Check for .loc is_stmt support.
3850 * configure, config.in: Rebuilt.
3851 * dwarf2out.c (dwarf2out_source_line): Skip is_stmt
3854 2018-09-20 Segher Boessenkool <segher@kernel.crashing.org>
3856 * config/rs6000/rs6000.opt (misel=no, misel=yes): Delete.
3857 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -misel=yes and
3860 2018-09-20 Segher Boessenkool <segher@kernel.crashing.org>
3862 * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
3864 * config/rs6000/rs6000.c (rs6000_debug_vector_unit): Delete
3867 2018-09-20 Marek Polacek <polacek@redhat.com>
3869 * doc/invoke.texi: Add -Wno-init-list-lifetime to C++ Language Options.
3871 2018-09-20 Richard Sandiford <richard.sandiford@arm.com>
3873 PR tree-optimization/87288
3874 * tree-vect-loop.c (vect_analyze_loop_2): Take PEELING_FOR_GAPS
3875 into account when determining PEELING_FOR_NITERS.
3877 2018-09-20 Richard Sandiford <richard.sandiford@arm.com>
3879 PR tree-optimization/86877
3880 * tree-vect-loop.c (vect_analyze_loop_2): Call
3881 vect_verify_datarefs_alignment.
3883 2018-09-19 Marek Polacek <polacek@redhat.com>
3885 * doc/invoke.texi: Document -Wclass-conversion.
3887 2018-09-19 John David Anglin <danglin@gcc.gnu.org>
3889 * config/pa/pa.c (pa_adjust_priority): Delete.
3890 (TARGET_SCHED_ADJUST_PRIORITY): Delete define.
3892 * config/pa/pa.md (atomic_storeqi): Restore deleted expander.
3893 (atomic_storehi): Likewise.
3894 (atomic_storesi): Likewise.
3895 (atomic_loaddi): Restore compare and swap exchange loop code.
3897 2018-09-19 Segher Boessenkool <segher@kernel.crashing.org>
3899 PR rtl-optimization/86902
3900 * combine.c (try_combine): When changing the CC mode used, don't change
3901 an unrelated mode in other_insn to that new CC mode.
3903 2018-09-19 David Malcolm <dmalcolm@redhat.com>
3905 * tree-data-ref.c (runtime_alias_check_p): Use formatted printing
3906 with %T in place of calls to dump_generic_expr.
3907 (prune_runtime_alias_test_list): Likewise.
3908 (create_runtime_alias_checks): Likewise.
3909 * tree-vect-data-refs.c (vect_check_nonzero_value): Likewise.
3910 (vect_analyze_data_ref_dependence): Likewise.
3911 (vect_slp_analyze_data_ref_dependence): Likewise.
3912 (vect_record_base_alignment): Likewise. Use %G in place of call
3913 to dump_gimple_stmt.
3914 (vect_compute_data_ref_alignment): Likewise.
3915 (verify_data_ref_alignment): Likewise.
3916 (vect_find_same_alignment_drs): Likewise.
3917 (vect_analyze_group_access_1): Likewise.
3918 (vect_analyze_data_ref_accesses): Likewise.
3919 (dependence_distance_ge_vf): Likewise.
3920 (dump_lower_bound): Likewise.
3921 (vect_prune_runtime_alias_test_list): Likewise.
3922 (vect_find_stmt_data_reference): Likewise.
3923 (vect_analyze_data_refs): Likewise.
3924 (vect_create_addr_base_for_vector_ref): Likewise.
3925 (vect_create_data_ref_ptr): Likewise.
3926 * tree-vect-loop-manip.c (vect_set_loop_condition): Likewise.
3927 (vect_can_advance_ivs_p): Likewise.
3928 (vect_update_ivs_after_vectorizer): Likewise.
3929 (vect_gen_prolog_loop_niters): Likewise.
3930 (vect_prepare_for_masked_peels): Likewise.
3931 * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
3932 (vect_determine_vectorization_factor): Likewise.
3933 (vect_is_simple_iv_evolution): Likewise.
3934 (vect_analyze_scalar_cycles_1): Likewise.
3935 (vect_analyze_loop_operations): Likewise.
3936 (report_vect_op): Likewise.
3937 (vect_is_slp_reduction): Likewise.
3938 (check_reduction_path): Likewise.
3939 (vect_is_simple_reduction): Likewise.
3940 (vect_create_epilog_for_reduction): Likewise.
3941 (vect_finalize_reduction:): Likewise.
3942 (vectorizable_induction): Likewise.
3943 (vect_transform_loop_stmt): Likewise.
3944 (vect_transform_loop): Likewise.
3945 (optimize_mask_stores): Likewise.
3946 * tree-vect-patterns.c (vect_pattern_detected): Likewise.
3947 (vect_split_statement): Likewise.
3948 (vect_recog_over_widening_pattern): Likewise.
3949 (vect_recog_average_pattern): Likewise.
3950 (vect_determine_min_output_precision_1): Likewise.
3951 (vect_determine_precisions_from_range): Likewise.
3952 (vect_determine_precisions_from_users): Likewise.
3953 (vect_mark_pattern_stmts): Likewise.
3954 (vect_pattern_recog_1): Likewise.
3955 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
3956 (vect_record_max_nunits): Likewise.
3957 (vect_build_slp_tree_1): Likewise.
3958 (vect_build_slp_tree_2): Likewise.
3959 (vect_print_slp_tree): Likewise.
3960 (vect_analyze_slp_instance): Likewise.
3961 (vect_detect_hybrid_slp_stmts): Likewise.
3962 (vect_detect_hybrid_slp_1): Likewise.
3963 (vect_slp_analyze_operations): Likewise.
3964 (vect_slp_analyze_bb_1): Likewise.
3965 (vect_transform_slp_perm_load): Likewise.
3966 (vect_schedule_slp_instance): Likewise.
3967 * tree-vect-stmts.c (vect_mark_relevant): Likewise.
3968 (vect_mark_stmts_to_be_vectorized): Likewise.
3969 (vect_init_vector_1): Likewise.
3970 (vect_get_vec_def_for_operand): Likewise.
3971 (vect_finish_stmt_generation_1): Likewise.
3972 (vect_check_load_store_mask): Likewise.
3973 (vectorizable_call): Likewise.
3974 (vectorizable_conversion): Likewise.
3975 (vectorizable_operation): Likewise.
3976 (vectorizable_load): Likewise.
3977 (vect_analyze_stmt): Likewise.
3978 (vect_is_simple_use): Likewise.
3979 (vect_get_vector_types_for_stmt): Likewise.
3980 (vect_get_mask_type_for_stmt): Likewise.
3981 * tree-vectorizer.c (increase_alignment): Likewise.
3983 2018-09-19 Andrew Stubbs <ams@codesourcery.com>
3985 * doc/rtl.texi: Adjust vec_select description.
3986 * simplify-rtx.c (simplify_binary_operation_1): Allow VEC_SELECT to use
3987 non-constant selectors.
3989 2018-09-19 Matthew Malcomson <matthew.malcomson@arm.com>
3991 * config/aarch64/aarch64-protos.h
3992 (aarch64_offset_9bit_signed_unscaled_p): New declaration.
3993 * config/aarch64/aarch64.md (arches): New "rcpc8_4" attribute value.
3994 (arch_enabled): Add check for "rcpc8_4" attribute value of "arch".
3995 * config/aarch64/aarch64.h (AARCH64_FL_RCPC8_4): New bitfield.
3996 (AARCH64_FL_FOR_ARCH8_4): Include AARCH64_FL_RCPC8_4.
3997 (AARCH64_FL_PROFILE): Move index so flags are ordered.
3998 (AARCH64_ISA_RCPC8_4): New flag.
3999 * config/aarch64/aarch64.c (offset_9bit_signed_unscaled_p): Renamed
4000 to aarch64_offset_9bit_signed_unscaled_p.
4001 * config/aarch64/atomics.md (atomic_store<mode>): Allow offset
4003 * config/aarch64/constraints.md (Ust): New constraint.
4004 * config/aarch64/predicates.md.
4005 (aarch64_9bit_offset_memory_operand): New predicate.
4006 (aarch64_rcpc_memory_operand): New predicate.
4008 2018-09-19 Eric Botcazou <ebotcazou@adacore.com>
4010 PR rtl-optimization/87361
4011 * rtlanal.c (nonzero_bits1): Revert accidental change.
4013 2018-09-19 Richard Biener <rguenther@suse.de>
4015 PR tree-optimization/87349
4016 PR tree-optimization/87342
4017 * tree-ssa-sccvn.c (do_rpo_vn): Iterate max_rpo computation.
4019 2018-09-18 Marek Polacek <polacek@redhat.com>
4021 P1064R0 - Allowing Virtual Function Calls in Constant Expressions
4022 * gimple-fold.c (gimple_get_virt_method_for_vtable): Adjust assert.
4024 2018-09-18 Segher Boessenkool <segher@kernel.crashing.org>
4026 * config/rs6000/rs6000.md: Remove old "Cygnus sibcall" comment.
4028 2018-09-18 Segher Boessenkool <segher@kernel.crashing.org>
4030 PR rtl-optimization/86882
4031 * rtlanal.c (reg_overlap_mentioned_p): Handle CLOBBER.
4033 2018-09-18 Uros Bizjak <ubizjak@gmail.com>
4035 * config/i386/i386.md (*<code>extend<mode>xf2): Macroize insn from
4036 *<code>extendsfxf2 and *<code>extenddfxf2 using MODEF mode iterator.
4038 2018-09-18 Jonathan Wakely <jwakely@redhat.com>
4041 * doc/invoke.texi (Link Options): Fix formatting and grammar.
4043 2018-09-18 Richard Biener <rguenther@suse.de>
4046 * tree-ssa-coalesce.c (tree_int_map_hasher): Remove.
4047 (compute_samebase_partition_bases): Likewise.
4048 (coalesce_ssa_name): Always use compute_optimized_partition_bases.
4049 (gimple_can_coalesce_p): Simplify.
4051 2018-09-18 Hans-Peter Nilsson <hp@bitrange.com>
4053 Handle a library implementation of ffs calling __builtin_ffs.
4054 * config/mmix/mmix.c (TARGET_INIT_LIBFUNCS): Override with...
4055 (mmix_init_libfuncs): New function: make __builtin_ffs expand
4058 2018-09-17 David Malcolm <dmalcolm@redhat.com>
4060 * diagnostic-show-locus.c (class layout_range): Add field
4062 (layout_range::layout_range): Add "original_idx" param and use it
4063 to initialize new field.
4064 (make_range): Use 0 for original_idx.
4065 (layout::layout): Pass in index to calls to
4066 maybe_add_location_range.
4067 (layout::maybe_add_location_range): Add param "original_idx" and
4068 pass it on to layout_range.
4069 (layout::print_any_labels): Pass on range->m_original_idx to
4071 (gcc_rich_location::add_location_if_nearby): Use 0 for
4073 * gcc-rich-location.h (text_range_label::get_text): Update for new
4075 (range_label_for_type_mismatch::get_text): Likewise.
4077 2018-09-17 Uros Bizjak <ubizjak@gmail.com>
4079 * config/i386/i386.c (ix86_emit_i387_log1p): Emit fldln2 earlier.
4081 2018-09-17 David Malcolm <dmalcolm@redhat.com>
4083 * gimple-ssa-sprintf.c (fmtwarn): Update for introduction of
4084 format_string_diagnostic_t.
4085 (fmtwarn_n): Likewise.
4086 * substring-locations.c
4087 (format_string_diagnostic_t::format_string_diagnostic_t) New ctor.
4088 (format_warning_n_va): Convert to...
4089 (format_string_diagnostic_t::emit_warning_n_va): ...this.
4090 (format_warning_va): Convert to...
4091 (format_string_diagnostic_t::emit_warning_va): ...this.
4092 (format_warning_at_substring): Convert to...
4093 (format_string_diagnostic_t::emit_warning): ...this.
4094 (format_warning_at_substring_n): Convert to...
4095 (format_string_diagnostic_t::emit_warning_n): ...this.
4096 * substring-locations.h (class format_string_diagnostic_t): New
4098 (format_warning_va): Convert to
4099 format_string_diagnostic_t::emit_warning_va.
4100 (format_warning_n_va): Convert to
4101 format_string_diagnostic_t::emit_warning_n_va.
4102 (format_warning_at_substring): Convert to
4103 format_string_diagnostic_t::emit_warning.
4104 (format_warning_at_substring_n): Convert to
4105 format_string_diagnostic_t::emit_warning_n.
4107 2018-09-17 Cesar Philippidis <cesar@codesourcery.com>
4108 Bernd Schmidt <bernds_cb1@t-online.de>
4110 * config/nvptx/nvptx.md (atomic_fetch_<logic><mode>): Enable with
4113 2018-09-17 Uros Bizjak <ubizjak@gmail.com>
4115 * config/i386/i386.md (truncxf<mode>2_i387_noop_unspec): Change
4116 operand 0 predicate to nonimmediate operand.
4117 (rint<mode>2_frndint): Remove insn pattern.
4118 (rint<mode>2): Change operand 1 predicate to general_operand.
4119 Extend operand 1 to XFmode and generate rintxf2 insn.
4120 (frndintxf2_<rounding>): Rename from frndint<mode>2_<rounding>.
4121 Do not use X87MODEF mode macro.
4122 (frndintxf2_<rounding>_i387): Rename from
4123 frndint<mode>2_<rounding>_i387. Do not use X87MODEF mode macro.
4124 (<rounding_insn><mode>2): For non-SSE modes, extend operand 1
4125 to XFmode and generate significandxf3 insn.
4127 2018-09-17 Richard Biener <rguenther@suse.de>
4129 PR tree-optimization/87328
4130 * tree-ssa-sccvn.c (process_bb): Remove assertion about not
4131 visiting unexecutable backedges when not iterating.
4132 (do_rpo_vn): Mark all edges not executable even when not
4135 2018-09-17 Martin Jambor <mjambor@suse.cz>
4138 * doc/invoke.texi (Warning Options): Likewise.
4140 2018-09-17 Richard Biener <rguenther@suse.de>
4142 PR tree-optimization/87301
4143 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_cleanup): Properly
4144 clean EH info from leftover copy assignments.
4146 2018-09-17 Martin Liska <mliska@suse.cz>
4148 PR gcov-profile/85871
4149 * gcov.c (output_intermediate_file): Fix out of bounds
4152 2018-09-17 Vineet Gupta <vgupta@synopsys.com>
4154 * config/arc/arc.c: Object attributes for core4 not reflected
4156 * config/arc/arc.h: Don't restrict DBNZ to core3 (core4 includes
4159 2018-09-17 Alexey Brodkin <abrodkin@synopsys.com>
4161 * config/arc/linux.h (LINK_EH_SPEC): Add missing space.
4163 2018-09-17 Martin Liska <mliska@suse.cz>
4165 * doc/gcov.texi: Document new option --use-hotness-colors.
4166 * gcov.c (struct source_info): Declare new field.
4167 (source_info::source_info): Set default for maximum_count.
4168 (print_usage): Add new -q option.
4169 (process_args): Process it.
4170 (accumulate_line_info): Save src->maximum_count.
4171 (output_line_beginning): Make color line number if
4172 flag_use_hotness_colors is set.
4173 (output_line_details): Pass default argument value.
4174 (output_lines): Pass src->maximum_count.
4176 2018-09-17 Martin Liska <mliska@suse.cz>
4178 * common/config/i386/i386-common.c (ix86_get_valid_option_values):
4179 Use processor_names table.
4180 * config/i386/i386.c (ix86_default_align): Use
4181 processor_cost_table for alignment values.
4182 (ix86_option_override_internal): Use processor_names.
4183 (ix86_function_specific_print): Likewise.
4184 * config/i386/i386.h (struct processor_costs):
4185 Add alignment values.
4186 (struct ptt): Remove and replace with const char *.
4187 * config/i386/x86-tune-costs.h (struct processor_costs):
4188 Declare default alignments for all costs.
4190 2018-09-17 Aldy Hernandez <aldyh@redhat.com>
4192 * tree-vrp.c (extract_range_from_unary_expr): Do not special case
4193 symbolics or VR_VARYING ranges for ABS_EXPR.
4194 * wide-int-range.cc (wide_int_range_abs): Return positive numbers
4195 when range will wrap.
4197 2018-09-15 Eric Botcazou <ebotcazou@adacore.com>
4200 * cfgexpand.c (expand_gimple_basic_block): Be prepared for a BARRIER
4201 before and after a JUMP_TABLE_DATA.
4203 2018-09-14 John David Anglin <danglin@gcc.gnu.org>
4206 * dojump.c (do_compare_and_jump): Canonicalize function pointers
4207 when one operand is a function pointer. Use POINTER_TYPE_P and
4208 FUNC_OR_METHOD_TYPE_P.
4209 * expr.c (do_store_flag): Use POINTER_TYPE_P and FUNC_OR_METHOD_TYPE_P.
4210 * fold-const.c (build_range_check): Likewise.
4211 * match.pd (simple_comparison): Likewise.
4213 2018-09-14 David Malcolm <dmalcolm@redhat.com>
4216 * spellcheck.c (get_edit_distance_cutoff): New function.
4217 (selftest::test_edit_distance_unit_test_oneway): Rename to...
4218 (selftest::test_get_edit_distance_one_way): ...this.
4219 (selftest::test_get_edit_distance_unit): Rename to...
4220 (selftest::test_get_edit_distance_both_ways): ...this.
4221 (selftest::test_edit_distances): Move tests to this new function,
4222 and test some more pairs of strings. Update for above renaming.
4223 (selftest::get_old_cutoff): New function.
4224 (selftest::test_get_edit_distance_cutoff): New function.
4225 (selftest::assert_suggested_for): New function.
4226 (ASSERT_SUGGESTED_FOR): New macro.
4227 (selftest::assert_not_suggested_for): New function.
4228 (ASSERT_NOT_SUGGESTED_FOR): New macro.
4229 (selftest::test_suggestions): New function.
4230 (selftest::spellcheck_c_tests): Move test_get_edit_distance_unit
4231 tests to selftest::test_edit_distances and call it. Add calls to
4232 selftest::test_get_edit_distance_cutoff and
4233 selftest::test_suggestions.
4234 * spellcheck.h (get_edit_distance_cutoff): New function declaration.
4235 (best_match::consider): Replace hard-coded cutoff calculation with
4237 (best_match::get_cutoff): New declaration.
4238 (best_match::get_best_meaningful_candidate): Likewise.
4240 2018-09-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
4242 * builtins.c (fold_builtin_strlen): Remove TODO comment.
4244 2018-09-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
4247 2018-07-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
4249 * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
4250 terminated string literal.
4252 2018-09-14 Martin Sebor <msebor@redhat.com>
4254 * builtins.c (unterminated_array): Handle ARRAY_REF.
4255 (expand_builtin_stpcpy_1): Detect unterminated char arrays.
4256 * builtins.h (unterminated_array): Declare extern.
4257 * gimple-fold.c (gimple_fold_builtin_stpcpy): Detect unterminated
4259 (gimple_fold_builtin_sprintf): Propagate NO_WARNING to transformed
4262 2018-09-14 Martin Sebor <msebor@redhat.com>
4263 Jeff Law <law@redhat.com>
4265 * builtins.c (unterminated_array): New.
4266 (expand_builtin_strcpy): Adjust.
4267 (expand_builtin_strcpy_args): Detect unterminated arrays.
4268 * gimple-fold.c (get_maxval_strlen): Add argument. Detect
4269 unterminated arrays.
4270 * gimple-fold.h (get_maxval_strlen): Add argument.
4271 (gimple_fold_builtin_strcpy): Detec unterminated arrays.
4273 * gimple-fold.c (get_range_strlen): Add argument.
4274 (get_maxval_strlen): Adjust.
4275 * gimple-fold.h (get_range_strlen): Add argument.
4277 2018-09-14 Wei Xiao <wei3.xiao@intel.com>
4279 * config/i386/movdirintrin.h: Fix copyright year.
4281 2018-09-14 Uros Bizjak <ubizjak@gmail.com>
4283 * reg-stack.c: Include regs.h.
4284 (replace_reg): Assert that mode is MODE_FLOAT or MODE_COMPLEX_FLOAT.
4285 (emit_pop_insn): Default pop insn mode to the reg_raw_mode of
4286 FIRST_STACK_REG, not DFmode.
4287 (emit_swap_insn): Default swap insn mode to the reg_raw_mode of
4288 FIRST_STACK_REG, not XFmode. Explicitly construct swap RTX.
4289 (change stack): Default register mode to the reg_raw_mode of
4290 FIRST_STACK_REG, not DFmode.
4291 * config/i386/i386.md (*swap<mode>): Remove insn pattern.
4292 (*swapxf): Rename from swapxf.
4294 2018-09-14 Carl Love <cel@us.ibm.com>
4296 * config/rs6000/emmintrin.h: Add _MM_SHUFFLE2.
4297 * config/rs6000/xmmintrin.h: Add _MM_SHUFFLE.
4299 2018-09-14 Segher Boessenkool <segher@kernel.crashing.org>
4302 * config/rs6000/rs6000.md (*mov<mode>_hardfloat64): Add Z to the Y
4305 2018-09-14 Sam Tebbs <sam.tebbs@arm.com>
4308 * config/aarch64/aarch64.md (*aarch64_bfxilsi_uxtw): Define.
4310 2018-09-14 Jason Merrill <jason@redhat.com>
4312 Fix --enable-gather-detailed-mem-stats.
4313 * hash-table.c (hash_table_usage): Change from variable to function.
4314 * hash-table.h: Adjust.
4315 * Makefile.in: Add missing dependencies on hash-table.h.
4317 2018-09-14 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
4319 PR tree-optimization/87259
4321 (pass_cse_reciprocals::execute): Run optimize_recip_sqrt after
4322 execute_cse_reciprocals_1 has tried transforming.
4324 2018-09-14 Aldy Hernandez <aldyh@redhat.com>
4326 * tree-vrp.c (extract_range_from_binary_expr_1): Normalize
4327 VR_VARYING for PLUS/MINUS_EXPR.
4329 2018-09-14 Ilya Leoshkevich <iii@linux.ibm.com>
4331 * config/s390/s390-passes.def (INSERT_PASS_BEFORE): Improve
4334 2018-09-14 Richard Biener <rguenther@suse.de>
4337 * tree-ssa-coalesce.c (ssa_conflicts_merge): Remove conflict
4338 bits for the merged partition.
4340 2018-09-13 Martin Sebor <msebor@redhat.com>
4341 Bernd Edlinger <bernd.edlinger@hotmail.de>
4343 * builtins.h (c_srlen): Add argument.
4344 * builtins.c (warn_string_no_nul): New function.
4345 (c_strlen): Add argument and use it. Update recursive calls.
4346 Pass DECL argument to string_constant to get info on non
4347 terminated strings. Update *NONSTR as needed.
4348 (fold_builtin_strlen): Add argument to calls to c_strlen.
4349 Warn for unterminated arrays.
4350 (warn_string_no_null): Add prototype.
4351 * expr.c (string_constant): Update arguments. Update recursive
4352 calls appropriately. Detect missing NUL terminator and outermost
4353 declaration its missing in.
4354 Improve checks for arrays with nonzero lower bound or elements
4355 that are not a single byte. Simplify offset computation.
4356 Simplify checks for non-NUL terminated strings.
4357 * gimple-fold.c (get_range_strlen): Add argument to c_strlen call.
4358 * gimple-ssa-sprintf.c (get_string_length): Remove unnecessary code.
4360 2018-09-13 Bernd Edlinger <bernd.edlinger@hotmail.de>
4362 * builtins.c (c_strlen): Handle not zero terminated STRING_CSTs
4364 * fold-const.c (c_getstr): Fix function comment. Remove unused third
4365 argument. Fix range checks.
4366 * fold-const.h (c_getstr): Adjust protoype.
4367 * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid folding when
4368 string is constant but contains no NUL byte.
4370 * expr.c (string_constant): Adjust function comment.
4371 Remove bogus check for zero termination.
4373 * fold-const.c (c_getstr): Clamp STRING_LENGTH to STRING_SIZE.
4375 * varasm.c (compare_constant): Compare type size of STRING_CSTs.
4376 (get_constant_size): Don't make STRING_CSTs larger than they are.
4377 (check_string_literal): New check function for STRING_CSTs.
4378 (output_constant): Use it.
4380 2018-09-13 Eric Botcazou <ebotcazou@adacore.com>
4383 * config/visium/visium.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define.
4385 2018-09-13 Richard Biener <rguenther@suse.de>
4387 PR tree-optimization/87263
4388 * tree-ssa-sccvn.c (visit_phi): Revert some earlier changes.
4389 (struct unwind_state): Add max_rpo field.
4390 (do_rpo_vn): Allow up-to-date loop state to be used when not iterating.
4391 Compute max_rpo, the max RPO number a block can be backwards reached
4392 from. Re-write non-iterating mode to a RPO ordered worklist approach,
4393 separating it from the iterating mode.
4395 2018-09-13 Vlad Lazar <vlad.lazar@arm.com>
4397 * haifa-sched.c (rank_for_schedule): Schedule by INSN_COST.
4398 (rfs_decision): New scheduling decision.
4400 2018-09-13 Richard Biener <rguenther@suse.de>
4403 * tree-ssa-sccvn.c (vn_nary_op_insert_into): Fix assert.
4404 (vn_nary_op_insert_pieces_predicated): Do not write useless
4405 valid_dominated_by_p entry outside of the allocated storage.
4407 2018-09-13 Omar Sandoval <osandov@osandov.com>
4408 Tom de Vries <tdevries@suse.de>
4411 * dwarf2out.c (is_c): New function.
4412 (add_subscript_info): Add DW_AT_count of 0 for C zero-length arrays.
4414 2018-09-13 Sam Tebbs <sam.tebbs@arm.com>
4417 * config/aarch64/aarch64.md (*aarch64_bfxil):
4419 * config/aarch64/constraints.md (Ulc): Define.
4420 * config/aarch64/aarch64-protos.h (aarch64_high_bits_all_ones_p):
4422 * config/aarch64/aarch64.c (aarch64_high_bits_all_ones_p):
4425 2018-09-13 Vlad Lazar <vlad.lazar@arm.com>
4427 * config/aarch64/aarch64.h (TARGET_COMPUTE_FRAME_LAYOUT): Define.
4428 * config/aarch64/aarch64.c (aarch64_expand_prologue): Remove
4429 aarch64_layout_frame call.
4430 (aarch64_expand_epilogue): Likewise.
4431 (aarch64_initial_elimination_offset): Likewise.
4432 (aarch64_get_separate_components): Likewise.
4433 (aarch64_use_return_insn_p): Likewise.
4434 (aarch64_layout_frame): Remove unneeded check.
4436 2018-09-13 Jakub Jelinek <jakub@redhat.com>
4438 * configure.ac: Only append
4439 " : (reconfigured) $TOPLEVEL_CONFIGURE_ARGUMENTS" to
4440 gcc_config_arguments if it was never reconfigured or last reconfigure
4441 was with different arguments.
4442 * configure: Regenerated.
4444 2018-09-13 Jakub Jelinek <jakub@redhat.com>
4445 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
4448 * expr.c (maybe_optimize_pow2p_mod_cmp): New function.
4449 (maybe_optimize_mod_cmp): Use it if integer_pow2p treeop1.
4451 2018-09-13 Jakub Jelinek <jakub@redhat.com>
4453 PR tree-optimization/87287
4454 * fold-const.c (fold_binary_loc) <case EQ_EXPR>: Move signed modulo
4455 X % C == 0 to X % (unsigned) C == 0 optimization to ...
4456 * match.pd (X % C == 0): ... here. New optimization.
4458 2018-09-12 Jakub Jelinek <jakub@redhat.com>
4461 * expr.h (maybe_optimize_mod_cmp): Declare.
4462 * expr.c (mod_inv): New function.
4463 (maybe_optimize_mod_cmp): New function.
4464 (do_store_flag): Use it.
4465 * cfgexpand.c (expand_gimple_cond): Likewise.
4467 2018-09-09 Cesar Philippidis <cesar@codesourcery.com>
4468 Julian Brown <julian@codesourcery.com>
4471 * gimplify.c (gimplify_scan_omp_clauses): Set
4472 target_firstprivatize_array_bases in OpenACC parallel and kernels
4473 region contexts. Remove GOMP_MAP_FIRSTPRIVATE_REFERENCE clauses from
4474 OpenACC data regions.
4476 2018-09-12 Uros Bizjak <ubizjak@gmail.com>
4478 * config/i386/i386.md (sqrt_extend<mode>xf3_i387): Remove.
4479 (sqrt<mode>2): Extend operand 1 to XFmode and generate sqrtxf3 insn.
4481 2018-09-12 Richard Biener <rguenther@suse.de>
4483 PR tree-optimization/87280
4484 * tree-ssa-sccvn.c (process_bb): Handle the case of executable
4485 edge but unreachable target.
4486 (do_rpo_vn): For conservatively handling a PHI only mark
4487 the backedge executable but not the block reachable.
4489 2018-09-12 Richard Biener <rguenther@suse.de>
4491 PR tree-optimization/87266
4492 * tree-ssa-sccvn.c (do_rpo_vn): Always iterate to not yet
4495 2018-09-12 Andreas Krebbel <krebbel@linux.ibm.com>
4497 * config/s390/s390.md (PFPO_RND_MODE_DFP, PFPO_RND_MODE_BFP): New
4499 ("trunc<BFP:mode><DFP_ALL:mode>2")
4500 ("trunc<DFP_ALL:mode><BFP:mode>2")
4501 ("extend<BFP:mode><DFP_ALL:mode>2")
4502 ("extend<DFP_ALL:mode><BFP:mode>2"): Set proper rounding mode
4503 according to the target operand type.
4505 2018-09-12 Jakub Jelinek <jakub@redhat.com>
4506 Andreas Krebbel <krebbel@linux.ibm.com>
4508 PR tree-optimization/86844
4509 * gimple-ssa-store-merging.c
4510 (imm_store_chain_info::coalesce_immediate): For overlapping stores, if
4511 there are any overlapping stores in between them, make sure they are
4512 also coalesced or we give up completely.
4514 2018-09-12 Jakub Jelinek <jakub@redhat.com>
4517 * fold-const.c (fold_ternary_loc) <case COND_EXPR>: Verify also that
4518 BIT_AND_EXPR's second operand is a power of two. Formatting fix.
4520 2018-09-12 Tom de Vries <tdevries@suse.de>
4522 * common.opt (gdescribe-dies): Add option.
4523 * dwarf2out.c (add_name_and_src_coords_attributes): Add description
4524 attribute for artifical and nameless decls.
4525 (dwarf2out_register_external_die): Add description attribute to
4526 external reference die.
4527 (add_desc_attribute): New functions.
4528 (gen_subprogram_die): Add description attribute to
4529 DW_TAG_call_site_parameter.
4530 * tree-pretty-print.c (print_generic_expr_to_str): New function.
4531 * tree-pretty-print.h (print_generic_expr_to_str): Declare.
4532 * doc/invoke.texi (@item Debugging Options): Add -gdescribe-dies and
4534 (@item -gdescribe-dies): Add.
4536 2018-09-12 Aldy Hernandez <aldyh@redhat.com>
4538 * tree-vrp.c (vrp_shift_undefined_p): Remove.
4539 (extract_range_from_binary_expr_1: Call
4540 wide_int_range_shift_undefined_p instead of vrp_shift_undefined_p.
4541 * wide-int-range.h (wide_int_range_shift_undefined_p): Do not
4544 2018-09-12 Aldy Hernandez <aldyh@redhat.com>
4546 * gimple-ssa-warn-alloca.c
4547 (alloca_type_and_limit::alloca_type_and_limit): Initialize limit
4548 field for ALLOCA_BOUND_*_LARGE.
4550 2018-09-11 Nathan Sidwell <nathan@acm.org>
4552 * gcc.c (load_specs, execute, run_attempt): Use %qs not '%s'.
4554 2018-09-11 Uros Bizjak <ubizjak@gmail.com>
4556 * reg-stack.c (subst_asm_stack_regs): Call replace_reg also
4557 for clobbers. Remove obsolete comment.
4559 2018-09-11 Uros Bizjak <ubizjak@gmail.com>
4561 * config/i386/i386.md (define_attr "type"): Remove mpxmov, mpxmk,
4562 mpxchk, mpxld and mpxst types.
4563 (define_attr length_immediate): Remove all processing of mpx types.
4564 (define_attr prefix_0f): Ditto.
4565 (define_attr memory): Ditto.
4567 2018-09-11 Uros Bizjak <ubizjak@gmail.com>
4569 * config/i386/i386.md (fyl2x_extend<mode>xf3_i387): Remove.
4570 (log<mode>2): Change operand 1 predicate to general_operand.
4571 Extend operand 1 to XFmode and generate logxf3 insn.
4572 (log10<mode>2): Change operand 1 predicate to general_operand.
4573 Extend operand 1 to XFmode and generate log10xf3 insn.
4574 (log2<mode>2): Change operand 1 predicate to general_operand.
4575 Extend operand 1 to XFmode and generate log2xf3 insn.
4576 (fyl2xp1_extend<mode>xf3_i387): Remove.
4577 (log1p<mode>2): Change operand 1 predicate to general_operand.
4578 Extend operand 1 to XFmode and generate log1pxf3 insn.
4579 (fxtract_extend<mode>xf3_i387): Remove.
4580 (logb<mode>2): Change operand 1 predicate to general_operand.
4581 Extend operand 1 to XFmode and generate logbxf3 insn.
4582 (ilogb<mode>2): Change operand 1 predicate to general_operand.
4583 Extend operand 1 to XFmode and generate fxtractxf3_i387 insn.
4584 (significand<mode>2): Change operand 1 predicate to general_operand.
4585 Extend operand 1 to XFmode and generate significandxf3 insn.
4587 2018-09-11 Nathan Sidwell <nathan@acm.org>
4589 * gcc.c (perror_with_name, pfatal_with_name): Delete.
4590 (load_specs): Use fatal_error.
4591 (DELETE_IF_ORDINARY, process_command): Use error.
4592 (execute, run_attempt): Use fatal_error.
4594 2018-09-11 Andrew Stubbs <ams@codesourcery.com>
4596 * diagnostic-core.h (sorry_at): New prototype.
4597 * diagnostic.c (sorry_at): New function.
4599 2018-09-11 Aldy Hernandez <aldyh@redhat.com>
4601 * tree-vrp.c (extract_range_from_binary_expr_1): Treat all divisions
4602 by zero as VR_UNDEFINED.
4604 2018-09-10 Uros Bizjak <ubizjak@gmail.com>
4606 * config/i386/i386.md (<sincos>xf2): Rename from *<sincos>xf2_i387.
4607 (*<sincos>_extend<mode>xf2_i387): Remove insn pattern.
4608 (<sincos>mode2): New expander.
4609 (sincos_extend<mode>xf3_i387): Remove insn pattern.
4610 (sincos -> sin, cos splitters): Remove splitter patterns.
4611 (sincos<mode>3): Change operand 2 predicate to general_operand.
4612 Extend operand 2 to XFmode and generate sincosxf3 insn.
4613 (fptanxf4_i387): Change mode of operands 0 and 3 to SFmode.
4614 Change operand 3 predicate to const1_operand.
4615 (fptan_extend<mode>xf4_i387): Remove insn pattern.
4616 (tanxf2): Update operands in the call to fptanxf4_i387.
4617 (tan<mode>2): Change operand 1 predicate to general_operand.
4618 Extend operand 1 to XFmode and generate tanxf3 insn.
4619 (atan2xf3): Rename from *fpatanxf3_i387.
4620 (fpatan_extend<mode>xf3_i387): Remove insn pattern.
4621 (atan2xf3): Remove expander.
4622 (atan2<mode<3): Change operand 1 and 2 predicates to general_operand.
4623 Extend operands 1 and 2 to XFmode and generate atan2xf3 insn.
4624 (atan<mode>2): Change operand 1 predicate to general_operand.
4625 Extend operand 1 to XFmode and generate atanxf3 insn.
4627 2018-09-10 Uros Bizjak <ubizjak@gmail.com>
4629 * config/i386/i386.md (x87/SSE constant load splitter): Use
4630 memory_operand instead of nonimmediate_operand for input operand
4633 2018-09-09 Uros Bizjak <ubizjak@gmail.com>
4635 * config/i386/i386.md (float partial SSE register stall splitter): Move
4636 splitter near its instruction pattern.
4637 (float_extend partial SSE register stall splitter): Ditto.
4638 (float_truncate partial SSE register stall splitter): Ditto.
4640 2018-09-09 Hans-Peter Nilsson <hp@bitrange.com>
4643 * config/mmix/mmix.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
4644 to speculation_safe_value_not_needed.
4647 * config/mmix/mmix.c (mmix_assemble_integer): Handle byte-size
4648 non-CONST_INT rtx:es using assemble_integer_with_op ".byte".
4649 (MMIX_CFUN_NEEDS_SAVED_EH_RETURN_ADDRESS): Don't call
4650 leaf_function_p, instead use has_hard_reg_initial_val.
4652 2018-09-09 Nathan Sidwell <nathan@acm.org>
4654 * gcc.h (pfatal_with_name): Don't declare here.
4655 * gcc.c (pfatal_with_name): Make static.
4657 2018-09-09 Xianmiao Qu <xianmiao_qu@c-sky.com>
4659 * config/csky/csky.md (*cskyv2_adddi3, *cskyv2_subdi3): Add
4662 2018-09-08 John David Anglin <danglin@gcc.gnu.org>
4664 PR rtl-optimization/85458
4665 * sel-sched.c (sel_target_adjust_priority): Allow backend adjust
4666 priority hook to reduce the priority of EXPR.
4668 2018-09-07 Uros Bizjak <ubizjak@gmail.com>
4670 * config/i386/i386.md (float<SWI48x:mode><MODEF:mode>2) Enable
4671 DImode for x87 on 32bit targets. Conditionally disable x87 modes
4672 with X87_ENABLE_FLOAT. Remove preparation code.
4673 (*float<SWI48:mode><MODEF:mode>2): Rename from
4674 *float<SWI48:mode><MODEF:mode>2_mixed. Handle x87, SSE and mixed
4675 math using "enabled" attribute.
4676 (*floatdi<MODEF:mode>2_i387): Rename from
4677 *float<SWI48x:mode><MODEF:mode>2_i387. Handle only DImode and
4678 enable for 32bit targets only.
4679 (floatdi<X87MODEF:mode>2_i387_with_xmm pre-reload splitter): New
4681 (floatdi<X87MODEF:mode>2_i387_with_xmm): Use register_operand
4682 as operand 1 predicate. Rewrite as define_insn_and_split.
4683 (floatdi<X87MODEF:mode>2_i387_with_xmm memory input splitter): Remove.
4685 2018-09-06 Uros Bizjak <ubizjak@gmail.com>
4687 * reg-stack.c (get_true_reg) <case FLOAT_TRUNCATE>: Reorder
4688 to fallthru to FLOAT case.
4690 2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
4693 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Update logic
4694 around folding of vec_sl to handle out of range shift values.
4696 2018-09-06 Uros Bizjak <ubizjak@gmail.com>
4698 * config/i386/i386.md (fix_trunc<mode>_fisttp_i387_1): Remove.
4699 Update callers to gen_fix_trunc<mode>_i387_fisttp
4700 (fix_trunc<mode>_i387_fisttp): Change operand 0 predicate to
4701 nonimmediate_operand.
4702 (fix_trunc<mode>_i387_fisttp_with_temp): Remove insn pattern
4703 and corresponding splitters.
4704 (*fix_trunc<mode>_i387_1): Always expand with fix_trunc<mode>_i387.
4705 (fix_truncdi_i387): Change operand 0 predicate to nonimmediate_operand.
4706 (fix_truncdi_i387_with_temp): Remove insn pattern
4707 and corresponding splitters.
4708 (fix_trunc<mode>_i387): Change operand 0 predicate to
4709 nonimmediate_operand.
4710 (fix_trunc<mode>_i387_with_temp): Remove insn pattern
4711 and corresponding splitters.
4712 (*fistdi2_1): Remove.
4714 (fistdi2_with_temp): Remove insn pattern and corresponding splitters.
4715 (lrintxfdi2): Remove expander. Reimplement as define_insn.
4716 (*fist<mode>2_1): Remove.
4717 (fist<mode>2): Ditto.
4718 (fist<mode>2_with_temp): Remove insn pattern and corresponding
4720 (lrintxf<mode>2): Remove expander. Reimplement as define_insn.
4721 (*fist<mode>2_<rounding>_1): Always expand with fist<mode>2_<rounding>.
4722 (fistdi2_<rounding>): Change operand 0 predicate to
4723 nonimmediate_operand.
4724 (fistdi2_<rounding>_with_temp): Remove insn pattern
4725 and corresponding splitters.
4726 (fist<mode>2_<rounding>): Change operand 0 predicate to
4727 nonimmediate_operand.
4728 (fist<mode>2_<rounding>_with_temp): Remove insn pattern
4729 and corresponding splitters.
4731 (*fixuns_trunc<mode>si2_avx512f_zext): Depend on TARGET_SSE_MATH.
4733 2018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
4735 * varasm.c (output_constructor_regular_field): Check TYPE_SIZE_UNIT of
4738 2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
4740 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support for
4741 early gimple folding of vec_splat().
4742 * tree-vect-generic.c: Remove static from tree_vec_extract() definition.
4743 * gimple-fold.h: Add an extern define for tree_vec_extract().
4745 2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
4747 * config/rs6000/rs6000.c (fold_mergehl_helper): Add types_compatible_p
4748 wrappers around TREE_TYPE comparisons.
4750 2018-09-06 Ilya Leoshkevich <iii@linux.ibm.com>
4753 * config/s390/predicates.md: Add nonsym_memory_operand.
4754 * config/s390/s390.c (s390_legitimize_cs_operand): If operand
4755 contains a SYMBOL_REF, load it into an intermediate pseudo.
4756 (s390_emit_compare_and_swap): Legitimize operand.
4757 * config/s390/s390.md: Use the new nonsym_memory_operand
4758 with UNSPECV_CAS patterns.
4760 2018-09-06 Ilya Leoshkevich <iii@linux.ibm.com>
4763 * config/s390/s390-passes.def: New file.
4764 * config/s390/s390-protos.h (class rtl_opt_pass): Add forward
4766 (make_pass_s390_early_mach): Add declaration.
4767 * config/s390/s390.c (make_pass_s390_early_mach):
4768 (s390_option_override): Remove dynamic registration.
4769 * config/s390/t-s390: Add s390-passes.def.
4771 2018-09-06 Ilya Leoshkevich <iii@linux.ibm.com>
4773 * config/s390/s390.c (s390_decompose_constant_pool_ref):
4774 Remove UNSPEC_LTREL_BASE check.
4775 (annotate_constant_pool_refs): Likewise.
4776 (find_constant_pool_ref): Likewise.
4777 (find_ltrel_base): Removed.
4778 (replace_ltrel_base): Removed.
4779 (s390_mainpool_finish): Remove replace_ltrel_base call.
4780 (s390_chunkify_start): Remove pending LTREL_BASE logic.
4781 (s390_chunkify_finish): Remove replace_ltrel_base call.
4782 * config/s390/s390.md: Remove UNSPEC_LTREL_BASE.
4784 2018-09-06 Hans-Peter Nilsson <hp@axis.com>
4787 * config/cris/cris.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
4788 to speculation_safe_value_not_needed.
4790 2018-09-05 Cesar Philippidis <cesar@codesourcery.com>
4791 Bernd Schmidt <bernds_cb1@t-online.de>
4793 * config/nvptx/nvptx-opts.h: New file.
4794 * config/nvptx/nvptx.c (nvptx_file_start): Print the correct .target.
4795 * config/nvptx/nvptx.h: Include "nvptx-opts.h".
4797 (TARGET_SM35): New macro.
4798 * config/nvptx/nvptx.md (atomic_fetch_<logic><mode>): Enable with the
4800 * config/nvptx/nvptx.opt (ptx_isa, sm_30, sm_35): New enum and its
4802 (misa=): New option.
4803 * doc/invoke.texi (Nvidia PTX Options): Document -misa.
4805 2018-09-05 Uros Bizjak <ubizjak@gmail.com>
4807 * config/i386/i386.md (truncdfsf2): Remove expander.
4808 (truncdfsf2_with_temp): Ditto.
4809 (truncxf<mode>2): Ditto.
4810 (*truncdfsf_fast_mixed): Remove insn pattern.
4811 (*truncdfsf_fast_i387): Ditto.
4812 (*truncdfsf_mixed): Ditto.
4813 (*truncdfsf_i387): Ditto.
4814 (*truncdfsf2_i387_1): Ditto.
4815 (*truncxfsf2_mixed): Ditto.
4816 (*truncxfdf2_mixed): Ditto.
4817 (*truncxf<mode>2_i387_noop): Ditto. Update callers
4818 to call gen_truncxf<mode>2 instead.
4819 (*truncxf<mode>2_i387): Remove.
4820 (reg->reg splitters): Remove splitter pattern.
4821 (reg->mem splitters): Ditto.
4823 (truncdfsf2): New insn pattern.
4824 (truncxf<mode>2): Ditto.
4826 2018-09-05 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
4828 * tree-ssa-math-opts.c (is_mult_by): New function.
4829 (is_square_of): Use the above.
4830 (optimize_recip_sqrt): New function.
4831 (pass_cse_reciprocals::execute): Use the above.
4833 2018-09-05 Richard Biener <rguenther@suse.de>
4836 * tree-ssa-sccvn.c (rpo_elim::eliminate_push_avail): Make sure
4837 to zero-init the emplaced vec.
4839 2018-09-05 Martin Liska <mliska@suse.cz>
4841 PR tree-optimization/87205
4842 * tree-switch-conversion.c (pass_lower_switch::execute):
4843 Group cases for switch statements.
4845 2018-09-05 Richard Biener <rguenther@suse.de>
4847 PR tree-optimization/87217
4848 * tree-ssa-sccvn.c (vuse_valueize): New.
4849 (vn_reference_lookup_pieces): Use it.
4850 (vn_reference_lookup): Likewise.
4852 2018-09-05 Nathan Sidwell <nathan@acm.org>
4855 * stor-layout.c (place_field): Scan forwards to check last
4856 bitfield when ms_bitfield_placement is in effect.
4858 2018-09-05 Richard Biener <rguenther@suse.de>
4861 * tree-vect-stmts.c (vectorizable_simd_clone_call): Fix bogus
4864 2018-09-05 Siddhesh Poyarekar <siddhesh@sourceware.org>
4865 Kugan Vivekanandarajah <kugan.vivekanandarajah@linaro.org>
4867 * config/aarch64/falkor-tag-collision-avoidance.c: New file.
4868 * config.gcc (extra_objs): Build it.
4869 * config/aarch64/t-aarch64 (falkor-tag-collision-avoidance.o):
4871 * config/aarch64/aarch64-passes.def
4872 (pass_tag_collision_avoidance): New pass.
4873 * config/aarch64/aarch64.c (qdf24xx_tunings): Add
4874 AARCH64_EXTRA_TUNE_RENAME_LOAD_REGS to tuning_flags.
4875 (aarch64_classify_address): Remove static qualifier.
4876 (aarch64_address_info, aarch64_address_type): Move to...
4877 * config/aarch64/aarch64-protos.h: ... here.
4878 (make_pass_tag_collision_avoidance): New function.
4879 * config/aarch64/aarch64-tuning-flags.def (rename_load_regs):
4882 2018-09-05 Martin Liska <mliska@suse.cz>
4884 * doc/gcov.texi: Update documentation of humar
4886 * gcov.c (format_count): Print one decimal place, it provides
4887 more fine number of situations like '1G' vs. '1.4G'.
4889 2018-09-05 Martin Liska <mliska@suse.cz>
4892 * config/rs6000/rs6000.opt: Mark the option as Deprecated.
4893 * optc-gen.awk: Allow 'Var' for Deprecated options in order
4894 to generate a MASK value.
4896 2018-09-04 H.J. Lu <hongjiu.lu@intel.com>
4899 * dwarf2out.c (based_loc_descr): Allow hard frame pointer even
4900 if frame pointer isn't used.
4901 (compute_frame_pointer_to_fb_displacement): Likewise.
4903 2018-09-04 Jakub Jelinek <jakub@redhat.com>
4906 * common/config/i386/i386-common.c (OPTION_MASK_ISA_XSAVEOPT_SET,
4907 OPTION_MASK_ISA_XSAVES_SET, OPTION_MASK_ISA_XSAVEC_SET): Use
4908 OPTION_MASK_ISA_XSAVE_SET instead of OPTION_MASK_ISA_XSAVE.
4909 (OPTION_MASK_ISA_XSAVE_UNSET): Add OPTION_MASK_ISA_XSAVES_UNSET
4910 and OPTION_MASK_ISA_XSAVEC_UNSET.
4912 2018-09-04 Max Filippov <jcmvbkbc@gmail.com>
4914 * config/xtensa/xtensa.c (xtensa_expand_atomic): Reorder AND and
4915 XOR operations in NAND case.
4917 2018-09-04 Aldy Hernandez <aldyh@redhat.com>
4919 * wide-int-range.cc (wide_int_range_convert): New.
4920 * wide-int-range.h (wide_int_range_convert): New.
4921 * tree-vrp.c (extract_range_from_unary_expr): Abstract wide int
4922 code into wide_int_range_convert.
4923 (extract_range_into_wide_ints): Do not munge anti range constants
4924 into the entire domain. Just return the range back.
4926 2018-09-04 Martin Liska <mliska@suse.cz>
4928 * genmatch.c (output_line_directive): Add new argument
4930 (dt_simplify::gen_1): Encapsulate dump within __builtin_expect.
4932 2018-09-04 Jonathan Wakely <jwakely@redhat.com>
4934 * doc/invoke.texi (Option Summary): Add whitespace.
4936 * doc/invoke.texi (Option Summary): Add -Waligned-new.
4938 2018-09-04 Richard Biener <rguenther@suse.de>
4940 PR tree-optimization/87211
4941 * tree-ssa-sccvn.c (visit_phi): When value-numbering to a
4942 backedge value we're supposed to treat as VARYING also number
4943 the PHI to VARYING in case it got a different value-number already.
4945 2018-09-04 Aldy Hernandez <aldyh@redhat.com>
4947 * tree-vrp.c (vrp_can_optimize_bit_op): Remove.
4948 (extract_range_from_binary_expr_1): Do not call
4949 vrp_can_optimize_bit_op.
4950 * wide-int-range.cc (wide_int_range_can_optimize_bit_op): Make
4952 (wide_int_range_get_mask_and_bounds): New.
4953 (wide_int_range_optimize_bit_op): New.
4954 (wide_int_range_bit_ior): Call wide_int_range_optimize_bit_op.
4955 (wide_int_range_bit_and): Same.
4956 * wide-int-range.h (wide_int_range_can_optimize_bit_op): Remove.
4957 (wide_int_range_optimize_bit_op): New.
4958 (wide_int_range_get_mask_and_bounds): New.
4960 2018-09-04 Richard Biener <rguenther@suse.de>
4962 PR tree-optimization/87176
4963 * tree-ssa-sccvn.c (visit_phi): Remove redundant allsame
4964 variable. When value-numbering a virtual PHI node make sure
4965 to not value-number to the backedge value.
4967 2018-09-04 Jonathan Wakely <jwakely@redhat.com>
4969 * doc/extend.texi (Long Long, Hex Floats): Document support for
4970 long long and hex floats in more recent versions of ISO C++.
4972 2018-09-03 Richard Biener <rguenther@suse.de>
4974 PR tree-optimization/87177
4975 * tree-ssa-sccvn.c (vuse_ssa_val): Revert previous change, keep
4978 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
4980 * bb-reorder.c (edge_order): Convert to C-qsort-style
4981 tri-state comparator.
4982 (reorder_basic_blocks_simple): Change std::stable_sort to
4985 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
4987 * tree-loop-distribution.c (offset_cmp): Convert to C-qsort-style
4988 tri-state comparator.
4989 (fuse_memset_builtins): Change std::stable_sort to gcc_stablesort.
4991 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
4993 * sort.cc (struct sort_ctx): New field 'nlim'. Use it...
4994 (mergesort): ... here as maximum count for using netsort.
4995 (gcc_qsort): Set nlim to 3 if stable sort is requested.
4996 (gcc_stablesort): New.
4997 * system.h (gcc_stablesort): Declare.
4999 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
5001 * sort.cc (gcc_qsort) [CHECKING_P]: Call qsort_chk.
5002 * system.h (qsort): Always redirect to gcc_qsort. Update comment.
5003 * vec.c (qsort_chk): Do not call gcc_qsort. Update comment.
5005 2018-09-03 Segher Boessenkool <segher@kernel.crashing.org>
5007 * config/rs6000/rs6000.md (*mov<mode>_hardfloat32): Remove %U from the
5008 lxsdx and stxsdx alternatives.
5009 (*mov<mode>_hardfloat64): Ditto.
5010 * config/rs6000/vsx.md (*vsx_extract_<mode>_store): Ditto.
5012 2018-09-03 Richard Biener <rguenther@suse.de>
5014 PR tree-optimization/87200
5015 * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Valueize a
5018 2018-09-03 Martin Liska <mliska@suse.cz>
5020 PR tree-optimization/87201
5021 * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
5022 Fix parenthesis in an expression.
5024 2018-09-03 Richard Biener <rguenther@suse.de>
5026 PR tree-optimization/87197
5027 * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Mark the new def
5028 visited. CSE the VN_INFO hashtable lookup.
5030 PR tree-optimization/87169
5031 * tree-ssa-sccvn.c (do_rpo_vn): When marking loops for not
5032 iterating make sure there's no extra backedges from irreducible
5033 regions feeding the header. Mark the destination block
5036 2018-09-03 Martin Liska <mliska@suse.cz>
5039 * common/common-target.def: Add TARGET_GET_VALID_OPTION_VALUES.
5040 * common/common-targhooks.c (default_get_valid_option_values):
5042 * common/common-targhooks.h (default_get_valid_option_values):
5044 * common/config/i386/i386-common.c: Move processor_target_table
5046 (ix86_get_valid_option_values): New function.
5047 (TARGET_GET_VALID_OPTION_VALUES): New macro.
5048 * config/i386/i386.c (struct ptt): Move to i386-common.c.
5049 (PTA_*): Move all defined masks into i386-common.c.
5050 (ix86_function_specific_restore): Use new processor_cost_table.
5051 * config/i386/i386.h (struct ptt): Moved from i386.c.
5052 (struct pta): Likewise.
5053 * doc/tm.texi: Document new TARGET_GET_VALID_OPTION_VALUES.
5054 * doc/tm.texi.in: Likewise.
5055 * opt-suggestions.c (option_proposer::suggest_option):
5056 Pass prefix to build_option_suggestions.
5057 (option_proposer::get_completions): Likewise.
5058 (option_proposer::build_option_suggestions): Use the new target
5060 * opts.c (struct option_help_tuple): New struct.
5061 (print_filtered_help): Use the new target hook.
5063 2018-09-03 Martin Liska <mliska@suse.cz>
5066 * predict.c (set_even_probabilities): Add likely_edges
5067 argument and handle cases where we have precisely one
5069 (combine_predictions_for_bb): Catch also likely_edges.
5070 (tree_predict_by_opcode): Handle gswitch statements.
5071 * tree-cfg.h (find_case_label_for_value): New declaration.
5072 (find_taken_edge_switch_expr): Likewise.
5073 * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
5074 Find pivot in decision tree based on probabily, not by number of
5077 2018-09-02 Gerald Pfeifer <gerald@pfeifer.com>
5079 * doc/standards.texi (Standards): Update Objective-C reference.
5081 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
5083 * doc/install.texi (Prerequisites): Update link for MPC.
5085 2018-09-01 Michael Matz <matz@suse.de>
5087 PR tree-optimization/87074
5088 * gimple-loop-jam.c (unroll_jam_possible_p): Check loop exit
5089 PHIs for outer-loop uses.
5091 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
5093 * doc/generic.texi (OpenMP): Adjust link to openmp.org.
5094 * doc/invoke.texi (C Dialect Options): Ditto.
5096 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
5098 * doc/install.texi (Prerequisites): Adjust link mpfr.org.
5100 2018-08-31 Richard Biener <rguenther@suse.de>
5102 PR tree-optimization/87168
5103 * tree-ssa-sccvn.c (SSA_VAL): Add visited output parameter.
5104 (rpo_elim::eliminate_avail): When OP was not visited it must
5107 2018-08-31 David Malcolm <dmalcolm@redhat.com>
5109 * tree-vrp.c (copy_value_range): Convert param "from" from
5110 "value_range *" to "const value_range *".
5111 (range_is_null): Likewise for param "vr".
5112 (range_int_cst_p): Likewise.
5113 (range_int_cst_singleton_p): Likewise.
5114 (symbolic_range_p): Likewise.
5115 (value_ranges_intersect_p): Likewise for both params.
5116 (value_range_nonnegative_p): Likewise for param "vr".
5117 (value_range_constant_singleton): Likewise.
5118 (vrp_set_zero_nonzero_bits): Likewise for param "ar".
5119 (extract_range_into_wide_ints): Likewise for param "vr".
5120 (extract_range_from_multiplicative_op): Likewise for params "vr0"
5122 (vrp_can_optimize_bit_op): Likewise.
5123 (extract_range_from_binary_expr_1): Likewise for params "vr0_" and
5125 (extract_range_from_unary_expr): Likewise.
5126 (debug_value_range): Likewise for param "vr".
5127 (value_range::dump): Add "const" qualifier.
5128 (vrp_prop::check_array_ref): Convert local "vr" from
5129 "value_range *" to "const value_range *".
5130 (vrp_prop::check_mem_ref): Likewise.
5131 (vrp_prop::visit_stmt): Likewise for local "old_vr".
5132 (vrp_intersect_ranges_1): Likewise for param "vr_1".
5133 (vrp_intersect_ranges): Likewise.
5134 (simplify_stmt_for_jump_threading): Likewise for local "vr".
5135 (vrp_prop::vrp_finalize): Likewise.
5136 * tree-vrp.h (value_range::dump): Add "const" qualifier.
5137 (vrp_intersect_ranges): Add "const" qualifier to params as above.
5138 (extract_range_from_unary_expr): Likewise.
5139 (value_range_constant_singleton): Likewise.
5140 (symbolic_range_p): Likewise.
5141 (copy_value_range): Likewise.
5142 (extract_range_from_binary_expr_1): Likewise.
5143 (range_int_cst_p): Likewise.
5144 (vrp_set_zero_nonzero_bits): Likewise.
5145 (range_int_cst_singleton_p): Likewise.
5147 2018-08-31 Vlad Lazar <vlad.lazar@arm.com>
5149 * config/aarch64/arm_neon.h (vabsd_s64): New.
5150 (vnegd_s64): Likewise.
5152 2018-08-31 Martin Jambor <mjambor@suse.cz>
5154 * ipa-cp.c (estimate_local_effects): Replace wrong MAX with MIN.
5156 2018-08-31 Martin Liska <mliska@suse.cz>
5158 * ipa-icf.c (sem_item::add_type): Use
5159 sem_item::m_type_hash_cache.
5160 * ipa-icf.h: Move the cache from sem_item_optimizer
5163 2018-08-31 Nathan Sidwell <nathan@acm.org>
5165 * doc/extend.texi (Backwards Compatibility): Remove implicit
5166 extern C leeway of () being (...).
5168 2018-08-31 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
5170 * ipa-inline.c (can_inline_edge_by_limits_p): Fix typos in comment.
5172 2018-08-31 Segher Boessenkool <segher@kernel.crashing.org>
5176 * config/rs6000/rs6000.md (lround<mode>di2): Gate on TARGET_FPRND.
5178 2018-08-31 Jakub Jelinek <jakub@redhat.com>
5181 * expmed.c (expand_mult_const): Use immed_wide_int_const instead of
5182 gen_int_mode. Formatting fixes.
5184 2018-08-30 Sandra Loosemore <sandra@codesourcery.com>
5186 * target.def (custom_function_descriptors): Improve documentation.
5187 * doc/tm.texi.in (Trampolines): Expand discussion of function
5188 descriptors and move TARGET_CUSTOM_FUNCTION_DESCRIPTORS to the
5189 beginning of the section.
5190 * doc/tm.texi: Regenerated.
5192 2018-08-30 Jose E. Marchesi <jose.marchesi@oracle.com>
5194 * cfg.h (class auto_edge_flag): Spell out the template-id of the
5195 base class in the initializer list. This is a workaround for
5196 building with older GCC.
5197 (class auto_bb_flag): Likewise.
5199 2018-08-30 Aaron Sawdey <acsawdey@linux.ibm.com>
5201 * config/rs6000/altivec.md (altivec_eq<mode>): Remove star.
5202 (altivec_vcmpequ<VI_char>_p): Remove star.
5203 * config/rs6000/rs6000-string.c (do_load_for_compare): Support
5205 (expand_strncmp_vec_sequence): New function.
5206 (emit_final_str_compare_vec): New function.
5207 (expand_strn_compare): Add support for vector strncmp.
5208 * config/rs6000/rs6000.opt (-mstring-compare-inline-limit): Change
5209 length specification to bytes.
5210 * config/rs6000/vsx.md (vsx_ld_elemrev_v16qi_internal): Remove star.
5211 (vcmpnezb_p): New pattern.
5212 * doc/invoke.texi (RS/6000 and PowerPC Options): Update documentation
5213 for option -mstring-compare-inline-limit.
5215 2018-08-30 Thiago Macieira <thiago.macieira@intel.com>
5217 * config/i386/i386.c (PTA_WESTMERE): Remove PTA_AES.
5218 (PTA_SKYLAKE): Add PTA_AES.
5219 (PTA_GOLDMONT): Likewise.
5221 2018-08-29 Jan Hubicka <jh@suse.cz>
5224 * lto-opts.c (lto_write_options): Always stream PIC/PIE mode.
5225 * lto-wrapper.c (merge_and_complain): Fix merging of PIC/PIE.
5227 2018-08-29 Jan Hubicka <jh@suse.cz>
5229 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not follow
5231 (hash_tree): Do not visit TYPE_STUB_DECL.
5232 * tree-streamer-out.c (write_ts_type_common_tree_pointers): Do not
5233 stream TYPE_STUB_DECL.
5234 * tree-streamer-in.c (lto_input_ts_type_common_tree_pointers): Likewise.
5235 * ipa-utils.h (type_with_linkage_p): Do not rely on TYPE_STUB_DECL
5236 after free_lang_data.
5237 (type_in_anonymous_namespace_p): Likewise.
5239 2018-08-29 Jan Hubicka <jh@suse.cz>
5241 * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
5242 comment that it has to be even number.
5243 (class sreal): Change m_sig type to int32_t.
5244 * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
5245 int64_t for temporary calculations.
5246 (sreal_verify_basics): Drop one bit from minimum and maximum.
5248 2018-08-30 Richard Biener <rguenther@suse.de>
5250 PR tree-optimization/87147
5251 * tree-ssa-sccvn.c (SSA_VISITED): New function.
5252 (visit_phi): When the degenerate result is from the backedge and
5253 we didn't visit its definition yet drop to VARYING.
5254 (do_rpo_vn): Properly mark blocks with incoming backedges as executable.
5256 2018-08-29 Jan Hubicka <jh@suse.cz>
5258 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not walk
5260 (hash_tree): Likewise.
5262 2018-08-29 Jan Hubicka <jh@suse.cz>
5264 * tree.c (find_decls_types_r): Walk also TYPE_NEXT_PTR_TO
5265 and TYPE_NEXT_REF_TO.
5267 2018-08-29 Jan Hubicka <jh@suse.cz>
5269 * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
5270 comment that it has to be even number.
5271 (class sreal): Change m_sig type to int32_t.
5272 * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
5273 int64_t for temporary calculations.
5274 (sreal_verify_basics): Drop one bit from minimum and maximum.
5276 2018-08-30 Tamar Christina <tamar.christina@arm.com>
5278 * config/aarch64/aarch64.c (aarch64_expand_movmem): Set TImode max.
5280 2018-08-30 Vlad Lazar <vlad.lazar@arm.com>
5283 * expmed.c (canonicalize_comparison): Use wi::sub instead of wi::add
5284 if to_add is negative.
5286 2018-08-29 Bernd Edlinger <bernd.edlinger@hotmail.de>
5289 * builtins.c (c_strlen): Improve range checks.
5291 2018-08-29 Martin Sebor <msebor@redhat.com>
5292 Jeff Law <law@redhat.com>
5294 PR tree-optimization/86714
5295 PR tree-optimization/86711
5296 * builtins.c (c_strlen): Add arguments to call to string_constant.
5297 * expr.c (string_constant): Add argument. Detect missing nul
5298 terminator and outermost declaration it's missing in.
5299 * expr.h (string_constant): Add argument.
5300 * fold-const.c (read_from_constant_string): Add arguments to call to
5302 (c_getstr): Likewise.
5303 * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
5305 * tree-ssa-strlen.c (get_stridx): Likewise.
5307 2018-08-29 Jan Hubicka <jh@suse.cz>
5309 * tree-streamer-in.c (lto_input_ts_function_decl_tree_pointers):
5310 Do not stream DECL_VINDEX.
5311 * tree-streamer-out.c (write_ts_function_decl_tree_pointers): Likewise.
5312 * tree.c (free_lang_data_in_decl): Clear DECL_VINDEX.
5313 (decl_function_context): Use DECL_VIRTUAL_P rather than DECL_VINDEX.
5315 2018-08-29 Richard Biener <rguenther@suse.de>
5317 * tree-ssa-sccvn.c (vuse_ssa_val): Return NULL for unvisited
5318 virtual operands that are not default defs to honor region
5320 (rpo_vn_valueize): Remove ineffective code here.
5322 2018-08-29 Richard Biener <rguenther@suse.de>
5324 PR tree-optimization/87132
5325 * tree-ssa-alias.c (get_continuation_for_phi): Do not translate
5326 when skipping defs reachable over backedges.
5328 2018-08-29 Richard Biener <rguenther@suse.de>
5330 * tree-core.h: Document use of deprecated_flag in SSA_NAME.
5331 * tree.h (SSA_NAME_POINTS_TO_READONLY_MEMORY): Define.
5332 * tree-into-ssa.c (pass_build_ssa::execute): Initialize
5333 function parameters SSA_NAME_POINTS_TO_READONLY_MEMORY from fnspec.
5334 * tree-ssa-sccvn.c (const_parms, init_const_parms): Remove.
5335 (vn_reference_lookup_3): Remove use of const_parms.
5336 (free_rpo_vn): Do not free const_parms.
5337 (do_rpo_vn): Do not call init_const_parms.
5338 * tree-ssa-alias.c (refs_may_alias_p_1): Honor
5339 SSA_NAME_POINTS_TO_READONLY_MEMORY.
5340 (call_may_clobber_ref_p_1): Likewise.
5342 2018-08-29 Alexander Monakov <amonakov@ispras.ru>
5345 * invoke.texi (Optimization Options): List -ftree-scev-cprop.
5347 (-ftree-scev-cprop): Document.
5349 2018-08-29 Jan Hubicka <jh@suse.cz>
5351 * sreal.h (normalize, normalize_up, normalize_down): Add new_sig/new_exp
5353 (sreal constructor): Update.
5354 * sreal.c (sreal:operator+, sreal:operator-, sreal:operator*,
5355 sreal:operator/): Update.
5357 2018-08-29 Martin Liska <mliska@suse.cz>
5359 * tree-switch-conversion.c (switch_conversion::expand):
5360 Strenghten assumption about gswitch statements.
5362 2018-08-29 Richard Biener <rguenther@suse.de>
5364 PR tree-optimization/87117
5365 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_stmt): Only
5366 re-value-number released SSA VDEFs.
5368 2018-08-29 Richard Biener <rguenther@suse.de>
5370 PR tree-optimization/87126
5371 * tree-ssa-sccvn.c (vn_reference_insert): Remove assert.
5373 2018-08-28 Jim Wilson <jimw@sifive.com>
5375 * config/riscv/pic.md: Rewrite.
5376 * config/riscv/riscv.c (riscv_address_insns): Return cost of 3 for
5378 * config/riscv/riscv.md (ZERO_EXTEND_LOAD): Delete.
5379 (SOFTF, default_load, softload, softstore): New.
5381 2018-08-28 Jeff Law <law@redhat.com>
5383 * fold-const.c (fold_binary_loc): Remove recently added assert.
5385 2018-08-28 Joern Rennecke <joern.rennecke@riscy-ip.com>
5387 * genpreds.c (write_predicate_subfunction): Also add ATTRIBUTE_UNUSED
5388 to OP parmeter of generated function.
5390 2018-08-28 MCC CS <deswurstes@users.noreply.github.com>
5392 PR tree-optimization/87009
5393 * match.pd: Add boolean optimizations.
5395 2018-08-28 Martin Sebor <msebor@redhat.com>
5398 * calls.c (alloc_max_size): Treat HOST_WIDE_INT special.
5399 * gimple-ssa-warn-alloca.c (adjusted_warn_limit): New function.
5400 (pass_walloca::gate): Use it.
5401 (alloca_call_type): Same.
5402 (pass_walloca::execute): Same.
5403 * stor-layout.c (layout_decl): Treat HOST_WIDE_INT special.
5405 2018-08-28 David Malcolm <dmalcolm@redhat.com>
5407 * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): Change version check on
5408 GCC_VERSION for usage of "__gcc_dump_printf__" format from
5411 2018-08-28 Richard Biener <rguenther@suse.de>
5413 PR tree-optimization/87124
5414 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Guard against
5415 constants before looking up avail.
5417 2018-08-28 Jakub Jelinek <jakub@redhat.com>
5420 * calls.c (maybe_warn_nonstring_arg): Punt early if
5421 warn_stringop_overflow is zero. Don't call get_range_strlen
5422 on 3rd argument, keep iterating until lenrng[1] is INTEGER_CST.
5423 Swap comparison operands to have constants on rhs. Only use
5424 lenrng[1] if non-NULL and INTEGER_CST. Don't uselessly
5425 increment lenrng[0].
5427 2018-08-28 Richard Sandiford <richard.sandiford@arm.com>
5429 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Fix unguarded
5430 use of tree_to_shwi. Remove duplicated test for the size being
5431 a whole number of bytes.
5433 2018-08-28 Richard Biener <rguenther@suse.de>
5435 PR tree-optimization/87117
5436 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_cleanup):
5437 Handle removed stmt without LHS (GIMPLE_NOP).
5439 2018-08-28 Richard Biener <rguenther@suse.de>
5441 PR tree-optimization/87117
5442 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Exclude
5443 void which is is_gimple_reg_type by checking for COMPLETE_TYPE_P.
5445 2018-08-28 Richard Biener <rguenther@suse.de>
5447 PR tree-optimization/87117
5448 * tree-ssa-pre.c (compute_avail): Do not make expressions
5449 with predicated values available.
5450 (get_expr_value_id): Assert we do not run into predicated value
5453 2018-08-28 Richard Biener <rguenther@suse.de>
5455 PR tree-optimization/87117
5456 * tree-ssa-operands.c (add_stmt_operand): STRING_CST may
5457 get virtual operands.
5458 (get_expr_operands): Handle STRING_CST like other decls.
5460 2018-08-28 Martin Liska <mliska@suse.cz>
5462 * tree.h: Update documentation of fndecl_built_in_p
5466 2018-08-27 Jeff Law <law@redhat.com>
5467 PR tree-optimization/87110
5468 * tree-ssa-dse.c (compute_trims): Handle non-constant
5471 2018-08-27 Martin Sebor <msebor@redhat.com>
5473 PR tree-optimization/86914
5474 * tree-ssa-strlen.c (maybe_set_strlen_range): Avoid MEM_REF.
5476 2018-08-27 Martin Sebor <msebor@redhat.com>
5478 PR tree-optimization/87112
5479 * builtins.c (expand_builtin_strnlen): Convert c_strlen result to
5480 the type of the bound argument.
5482 2018-08-27 Jeff Law <law@redhat.com>
5484 * tree-ssa-dse.c (compute_trims): Handle case where the reference's
5485 type does not have a TYPE_SIZE_UNIT.
5487 2018-08-27 Steve Ellcey <sellcey@cavium.com>
5489 * config/aarch64/aarch64-speculation.cc: Replace include of cfg.h
5490 with include of backend.h.
5492 2018-08-27 Richard Biener <rguenther@suse.de>
5494 PR tree-optimization/86927
5495 * tree-vect-loop.c (vect_create_epilog_for_reduction): Properly
5496 use const cond reduction code.
5498 2018-08-27 Alexander Monakov <amonakov@ispras.ru>
5500 PR tree-optimization/85758
5501 * match.pd ((X & Y) ^ Y): Add :s qualifier to inner expression.
5503 2018-08-27 David Malcolm <dmalcolm@redhat.com>
5506 * diagnostic-show-locus.c (class layout_range): Update for
5507 conversion of show_caret_p to a tri-state.
5508 (layout_range::layout_range): Likewise.
5509 (make_range): Likewise.
5510 (layout::maybe_add_location_range): Likewise.
5511 (layout::should_print_annotation_line_p): Don't show annotation
5512 lines for ranges that are SHOW_LINES_WITHOUT_RANGE.
5513 (layout::get_state_at_point): Update for conversion of
5514 show_caret_p to a tri-state. Bail out early for
5515 SHOW_LINES_WITHOUT_RANGE, so that such ranges don't affect
5516 underlining or source colorization.
5517 (gcc_rich_location::add_location_if_nearby): Update for conversion
5518 of show_caret_p to a tri-state.
5519 (selftest::test_one_liner_multiple_carets_and_ranges): Likewise.
5520 (selftest::test_one_liner_fixit_replace_equal_secondary_range):
5522 (selftest::test_one_liner_labels): Likewise.
5523 * gcc-rich-location.c (gcc_rich_location::add_expr): Update for
5524 conversion of show_caret_p to a tri-state.
5525 * pretty-print.c (text_info::set_location): Likewise.
5526 * pretty-print.h (text_info::set_location): Likewise.
5527 * substring-locations.c (format_warning_n_va): Likewise.
5528 * tree-diagnostic.c (default_tree_printer): Likewise.
5529 * tree-pretty-print.c (newline_and_indent): Likewise.
5531 2018-08-27 David Malcolm <dmalcolm@redhat.com>
5534 * diagnostic-show-locus.c (get_line_span_for_fixit_hint): Show the
5535 line above for line-insertion fix-it hints.
5536 (selftest::test_fixit_insert_containing_newline): Update the
5537 expected results, and add a test with line-numbering enabled.
5539 2018-08-27 Martin Liska <mliska@suse.cz>
5542 * sanopt.c (sanitize_rewrite_addressable_params): Ignore
5543 params with DECL_HAS_VALUE_EXPR_P.
5545 2018-08-27 Martin Liska <mliska@suse.cz>
5547 * config/i386/i386.c (ix86_expand_set_or_movmem): Dump
5548 selected expansion strategy.
5550 2018-08-27 Martin Liska <mliska@suse.cz>
5552 * builtins.h (is_builtin_fn): Remove and fndecl_built_in_p.
5553 * builtins.c (is_builtin_fn): Likewise.
5554 * attribs.c (diag_attr_exclusions): Use new function
5555 fndecl_built_in_p and remove check for FUNCTION_DECL if
5557 (builtin_mathfn_code): Likewise.
5558 (fold_builtin_expect): Likewise.
5559 (fold_call_expr): Likewise.
5560 (fold_builtin_call_array): Likewise.
5561 (fold_call_stmt): Likewise.
5562 (set_builtin_user_assembler_name): Likewise.
5563 (is_simple_builtin): Likewise.
5564 * calls.c (gimple_alloca_call_p): Likewise.
5565 (maybe_warn_nonstring_arg): Likewise.
5566 * cfgexpand.c (expand_call_stmt): Likewise.
5567 * cgraph.c (cgraph_update_edges_for_call_stmt_node): Likewise.
5568 (cgraph_edge::verify_corresponds_to_fndecl): Likewise.
5569 (cgraph_node::verify_node): Likewise.
5570 * cgraphclones.c (build_function_decl_skip_args): Likewise.
5571 (cgraph_node::create_clone): Likewise.
5572 * config/arm/arm.c (arm_insert_attributes): Likewise.
5573 * config/i386/i386.c (ix86_gimple_fold_builtin): Likewise.
5574 * dse.c (scan_insn): Likewise.
5575 * expr.c (expand_expr_real_1): Likewise.
5576 * fold-const.c (operand_equal_p): Likewise.
5577 (fold_binary_loc): Likewise.
5578 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Likewise.
5579 * gimple-low.c (lower_stmt): Likewise.
5580 * gimple-pretty-print.c (dump_gimple_call): Likewise.
5581 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
5583 * gimple.c (gimple_build_call_from_tree): Likewise.
5584 (gimple_call_builtin_p): Likewise.
5585 (gimple_call_combined_fn): Likewise.
5586 * gimplify.c (gimplify_call_expr): Likewise.
5587 (gimple_boolify): Likewise.
5588 (gimplify_modify_expr): Likewise.
5589 (gimplify_addr_expr): Likewise.
5590 * hsa-gen.c (gen_hsa_insns_for_call): Likewise.
5591 * ipa-cp.c (determine_versionability): Likewise.
5592 * ipa-fnsummary.c (compute_fn_summary): Likewise.
5593 * ipa-param-manipulation.c (ipa_modify_formal_parameters): Likewise.
5594 * ipa-split.c (visit_bb): Likewise.
5595 (split_function): Likewise.
5596 * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
5597 * lto-cgraph.c (input_node): Likewise.
5598 * lto-streamer-out.c (write_symbol): Likewise.
5599 * omp-low.c (setjmp_or_longjmp_p): Likewise.
5600 (lower_omp_1): Likewise.
5601 * predict.c (strip_predict_hints): Likewise.
5602 * print-tree.c (print_node): Likewise.
5603 * symtab.c (symtab_node::output_to_lto_symbol_table_p): Likewise.
5604 * trans-mem.c (is_tm_irrevocable): Likewise.
5605 (is_tm_load): Likewise.
5606 (is_tm_simple_load): Likewise.
5607 (is_tm_store): Likewise.
5608 (is_tm_simple_store): Likewise.
5609 (is_tm_abort): Likewise.
5610 (tm_region_init_1): Likewise.
5611 * tree-call-cdce.c (gen_shrink_wrap_conditions): Likewise.
5612 * tree-cfg.c (verify_gimple_call): Likewise.
5613 (move_stmt_r): Likewise.
5614 (stmt_can_terminate_bb_p): Likewise.
5615 * tree-eh.c (lower_eh_constructs_2): Likewise.
5616 * tree-if-conv.c (if_convertible_stmt_p): Likewise.
5617 * tree-inline.c (remap_gimple_stmt): Likewise.
5618 (copy_bb): Likewise.
5619 (estimate_num_insns): Likewise.
5620 (fold_marked_statements): Likewise.
5621 * tree-sra.c (scan_function): Likewise.
5622 * tree-ssa-ccp.c (surely_varying_stmt_p): Likewise.
5623 (optimize_stack_restore): Likewise.
5624 (pass_fold_builtins::execute): Likewise.
5625 * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Likewise.
5626 (mark_all_reaching_defs_necessary_1): Likewise.
5627 * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Likewise.
5628 * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
5629 (pass_forwprop::execute): Likewise.
5630 * tree-ssa-loop-im.c (stmt_cost): Likewise.
5631 * tree-ssa-math-opts.c (pass_cse_reciprocals::execute): Likewise.
5632 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Likewise.
5633 * tree-ssa-strlen.c (get_string_length): Likewise.
5634 * tree-ssa-structalias.c (handle_lhs_call): Likewise.
5635 (find_func_aliases_for_call): Likewise.
5636 * tree-ssa-ter.c (find_replaceable_in_bb): Likewise.
5637 * tree-stdarg.c (optimize_va_list_gpr_fpr_size): Likewise.
5638 * tree-tailcall.c (find_tail_calls): Likewise.
5639 * tree.c (need_assembler_name_p): Likewise.
5640 (free_lang_data_in_decl): Likewise.
5641 (get_call_combined_fn): Likewise.
5642 * ubsan.c (is_ubsan_builtin_p): Likewise.
5643 * varasm.c (incorporeal_function_p): Likewise.
5644 * tree.h (DECL_BUILT_IN): Remove and replace with
5646 (DECL_BUILT_IN_P): Transfort to fndecl_built_in_p.
5647 (fndecl_built_in_p): New.
5649 2018-08-27 Martin Liska <mliska@suse.cz>
5651 PR tree-optimization/86847
5652 * tree-switch-conversion.c (switch_decision_tree::dump_case_nodes):
5653 Dump also subtree probability.
5654 (switch_decision_tree::do_jump_if_equal): New function.
5655 (switch_decision_tree::emit_case_nodes): Handle special
5656 situations in balanced tree that can be emitted much simpler.
5657 Fix calculation of probabilities that happen in tree expansion.
5658 * tree-switch-conversion.h (struct cluster): Add
5660 (struct simple_cluster): Likewise.
5661 (struct case_tree_node): Add new function has_child.
5662 (do_jump_if_equal): New.
5664 2018-08-27 Martin Liska <mliska@suse.cz>
5666 * tree-switch-conversion.c (bit_test_cluster::find_bit_tests):
5667 Add new argument to bit_test_cluster constructor.
5668 (bit_test_cluster::emit): Set bits really number of values
5670 (bit_test_cluster::hoist_edge_and_branch_if_true): Add
5671 probability argument.
5672 * tree-switch-conversion.h (struct bit_test_cluster):
5673 Add m_handles_entire_switch.
5675 2018-08-27 Martin Liska <mliska@suse.cz>
5677 PR tree-optimization/86702
5678 * tree-switch-conversion.c (jump_table_cluster::emit):
5679 Make probabilities even for values in jump table
5680 according to number of cases handled.
5681 (switch_decision_tree::compute_cases_per_edge): Pass
5682 argument to reset_out_edges_aux function.
5683 (switch_decision_tree::analyze_switch_statement): Likewise.
5684 * tree-switch-conversion.h (switch_decision_tree::reset_out_edges_aux):
5687 2018-08-27 Martin Liska <mliska@suse.cz>
5689 * cfgexpand.c (expand_asm_stmt): Use label_to_block and pass
5690 cfun argument explicitly.
5691 * gimple-pretty-print.c (dump_gimple_switch): Likewise.
5692 * hsa-gen.c (gen_hsa_insns_for_switch_stmt): Use new
5693 function gimple_switch_default_bb.
5694 (convert_switch_statements):
5696 * ipa-fnsummary.c (set_switch_stmt_execution_predicate):
5697 * stmt.c (label_to_block_fn): Use label_to_block and pass
5698 cfun argument explicitly and use gimple_switch_label_bb.
5699 (expand_case): Likewise.
5700 * tree-cfg.c (lower_phi_internal_fn): Use label_to_block and pass
5701 cfun argument explicitly. Likewise.
5702 (make_edges_bb): Likewise.
5703 (make_cond_expr_edges): Likewise.
5704 (get_cases_for_edge): Likewise.
5705 (make_gimple_switch_edges): Likewise.
5706 (label_to_block_fn): Likewise.
5707 (label_to_block): Likewise.
5708 (make_goto_expr_edges): Likewise.
5709 (make_gimple_asm_edges): Likewise.
5710 (main_block_label): Likewise.
5711 (group_case_labels_stmt): Likewise.
5712 (find_taken_edge_computed_goto): Likewise.
5713 (find_taken_edge_switch_expr): Likewise.
5714 (gimple_verify_flow_info): Likewise.
5715 (gimple_redirect_edge_and_branch): Likewise.
5716 (gimple_switch_label_bb): New function.
5717 (gimple_switch_default_bb): Likewise.
5718 (gimple_switch_edge): Likewise.
5719 (gimple_switch_default_edge): Likewise.
5720 * tree-cfg.h (label_to_block_fn): Remove and replace ...
5721 (label_to_block): ... with this.
5722 (gimple_switch_label_bb): New.
5723 (gimple_switch_default_bb): Likewise.
5724 (gimple_switch_edge): Likewise.
5725 (gimple_switch_default_edge): Likewise.
5726 * tree-cfgcleanup.c (convert_single_case_switch): Use
5727 new gimple functions and pass new argument to label_to_block.
5728 (cleanup_control_flow_bb):
5729 * tree-eh.c (make_eh_dispatch_edges): Use label_to_block and pass
5730 cfun argument explicitly.
5731 (make_eh_edges): Likewise.
5732 (redirect_eh_dispatch_edge): Likewise.
5733 (lower_resx): Likewise.
5734 (lower_eh_dispatch): Likewise.
5735 (maybe_remove_unreachable_handlers): Likewise.
5736 (unsplit_eh): Likewise.
5737 (cleanup_empty_eh): Likewise.
5738 (verify_eh_edges): Likewise.
5739 (verify_eh_dispatch_edge): Likewise.
5740 * tree-ssa-dom.c (record_edge_info): Likewise.
5741 * tree-ssa-forwprop.c (simplify_gimple_switch_label_vec): Likewise.
5742 * tree-ssa-threadedge.c (thread_around_empty_blocks): Likewise.
5743 (thread_through_normal_block): Likewise.
5744 * tree-ssa-uncprop.c (associate_equivalences_with_edges): Likewise.
5745 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds):
5746 * tree-switch-conversion.c (switch_conversion::collect): Use new
5748 (switch_conversion::check_final_bb): Likewise.
5749 (switch_conversion::gather_default_values): Pass new argument
5751 (switch_conversion::build_constructors): Likewise.
5752 (switch_decision_tree::compute_cases_per_edge): Use new
5753 gimple_switch_edge function.
5754 (switch_decision_tree::analyze_switch_statement): Pass new argument
5756 (switch_decision_tree::try_switch_expansion): Use
5757 gimple_switch_default_edge.
5758 * tree-vrp.c (find_switch_asserts): Pass new argument
5760 * vr-values.c (vr_values::vrp_visit_switch_stmt): Likewise.
5761 (vr_values::simplify_switch_using_ranges): Likewise.
5763 2018-08-27 Richard Biener <rguenther@suse.de>
5765 * cfganal.h (rev_post_order_and_mark_dfs_back_seme): Declare.
5766 * cfganal.c (rev_post_order_and_mark_dfs_back_seme): New function.
5768 * tree-ssa-sccvn.h (struct vn_pval): New structure.
5769 (struct vn_nary_op_s): Add unwind_to member. Add
5770 predicated_values flag and put result into a union together
5771 with a linked list of vn_pval.
5772 (struct vn_ssa_aux): Add name member to make maintaining
5773 a map of SSA name to vn_ssa_aux possible. Remove no longer
5774 needed info, dfsnum, low, visited, on_sccstack, use_processed
5775 and range_info_anti_range_p members.
5776 (run_scc_vn, vn_eliminate, free_scc_vn, vn_valueize): Remove.
5777 (do_rpo_vn, run_rpo_vn, eliminate_with_rpo_vn, free_rpo_vn):
5779 (vn_valueize): New global.
5780 (vn_context_bb): Likewise.
5781 (VN_INFO_RANGE_INFO, VN_INFO_ANTI_RANGE_P, VN_INFO_RANGE_TYPE,
5782 VN_INFO_PTR_INFO): Remove.
5783 * tree-ssa-sccvn.c: ... (rewrite)
5784 (pass_fre::execute): For -O2+ initialize loops and run
5785 RPO VN in optimistic mode (iterating). For -O1 and -Og
5786 run RPO VN in non-optimistic mode.
5787 * params.def (PARAM_SCCVN_MAX_SCC_SIZE): Remove.
5788 (PARAM_RPO_VN_MAX_LOOP_DEPTH): Add.
5789 * doc/invoke.texi (sccvn-max-scc-size): Remove.
5790 (rpo-vn-max-loop-depth): Document.
5791 * tree-ssa-alias.c (walk_non_aliased_vuses): Stop walking
5792 when valuezing the VUSE signals we walked out of the region.
5793 * tree-ssa-pre.c (phi_translate_1): Ignore predicated values.
5794 (phi_translate): Set VN context block to use for availability
5796 (compute_avail): Likewise.
5797 (pre_valueize): New function.
5798 (pass_pre::execute): Adjust to the RPO VN API.
5800 * tree-ssa-loop-ivcanon.c: Include tree-ssa-sccvn.h.
5801 (propagate_constants_for_unrolling): Remove.
5802 (tree_unroll_loops_completely): Perform value-numbering
5803 on the unrolled bodies loop parent.
5805 2018-08-27 Richard Biener <rguenther@suse.de>
5807 * tree-ssa-pre.c (compute_antic): Re-use inverted postorder
5808 for partial antic compute.
5810 2018-08-27 Jakub Jelinek <jakub@redhat.com>
5812 PR rtl-optimization/87065
5813 * combine.c (simplify_if_then_else): Formatting fix.
5814 (if_then_else_cond): Guard MULT optimization with SCALAR_INT_MODE_P
5816 (known_cond): Don't return const_true_rtx for vector modes. Use
5817 CONST0_RTX instead of const0_rtx. Formatting fixes.
5819 2018-08-27 Martin Liska <mliska@suse.cz>
5821 PR gcov-profile/87069
5822 * gcov.c (process_file): Record files already processed
5823 and warn about a file being processed multiple times.
5825 2018-08-27 Martin Liska <mliska@suse.cz>
5828 * config/aarch64/aarch64.c (aarch64_override_options_internal):
5829 Set default values for x_aarch64_*_string strings.
5830 * config/aarch64/aarch64.opt: Remove --{march,mcpu,mtune}==
5831 prefix. For -mabi do not print '=ABI' in help and use
5832 <option_value> format for -msve-vector-bits and -moverride
5835 2018-08-26 Jeff Law <law@redhat.com>
5837 * config/mips/frame-header-opt.c: Include "backend.h" rather than
5840 2018-08-26 Marek Polacek <polacek@redhat.com>
5842 PR c++/87029, Implement -Wredundant-move.
5843 * doc/invoke.texi: Document -Wredundant-move.
5845 2018-08-25 Martin Sebor <msebor@redhat.com>
5847 PR tree-optimization/87059
5848 * builtins.c (expand_builtin_strncmp): Convert MIN_EXPR operand
5849 to the same type as the other.
5850 * fold-const.c (fold_binary_loc): Assert expectation.
5852 2018-08-25 Iain Sandoe <iain@sandoe.co.uk>
5854 * config/darwin.c (machopic_legitimize_pic_address): Clean up
5855 extraneous parentheses, dead code section and formatting.
5857 2018-08-24 David Malcolm <dmalcolm@redhat.com>
5860 * diagnostic-show-locus.c (layout::layout): Ensure the margin is
5861 wide enough for jumps in the line-numbering to be visible.
5862 (layout::print_gap_in_line_numbering): New member function.
5863 (layout::calculate_line_spans): When using line numbering, merge
5864 line spans that are only 1 line apart.
5865 (diagnostic_show_locus): When printing line numbers, show gaps in
5866 line numbering directly, rather than printing headers.
5867 (selftest::test_diagnostic_show_locus_fixit_lines): Add test of
5868 line-numbering with multiple line spans.
5869 (selftest::test_fixit_insert_containing_newline_2): Add test of
5870 line-numbering, in which the spans are close enough to be merged.
5872 2018-08-24 Aldy Hernandez <aldyh@redhat.com>
5874 * gimple-ssa-evrp-analyze.c (set_ssa_range_info): Pass value_range
5875 to range_includes_zero_p. Do not special case VR_ANTI_RANGE.
5876 * tree-vrp.c (range_is_nonnull): Remove.
5877 (range_includes_zero_p): Accept value_range instead of min/max.
5878 (extract_range_from_binary_expr_1): Do not early bail on
5880 Use range_includes_zero_p instead of range_is_nonnull.
5881 (extract_range_from_unary_expr): Use range_includes_zero_p instead
5882 of range_is_nonnull.
5883 (vrp_meet_1): Pass value_range to range_includes_zero_p. Do not
5884 special case VR_ANTI_RANGE.
5885 (vrp_finalize): Same.
5886 * tree-vrp.h (range_includes_zero_p): Pass value_range as argument
5888 (range_is_nonnull): Remove.
5889 * vr-values.c (vrp_stmt_computes_nonzero): Use
5890 range_includes_zero_p instead of range_is_nonnull.
5891 (extract_range_basic): Pass value_range to range_includes_zero_p
5892 instead of range_is_nonnull.
5894 2018-08-24 Uros Bizjak <ubizjak@gmail.com>
5896 * emit-rtl.c (init_emit_once): Do not emit MODE_POINTER_BOUNDS RTXes.
5897 * emit-rtl.h (rtl_data): Remove return_bnd.
5898 * explow.c (trunc_int_for_mode): Do not handle POINTER_BOUNDS_MODE_P.
5899 * function.c (diddle_return_value): Do not handle crtl->return_bnd.
5900 * genmodes.c (complete_mode): Do not handle MODE_POINTER_BOUNDS.
5901 (POINTER_BOUNDS_MODE): Remove definition.
5902 (make_pointer_bounds_mode): Remove.
5903 (get_mode_class): Do not handle MODE_POINTER_BOUNDS.
5904 * machmode.h (POINTER_BOUNDS_MODE_P): Remove definition.
5905 (scalare_mode::includes_p): Do not handle MODE_POINTER_BOUNDS.
5906 * mode-classes.def: Do not define MODE_POINTER_BOUNDS.
5907 * stor-layout.c (int_mode_for_mode): Do not handle MODE_POINTER_BOUNDS.
5908 * tree-core.h (enum tree_index): Remove TI_POINTER_BOUNDS_TYPE.
5909 * varasm.c (output_constant_pool_2): Do not handle MODE_POINTER_BOUNDS.
5911 * config/i386/i386-modes.def (BND32, BND64): Remove.
5912 * config/i386/i386.c (dbx_register_map): Remove bound registers.
5913 (dbx64_register_map): Ditto.
5914 (svr4_dbx_register_map): Ditto.
5915 (indirect_thunk_bnd_needed): Remove.
5916 (indirect_thunks_bnd_used): Ditto.
5917 (indirect_return_bnd_needed): Ditto.
5918 (indirect_return_via_cx_bnd): Ditto.
5919 (enum indirect_thunk_prefix): Remove indirect_thunk_prefix_bnd.
5920 (indirect_thunk_name): Remove handling of indirect_thunk_prefix_bnd.
5921 (output_indirect_thunk): Ditto. Remove need_prefix argument.
5922 (output_indirect_thunk_function): Remove handling of
5923 indirect_return_bnd_needed, indirect_return_via_cx_bnd,
5924 indirect_thunk_bnd_needed and indirect_thunks_bnd_used variables.
5925 (ix86_save_reg): Remove handling of crtl->return_bnd.
5926 (ix86_legitimate_constant_p): Remove handling of POINTER_BOUNDS_MODE_P.
5927 (ix86_print_operand_address_as): Remove handling of UNSPEC_BNDMK_ADDR
5928 and UNSPEC_BNDLX_ADDR.
5929 (ix86_output_indirect_branch_via_reg): Remove handling of
5930 indirect_thunk_prefix_bnd.
5931 (ix86_output_indirect_branch_via_push): Ditto.
5932 (ix86_output_function_return): Ditto.
5933 (ix86_output_indirect_function_return): Ditto.
5934 (avoid_func_arg_motion): Do not handle UNSPEC_BNDSTX.
5935 * config/i386/i386.h (FIXED_REGISTERS): Remove bound registers.
5936 (CALL_USED_REGISTERS): Ditto.
5937 (REG_ALLOC_ORDER): Update for removal of bound registers.
5938 (HI_REGISTER_NAMES): Ditto.
5939 * config/i386/i386.md (UNSPEC_BNDMK, UNSPEC_BNDMK_ADDR, UNSPEC_BNDSTX)
5940 (UNSPEC_BNDLDX, UNSPEC_BNDLDX_ADDR, UNSPEC_BNDCL, UNSPEC_BNDCU)
5941 (UNSPEC_BNDCN, UNSPEC_MPX_FENCE): Remove.
5942 (BND0_REG, BND1_REG, BND2_REG, BND3_REG): Remove
5943 (FIRST_PSEUDO_REG): Update.
5944 (BND): Remove mode iterator.
5945 * config/i386/predicates.md (bnd_mem_operator): Remove.
5947 2018-08-24 Richard Sandiford <richard.sandiford@arm.com>
5949 * tree-vect-stmts.c (vectorizable_bswap): Handle variable-length
5952 2018-08-24 Richard Sandiford <richard.sandiford@arm.com>
5954 * tree-vect-slp.c (vect_transform_slp_perm_load): Separate out
5955 the case in which the permute needs only a single element and
5956 repeats for every vector of the result. Extend that case to
5957 handle variable-length vectors.
5958 * tree-vect-stmts.c (vectorizable_load): Update accordingly.
5960 2018-08-24 H.J. Lu <hongjiu.lu@intel.com>
5963 * dwarf2out.c (save_macinfo_strings): Call set_indirect_string
5964 on DW_MACINFO_start_file for -gsplit-dwarf -g3.
5966 2018-08-24 Richard Biener <rguenther@suse.de>
5968 * cfg.h (struct control_flow_graph): Add edge_flags_allocated and
5969 bb_flags_allocated members.
5970 (auto_flag): New RAII class for allocating flags.
5971 (auto_edge_flag): New RAII class for allocating edge flags.
5972 (auto_bb_flag): New RAII class for allocating bb flags.
5973 * cfgloop.c (verify_loop_structure): Allocate temporary edge
5975 * cfganal.c (dfs_enumerate_from): Remove use of visited sbitmap
5976 in favor of temporarily allocated BB flag.
5977 * hsa-brig.c: Re-order includes.
5978 * hsa-dump.c: Likewise.
5979 * hsa-regalloc.c: Likewise.
5980 * print-rtl.c: Likewise.
5981 * profile-count.c: Likewise.
5983 2018-08-24 Segher Boessenkool <segher@kernel.crashing.org>
5986 * config/rs6000/rs6000.c (toc_relative_expr_p): Check that the base is
5989 2018-08-24 Aldy Hernandez <aldyh@redhat.com>
5992 * wide-int-range.cc (wide_int_range_div): Do not ignore result
5993 from wide_int_range_multiplicative_op.
5995 2018-08-23 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
5997 * tree-vect-data-refs.c (vect_grouped_store_supported): Fix typo
6000 2018-08-23 Giuliano Belinassi <giuliano.belinassi@usp.br>
6002 * genmatch.c (parser::parse_operation): Fix typo 'exapnded'
6005 2018-08-23 Alexander Monakov <amonakov@ispras.ru>
6007 * tree-scalar-evolution.c (final_value_replacement_loop): Dump
6008 full GENERIC expression used for replacement.
6010 2018-08-23 Aldy Hernandez <aldyh@redhat.com>
6012 * tree-vrp.c (abs_extent_range): Remove.
6013 (extract_range_into_wide_ints): Pass wide ints by reference.
6014 (extract_range_from_binary_expr_1): Rewrite the *DIV_EXPR code.
6015 Pass wide ints by reference in all calls to
6016 extract_range_into_wide_ints.
6017 * wide-int-range.cc (wide_int_range_div): New.
6018 * wide-int-range.h (wide_int_range_div): New.
6019 (wide_int_range_includes_zero_p): New.
6020 (wide_int_range_zero_p): New.
6022 2018-08-23 Matthew Malcomson <matthew.malcomson@arm.com>
6024 * config/aarch64/aarch64.md (arches): New enum.
6025 (arch): New enum attr.
6026 (arch_enabled): New attr.
6027 (enabled): Now uses arch_enabled only.
6028 (simd, sve, fp16): Removed attribute.
6029 (fp): Attr now defined in terms of 'arch'.
6030 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64, *movti_aarch64,
6031 *movhf_aarch64, <optab><fcvt_target><GPF:mode>2,
6032 <FCVT_F2FIXED:fcvt_fixed_insn><GPF:mode>3,
6033 <FCVT_FIXED2F:fcvt_fixed_insn><GPI:mode>3): Merge 'fp' and 'simd'
6034 attributes into 'arch'.
6035 (*movsf_aarch64, *movdf_aarch64, *movtf_aarch64, *add<mode>3_aarch64,
6036 subdi3, neg<mode>2, <optab><mode>3, one_cmpl<mode>2,
6037 *<NLOGICAL:optab>_one_cmpl<mode>3, *xor_one_cmpl<mode>3,
6038 *aarch64_ashl_sisd_or_int_<mode>3, *aarch64_lshr_sisd_or_int_<mode>3,
6039 *aarch64_ashr_sisd_or_int_<mode>3, *aarch64_sisd_ushl): Convert use of
6040 'simd' attribute into 'arch'.
6041 (load_pair_sw_<SX:mode><SX2:mode>, load_pair_dw_<DX:mode><DX2:mode>,
6042 store_pair_sw_<SX:mode><SX2:mode>, store_pair_dw_<DX:mode><DX2:mode>):
6043 Convert use of 'fp' attribute to 'arch'.
6044 * config/aarch64/aarch64-simd.md (move_lo_quad_internal_<mode>,
6045 move_lo_quad_internal_<mode>): (different modes) Merge 'fp' and 'simd'
6047 (move_lo_quad_internal_be_<mode>, move_lo_quad_internal_be_<mode>):
6048 (different modes) Merge 'fp' and 'simd' into 'arch'.
6049 (*aarch64_combinez<mode>, *aarch64_combinez_be<mode>): Merge 'fp' and
6052 2018-08-23 Segher Boessenkool <segher@kernel.crashing.org>
6054 PR rtl-optimization/87026
6055 * expmed.c (canonicalize_comparison): If we can no longer create
6056 pseudoregisters, don't.
6058 2018-08-23 Richard Earnshaw <rearnsha@arm.com>
6061 * config/arm/arm-protos.h (arm_emit_speculation_barrier): New
6063 * config/arm/arm.c (speculation_barrier_libfunc): New static
6065 (arm_init_libfuncs): Initialize it.
6066 (arm_emit_speculation_barrier): New function.
6067 * config/arm/arm.md (speculation_barrier): Call
6068 arm_emit_speculation_barrier for architectures that do not have
6070 (speculation_barrier_insn): Only match on Armv7 or later.
6072 2018-08-23 Richard Biener <rguenther@suse.de>
6075 * tree-inline.c (copy_bb): Drop unused __builtin_va_arg_pack_len
6078 2018-08-23 Richard Sandiford <richard.sandiford@arm.com>
6080 * config/aarch64/aarch64.c (aarch64_evpc_sve_tbl): Fix handling
6081 of single-vector TBLs.
6082 (aarch64_vectorize_vec_perm_const): Set one_vector_p when only
6085 2018-08-23 Richard Sandiford <richard.sandiford@arm.com>
6088 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const_1): Fix
6089 aarch64_evpc_tbl guard.
6091 2018-08-22 Bernd Edlinger <bernd.edlinger@hotmail.de>
6093 * tree-ssa-dse.c (compute_trims): Avoid folding away undefined
6096 2018-08-22 Martin Sebor <msebor@redhat.com>
6099 * tree-pretty-print.c (pretty_print_string): Add argument.
6100 (dump_generic_node): Call to pretty_print_string with string size.
6102 2018-08-22 Segher Boessenkool <segher@kernel.crashing.org>
6104 PR rtl-optimization/86771
6105 * combine.c (try_combine): Do not allow splitting a resulting PARALLEL
6106 of two SETs into those two SETs, one to be placed at i2, if that SETs
6107 destination is modified between i2 and i3.
6109 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
6111 PR tree-optimization/86725
6112 * tree-vect-loop.c (vect_inner_phi_in_double_reduction_p): New
6114 (vect_analyze_scalar_cycles_1): Check it.
6116 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
6118 PR tree-optimization/86725
6119 * tree-vect-loop.c (vect_is_simple_reduction): When treating
6120 an outer loop phi as a double reduction, make sure that the
6121 single user of the phi result is an inner loop phi.
6123 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
6125 * tree-vect-data-refs.c (vect_analyze_group_access_1): Convert
6126 grouped stores with gaps to a strided group.
6128 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
6130 * tree-vect-stmts.c (get_group_load_store_type)
6131 (get_load_store_type): Only test STMT_VINFO_STRIDED_P for the
6132 first statement in a group.
6134 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
6136 * config/darwin.h (LINK_COMMAND_SPEC_A): Sync LTO options with
6137 the sequence used in gcc/gcc.c.
6139 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
6142 * gcc-ar.c (main): Don’t try to invoke the plug-in if we’re not
6145 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
6147 * config/darwin10.h (LINK_GCC_C_SEQUENCE_SPEC): Adjust to use the
6148 Darwin10-specific unwinder-shim.
6149 * config/darwin12.h (LINK_GCC_C_SEQUENCE_SPEC): Remove.
6150 * config/rs6000/darwin.h (DARWIN_CRT1_SPEC, DARWIN_DYLIB1_SPEC):
6151 New to cater for Darwin10 Rosetta.
6153 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
6155 * config/i386/i386.c (ix86_output_addr_diff_elt): Move the MACH-O
6156 specific test before the one for HAVE_AS_GOTOFF_IN_DATA.
6158 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
6163 * gcc/dwarf2out.c (FUNC_SECOND_SECT_LABEL): New.
6164 (dwarf2out_switch_text_section): Generate a local label for the
6165 second function sub-section and apply it as the second FDE start
6167 * gcc/final.c (final_scan_insn_1): Emit second FDE label after the
6168 second sub-section start.
6170 2018-08-22 Richard Biener <rguenther@suse.de>
6172 PR tree-optimization/86988
6173 * tree-vrp.c (vrp_prop::check_mem_ref): Bail out on VLAs.
6175 2018-08-22 Richard Biener <rguenther@suse.de>
6177 PR tree-optimization/86945
6178 * tree-cfg.c (generate_range_test): Use unsigned arithmetic.
6180 2018-08-22 Alexandre Oliva <oliva@adacore.com>
6182 * config/rs6000/rs6000.c (SMALL_DATA_RELOC, SMALL_DATA_REG): Add
6183 a comment about how uses of r2 for .sdata2 come about.
6185 2018-08-22 Alexandre Oliva <aoliva@redhat.com>
6187 * tree-ssa-reassoc.c (is_reassociable_op): Fix cut&pasto.
6189 2018-08-21 Marek Polacek <polacek@redhat.com>
6191 PR c++/86981, Implement -Wpessimizing-move.
6192 * doc/invoke.texi: Document -Wpessimizing-move.
6194 2018-08-21 Jan Hubicka <jh@suse.cz>
6196 * tree.c (find_decls_types_r): Do not check for redundant typedefs.
6197 * tree.h (is_redundant_typedef): Remove.
6198 * dwarf2out.c (is_redundant_typedef): Turn into static function.
6200 2018-08-21 Jan Hubicka <jh@suse.cz>
6202 * tree.c (free_lang_data_in_decl): Remove types from DECL_CONTEXT
6205 2018-08-21 Tamar Christina <tamar.christina@arm.com>
6207 * expmed.c (extract_low_bits): Reject invalid subregs early.
6209 2018-08-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
6212 * tree-ssa-strlen.c (adjust_last_stmt): Avoid folding away undefined
6215 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
6217 * config/vxworks.h: Guard vxworks_asm_out_constructor and
6218 vxworks_asm_out_destructor by !HAVE_INITFINI_ARRAY_SUPPORT
6219 * config/vxworks.c: Likewise.
6221 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
6223 * config/vxworks.c: Set targetm.have_ctors_dtors
6224 if HAVE_INITFINI_ARRAY_SUPPORT.
6225 * config/vxworks.h: Set SUPPORTS_INIT_PRIORITY
6226 if HAVE_INITFINI_ARRAY_SUPPORT.
6228 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
6230 * config/vxworks.h: Add $(WIND_BASE)/target/h/wrn/coreip to
6231 default search path for VxWorks < 7.
6233 2018-08-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
6235 * gimple-ssa-sprintf.c (decl_constant_value): Remove.
6236 (get_format_string): Refer to c_getstr.
6238 2018-08-21 Tom de Vries <tdevries@suse.de>
6240 * cgraph.h (debuginfo_early_init, debuginfo_init, debuginfo_fini)
6241 (debuginfo_start, debuginfo_stop, debuginfo_early_start)
6242 (debuginfo_early_stop): Declare.
6243 * cgraphunit.c (debuginfo_early_init, debuginfo_init, debuginfo_fini)
6244 (debuginfo_start, debuginfo_stop, debuginfo_early_start)
6245 (debuginfo_early_stop): New function.
6246 (symbol_table::finalize_compilation_unit): Call debuginfo_early_start
6247 and debuginfo_early_stop.
6248 * dwarf2out.c (dwarf2out_finish, dwarf2out_early_finish): Dump dwarf.
6249 * toplev.c (compile_file): Call debuginfo_start and debuginfo_stop.
6250 (general_init): Call debuginfo_early_init.
6251 (finalize): Call debuginfo_fini.
6252 (do_compile): Call debuginfo_init.
6253 * doc/invoke.texi (@gccoptlist): Add -fdump-debug and
6255 (@item -fdump-debug, @item -fdump-earlydebug): Add.
6257 2018-08-21 Tom de Vries <tdevries@suse.de>
6259 * dwarf2out.c (print_dw_val, print_loc_descr, print_die): Handle
6260 flag_dump_noaddr and flag_dump_unnumbered.
6262 2018-08-21 Aldy Hernandez <aldyh@redhat.com>
6264 * wide-int-range.cc (wide_int_range_abs): New.
6265 (wide_int_range_order_set): Rename from wide_int_range_min_max.
6266 * wide-int-range.h (wide_int_range_abs): New.
6267 (wide_int_range_min_max): New.
6268 * tree-vrp.c (extract_range_from_unary_expr): Rewrite ABS_EXPR
6269 case to call wide_int_range_abs.
6270 Rewrite MIN/MAX_EXPR to call wide_int_range_min_max.
6271 (extract_range_from_abs_expr): Delete.
6273 2018-08-20 Michael Meissner <meissner@linux.ibm.com>
6276 * config/rs6000/rs6000.md (extendsi<mode>2): Change constraints
6277 from 'Y' to 'YZ' to enable the LWAX instruction to be generated
6280 2018-08-20 Nathan Sidwell <nathan@acm.org>
6281 Jeff Law <law@redhat.com>
6283 * config/s390/s390-c (s390_macro_to_expand): Use cpp_macro_p.
6284 * config/spu/spu-c.c (spu_macro_to_expand): Likewise.
6286 2018-08-20 David Malcolm <dmalcolm@redhat.com>
6289 * attribs.c (diag_attr_exclusions): Add auto_diagnostic_group instance.
6290 (decl_attributes): Likewise.
6291 * calls.c (maybe_warn_nonstring_arg): Add auto_diagnostic_group
6293 * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
6294 * diagnostic-core.h (class auto_diagnostic_group): New class.
6295 * diagnostic.c (diagnostic_initialize): Initialize the new fields.
6296 (diagnostic_report_diagnostic): Handle the first diagnostics within
6298 (emit_diagnostic): Add auto_diagnostic_group instance.
6300 (inform_n): Likewise.
6301 (warning): Likewise.
6302 (warning_at): Likewise.
6303 (warning_n): Likewise.
6304 (pedwarn): Likewise.
6305 (permerror): Likewise.
6307 (error_n): Likewise.
6308 (error_at): Likewise.
6310 (fatal_error): Likewise.
6311 (internal_error): Likewise.
6312 (internal_error_no_backtrace): Likewise.
6313 (auto_diagnostic_group::auto_diagnostic_group): New ctor.
6314 (auto_diagnostic_group::~auto_diagnostic_group): New dtor.
6315 * diagnostic.h (struct diagnostic_context): Add fields
6316 "diagnostic_group_nesting_depth",
6317 "diagnostic_group_emission_count", "begin_group_cb",
6319 * gimple-ssa-isolate-paths.c (find_implicit_erroneous_behavior):
6320 Add auto_diagnostic_group instance(s).
6321 (find_explicit_erroneous_behavior): Likewise.
6322 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Likewise.
6323 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Likewise.
6324 * gimplify.c (warn_implicit_fallthrough_r): Likewise.
6325 (gimplify_va_arg_expr): Likewise.
6326 * hsa-gen.c (HSA_SORRY_ATV): Likewise.
6327 (HSA_SORRY_AT): Likewise.
6328 * ipa-devirt.c (compare_virtual_tables): Likewise.
6329 (warn_odr): Likewise.
6330 * multiple_target.c (expand_target_clones): Likewise.
6331 * opts-common.c (cmdline_handle_error): Likewise.
6332 * reginfo.c (globalize_reg): Likewise.
6333 * substring-locations.c (format_warning_n_va): Likewise.
6334 * tree-inline.c (expand_call_inline): Likewise.
6335 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Likewise.
6336 * tree-ssa-loop-niter.c
6337 (do_warn_aggressive_loop_optimizations): Likewise.
6338 * tree-ssa-uninit.c (warn_uninit): Likewise.
6339 * tree.c (warn_deprecated_use): Likewise.
6341 2018-08-20 H.J. Lu <hongjiu.lu@intel.com>
6344 * config/i386/i386.md (eh_return): Always update EH return
6345 address in word_mode.
6347 2018-08-20 Chung-Lin Tang <cltang@codesourcery.com>
6349 * targhooks.c (std_gimplify_va_arg_expr): Properly handle case of when
6350 TARGET_SPLIT_COMPLEX_ARG is defined.
6352 2018-08-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
6354 * expr.c (store_field): Change gcc_assert to gcc_checking_assert.
6356 2018-08-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
6359 * expr.c (expand_assignment): Assert that bitpos is positive.
6360 (store_field): Likewise
6361 (expand_expr_real_1): Make sure that bitpos is positive.
6362 * config/alpha/alpha.h (CONSTANT_ADDRESS_P): Avoid signed
6365 2018-08-20 Nathan Sidwell <nathan@acm.org>
6367 * Makefile.in (CPP_ID_DATA_H): Delete.
6368 (CPP_INTERNAL_H): Don't add it.
6369 (GTFILES): Replace CPP_ID_DATA_H with CPPLIB_H.
6370 * gengtype.c (open_base_files): Replace cpp-id-data.h with cpplib.h
6372 2018-08-20 Richard Biener <rguenther@suse.de>
6374 PR tree-optimization/78655
6375 * tree-vrp.c (extract_range_from_binary_expr_1): Make
6376 pointer + offset nonnull if either operand is nonnull work.
6378 2018-08-20 Tom de Vries <tdevries@suse.de>
6380 * dwarf2out.c (add_scalar_info): Don't add reference to existing die
6381 unless the referenced die describes the added property using
6382 DW_AT_location or DW_AT_const_value. Fall back to exprloc case.
6383 Otherwise, add a DW_AT_location to the referenced die.
6385 2018-08-19 Uros Bizjak <ubizjak@gmail.com>
6388 * config/i386/i386.c (ix86_rtx_costs) [case SET]: Check source for
6389 register_operand when calling ix86_set_reg_reg_cost.
6390 [case CONST_INT, case CONST, case LABEL_REF, case SYMBOL_REF]:
6391 Set *total to 0 for operands that satisfy x86_64_immediate_operand
6392 predicate and to 1 otherwise.
6394 2018-08-18 Iain Sandoe <iain@sandoe.co.uk>
6396 * config/darwin.c (darwin_override_options): If -gsplit-dwarf is set,
6397 emit a diagnostic that it is not supported and reset the option.
6398 * config/darwin.h (DRIVER_SELF_SPECS): Note that gsplit-dwarf is not
6399 supported and consume the option. (ASM_FINAL_SPEC): New.
6401 2018-08-17 Segher Boessenkool <segher@kernel.crashing.org>
6403 * doc/md.texi (Patterns): Use @ref instead of @xref in the middle of
6406 2018-08-17 Sandra Loosemore <sandra@codesourcery.com>
6408 C-SKY port: Documentation
6410 * doc/extend.texi (C-SKY Function Attributes): New section.
6411 * doc/invoke.texi (Option Summary): Add C-SKY options.
6412 (C-SKY Options): New section.
6413 * doc/md.texi (Machine Constraints): Document C-SKY constraints.
6415 2018-08-17 Jojo <jijie_rong@c-sky.com>
6416 Huibin Wang <huibin_wang@c-sky.com>
6417 Sandra Loosemore <sandra@codesourcery.com>
6418 Chung-Lin Tang <cltang@codesourcery.com>
6420 C-SKY port: Backend implementation
6422 * config/csky/*: New.
6423 * common/config/csky/*: New.
6425 2018-08-17 Jojo <jijie_rong@c-sky.com>
6426 Huibin Wang <huibin_wang@c-sky.com>
6427 Sandra Loosemore <sandra@codesourcery.com>
6428 Chung-Lin Tang <cltang@codesourcery.com>
6429 Andrew Jenner <andrew@codesourcery.com>
6431 C-SKY port: Configury
6433 * config.gcc (csky-*-*): New.
6434 * configure.ac: Add csky to targets for dwarf2 debug_line support.
6435 * configure: Regenerated.
6437 2018-08-17 David Malcolm <dmalcolm@redhat.com>
6439 * dump-context.h: Include "dumpfile.h".
6440 (dump_context::dump_printf_va): Convert final param from va_list
6441 to va_list *. Convert from ATTRIBUTE_PRINTF to
6442 ATTRIBUTE_GCC_DUMP_PRINTF.
6443 (dump_context::dump_printf_loc_va): Likewise.
6444 * dumpfile.c: Include "stringpool.h".
6445 (make_item_for_dump_printf_va): Delete.
6446 (make_item_for_dump_printf): Delete.
6447 (class dump_pretty_printer): New class.
6448 (dump_pretty_printer::dump_pretty_printer): New ctor.
6449 (dump_pretty_printer::emit_items): New member function.
6450 (dump_pretty_printer::emit_any_pending_textual_chunks): New member
6452 (dump_pretty_printer::emit_item): New member function.
6453 (dump_pretty_printer::stash_item): New member function.
6454 (dump_pretty_printer::format_decoder_cb): New member function.
6455 (dump_pretty_printer::decode_format): New member function.
6456 (dump_context::dump_printf_va): Reimplement in terms of
6457 dump_pretty_printer.
6458 (dump_context::dump_printf_loc_va): Convert final param from va_list
6460 (dump_context::begin_scope): Reimplement call to
6461 make_item_for_dump_printf.
6462 (dump_printf): Update for change to dump_printf_va.
6463 (dump_printf_loc): Likewise.
6464 (selftest::test_capture_of_dump_calls): Convert "stmt" from
6465 greturn * to gimple *. Add a test_decl. Add tests of dump_printf
6466 with %T, %E, and %G.
6467 * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): New macro.
6468 (dump_printf): Replace ATTRIBUTE_PRINTF_2 with
6469 ATTRIBUTE_GCC_DUMP_PRINTF (2, 3).
6470 (dump_printf_loc): Replace ATTRIBUTE_PRINTF_3 with
6471 ATTRIBUTE_GCC_DUMP_PRINTF (3, 0).
6472 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Convert
6473 use of HOST_WIDE_INT_PRINT_DEC on unsigned HOST_WIDE_INT "count"
6474 within a dump_printf_loc call to "%wu".
6475 (vector_alignment_reachable_p): Merge two dump_printf[_loc] calls,
6476 converting a use of HOST_WIDE_INT_PRINT_DEC to "%wd". Add a
6477 missing space after "=".
6478 * tree-vect-loop.c (vect_analyze_loop_2) Within a dump_printf
6479 call, convert use of HOST_WIDE_INT_PRINT_DEC to "%wd".
6480 * tree-vect-slp.c (vect_slp_bb): Within a dump_printf_loc call,
6481 convert use of HOST_WIDE_INT_PRINT_UNSIGNED to "%wu".
6482 * tree-vectorizer.c (try_vectorize_loop_1): Likewise. Remove
6483 duplicate "vectorized" from message.
6485 2018-08-17 Szabolcs Nagy <szabolcs.nagy@arm.com>
6487 * config/arm/arm-builtins.c (arm_init_simd_builtin_types): Clear
6488 polyNxK_t element's TYPE_STRING_FLAG.
6490 2018-08-17 Segher Boessenkool <segher@kernel.crashing.org>
6492 * config/rs6000/rs6000.md (*cbranch, *creturn): Name these patterns
6493 (they were unnamed before). Fix comments.
6495 2018-08-17 Nathan Sidwell <nathan@acm.org>
6497 * cppbuiltin.c: Include "cpplib.h", not "cpp-id-data.h".
6499 2018-08-17 Richard Biener <rguenther@suse.de>
6501 PR tree-optimization/86841
6502 * wide-int-range.cc (wide_int_range_lshift): Use to_uhwi.
6504 2018-08-17 Martin Liska <mliska@suse.cz>
6506 * common.opt: Remove Warn, Init and Report for options with
6507 Ignore/Deprecated flag. Warning is done automatically for
6509 * config/i386/i386.opt: Likewise.
6510 * config/ia64/ia64.opt: Likewise.
6511 * config/rs6000/rs6000.opt: Likewise.
6512 * cppbuiltin.c (define_builtin_macros_for_compilation_flags):
6513 Remove usage of flag_check_pointer_bounds.
6514 * lto-wrapper.c (merge_and_complain): Do not handle
6515 OPT_fcheck_pointer_bounds.
6516 (append_compiler_options): Likewise.
6517 * opt-functions.awk: Do not handle Deprecated.
6518 * optc-gen.awk: Check that Var, Report and Init are not
6519 used for an option with Ignore/Deprecated flag.
6520 * opts-common.c (decode_cmdline_option): Do not report
6522 (read_cmdline_option): Report warning for OPT_SPECIAL_deprecated
6524 * opts.h (struct cl_option): Remove cl_deprecated flag.
6525 (CL_ERR_DEPRECATED): Remove error enum value.
6527 2018-08-17 Richard Biener <rguenther@suse.de>
6530 * tree-inline.c (copy_bb): When inlining __builtin_va_arg_pack_len ()
6531 across a va-arg-pack using call adjust its return value accordingly.
6533 2018-08-16 Martin Sebor <msebor@redhat.com>
6535 PR tree-optimization/86853
6536 * gimple-ssa-sprintf.c (struct format_result): Rename member.
6537 (struct fmtresult): Add member and initialize it in ctors.
6538 (format_character): Handle %C. Extend range to NUL. Set MAYFAIL.
6539 (format_string): Handle %S the same as %ls. Set MAYFAIL.
6540 (format_directive): Set POSUNDER4K when MAYFAIL is set.
6541 (parse_directive): Handle %C same as %c.
6542 (sprintf_dom_walker::compute_format_length): Adjust.
6543 (is_call_safe): Adjust.
6545 2018-08-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
6547 * builtins.c (c_strlen): Add new parameter eltsize. Use it
6548 for determining how to count the elements.
6549 * builtins.h (c_strlen): Adjust prototype.
6550 * expr.c (string_constant): Add new parameter mem_size.
6551 Set *mem_size appropriately.
6552 * expr.h (string_constant): Adjust protoype.
6553 * gimple-fold.c (get_range_strlen): Add new parameter eltsize.
6554 * gimple-fold.h (get_range_strlen): Adjust prototype.
6555 * gimple-ssa-sprintf.c (get_string_length): Add new parameter eltsize.
6556 (format_string): Call get_string_length with eltsize.
6558 2018-08-16 David Malcolm <dmalcolm@redhat.com>
6560 * diagnostic.c (default_diagnostic_start_span_fn): Call pp_string
6561 to emit the span, rather than setting it as the prefix.
6563 2018-08-16 David Malcolm <dmalcolm@redhat.com>
6565 * diagnostic-show-locus.c (layout::start_annotation_line): Add
6566 "margin_char" parameter, defaulting to space. Use it in place
6567 of pp_space for the initial part of the margin.
6568 (layout::print_leading_fixits): Use '+' when filling the margin
6569 of line-insertion fix-it hints.
6571 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
6573 * config/rs6000/rs6000.md (two unnamed define_insn and define_split):
6576 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
6578 * config/rs6000/altivec.md: Don't set length attribute to the default
6580 * config/rs6000/darwin.md: Ditto.
6581 * config/rs6000/dfp.md: Ditto.
6582 * config/rs6000/htm.md: Ditto.
6583 * config/rs6000/rs6000.md: Ditto.
6584 * config/rs6000/sync.md: Ditto.
6585 * config/rs6000/vsx.md: Ditto.
6587 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
6589 * config/rs6000/altivec.md: Don't set length attribute to the default
6590 value, for branch instructions.
6591 * config/rs6000/darwin.md: Ditto.
6592 * config/rs6000/rs6000.md: Ditto.
6594 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
6596 * config/rs6000/rs6000.md (length): Always define as const_int 4.
6597 (unnamed conditional branch define_insn): Set length to 4 or 8
6598 depending on offset.
6599 (<bd>_<mode>): Similar, for alternative 0.
6600 (<bd>tf_<mode>): Ditto.
6602 2018-08-16 Tamar Christina <tamar.christina@arm.com>
6604 * expr.c (copy_blkmode_to_reg): Perform larger copies when safe.
6606 2018-08-16 Matthew Malcomson <matthew.malcomson@arm.com>
6608 * doc/rtl.texi: Replace old RTX class names with new names.
6611 2018-08-16 Vlad Lazar <vlad.lazar@arm.com>
6613 * expmed.h (canonicalize_comparison): New declaration.
6614 * expmed.c (canonicalize_comparison, equivalent_cmp_code): New function.
6615 * expmed.c (emit_store_flag_1): Add call to canonicalize_comparison.
6616 * optabs.c (prepare_cmp_insn): Likewise.
6617 * rtl.h (unsigned_condition_p): New function which checks if a
6618 comparison operator is unsigned.
6620 2018-08-16 Nathan Sidwell <nathan@acm.org>
6622 * config/rs6000/rs6000-c.c (rs6000_macro_to_expend): Use cpp_macro_p.
6623 * config/powerpcspc/powerpcspe-c.c (rs6000_macro_to_expend): Likewise.
6625 2018-08-16 Tamar Christina <tamar.christina@arm.com>
6628 * config/arm/arm.c (arm_can_change_mode_class): Disallow subreg.
6629 * config/arm/neon.md (movv4hf, movv8hf): Refactored to..
6630 (mov<mov>): ..this and enable unconditionally.
6632 2018-08-16 Tamar Christina <tamar.christina@arm.com>
6634 * config/arm/neon.md (*neon_mov<mode>): Remove reg-to-reg alternative.
6636 2018-08-16 Sam Tebbs <sam.tebbs@arm.com>
6638 * config/aarch64/aarch64.opt (mlow-precision-recip-sqrt)
6639 (mlow-precision-sqrt, mlow-precision-div, mverbose-cost-dump): Replace
6640 "Common" with "Target".
6642 2018-08-15 Uros Bizjak <ubizjak@gmail.com>
6644 * config/i386/i386.opt (mmitigate-rop): Mark as deprecated.
6645 * doc/invoke.texi (mmitigate-rop): Remove.
6646 * config/i386/i386.c: Do not include "regrename.h".
6647 (ix86_rop_should_change_byte_p, reg_encoded_number)
6648 (ix86_get_modrm_for_rop, set_rop_modrm_reg_bits, ix86_mitigate_rop):
6650 (ix86_reorg): Remove call to ix86_mitigate_rop.
6651 * config/i386/i386.md (attr "modrm_class"): Remove.
6652 (cmp<mode>_ccno_1, mov<mode>_xor, movstrict<mode>_xor)
6653 (x86_mov<mode>cc_0_m1. x86_mov<mode>cc_0_m1_se)
6654 (x86_mov<mode>cc_0_m1_neg): Remove modrm_class attribute override.
6656 2018-08-15 Will Schmidt <will_schmidt@vnet.ibm.com>
6658 * config/rs6000/rs600.c (rs6000_gimple_fold_builtin): Add entries to
6659 allow folding of mergeh() and mergel() for the float and double types.
6660 (fold_mergehl_helper): Rework to handle building a permute tree
6663 2018-08-15 Uros Bizjak <ubizjak@gmail.com>
6665 * config/i386/i386.c (expand_vec_perm_movs): Enable V4SFmode
6668 2018-08-15 David Malcolm <dmalcolm@redhat.com>
6670 * common.opt (fdiagnostics-show-labels): New option.
6671 * diagnostic-show-locus.c (class layout_range): Add field
6673 (class layout): Add field "m_show_labels_p".
6674 (layout_range::layout_range): Add param "label" and use it to
6676 (make_range): Pass in NULL for new "label" param of layout_range's
6678 (layout::layout): Initialize m_show_labels_p.
6679 (layout::maybe_add_location_range): Pass in loc_range->m_label
6680 when constructing layout_range instances.
6681 (struct line_label): New struct.
6682 (layout::print_any_labels): New member function.
6683 (layout::print_line): Call it if label-printing is enabled.
6684 (selftest::test_one_liner_labels): New test.
6685 (selftest::test_diagnostic_show_locus_one_liner): Call it.
6686 * diagnostic.c (diagnostic_initialize): Initialize
6687 context->show_labels_p.
6688 * diagnostic.h (struct diagnostic_context): Add field
6690 * doc/invoke.texi (Diagnostic Message Formatting Options): Add
6691 -fno-diagnostics-show-labels.
6692 * dwarf2out.c (gen_producer_string): Add
6693 OPT_fdiagnostics_show_labels to the ignored options.
6694 * gcc-rich-location.c (gcc_rich_location::add_expr): Add "label"
6696 (gcc_rich_location::maybe_add_expr): Likewise.
6697 * gcc-rich-location.h (gcc_rich_location::gcc_rich_location): Add
6698 label" param, defaulting to NULL.
6699 (gcc_rich_location::add_expr): Add "label" param.
6700 (gcc_rich_location::maybe_add_expr): Likewise.
6701 (class text_range_label): New class.
6702 (class range_label_for_type_mismatch): New class.
6703 * gimple-ssa-sprintf.c (fmtwarn): Pass NULL for new label params
6704 of format_warning_va.
6705 (fmtwarn_n): Likewise for new params of format_warning_n_va.
6706 * lto-wrapper.c (merge_and_complain): Add
6707 OPT_fdiagnostics_show_labels to the "pick one setting" options.
6708 (append_compiler_options): Likewise to the dropped options.
6709 (append_diag_options): Likewise to the passed-on options.
6710 * opts.c (common_handle_option): Handle the new option.
6711 * selftest-diagnostic.c
6712 (test_diagnostic_context::test_diagnostic_context): Enable
6714 * substring-locations.c: Include "gcc-rich-location.h".
6715 (format_warning_n_va): Add "fmt_label" and "param_label" params
6716 and use them as appropriate.
6717 (format_warning_va): Add "fmt_label" and "param_label" params,
6718 passing them on to format_warning_n_va.
6719 (format_warning_at_substring): Likewise.
6720 (format_warning_at_substring_n): Likewise.
6721 * substring-locations.h (format_warning_va): Add "fmt_label" and
6722 "param_label" params.
6723 (format_warning_n_va): Likewise.
6724 (format_warning_at_substring): Likewise.
6725 (format_warning_at_substring_n): Likewise.
6726 * toplev.c (general_init): Initialize global_dc->show_labels_p.
6728 2018-08-15 Qing Zhao <qing.zhao@oracle.com>
6731 * builtins.c (expand_builtin_memcmp): Do not expand the call
6732 when overflow is detected.
6734 2018-08-15 Martin Sebor <msebor@redhat.com>
6736 PR tree-optimization/71625
6737 * config/aarch64/aarch64-builtins.c
6738 (aarch64_init_simd_builtin_types): Clear Poly8_t's TYPE_STRING_FLAG.
6740 2018-08-15 Ilya Leoshkevich <iii@linux.ibm.com>
6742 * config/s390/s390.c (s390_reorg): Remove loop.
6744 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
6747 (darwin_function_switched_text_sections): Delete.
6748 * gcc/config/darwin.h
6749 (TARGET_ASM_FUNCTION_SWITCHED_TEXT_SECTIONS): Likewise.
6751 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
6754 * config/darwin.h: (DEBUG_STR_OFFSETS_SECTION, DEBUG_LOCLISTS_SECTION,
6755 DEBUG_RNGLISTS_SECTION) new macros. (DEBUG_PUBNAMES_SECTION,
6756 DEBUG_PUBTYPES_SECTION) update to include GNU variant.
6758 2018-08-15 Martin Liska <mliska@suse.cz>
6760 PR tree-optimization/86925
6761 * predict.c (expr_expected_value_1): When taking
6762 later predictor, assign also probability.
6763 Use fold_build2_initializer_loc in order to fold
6764 the expression in -frounding-math.
6766 2018-08-14 Allan Sandfeld Jensen <allan.jensen@qt.io>
6768 * config/i386/i386.c (expand_vec_perm_movs): New method matching movs
6770 (expand_vec_perm_1): Try the new method.
6772 2018-08-14 Ilya Leoshkevich <iii@linux.ibm.com>
6775 * lra-lives.c (remove_some_program_points_and_update_live_ranges):
6776 Check whether lra_live_max_point is 0 before dividing.
6778 2018-08-14 Martin Sebor <msebor@redhat.com>
6780 PR tree-optimization/86650
6781 * tree-vrp.c (vrp_prop::check_array_ref): Print an inform message.
6782 (vrp_prop::check_mem_ref): Same.
6784 2018-08-13 Liu Hao <lh_mouse@126.com>
6786 * pretty-print.c (eat_esc_sequence): Swap the foreground and
6787 background colors if the COMMON_LVB_REVERSE_VIDEO flag is set,
6788 and clear it thereafter, as it only works for DBCS.
6790 2018-08-13 Liu Hao <lh_mouse@126.com>
6792 * pretty-print.c (mingw_ansi_fputs): Do not call _close() on the
6793 handle returned by _get_osf_handle().
6795 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
6797 * gcc/config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support
6798 for folding vec_perm.
6800 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
6802 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin):
6803 Add support for gimple-folding of vec_pack() and vec_unpack()
6806 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
6808 * config/rs6000/rs6000.c (rs6000_builtin_valid_without_lhs): Add
6809 vec_xst variants to the list.
6810 (rs6000_gimple_fold_builtin): Add support for folding unaligned
6811 vector loads and stores.
6813 2018-08-13 David Edelsohn <dje.gcc@gmail.com>
6815 * config.gcc (rs6000-ibm-aix4.x): Delete.
6816 (rs6000-ibm-aix5.1): Delete.
6817 (rs6000-ibm-aix5.2): Delete.
6818 (rs6000-ibm-aix5.3): Delete.
6819 * config/rs6000/aix43.h: Delete.
6820 * config/rs6000/aix51.h: Delete.
6821 * config/rs6000/aix52.h: Delete.
6822 * config/rs6000/t-aix43: Delete.
6824 2018-08-13 Ilya Leoshkevich <iii@linux.ibm.com>
6826 * config/s390/s390.c (s390_decompose_constant_pool_ref):
6828 (s390_decompose_address): Factor out constant pool ref
6831 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
6833 * config/nds32/nds32-predicates.c
6834 (nds32_can_use_bclr_p): Change return type as bool.
6835 (nds32_can_use_bset_p): Ditto.
6836 (nds32_can_use_btgl_p): Ditto.
6837 (nds32_can_use_bitci_p): Ditto.
6838 * config/nds32/nds32-protos.h
6839 (nds32_can_use_bclr_p): Change declaration.
6840 (nds32_can_use_bset_p): Ditto.
6841 (nds32_can_use_btgl_p): Ditto.
6842 (nds32_can_use_bitci_p): Ditto.
6844 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
6846 * config/nds32/nds32.c (nds32_expand_prologue, nds32_expand_epilogue):
6847 Support -msched-prolog-epilog option.
6848 * config/nds32/nds32.opt (msched-prolog-epilog): New option.
6850 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
6852 * common/config/nds32/nds32-common.c
6853 (nds32_option_optimization_table): Enalbe -malways-align.
6855 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
6857 * config.gcc (nds32*): Add nds32_isr.h and nds32_init.inc in
6859 * common/config/nds32/nds32-common.c (nds32_handle_option): Handle
6860 OPT_misr_secure_ case.
6861 * config/nds32/nds32-isr.c: Implementation of backward compatibility.
6862 * config/nds32/nds32-protos.h (nds32_isr_function_critical_p): New.
6863 * config/nds32/nds32.c (nds32_attribute_table): Add critical and
6865 * config/nds32/nds32.h (nds32_isr_nested_type): Add NDS32_CRITICAL.
6866 (nds32_isr_info): New field security_level.
6867 (TARGET_ISR_VECTOR_SIZE_4_BYTE): New macro.
6868 * config/nds32/nds32.md (return_internal): Consider critical attribute.
6869 * config/nds32/nds32.opt (misr-secure): New option.
6870 * config/nds32/nds32_init.inc: New file.
6871 * config/nds32/nds32_isr.h: New file.
6873 2018-08-11 John David Anglin <danglin@gcc.gnu.org>
6875 * config/pa/pa.md (UNSPEC_MEMORY_BARRIER): New unspec enum.
6876 Update comment for atomic instructions.
6877 (atomic_storeqi, atomic_storehi, atomic_storesi, atomic_storesf,
6878 atomic_loaddf, atomic_loaddf_1, atomic_storedf, atomic_storedf_1):
6880 (atomic_loaddi): Revise fence expansion to only emit fence prior to
6881 load for __ATOMIC_SEQ_CST model.
6882 (atomic_loaddi_1): Remove float register target.
6883 (atomic_storedi): Handle CONST_INT values.
6884 (atomic_storedi_1): Remove float register source. Add special case
6886 (memory_barrier): New expander and insn.
6888 2018-08-11 Jakub Jelinek <jakub@redhat.com>
6890 PR tree-optimization/86835
6891 * tree-ssa-math-opts.c (insert_reciprocals): Even when inserting
6892 new_stmt after def_gsi, make sure to insert new_square_stmt after
6893 that stmt, not 2 stmts before it.
6895 2018-08-10 Alexander Monakov <amonakov@ispras.ru>
6898 * config/i386/i386.md (<s>mul<mode>3_highpart): Use DWIH mode iterator
6901 2018-08-10 Martin Liska <mliska@suse.cz>
6904 * builtin-types.def (BT_FN_LONG_LONG_LONG_DOUBLE): Add new
6906 * builtins.c (expand_builtin_expect_with_probability):
6908 (expand_builtin_expect_with_probability): New function.
6909 (build_builtin_expect_predicate): Add new argumnet probability
6910 for BUILT_IN_EXPECT_WITH_PROBABILITY.
6911 (fold_builtin_expect):
6914 * builtins.def (BUILT_IN_EXPECT_WITH_PROBABILITY):
6915 * builtins.h (fold_builtin_expect): Set new argument.
6916 * doc/extend.texi: Document __builtin_expect_with_probability.
6917 * doc/invoke.texi: Likewise.
6918 * gimple-fold.c (gimple_fold_call): Pass new argument.
6919 * ipa-fnsummary.c (find_foldable_builtin_expect): Handle
6920 also BUILT_IN_EXPECT_WITH_PROBABILITY.
6921 * predict.c (get_predictor_value): New function.
6922 (expr_expected_value): Add new argument probability. Assume
6923 that predictor and probability are always non-null.
6924 (expr_expected_value_1): Likewise. For __builtin_expect and
6925 __builtin_expect_with_probability set probability. Handle
6926 combination in binary expressions.
6927 (tree_predict_by_opcode): Simplify code by simply calling
6928 get_predictor_value.
6929 (pass_strip_predict_hints::execute): Add handling of
6930 BUILT_IN_EXPECT_WITH_PROBABILITY.
6931 * predict.def (PRED_BUILTIN_EXPECT_WITH_PROBABILITY): Add
6933 * tree.h (DECL_BUILT_IN_P): New function.
6935 2018-08-10 Martin Liska <mliska@suse.cz>
6937 PR tree-optimization/85799
6938 * passes.def: Add argument for pass_strip_predict_hints.
6939 * predict.c (class pass_strip_predict_hints): Add new argument
6941 (strip_predictor_early): New function.
6942 (pass_strip_predict_hints::execute): Call the function to
6944 (strip_predict_hints): New function.
6945 * predict.def: Fix comment.
6947 2018-08-10 Thomas Preud'homme <thomas.preudhomme@linaro.org>
6949 * Makefile.in: Clarify which tm.texi to copy over to assert the
6950 right to grant a GFDL license for all.
6952 2018-08-09 Jeff Law <law@redhat.com>
6954 * config/m68k/m68k.c (m68k_adjust_decorated_operand): Remove
6957 2018-08-09 Andreas Schwab <schwab@linux-m68k.org>
6959 * config/m68k/m68k-protos.h (m68k_final_prescan_insn): Remove
6962 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
6964 * tree-vect-loop.c (vectorizable_reduction): Allow inner-loop
6965 reductions for variable-length vectors.
6967 2018-08-09 David Malcolm <dmalcolm@redhat.com>
6970 * common.opt (fdiagnostics-show-line-numbers): New option.
6971 * diagnostic-show-locus.c (class layout): Add fields
6972 "m_show_line_numbers_p" and "m_linenum_width";
6973 (num_digits): New function.
6974 (test_num_digits): New function.
6975 (layout::layout): Initialize new fields. Update m_x_offset
6976 logic to handle any left margin.
6977 (layout::print_source_line): Print line number when requested.
6978 (layout::start_annotation_line): New member function.
6979 (layout::print_annotation_line): Call it.
6980 (layout::print_leading_fixits): Likewise.
6981 (layout::print_trailing_fixits): Likewise. Update calls to
6982 move_to_column for new parameter.
6983 (layout::get_x_bound_for_row): Add "add_left_margin" param and use
6984 it to potentially call start_annotation_line.
6985 (layout::show_ruler): Call start_annotation_line.
6986 (selftest::test_line_numbers_multiline_range): New selftest.
6987 (selftest::diagnostic_show_locus_c_tests): Call test_num_digits
6988 and selftest::test_line_numbers_multiline_range.
6989 * diagnostic.c (diagnostic_initialize): Initialize
6990 show_line_numbers_p.
6991 * diagnostic.h (struct diagnostic_context): Add field
6992 "show_line_numbers_p".
6993 * doc/invoke.texi (Diagnostic Message Formatting Options): Add
6994 -fno-diagnostics-show-line-numbers.
6995 * dwarf2out.c (gen_producer_string): Add
6996 OPT_fdiagnostics_show_line_numbers to the ignored options.
6997 * lto-wrapper.c (merge_and_complain): Likewise to the "pick
6998 one setting" options.
6999 (append_compiler_options): Likewise to the dropped options.
7000 (append_diag_options): Likewise to the passed-on options.
7001 * opts.c (common_handle_option): Handle the new option.
7002 * toplev.c (general_init): Set up global_dc->show_line_numbers_p.
7004 2018-08-09 Kelvin Nilsen <kelvin@gcc.gnu.org>
7006 * doc/extend.texi (PowerPC AltiVec Built-in Functions Available on
7007 ISA 2.07): Correct spelling of bcdsub to be __builtin_bcdsub. Add
7008 third argument of type "const signed char" to descriptions of
7009 __builtin_bcdadd, __builtin_bcdadd_lt, __builtin_bcdadd_eq,
7010 __builtin_bcdadd_gt, __builtin_bcdadd_ov, __builtin_bcdsub,
7011 __builtin_bcdsub_lt, __builtin_bcdsub_eq, __builtin_bcdsub_gt,
7012 __builtin_bcdsub_ov functions.
7014 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
7016 PR tree-optimization/86858
7017 * tree-vect-loop.c (vect_is_simple_reduction): Restore
7018 flow_bb_inside_loop_p calls.
7020 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
7022 PR tree-optimization/86871
7023 * tree-vect-stmts.c (vect_transform_stmt): Use gimple_get_lhs
7024 instead of gimple_assign_lhs.
7026 2018-08-09 Richard Earnshaw <rearnsha@arm.com>
7029 * config/aarch64/aarch64.md (add<mode>3_carryinC_zero): Add missing
7030 register constraint to operand 0.
7031 (add<mode>3_carryinC): Likewise.
7032 (add<mode>3_carryinV_zero, add<mode>3_carryinV): Likewise.
7034 2018-08-09 Martin Liska <mliska@suse.cz>
7037 * common.opt: Remove extra line.
7039 2018-08-09 Martin Liska <mliska@suse.cz>
7041 * params.def (PARAM_ALIGN_LOOP_ITERATIONS): Remove double dots
7042 at the end of a line, make first letter capital and end up
7043 a sentence with a dot.
7044 (PARAM_LOOP_INTERCHANGE_STRIDE_RATIO): Likewise.
7045 (PARAM_LOOP_BLOCK_TILE_SIZE): Likewise.
7046 (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Likewise.
7047 (PARAM_GRAPHITE_MAX_ARRAYS_PER_SCOP): Likewise.
7048 (PARAM_MAX_ISL_OPERATIONS): Likewise.
7049 (PARAM_GRAPHITE_ALLOW_CODEGEN_ERRORS): Likewise.
7050 (PARAM_PROFILE_FUNC_INTERNAL_ID): Likewise.
7051 (PARAM_INDIR_CALL_TOPN_PROFILE): Likewise.
7052 (PARAM_SLP_MAX_INSNS_IN_BB): Likewise.
7053 (PARAM_IPA_CP_EVAL_THRESHOLD): Likewise.
7054 (PARAM_IPA_CP_RECURSION_PENALTY): Likewise.
7055 (PARAM_IPA_CP_SINGLE_CALL_PENALTY): Likewise.
7056 (PARAM_IPA_CP_LOOP_HINT_BONUS): Likewise.
7057 (PARAM_IPA_CP_ARRAY_INDEX_HINT_BONUS): Likewise.
7058 (PARAM_TREE_REASSOC_WIDTH): Likewise.
7059 (PARAM_HSA_GEN_DEBUG_STORES): Likewise.
7060 (PARAM_MAX_SPECULATIVE_DEVIRT_MAYDEFS): Likewise.
7061 (PARAM_MAX_VRP_SWITCH_ASSERTIONS): Likewise.
7063 2018-08-09 Andreas Krebbel <krebbel@linux.ibm.com>
7066 * config/s390/s390.c (s390_option_override_internal): Reduce the
7067 stack-clash-protection-probe-interval param if it would be too big
7070 2018-08-08 Andreas Schwab <schwab@linux-m68k.org>
7073 * config/m68k/m68k.h (FINAL_PRESCAN_INSN): Don't define.
7074 * config/m68k/m68k.c (handle_move_double): Don't call
7075 m68k_final_prescan_insn.
7076 (m68k_adjust_decorated_operand): Renamed from
7077 m68k_final_prescan_insn, remove first and third operand and
7079 (print_operand): Call it.
7080 (print_operand_address): Call it.
7082 2018-08-08 Nathan Sidwell <nathan@acm.org>
7084 * diagnostic.c (diagnostic_report_current_module): Use
7085 linemap_included_from & linemap_included_from_linemap.
7087 2018-08-08 Hongbo Zhang <hongbo.zhang@linaro.org>
7089 * config/aarch64/aarch64-cores.def: Add phecda core.
7090 * config/aarch64/aarch64-tune.md: Regenerate.
7091 * doc/invoke.texi: Add phecda core.
7093 2018-08-08 Andreas Krebbel <krebbel@linux.ibm.com>
7096 * config/s390/constraints.md ("NxHD0", "NxSD0"): New constraint
7098 * config/s390/s390.md ("movti"): Add more alternatives for
7099 constant to GPR copies.
7101 2018-08-08 Andreas Krebbel <krebbel@linux.ibm.com>
7103 * config/s390/s390.c: Fix whitespace damage throughout the file.
7104 * config/s390/s390.h: Likewise.
7105 * config/s390/tpf.h: Likewise.
7107 2018-08-08 Ilya Leoshkevich <iii@linux.ibm.com>
7109 * config/s390/s390.c (s390_loadrelative_operand_p):
7110 Remove TARGET_CPU_ZARCH usages.
7111 (s390_rtx_costs): Likewise.
7112 (s390_legitimate_constant_p): Likewise.
7113 (s390_cannot_force_const_mem): Likewise.
7114 (legitimate_reload_constant_p): Likewise.
7115 (s390_preferred_reload_class): Likewise.
7116 (legitimize_pic_address): Likewise.
7117 (legitimize_tls_address): Likewise.
7118 (s390_split_branches): Removed.
7119 (s390_add_execute): Removed.
7120 (s390_dump_pool): Remove TARGET_CPU_ZARCH usages.
7121 (s390_mainpool_start): Likewise.
7122 (s390_mainpool_finish): Likewise.
7123 (s390_mainpool_cancel): Removed.
7124 (s390_chunkify_start): Remove TARGET_CPU_ZARCH usages.
7125 (s390_chunkify_cancel): Likewise.
7126 (s390_return_addr_rtx): Likewise.
7127 (s390_register_info): Remove split_branches_pending_p uages.
7128 (s390_optimize_register_info): Likewise.
7129 (s390_init_frame_layout): Remove TARGET_CPU_ZARCH and
7130 split_branches_pending_p usages.
7131 (s390_can_eliminate): Remove TARGET_CPU_ZARCH usages.
7132 (s390_load_got): Likewise.
7133 (s390_expand_split_stack_prologue): Likewise.
7134 (output_asm_nops): Likewise.
7135 (s390_function_profiler): Likewise.
7136 (s390_emit_call): Likewise.
7137 (s390_conditional_register_usage): Likewise.
7138 (s390_optimize_prologue): Likewise.
7139 (s390_reorg): Remove TARGET_CPU_ZARCH and
7140 split_branches_pending_p usages.
7141 (s390_option_override_internal): Remove TARGET_CPU_ZARCH
7143 (s390_output_indirect_thunk_function): Likewise.
7144 * config/s390/s390.h (TARGET_CPU_ZARCH): Removed.
7145 (TARGET_CPU_ZARCH_P): Removed.
7146 (struct machine_function): Remove split_branches_pending_p.
7147 * config/s390/s390.md: Remove TARGET_CPU_ZARCH usages.
7149 2018-08-08 Ilya Leoshkevich <iii@linux.ibm.com>
7151 * common/config/s390/s390-common.c (processor_flags_table):
7153 * config.gcc: Remove with_arch/with_tune support.
7154 * config/s390/2064.md: Remove cpu attribute comparisons.
7155 * config/s390/driver-native.c (s390_host_detect_local_cpu):
7157 * config/s390/linux.h (ASM_SPEC):
7158 Remove -march support.
7159 * config/s390/s390-c.c (s390_cpu_cpp_builtins_internal):
7160 Use a table to get an arch level.
7161 * config/s390/s390-opts.h (enum processor_type):
7163 * config/s390/s390.c
7164 (processor_table): Remove entries, add arch_level values.
7165 (s390_issue_rate): Remove cases.
7166 (s390_option_override): Adjust
7167 s390_option_override_internal() call.
7168 (s390_option_override_internal): Remove deprecation warning.
7169 (s390_valid_target_attribute_tree): Adjust
7170 s390_option_override_internal() call.
7171 * config/s390/s390.h (struct s390_processor):
7172 Share with s390-c.c, add arch_level field.
7173 * config/s390/s390.md:
7174 Remove occurrences in cpu attribute.
7175 * config/s390/s390.opt: Remove -march/-mtune support.
7176 * config/s390/tpf.h (ASM_SPEC): Remove -march support.
7177 * doc/invoke.texi: Remove deprecation warning.
7179 2018-08-08 Luis Machado <luis.machado@linaro.org>
7181 * config/aarch64/aarch64.c (qdf24xx_vector_cost): New static
7183 (qdf24xx_tunings): Set vector cost structure to
7184 qdf24xx_vector_cost.
7186 * config/aarch64/aarch64.c (qdf24xx_addrcost_table)
7187 <register_sextend>: Set to 3.
7189 2018-08-07 Richard Sandiford <richard.sandiford@arm.com>
7192 * config/aarch64/iterators.md (FRECP, frecp_suffix): Delete.
7193 * config/aarch64/aarch64-simd.md
7194 (aarch64_frecp<FRECP:frecp_suffix><mode>): Fold FRECPE into...
7195 (@aarch64_frecpe<mode>): ...here and the move FRECPX to...
7196 (aarch64_frecpx<mode>): ...this new pattern.
7197 * config/aarch64/aarch64-simd-builtins.def: Remove comment
7198 about aarch64_frecp<FRECP:frecp_suffix><mode>.
7200 2018-08-07 Martin Liska <mliska@suse.cz>
7203 * predict.c (expr_expected_value_1): Handle DECL_IS_MALLOC,
7204 BUILT_IN_REALLOC and DECL_IS_OPERATOR_NEW.
7205 * predict.def (PRED_MALLOC_NONNULL): New predictor.
7206 * doc/extend.texi: Document that malloc attribute adds
7209 2018-08-06 John David Anglin <danglin@gcc.gnu.org>
7212 * config/pa/pa.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7213 Define to speculation_safe_value_not_needed.
7215 2018-08-06 Jeff Law <law@redhat.com>
7217 * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Pass down
7218 the vr_values instance to cprop_into_stmt.
7219 (cprop_into_stmt): Pass vr_values instance down to cprop_operand.
7220 (cprop_operand): Also query EVRP to determine if OP is a constant.
7222 2018-08-06 Nathan Sidwell <nathan@acm.org>
7224 * diagnostic.c (diagnostic_report_current_module): Reroll
7225 included-at loop. Translate text.
7227 2018-08-06 David Malcolm <dmalcolm@redhat.com>
7229 * function-tests.c (selftest::test_expansion_to_rtl): Call
7230 free_after_compilation.
7232 2018-08-06 Alan Hayward <alan.hayward@arm.com>
7234 * config/aarch64/aarch64.md: Add clobber highs to tls_desc.
7236 2018-08-06 Andreas Krebbel <krebbel@linux.ibm.com>
7238 * config/s390/s390.c (s390_loop_unroll_adjust): Prevent small
7239 loops with memory block operations from getting unrolled.
7241 2018-08-06 Ulrich Weigand <uweigand@de.ibm.com>
7244 * config/spu/spu.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7245 Define to speculation_safe_value_not_needed.
7247 2018-08-06 Jeff Law <law@redhat.com>
7249 * reload1.c (forget_old_reloads_1): Adjust CLOBBER_HIGH
7252 2018-08-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
7255 * gcc/tree.c (build_common_tree_nodes): Initialize integer_types array
7256 with all enabled __intN types.
7258 * gcc/testsuite/gcc.target/msp430/pr86662.c: New test.
7260 2018-08-06 Alan Hayward <alan.hayward@arm.com>
7262 * alias.c (record_set): Check for clobber high.
7263 * cfgexpand.c (expand_gimple_stmt): Likewise.
7264 * combine-stack-adj.c (single_set_for_csa): Likewise.
7265 * combine.c (find_single_use_1): Likewise.
7266 (set_nonzero_bits_and_sign_copies): Likewise.
7267 (get_combine_src_dest): Likewise.
7268 (is_parallel_of_n_reg_sets): Likewise.
7269 (try_combine): Likewise.
7270 (record_dead_and_set_regs_1): Likewise.
7271 (reg_dead_at_p_1): Likewise.
7272 (reg_dead_at_p): Likewise.
7273 * dce.c (deletable_insn_p): Likewise.
7274 (mark_nonreg_stores_1): Likewise.
7275 (mark_nonreg_stores_2): Likewise.
7276 * df-scan.c (df_find_hard_reg_defs): Likewise.
7277 (df_uses_record): Likewise.
7278 (df_get_call_refs): Likewise.
7279 * dwarf2out.c (mem_loc_descriptor): Likewise.
7280 * haifa-sched.c (haifa_classify_rtx): Likewise.
7281 * ira-build.c (create_insn_allocnos): Likewise.
7282 * ira-costs.c (scan_one_insn): Likewise.
7283 * ira.c (equiv_init_movable_p): Likewise.
7284 (rtx_moveable_p): Likewise.
7285 (interesting_dest_for_shprep): Likewise.
7286 * jump.c (mark_jump_label_1): Likewise.
7287 * postreload-gcse.c (record_opr_changes): Likewise.
7288 * postreload.c (reload_cse_simplify): Likewise.
7289 (struct reg_use): Add source expr.
7290 (reload_combine): Check for clobber high.
7291 (reload_combine_note_use): Likewise.
7292 (reload_cse_move2add): Likewise.
7293 (move2add_note_store): Likewise.
7294 * print-rtl.c (print_pattern): Likewise.
7295 * recog.c (decode_asm_operands): Likewise.
7296 (store_data_bypass_p): Likewise.
7297 (if_test_bypass_p): Likewise.
7298 * regcprop.c (kill_clobbered_value): Likewise.
7299 (kill_set_value): Likewise.
7300 * reginfo.c (reg_scan_mark_refs): Likewise.
7301 * reload1.c (maybe_fix_stack_asms): Likewise.
7302 (eliminate_regs_1): Likewise.
7303 (elimination_effects): Likewise.
7304 (mark_not_eliminable): Likewise.
7305 (scan_paradoxical_subregs): Likewise.
7306 (forget_old_reloads_1): Likewise.
7307 * reorg.c (find_end_label): Likewise.
7308 (try_merge_delay_insns): Likewise.
7309 (redundant_insn): Likewise.
7310 (own_thread_p): Likewise.
7311 (fill_simple_delay_slots): Likewise.
7312 (fill_slots_from_thread): Likewise.
7313 (dbr_schedule): Likewise.
7314 * resource.c (update_live_status): Likewise.
7315 (mark_referenced_resources): Likewise.
7316 (mark_set_resources): Likewise.
7317 * rtl.c (copy_rtx): Likewise.
7318 * rtlanal.c (reg_referenced_p): Likewise.
7319 (single_set_2): Likewise.
7320 (noop_move_p): Likewise.
7321 (note_stores): Likewise.
7322 * sched-deps.c (sched_analyze_reg): Likewise.
7323 (sched_analyze_insn): Likewise.
7325 2018-08-06 Alan Hayward <alan.hayward@arm.com>
7327 * cse.c (invalidate_reg): New function extracted from...
7328 (invalidate): ...here.
7329 (canonicalize_insn): Check for clobber high.
7330 (invalidate_from_clobbers): invalidate clobber highs.
7331 (invalidate_from_sets_and_clobbers): Likewise.
7332 (count_reg_usage): Check for clobber high.
7333 (insn_live_p): Likewise.
7334 * cselib.c (cselib_expand_value_rtx_1):Likewise.
7335 (cselib_invalidate_regno): Check for clobber in setter.
7336 (cselib_invalidate_rtx): Pass through setter.
7337 (cselib_invalidate_rtx_note_stores):
7338 (cselib_process_insn): Check for clobber high.
7339 * cselib.h (cselib_invalidate_rtx): Add operand.
7341 2018-08-06 Alan Hayward <alan.hayward@arm.com>
7343 * lra-eliminations.c (lra_eliminate_regs_1): Check for clobber high.
7344 (mark_not_eliminable): Likewise.
7345 * lra-int.h (struct lra_insn_reg): Add clobber high marker.
7346 * lra-lives.c (process_bb_lives): Check for clobber high.
7347 * lra.c (new_insn_reg): Remember clobber highs.
7348 (collect_non_operand_hard_regs): Check for clobber high.
7349 (lra_set_insn_recog_data): Likewise.
7350 (add_regs_to_insn_regno_info): Likewise.
7351 (lra_update_insn_regno_info): Likewise.
7353 2018-08-06 Alan Hayward <alan.hayward@arm.com>
7355 * rtl.h (reg_is_clobbered_by_clobber_high): Add declarations.
7356 * rtlanal.c (reg_is_clobbered_by_clobber_high): Add function.
7358 2018-08-06 Alan Hayward <alan.hayward@arm.com>
7360 * emit-rtl.c (verify_rtx_sharing): Check for CLOBBER_HIGH.
7361 (copy_insn_1): Likewise.
7362 (gen_hard_reg_clobber_high): New gen function.
7363 * genconfig.c (walk_insn_part): Check for CLOBBER_HIGH.
7364 * genemit.c (gen_exp): Likewise.
7365 (gen_emit_seq): Pass through info.
7366 (gen_insn): Check for CLOBBER_HIGH.
7367 (gen_expand): Pass through info.
7368 (gen_split): Likewise.
7369 (output_add_clobbers): Likewise.
7370 * genrecog.c (validate_pattern): Check for CLOBBER_HIGH.
7371 (remove_clobbers): Likewise.
7372 * rtl.h (gen_hard_reg_clobber_high): New declaration.
7374 2018-08-06 Alan Hayward <alan.hayward@arm.com>
7376 * doc/rtl.texi (clobber_high): Add.
7377 (parallel): Add in clobber high
7378 * rtl.c (rtl_check_failed_code3): Add function.
7379 * rtl.def (CLOBBER_HIGH): Add expression.
7380 * rtl.h (RTL_CHECKC3): Add macro.
7381 (rtl_check_failed_code3): Add declaration.
7382 (XC3EXP): Add macro.
7384 2018-08-05 H.J. Lu <hongjiu.lu@intel.com>
7387 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Set
7388 cfun->machine->max_used_stack_alignment if needed.
7390 2018-08-04 Martin Sebor <msebor@redhat.com>
7392 PR tree-optimization/86571
7393 * gimple-ssa-sprintf.c (format_floating): Extend upper bound of
7396 2018-08-03 Sandra Loosemore <sandra@codesourcery.com>
7399 * config/nios2/nios2.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7402 2018-08-03 Jeff Law <law@redhat.com>
7405 * config/mn10300/mn10300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7406 Define to speculation_safe_value_not_needed.
7408 2018-08-03 David Malcolm <dmalcolm@redhat.com>
7410 * doc/gcov.texi (-x): Remove duplicate "to".
7411 * doc/invoke.texi (-Wnoexcept-type): Remove duplicate "calls".
7412 (-Wif-not-aligned): Remove duplicate "is".
7413 (-flto): Remove duplicate "the".
7414 (MicroBlaze Options): In examples of "-mcpu=cpu-type", remove
7415 duplicate "v5.00.b".
7416 (MSP430 Options): Remove duplicate "and" from the description
7417 of "-mgprel-sec=regexp".
7418 (x86 Options): Remove duplicate copies of "vmldLog102" and
7419 vmlsLog104 from description of "-mveclibabi=type".
7421 2018-08-03 Richard Sandiford <richard.sandiford@arm.com>
7423 * internal-fn.h (first_commutative_argument): Declare.
7424 * internal-fn.c (first_commutative_argument): New function.
7425 * tree-vect-slp.c (vect_get_and_check_slp_defs): Remove extra
7426 restrictions for pattern statements. Use first_commutative_argument
7427 to look for commutative operands in calls to internal functions.
7429 2018-08-03 Aldy Hernandez <aldyh@redhat.com>
7431 * Makefile.in (wide-int-range.o): New.
7432 * tree-vrp.c: Move all the wide_int_* functions to...
7433 * wide-int-range.cc: ...here.
7434 * tree-vrp.h: Move all the wide_int_* prototypes to...
7435 * wide-int-range.h: ...here.
7437 2018-08-03 Tom de Vries <tdevries@suse.de>
7439 * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): Return
7441 * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Remove define.
7442 * except.c (output_function_exception_table): Do early exit if
7443 targetm_common.except_unwind_info (&global_options) == UI_NONE.
7445 2018-08-03 Martin Liska <mliska@suse.cz>
7447 * predict.c (dump_prediction): Change to 2 digits
7450 2018-08-03 Siddhesh Poyarekar <siddhesh@sourceware.org>
7452 * config/aarch64/falkor.md (falkor_am_1_vxvy_vxvy): Move
7454 (falkor_am_1_gtov_gtov): ... a new insn reservation.
7456 2018-07-19 Ilya Leoshkevich <iii@linux.ibm.com>
7458 * config/nds32/nds32.c (nds32_hard_regno_mode_ok): Replace > with >=.
7459 * df-problems.c (df_remove_dead_eq_notes): Replace > with >=.
7460 * dwarf2out.c (mem_loc_descriptor): Replace > with >=.
7461 * lra-constraints.c (spill_hard_reg_in_range): Replace <= with <.
7462 * lra-remat.c (call_used_input_regno_present_p): Replace <= with <.
7464 2018-08-02 David Malcolm <dmalcolm@redhat.com>
7466 * diagnostic-show-locus.c (diagnostic_show_locus): Use
7467 pp_take_prefix when saving the existing prefix.
7468 * diagnostic.c (diagnostic_append_note): Likewise.
7469 * langhooks.c (lhd_print_error_function): Likewise.
7470 * pretty-print.c (pp_set_prefix): Drop the "const" from "prefix"
7471 param's type. Free the existing prefix.
7472 (pp_take_prefix): New function.
7473 (pretty_printer::pretty_printer): Drop the prefix parameter.
7474 Rename the length parameter to match the comment.
7475 (pretty_printer::~pretty_printer): Free the prefix.
7476 * pretty-print.h (pretty_printer::pretty_printer): Drop the prefix
7478 (struct pretty_printer): Drop the "const" from "prefix" field's
7479 type and clarify memory management.
7480 (pp_set_prefix): Drop the "const" from the 2nd param.
7481 (pp_take_prefix): New decl.
7483 2018-08-02 Aaron Sawdey <acsawdey@linux.ibm.com>
7485 * config/rs6000/rs6000-string.c (select_block_compare_mode): Move test
7486 for word_mode_ok here instead of passing as argument.
7487 (expand_block_compare): Change select_block_compare_mode() call.
7488 (expand_strncmp_gpr_sequence): New function.
7489 (expand_strn_compare): Make use of expand_strncmp_gpr_sequence.
7491 2018-08-02 Jeff Law <law@redhat.com>
7494 * config/m68k/m68k.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7495 Define to speculation_safe_value_not_needed.
7498 * config/h8300/h8300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7499 Define to speculation_safe_value_not_needed.
7501 2018-08-02 Tom de Vries <tdevries@suse.de>
7504 * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): New
7505 function. Return UI_TARGET unconditionally.
7506 (TARGET_EXCEPT_UNWIND_INFO): Redefine to nvptx_except_unwind_info.
7507 * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Emit commented out '.byte'.
7509 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
7511 * genemit.c (print_overload_test): Fix typo.
7513 2018-08-02 Richard Biener <rguenther@suse.de>
7515 PR tree-optimization/86816
7516 * tree-ssa-tail-merge.c (tail_merge_valueize): New function
7517 which checks for value availability before querying it.
7518 (gvn_uses_equal): Use it.
7519 (same_succ_hash): Likewise.
7520 (gimple_equal_p): Likewise.
7522 2018-08-02 Nick Clifton <nickc@redhat.com>
7525 * config/stormy16/stormy16.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7526 Define to speculation_safe_value_not_needed.
7529 * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7530 Define to speculation_safe_value_not_needed.
7533 * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7534 Define to speculation_safe_value_not_needed.
7537 * config/rx/rx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7538 Define to speculation_safe_value_not_needed.
7541 * config/msp430/msp430.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7542 Define to speculation_safe_value_not_needed.
7545 * config/mcore/mcore.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7546 Define to speculation_safe_value_not_needed.
7549 * config/m32r/m32r.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7550 Define to speculation_safe_value_not_needed.
7553 * config/iq2000/iq2000.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7554 Define to speculation_safe_value_not_needed.
7557 * config/frv/frv.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
7558 speculation_safe_value_not_needed.
7561 * config/fr30/fr30.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define
7562 to speculation_safe_value_not_needed.
7564 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
7566 * doc/md.texi: Expand the documentation of instruction names
7567 to mention port-local uses. Document '@' in pattern names.
7568 * read-md.h (overloaded_instance, overloaded_name): New structs.
7570 (md_reader::handle_overloaded_name): New member function.
7571 (md_reader::get_overloads): Likewise.
7572 (md_reader::m_first_overload): New member variable.
7573 (md_reader::m_next_overload_ptr): Likewise.
7574 (md_reader::m_overloads_htab): Likewise.
7575 * read-md.c (md_reader::md_reader): Initialize m_first_overload,
7576 m_next_overload_ptr and m_overloads_htab.
7577 * read-rtl.c (iterator_group): Add "type" and "get_c_token" fields.
7578 (get_mode_token, get_code_token, get_int_token): New functions.
7579 (map_attr_string): Add an optional argument that passes back
7580 the associated iterator.
7581 (overloaded_name_hash, overloaded_name_eq_p, named_rtx_p):
7582 (md_reader::handle_overloaded_name, add_overload_instance): New
7584 (apply_iterators): Handle '@' names. Report an error if '@'
7585 is used without iterators.
7586 (initialize_iterators): Initialize the new iterator_group fields.
7587 * genopinit.c (handle_overloaded_code_for)
7588 (handle_overloaded_gen): New functions.
7589 (main): Use them to print declarations of maybe_code_for_* and
7590 maybe_gen_* functions, and inline definitions of code_for_* and gen_*.
7591 * genemit.c (print_overload_arguments, print_overload_test)
7592 (handle_overloaded_code_for, handle_overloaded_gen): New functions.
7593 (main): Use it to print definitions of maybe_code_for_* and
7594 maybe_gen_* functions.
7595 * config/aarch64/aarch64.c (aarch64_split_128bit_move): Use
7596 gen_aarch64_mov{low,high}_di and gen_aarch64_movdi_{low,high}
7597 instead of explicit mode checks.
7598 (aarch64_split_simd_combine): Likewise gen_aarch64_simd_combine.
7599 (aarch64_split_simd_move): Likewise gen_aarch64_split_simd_mov.
7600 (aarch64_emit_load_exclusive): Likewise gen_aarch64_load_exclusive.
7601 (aarch64_emit_store_exclusive): Likewise gen_aarch64_store_exclusive.
7602 (aarch64_expand_compare_and_swap): Likewise
7603 gen_aarch64_compare_and_swap and gen_aarch64_compare_and_swap_lse
7604 (aarch64_gen_atomic_cas): Likewise gen_aarch64_atomic_cas.
7605 (aarch64_emit_atomic_swap): Likewise gen_aarch64_atomic_swp.
7606 (aarch64_constant_pool_reload_icode): Delete.
7607 (aarch64_secondary_reload): Use code_for_aarch64_reload_movcp
7608 instead of aarch64_constant_pool_reload_icode. Use
7609 code_for_aarch64_reload_mov instead of explicit mode checks.
7610 (rsqrte_type, get_rsqrte_type, rsqrts_type, get_rsqrts_type): Delete.
7611 (aarch64_emit_approx_sqrt): Use gen_aarch64_rsqrte instead of
7612 get_rsqrte_type and gen_aarch64_rsqrts instead of gen_rqrts_type.
7613 (recpe_type, get_recpe_type, recps_type, get_recps_type): Delete.
7614 (aarch64_emit_approx_div): Use gen_aarch64_frecpe instead of
7615 get_recpe_type and gen_aarch64_frecps instead of get_recps_type.
7616 (aarch64_atomic_load_op_code): Delete.
7617 (aarch64_emit_atomic_load_op): Likewise.
7618 (aarch64_gen_atomic_ldop): Use UNSPECV_ATOMIC_* instead of
7619 aarch64_atomic_load_op_code. Use gen_aarch64_atomic_load
7620 instead of aarch64_emit_atomic_load_op.
7621 * config/aarch64/aarch64.md (aarch64_reload_movcp<GPF_TF:mode><P:mode>)
7622 (aarch64_reload_movcp<VALL:mode><P:mode>, aarch64_reload_mov<mode>)
7623 (aarch64_movdi_<mode>low, aarch64_movdi_<mode>high)
7624 (aarch64_mov<mode>high_di, aarch64_mov<mode>low_di): Add a '@'
7625 character before the pattern name.
7626 * config/aarch64/aarch64-simd.md (aarch64_split_simd_mov<mode>)
7627 (aarch64_rsqrte<mode>, aarch64_rsqrts<mode>)
7628 (aarch64_simd_combine<mode>, aarch64_frecpe<mode>)
7629 (aarch64_frecps<mode>): Likewise.
7630 * config/aarch64/atomics.md (atomic_compare_and_swap<mode>)
7631 (aarch64_compare_and_swap<mode>, aarch64_compare_and_swap<mode>_lse)
7632 (aarch64_load_exclusive<mode>, aarch64_store_exclusive<mode>)
7633 (aarch64_atomic_swp<mode>, aarch64_atomic_cas<mode>)
7634 (aarch64_atomic_load<atomic_ldop><mode>): Likewise.
7636 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
7638 * config/aarch64/aarch64.c (aarch64_float_const_representable_p):
7639 Allow HFmode constants if TARGET_FP_F16INST.
7641 2018-08-02 Jackson Woodruff <jackson.woodruff@arm.com>
7644 * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp):
7645 No longer check last store for clobber of address register.
7647 2018-08-02 Martin Liska <mliska@suse.cz>
7649 PR gcov-profile/86817
7650 * gcov.c (process_all_functions): New function.
7652 (process_file): Move functions processing to
7653 process_all_functions.
7655 2018-08-02 David Malcolm <dmalcolm@redhat.com>
7657 * dumpfile.c (dump_user_location_t::dump_user_location_t): Add
7658 "const" to the "gimple *" and "rtx_insn *" parameters.
7659 * dumpfile.h (dump_user_location_t::dump_user_location_t):
7661 (dump_location_t::dump_location_t): Likewise.
7663 2018-08-01 Martin Sebor <msebor@redhat.com>
7665 PR tree-optimization/86650
7666 * gimple-pretty-print.c (percent_G_format): Accept a "gimple *"
7667 rather than a "gcall *". Directly pass the data of interest
7668 to percent_K_format, rather than building a temporary CALL_EXPR
7670 * gimple-fold.c (gimple_fold_builtin_strncpy): Adjust.
7671 (gimple_fold_builtin_strncat): Adjust.
7672 * gimple-ssa-warn-restrict.h (check_bounds_or_overlap): Replace
7673 gcall* argument with gimple*.
7674 * gimple-ssa-warn-restrict.c (check_call): Same.
7675 (wrestrict_dom_walker::before_dom_children): Same.
7676 (builtin_access::builtin_access): Same.
7677 (check_bounds_or_overlap): Same
7678 (maybe_diag_overlap): Same.
7679 (maybe_diag_offset_bounds): Same.
7680 * tree-diagnostic.c (default_tree_printer): Move usage of
7681 EXPR_LOCATION (t) and TREE_BLOCK (t) from within percent_K_format
7683 * tree-pretty-print.c (percent_K_format): Add argument.
7684 * tree-pretty-print.h: Add argument.
7685 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Adjust.
7686 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Adjust.
7687 (maybe_diag_stxncpy_trunc): Same.
7688 (handle_builtin_stxncpy): Same.
7689 (handle_builtin_strcat): Same.
7691 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
7693 * match.pd: Optimise pointer range checks.
7695 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
7697 PR tree-optimization/86758
7698 * tree-vect-stmts.c (vectorizable_simd_clone_call): Don't try
7699 to remove pattern statements.
7701 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
7703 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Use the
7704 result of dfs_enumerate_from when constructing stmt_vec_infos,
7705 instead of additionally calling get_loop_body.
7707 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
7709 * tree-vectorizer.h (vect_create_data_ref_ptr): Remove inv_p
7711 * tree-vect-data-refs.c (vect_create_data_ref_ptr): Likewise.
7712 When creating an iv, assert that the step is not known to be zero.
7713 (vect_setup_realignment): Update call accordingly.
7714 * tree-vect-stmts.c (vectorizable_store): Likewise.
7715 (vectorizable_load): Likewise. Handle VMAT_INVARIANT separately.
7717 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
7719 * tree-vectorizer.h (vect_stmt_to_vectorize): New function.
7720 * tree-vect-loop.c (vect_update_vf_for_slp): Use it.
7721 (vectorizable_reduction): Likewise.
7722 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
7723 (vect_detect_hybrid_slp_stmts): Likewise.
7724 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
7726 2018-08-01 Aldy Hernandez <aldyh@redhat.com>
7728 * tree-vrp (zero_nonzero_bits_from_bounds): Rename to...
7729 (wide_int_set_zero_nonzero_bits): ...this.
7730 (zero_nonzero_bits_from_vr): Rename to...
7731 (vrp_set_zero_nonzero_bits): ...this.
7732 (extract_range_from_multiplicative_op_1): Abstract wide int
7734 (wide_int_range_multiplicative_op): ...here.
7735 (extract_range_from_binary_expr_1): Extract wide int binary
7736 operations into their own functions.
7737 (wide_int_range_lshift): New.
7738 (wide_int_range_can_optimize_bit_op): New.
7739 (wide_int_range_shift_undefined_p): New.
7740 (wide_int_range_bit_xor): New.
7741 (wide_int_range_bit_ior): New.
7742 (wide_int_range_bit_and): New.
7743 (wide_int_range_trunc_mod): New.
7744 (extract_range_into_wide_ints): New.
7745 (vrp_shift_undefined_p): New.
7746 (extract_range_from_multiplicative_op): New.
7747 (vrp_can_optimize_bit_op): New.
7748 * tree-vrp.h (value_range::dump): New.
7749 (wide_int_range_multiplicative_op): New.
7750 (wide_int_range_lshift):New.
7751 (wide_int_range_shift_undefined_p): New.
7752 (wide_int_range_bit_xor): New.
7753 (wide_int_range_bit_ior): New.
7754 (wide_int_range_bit_and): New.
7755 (wide_int_range_trunc_mod): New.
7756 (zero_nonzero_bits_from_bounds): Rename to...
7757 (wide_int_set_zero_nonzero_bits): ...this.
7758 (zero_nonzero_bits_from_vr): Rename to...
7759 (vrp_set_zero_nonzero_bits): ...this.
7760 (range_easy_mask_min_max): Rename to...
7761 (wide_int_range_can_optimize_bit_op): this.
7762 * vr-values.c (simplify_bit_ops_using_ranges): Rename
7763 zero_nonzero_bits_from_vr into vrp_set_zero_nonzero_bits.
7765 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
7767 * tree-vectorizer.h (vect_orig_stmt): New function.
7768 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Use it.
7769 * tree-vect-loop.c (vect_model_reduction_cost): Likewise.
7770 (vect_create_epilog_for_reduction): Likewise.
7771 (vectorizable_live_operation): Likewise.
7772 * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
7773 (vect_detect_hybrid_slp_stmts, vect_schedule_slp): Likewise.
7774 * tree-vect-stmts.c (vectorizable_call): Likewise.
7775 (vectorizable_simd_clone_call, vect_remove_stores): Likewise.
7777 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
7779 * tree-vectorizer.h (vect_transform_stmt): Remove grouped_store
7781 * tree-vect-stmts.c (vect_transform_stmt): Likewise.
7782 * tree-vect-loop.c (vect_transform_loop_stmt): Update call accordingly.
7783 (vect_transform_loop): Likewise.
7784 * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
7786 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
7788 * tree-vectorizer.h (vect_schedule_slp): Return void.
7789 * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
7790 (vect_schedule_slp): Likewise.
7792 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
7794 * tree-vect-loop.c (vect_transform_loop_stmt): Remove slp_scheduled
7796 (vect_transform_loop): Update calls accordingly. Schedule SLP
7797 instances before the main loop, if any exist.
7799 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
7801 PR tree-optimization/86749
7802 * tree-vect-patterns.c (vect_determine_min_output_precision_1):
7803 If the lhs is used in a COND_EXPR, check that it is being used
7804 as the "then" or "else" value.
7806 2018-08-01 Tom de Vries <tdevries@suse.de>
7809 * config/nvptx/nvptx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
7810 speculation_safe_value_not_needed.
7812 2018-08-01 Richard Biener <rguenther@suse.de>
7814 * tree-ssa-sccvn.c (visit_phi): Compare invariant addresses
7817 2018-08-01 Martin Liska <mliska@suse.cz>
7819 * value-prof.c (gimple_divmod_fixed_value_transform): Unify
7820 format how successful transformation is dumped.
7821 (gimple_mod_pow2_value_transform): Likewise.
7822 (gimple_mod_subtract_transform): Likewise.
7823 (gimple_stringops_transform): Likewise.
7825 2018-08-01 Martin Liska <mliska@suse.cz>
7828 * value-prof.c (interesting_stringop_to_profile_p):
7829 Simplify the code and add BUILT_IN_MEMMOVE.
7830 (gimple_stringops_transform): Likewise.
7832 2018-08-01 Sam Tebbs <sam.tebbs@arm.com>
7834 * config/aarch64/aarch64-simd.md
7835 (*aarch64_get_lane_zero_extendsi<mode>): Rename to...
7836 (*aarch64_get_lane_zero_extend<GPI:mode><VDQQH:mode>): ... This and
7837 use GPI iterator instead of SI mode.
7839 2018-08-01 Richard Earnshaw <rearnsha@arm.com>
7841 * config/rs6000/rs6000.md (speculation_barrier): Renamed from
7842 rs6000_speculation_barrier.
7843 * config/rs6000/rs6000.c (rs6000_expand_builtin): Adjust for
7844 new barrier pattern name.
7846 2018-08-01 Richard Earnshaw <rearnsha@arm.com>
7848 * config/i386/i386.md (unspecv): Add UNSPECV_SPECULATION_BARRIER.
7849 (speculation_barrier): New insn.
7851 2018-08-01 Richard Biener <rguenther@suse.de>
7854 * graphite.h: Include isl/id.h and isl/space.h to allow build
7857 2018-08-01 Jan Willem Jagersma <jwjagersma@gmail.com>
7860 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
7861 mode for COFF targets.
7862 * defaults.h (TARGET_COFF): Define.
7863 * config/i386/djgpp.h (TARGET_ASM_LTO_START, TARGET_ASM_LTO_END,
7864 TARGET_COFF): Define.
7865 (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): Declare.
7866 * config/i386/djgpp.c (saved_debug_info_level): New static variable.
7867 (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): New functions.
7869 2018-07-31 Alexandre Oliva <oliva@adacore.com>
7871 * gimple-streamer-in.c (input_bb): Restore BB discriminator.
7872 * gimple-streamer-out.c (output_bb): Save it.
7873 * lto-streamer-in.c (input_struct_function_base): Restore
7874 instance discriminator if available. Create map on demand.
7875 * lto-streamer-out.c (output_struct_function_base): Save it if
7877 * final.c (decl_to_instance_map): Document LTO strategy.
7879 2018-07-31 Alexandre Oliva <oliva@adacore.com>
7880 Olivier Hainque <hainque@adacore.com>
7882 * debug.h (decl_to_instance_map_t): New type.
7883 (decl_to_instance_map): Declare.
7884 (maybe_create_decl_to_instance_map): New inline function.
7885 * final.c (bb_discriminator, last_bb_discriminator): New statics,
7886 to track basic block discriminators.
7887 (final_start_function_1): Initialize them.
7888 (final_scan_insn_1): On NOTE_INSN_BASIC_BLOCK, track
7890 (decl_to_instance_map): New variable.
7891 (map_decl_to_instance, maybe_set_discriminator): New functions.
7892 (notice_source_line): Set discriminator.
7894 2018-07-31 Ian Lance Taylor <iant@golang.org>
7896 * targhooks.c (default_have_speculation_safe_value): Add
7899 2018-07-31 David Malcolm <dmalcolm@redhat.com>
7901 * dump-context.h: Include "pretty-print.h".
7902 (dump_context::refresh_dumps_are_enabled): New decl.
7903 (dump_context::emit_item): New decl.
7904 (class dump_context): Add fields "m_test_pp" and
7906 (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
7907 (temp_dump_context::get_dumped_text): New decl.
7908 (class temp_dump_context): Add field "m_pp".
7909 * dumpfile.c (refresh_dumps_are_enabled): Convert to...
7910 (dump_context::refresh_dumps_are_enabled): ...and add a test for
7912 (set_dump_file): Update for above change.
7913 (set_alt_dump_file): Likewise.
7914 (dump_loc): New overload, taking a pretty_printer *.
7915 (dump_context::dump_loc): Call end_any_optinfo. Dump the location
7916 to any test pretty-printer.
7917 (make_item_for_dump_gimple_stmt): New function, adapted from
7918 optinfo::add_gimple_stmt.
7919 (dump_context::dump_gimple_stmt): Call it, and use the result,
7920 eliminating the direct usage of dump_file and alt_dump_file in
7921 favor of indirectly using them via emit_item.
7922 (make_item_for_dump_gimple_expr): New function, adapted from
7923 optinfo::add_gimple_expr.
7924 (dump_context::dump_gimple_expr): Call it, and use the result,
7925 eliminating the direct usage of dump_file and alt_dump_file in
7926 favor of indirectly using them via emit_item.
7927 (make_item_for_dump_generic_expr): New function, adapted from
7929 (dump_context::dump_generic_expr): Call it, and use the result,
7930 eliminating the direct usage of dump_file and alt_dump_file in
7931 favor of indirectly using them via emit_item.
7932 (make_item_for_dump_printf_va): New function, adapted from
7933 optinfo::add_printf_va.
7934 (make_item_for_dump_printf): New function.
7935 (dump_context::dump_printf_va): Call make_item_for_dump_printf_va,
7936 and use the result, eliminating the direct usage of dump_file and
7937 alt_dump_file in favor of indirectly using them via emit_item.
7938 (make_item_for_dump_dec): New function.
7939 (dump_context::dump_dec): Call it, and use the result,
7940 eliminating the direct usage of dump_file and alt_dump_file in
7941 favor of indirectly using them via emit_item.
7942 (make_item_for_dump_symtab_node): New function, adapted from
7943 optinfo::add_symtab_node.
7944 (dump_context::dump_symtab_node): Call it, and use the result,
7945 eliminating the direct usage of dump_file and alt_dump_file in
7946 favor of indirectly using them via emit_item.
7947 (dump_context::begin_scope): Reimplement, avoiding direct usage
7948 of dump_file and alt_dump_file in favor of indirectly using them
7950 (dump_context::emit_item): New member function.
7951 (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
7952 Set up test pretty-printer on the underlying context. Call
7953 refresh_dumps_are_enabled.
7954 (temp_dump_context::~temp_dump_context): Call
7955 refresh_dumps_are_enabled.
7956 (temp_dump_context::get_dumped_text): New member function.
7957 (selftest::verify_dumped_text): New function.
7958 (ASSERT_DUMPED_TEXT_EQ): New macro.
7959 (selftest::test_capture_of_dump_calls): Run all tests twice, with
7960 and then without optinfo enabled. Add uses of
7961 ASSERT_DUMPED_TEXT_EQ to all tests. Add test of nested scopes.
7962 * dumpfile.h: Update comment for the dump_* API.
7963 * optinfo-emit-json.cc
7964 (selftest::test_building_json_from_dump_calls): Update for new
7965 param for temp_dump_context ctor.
7966 * optinfo.cc (optinfo_item::optinfo_item): Remove "owned" param
7967 and "m_owned" field.
7968 (optinfo_item::~optinfo_item): Likewise.
7969 (optinfo::add_item): New member function.
7970 (optinfo::emit): Update comment.
7971 (optinfo::add_string): Delete.
7972 (optinfo::add_printf): Delete.
7973 (optinfo::add_printf_va): Delete.
7974 (optinfo::add_gimple_stmt): Delete.
7975 (optinfo::add_gimple_expr): Delete.
7976 (optinfo::add_tree): Delete.
7977 (optinfo::add_symtab_node): Delete.
7978 (optinfo::add_dec): Delete.
7979 * optinfo.h (class dump_context): New forward decl.
7980 (optinfo::add_item): New decl.
7981 (optinfo::add_string): Delete.
7982 (optinfo::add_printf): Delete.
7983 (optinfo::add_printf_va): Delete.
7984 (optinfo::add_gimple_stmt): Delete.
7985 (optinfo::add_gimple_expr): Delete.
7986 (optinfo::add_tree): Delete.
7987 (optinfo::add_symtab_node): Delete.
7988 (optinfo::add_dec): Delete.
7989 (optinfo::add_poly_int): Delete.
7990 (optinfo_item::optinfo_item): Remove "owned" param.
7991 (class optinfo_item): Remove field "m_owned".
7993 2018-07-31 Jozef Lawrynowicz <jozef.l@mittosystems.com>
7996 * gcc/cfgexpand.c (set_parm_rtl): Use the alignment of Pmode when
7997 MAX_SUPPORTED_STACK_ALIGNMENT would otherwise be exceeded by the
7998 requested variable alignment.
7999 (expand_one_ssa_partition): Likewise.
8000 (expand_one_var): Likewise.
8002 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
8004 * config/pdp11/pdp11.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
8005 to speculation_safe_value_not_needed.
8007 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
8009 * targhooks.h (speculation_safe_value_not_needed): New prototype.
8010 * targhooks.c (speculation_safe_value_not_needed): New function.
8011 * target.def (have_speculation_safe_value): Update documentation.
8012 * doc/tm.texi: Regenerated.
8014 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
8016 * config/aarch64/iterators.md (ALLI_TI): New iterator.
8017 * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>): New
8019 (despeculate_copy<ALLI:mode>_insn): New insn.
8020 (despeculate_copyti_insn): New insn.
8021 (despeculate_simple<ALLI:mode>): New insn
8022 (despeculate_simpleti): New insn.
8023 * config/aarch64/aarch64.c (aarch64_speculation_safe_value): New
8025 (TARGET_SPECULATION_SAFE_VALUE): Redefine to
8026 aarch64_speculation_safe_value.
8027 (aarch64_print_operand): Handle const0_rtx in modifier 'H'.
8029 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
8031 * config/aarch64/aarch64-speculation.cc: New file.
8032 * config/aarch64/aarch64-passes.def (pass_track_speculation): Add
8033 before pass_reorder_blocks.
8034 * config/aarch64/aarch64-protos.h (make_pass_track_speculation): Add
8036 * config/aarch64/aarch64.c (aarch64_conditional_register_usage): Fix
8037 X14 and X15 when tracking speculation.
8038 * config/aarch64/aarch64.md (register name constants): Add
8039 SPECULATION_TRACKER_REGNUM and SPECULATION_SCRATCH_REGNUM.
8040 (unspec): Add UNSPEC_SPECULATION_TRACKER.
8041 (speculation_barrier): New insn attribute.
8042 (cmp<mode>): Allow SP in comparisons.
8043 (speculation_tracker): New insn.
8044 (speculation_barrier): Add speculation_barrier attribute.
8045 * config/aarch64/t-aarch64: Add make rule for aarch64-speculation.o.
8046 * config.gcc (aarch64*-*-*): Add aarch64-speculation.o to extra_objs.
8047 * doc/invoke.texi (AArch64 Options): Document -mtrack-speculation.
8049 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
8051 * config/aarch64/aarch64.md (cb<optab><mode>1): Disable when
8052 aarch64_track_speculation is true.
8053 (tb<optab><mode>1): Likewise.
8054 * config/aarch64/aarch64.c (aarch64_split_compare_regs): Do not
8055 generate CB[N]Z when tracking speculation.
8056 (aarch64_split_compare_and_swap): Likewise.
8057 (aarch64_split_atomic_op): Likewise.
8059 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
8061 * config/aarch64/aarch64.opt (mtrack-speculation): New target option.
8063 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
8065 * config/aarch64.md (unspecv): Add UNSPECV_SPECULAION_BARRIER.
8066 (speculation_barrier): New insn.
8068 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
8070 * config/arm/unspecs.md (unspecv): Add VUNSPEC_SPECULATION_BARRIER.
8071 * config/arm/arm.md (speculation_barrier): New expand.
8072 (speculation_barrier_insn): New pattern.
8074 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
8076 * builtin-types.def (BT_FN_PTR_PTR_VAR): New function type.
8077 (BT_FN_I1_I1_VAR, BT_FN_I2_I2_VAR, BT_FN_I4_I4_VAR): Likewise.
8078 (BT_FN_I8_I8_VAR, BT_FN_I16_I16_VAR): Likewise.
8079 * builtin-attrs.def (ATTR_NOVOPS_NOTHROW_LEAF_LIST): New attribute
8081 * builtins.def (BUILT_IN_SPECULATION_SAFE_VALUE_N): New builtin.
8082 (BUILT_IN_SPECULATION_SAFE_VALUE_PTR): New internal builtin.
8083 (BUILT_IN_SPECULATION_SAFE_VALUE_1): Likewise.
8084 (BUILT_IN_SPECULATION_SAFE_VALUE_2): Likewise.
8085 (BUILT_IN_SPECULATION_SAFE_VALUE_4): Likewise.
8086 (BUILT_IN_SPECULATION_SAFE_VALUE_8): Likewise.
8087 (BUILT_IN_SPECULATION_SAFE_VALUE_16): Likewise.
8088 * builtins.c (expand_speculation_safe_value): New function.
8089 (expand_builtin): Call it.
8090 * doc/cpp.texi: Document predefine __HAVE_SPECULATION_SAFE_VALUE.
8091 * doc/extend.texi: Document __builtin_speculation_safe_value.
8092 * doc/md.texi: Document "speculation_barrier" pattern.
8093 * doc/tm.texi.in: Pull in TARGET_SPECULATION_SAFE_VALUE and
8094 TARGET_HAVE_SPECULATION_SAFE_VALUE.
8095 * doc/tm.texi: Regenerated.
8096 * target.def (have_speculation_safe_value, speculation_safe_value): New
8098 * targhooks.c (default_have_speculation_safe_value): New function.
8099 (default_speculation_safe_value): New function.
8100 * targhooks.h (default_have_speculation_safe_value): Add prototype.
8101 (default_speculation_safe_value): Add prototype.
8103 2018-07-31 David Malcolm <dmalcolm@redhat.com>
8105 * dump-context.h (dump_context::dump_loc): New decl.
8106 * dumpfile.c (dump_context::dump_loc): New member function.
8107 (dump_context::dump_gimple_stmt_loc): Reimplement using dump_loc
8108 and dump_gimple_stmt.
8109 (dump_context::dump_gimple_expr_loc): Likewise, using
8111 (dump_context::dump_generic_expr_loc): Likewise, using
8113 (dump_context::dump_printf_loc_va): Likewise, using
8115 (dump_context::begin_scope): Explicitly using the global function
8116 "dump_loc", rather than the member function.
8118 2018-07-31 Martin Sebor <msebor@redhat.com>
8120 PR tree-optimization/86741
8121 * tree-vrp.c (vrp_prop::check_mem_ref): Avoid incomplete types.
8123 2018-07-31 Andreas Krebbel <krebbel@linux.ibm.com>
8125 * config/s390/s390.c (s390_expand_setmem): Make the unrolling to
8126 depend on whether prefetch instructions will be emitted or not.
8127 Use TARGET_SETMEM_PFD for checking whether prefetch instructions
8128 will be emitted or not.
8129 * config/s390/s390.h (TARGET_SETMEM_PREFETCH_DISTANCE)
8130 (TARGET_SETMEM_PFD): New macros.
8132 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8134 * tree-vectorizer.h (stmt_vec_info): Turn back into a typedef.
8135 (NULL_STMT_VEC_INFO): Delete.
8136 (stmt_vec_info::operator*): Likewise.
8137 (stmt_vec_info::operator gimple *): Likewise.
8138 * tree-vect-loop.c (vectorizable_reduction): Use NULL instead
8139 of NULL_STMT_VEC_INFO.
8140 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
8141 (vect_reassociating_reduction_p): Likewise.
8142 * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
8143 (vectorizable_store): Likewise.
8144 * tree-vectorizer.c (vec_info::set_vinfo_for_stmt): Likewise.
8145 (vec_info::free_stmt_vec_infos): Likewise.
8147 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8149 * tree-vectorizer.h (vect_stmt_in_region_p): Delete.
8150 * tree-vectorizer.c (vect_stmt_in_region_p): Likewise.
8152 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8154 * tree-vectorizer.h (vec_info::new_vinfo_for_stmt)
8155 (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
8156 (vec_info::free_stmt_vec_info): New private member functions.
8157 (set_stmt_vec_info_vec, free_stmt_vec_infos, vinfo_for_stmt)
8158 (set_vinfo_for_stmt, new_stmt_vec_info, free_stmt_vec_info): Delete.
8159 * tree-parloops.c (gather_scalar_reductions): Remove calls to
8160 set_stmt_vec_info_vec and free_stmt_vec_infos.
8161 * tree-vect-loop.c (_loop_vec_info): Remove call to
8162 set_stmt_vec_info_vec.
8163 * tree-vect-stmts.c (new_stmt_vec_info, set_stmt_vec_info_vec)
8164 (free_stmt_vec_infos, free_stmt_vec_info): Delete in favor of...
8165 * tree-vectorizer.c (vec_info::new_stmt_vec_info)
8166 (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
8167 (vec_info::free_stmt_vec_info): ...these new functions. Remove
8168 assignments in {vec_info::,}new_stmt_vec_info that are redundant
8169 with the clearing in the xcalloc.
8170 (stmt_vec_info_vec): Delete.
8171 (vec_info::vec_info): Don't call set_stmt_vec_info_vec.
8172 (vectorize_loops): Likewise.
8173 (vec_info::~vec_info): Remove argument from call to
8174 free_stmt_vec_infos.
8175 (vec_info::add_stmt): Remove vinfo argument from call to
8178 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8180 * tree-vectorizer.h (free_stmt_vec_info): Take a stmt_vec_info
8181 rather than a gimple stmt.
8182 * tree-vect-stmts.c (free_stmt_vec_info): Likewise. Don't free
8183 information for pattern statements when passed the original
8184 statement; instead wait to be passed the pattern statement itself.
8185 Don't call set_vinfo_for_stmt here.
8186 (free_stmt_vec_infos): Update call to free_stmt_vec_info.
8187 * tree-vect-loop.c (_loop_vec_info::~loop_vec_info): Don't free
8188 stmt_vec_infos here.
8189 * tree-vect-slp.c (_bb_vec_info::~bb_vec_info): Likewise.
8190 * tree-vectorizer.c (vec_info::remove_stmt): Nullify the statement's
8191 stmt_vec_infos entry.
8193 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8195 * tree-vectorizer.h (vec_info::replace_stmt): Declare.
8196 * tree-vectorizer.c (vec_info::replace_stmt): New function.
8197 * tree-vect-slp.c (vect_remove_slp_scalar_calls): Use it.
8198 * tree-vect-stmts.c (vectorizable_call): Likewise.
8199 (vectorizable_simd_clone_call): Likewise.
8201 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8203 * tree-vectorizer.h (vec_info::remove_stmt): Declare.
8204 * tree-vectorizer.c (vec_info::remove_stmt): New function.
8205 * tree-vect-loop-manip.c (vect_set_loop_condition): Use it.
8206 * tree-vect-loop.c (vect_transform_loop): Likewise.
8207 * tree-vect-slp.c (vect_schedule_slp): Likewise.
8208 * tree-vect-stmts.c (vect_remove_stores): Likewise.
8210 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8212 * tree-vectorizer.h (vec_info::lookup_dr): New member function.
8213 (vect_dr_stmt): Delete.
8214 * tree-vectorizer.c (vec_info::lookup_dr): New function.
8215 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Use it instead
8217 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
8218 (vect_analyze_data_ref_dependence, vect_record_base_alignments)
8219 (vect_verify_datarefs_alignment, vect_peeling_supportable)
8220 (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
8221 (vect_analyze_data_refs): Likewise.
8222 (vect_slp_analyze_data_ref_dependence): Likewise. Take a vec_info
8224 (vect_find_same_alignment_drs): Likewise.
8225 (vect_slp_analyze_node_dependences): Update calls accordingly.
8226 (vect_analyze_data_refs_alignment): Likewise. Use vec_info::lookup_dr
8227 instead of DR_VECT_AUX.
8228 (vect_get_peeling_costs_all_drs): Take a loop_vec_info instead
8229 of a vector data references. Use vec_info::lookup_dr instead of
8231 (vect_peeling_hash_get_lowest_cost): Update calls accordingly.
8232 (vect_enhance_data_refs_alignment): Likewise. Use vec_info::lookup_dr
8233 instead of DR_VECT_AUX.
8235 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8237 * tree-vectorizer.h (_loop_vec_info::unaligned_dr): Change to
8239 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
8241 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
8242 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
8243 (vect_gen_prolog_loop_niters): Likewise.
8245 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8247 * tree-vectorizer.h (set_dr_misalignment, dr_misalignment)
8248 (DR_TARGET_ALIGNMENT, aligned_access_p, known_alignment_for_access_p)
8249 (vect_known_alignment_in_bytes, vect_dr_behavior)
8250 (vect_get_scalar_dr_size): Take references as dr_vec_infos
8251 instead of data_references. Update calls to other routines for
8252 which the same change has been made.
8253 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Take
8254 dr_vec_infos instead of stmt_vec_infos.
8255 (vect_analyze_data_ref_dependence): Update call accordingly.
8256 (vect_slp_analyze_data_ref_dependence)
8257 (vect_record_base_alignments): Use DR_VECT_AUX.
8258 (vect_calculate_target_alignment, vect_compute_data_ref_alignment)
8259 (vect_update_misalignment_for_peel, verify_data_ref_alignment)
8260 (vector_alignment_reachable_p, vect_get_data_access_cost)
8261 (vect_peeling_supportable, vect_analyze_group_access_1)
8262 (vect_analyze_group_access, vect_analyze_data_ref_access)
8263 (vect_vfa_segment_size, vect_vfa_access_size, vect_vfa_align)
8264 (vect_compile_time_alias, vect_small_gap_p)
8265 (vectorizable_with_step_bound_p, vect_duplicate_ssa_name_ptr_info):
8266 (vect_supportable_dr_alignment): Take references as dr_vec_infos
8267 instead of data_references. Update calls to other routines for
8268 which the same change has been made.
8269 (vect_verify_datarefs_alignment, vect_get_peeling_costs_all_drs)
8270 (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
8271 (vect_slp_analyze_and_verify_node_alignment)
8272 (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
8273 (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
8274 (vect_setup_realignment): Use dr_vec_infos. Update calls after
8276 (_vect_peel_info::dr): Replace with...
8277 (_vect_peel_info::dr_info): ...this new field.
8278 (vect_peeling_hash_get_most_frequent)
8279 (vect_peeling_hash_choose_best_peeling): Update accordingly.
8280 (vect_peeling_hash_get_lowest_cost):
8281 (vect_enhance_data_refs_alignment): Likewise. Update calls to other
8282 routines for which the same change has been made.
8283 (vect_peeling_hash_insert): Likewise. Take a dr_vec_info instead of a
8285 * tree-vect-loop-manip.c (get_misalign_in_elems)
8286 (vect_gen_prolog_loop_niters): Use dr_vec_infos. Update calls after
8288 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
8289 * tree-vect-stmts.c (vect_get_store_cost, vect_get_load_cost)
8290 (vect_truncate_gather_scatter_offset, compare_step_with_zero)
8291 (get_group_load_store_type, get_negative_load_store_type)
8292 (vect_get_data_ptr_increment, vectorizable_store)
8293 (vectorizable_load): Likewise.
8294 (ensure_base_align): Take a dr_vec_info instead of a data_reference.
8295 Update calls to other routines for which the same change has been made.
8297 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8299 * tree-vectorizer.h (vec_info::move_dr): New member function.
8300 (dataref_aux): Rename to...
8301 (dr_vec_info): ...this and add "dr" and "stmt" fields.
8302 (_stmt_vec_info::dr_aux): Update accordingly.
8303 (_stmt_vec_info::data_ref_info): Delete.
8304 (STMT_VINFO_GROUPED_ACCESS, DR_GROUP_FIRST_ELEMENT)
8305 (DR_GROUP_NEXT_ELEMENT, DR_GROUP_SIZE, DR_GROUP_STORE_COUNT)
8306 (DR_GROUP_GAP, DR_GROUP_SAME_DR_STMT, REDUC_GROUP_FIRST_ELEMENT):
8307 (REDUC_GROUP_NEXT_ELEMENT, REDUC_GROUP_SIZE): Use dr_aux.dr instead
8309 (STMT_VINFO_DATA_REF): Likewise. Turn into an lvalue.
8310 (STMT_VINFO_DR_INFO): New macro.
8311 (DR_VECT_AUX): Use STMT_VINFO_DR_INKFO and vect_dr_stmt.
8312 (set_dr_misalignment): Update after rename of dataref_aux.
8313 (vect_dr_stmt): Move earlier in file. Return dr_aux.stmt.
8314 * tree-vect-stmts.c (new_stmt_vec_info): Remove redundant
8315 initialization of STMT_VINFO_DATA_REF.
8316 * tree-vectorizer.c (vec_info::move_dr): New function.
8317 * tree-vect-patterns.c (vect_recog_bool_pattern)
8318 (vect_recog_mask_conversion_pattern)
8319 (vect_recog_gather_scatter_pattern): Use it.
8320 * tree-vect-data-refs.c (vect_analyze_data_refs): Initialize
8321 the "dr" and "stmt" fields of dr_vec_info instead of
8322 STMT_VINFO_DATA_REF.
8324 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8326 * tree-vectorizer.h (_stmt_vec_info::pattern_stmt_p): New field.
8327 (is_pattern_stmt_p): Use it.
8328 * tree-vect-patterns.c (vect_init_pattern_stmt): Set pattern_stmt_p
8329 on pattern statements.
8331 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8333 * tree-vect-patterns.c (vect_mark_pattern_stmts): Take the
8334 original stmt as a stmt_vec_info rather than a gimple stmt.
8335 (vect_pattern_recog_1): Take the statement directly as a
8336 stmt_vec_info, rather than via a gimple_stmt_iterator.
8337 Update call to vect_mark_pattern_stmts.
8338 (vect_pattern_recog): Update calls accordingly.
8340 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8342 * tree-vectorizer.h (vect_get_vec_defs_for_stmt_copy)
8343 (vect_get_vec_def_for_stmt_copy): Take a vec_info rather than
8344 a vect_def_type for the first argument.
8345 * tree-vect-stmts.c (vect_get_vec_defs_for_stmt_copy): Likewise.
8346 (vect_get_vec_def_for_stmt_copy): Likewise. Return the original
8347 operand if it isn't defined by a vectorized statement.
8348 (vect_build_gather_load_calls): Remove the mask_dt argument and
8349 update calls to vect_get_vec_def_for_stmt_copy.
8350 (vectorizable_bswap): Likewise the dt argument.
8351 (vectorizable_call): Update calls to vectorizable_bswap and
8352 vect_get_vec_def_for_stmt_copy.
8353 (vectorizable_simd_clone_call, vectorizable_assignment)
8354 (vectorizable_shift, vectorizable_operation, vectorizable_condition)
8355 (vectorizable_comparison): Update calls to
8356 vect_get_vec_def_for_stmt_copy.
8357 (vectorizable_store): Likewise. Remove now-unnecessary calls to
8359 (vect_get_loop_based_defs): Remove dt argument and update call
8360 to vect_get_vec_def_for_stmt_copy.
8361 (vectorizable_conversion): Update calls to vect_get_loop_based_defs
8362 and vect_get_vec_def_for_stmt_copy.
8363 (vectorizable_load): Update calls to vect_build_gather_load_calls
8364 and vect_get_vec_def_for_stmt_copy.
8365 * tree-vect-loop.c (vect_create_epilog_for_reduction)
8366 (vectorizable_reduction, vectorizable_live_operation): Update calls
8367 to vect_get_vec_def_for_stmt_copy.
8369 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8371 * tree-vect-data-refs.c (vect_record_base_alignment): Replace vec_info
8372 and gimple stmt arguments with a stmt_vec_info.
8373 (vect_record_base_alignments): Update calls accordingly.
8374 * tree-vect-slp.c (vect_record_max_nunits): Replace vec_info
8375 and gimple stmt arguments with a stmt_vec_info.
8376 (vect_build_slp_tree_1): Remove vinfo argument and update call
8377 to vect_record_max_nunits.
8378 (vect_build_slp_tree_2): Update calls to vect_build_slp_tree_1
8379 and vect_record_max_nunits.
8381 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8383 * tree-vectorizer.h (nested_in_vect_loop_p): Move further down
8384 file and take a stmt_vec_info instead of a gimple stmt.
8385 (supportable_widening_operation, vect_finish_replace_stmt)
8386 (vect_finish_stmt_generation, vect_get_store_rhs)
8387 (vect_get_vec_def_for_operand_1, vect_get_vec_def_for_operand)
8388 (vect_get_vec_defs, vect_init_vector, vect_transform_stmt)
8389 (vect_remove_stores, vect_analyze_stmt, vectorizable_condition)
8390 (vect_get_smallest_scalar_type, vect_check_gather_scatter)
8391 (vect_create_data_ref_ptr, bump_vector_ptr)
8392 (vect_permute_store_chain, vect_setup_realignment)
8393 (vect_transform_grouped_load, vect_record_grouped_load_vectors)
8394 (vect_create_addr_base_for_vector_ref, vectorizable_live_operation)
8395 (vectorizable_reduction, vectorizable_induction)
8396 (get_initial_def_for_reduction, is_simple_and_all_uses_invariant)
8397 (vect_get_place_in_interleaving_chain): Take stmt_vec_infos rather
8398 than gimple stmts as arguments.
8399 * tree-vect-data-refs.c (vect_get_smallest_scalar_type)
8400 (vect_preserves_scalar_order_p, vect_slp_analyze_node_dependences)
8401 (can_group_stmts_p, vect_check_gather_scatter)
8402 (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
8403 (bump_vector_ptr, vect_permute_store_chain, vect_setup_realignment)
8404 (vect_permute_load_chain, vect_shift_permute_load_chain)
8405 (vect_transform_grouped_load)
8406 (vect_record_grouped_load_vectors): Likewise.
8407 * tree-vect-loop.c (vect_fixup_reduc_chain)
8408 (get_initial_def_for_reduction, vect_create_epilog_for_reduction)
8409 (vectorize_fold_left_reduction, is_nonwrapping_integer_induction)
8410 (vectorizable_reduction, vectorizable_induction)
8411 (vectorizable_live_operation, vect_loop_kill_debug_uses): Likewise.
8412 * tree-vect-patterns.c (type_conversion_p, adjust_bool_stmts)
8413 (vect_get_load_store_mask): Likewise.
8414 * tree-vect-slp.c (vect_get_place_in_interleaving_chain)
8415 (vect_analyze_slp_instance, vect_mask_constant_operand_p): Likewise.
8416 * tree-vect-stmts.c (vect_mark_relevant)
8417 (is_simple_and_all_uses_invariant)
8418 (exist_non_indexing_operands_for_use_p, process_use)
8419 (vect_init_vector_1, vect_init_vector, vect_get_vec_def_for_operand_1)
8420 (vect_get_vec_def_for_operand, vect_get_vec_defs)
8421 (vect_finish_stmt_generation_1, vect_finish_replace_stmt)
8422 (vect_finish_stmt_generation, vect_truncate_gather_scatter_offset)
8423 (compare_step_with_zero, vect_get_store_rhs, get_group_load_store_type)
8424 (get_negative_load_store_type, get_load_store_type)
8425 (vect_check_load_store_mask, vect_check_store_rhs)
8426 (vect_build_gather_load_calls, vect_get_strided_load_store_ops)
8427 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
8428 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
8429 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
8430 (get_group_alias_ptr_type, vectorizable_store, hoist_defs_of_uses)
8431 (vectorizable_load, vectorizable_condition, vectorizable_comparison)
8432 (vect_analyze_stmt, vect_transform_stmt, vect_remove_stores)
8433 (supportable_widening_operation): Likewise.
8435 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8437 * tree-vect-data-refs.c (vect_describe_gather_scatter_call): Take
8438 a stmt_vec_info instead of a gcall.
8439 (vect_check_gather_scatter): Update call accordingly.
8440 * tree-vect-loop-manip.c (iv_phi_p): Take a stmt_vec_info instead
8442 (vect_can_advance_ivs_p, vect_update_ivs_after_vectorizer)
8443 (slpeel_update_phi_nodes_for_loops):): Update calls accordingly.
8444 * tree-vect-loop.c (vect_transform_loop_stmt): Take a stmt_vec_info
8445 instead of a gimple stmt.
8446 (vect_transform_loop): Update calls accordingly.
8447 * tree-vect-slp.c (vect_split_slp_store_group): Take and return
8448 stmt_vec_infos instead of gimple stmts.
8449 (vect_analyze_slp_instance): Update use accordingly.
8450 * tree-vect-stmts.c (read_vector_array, write_vector_array)
8451 (vect_clobber_variable, vect_stmt_relevant_p, permute_vec_elements)
8452 (vect_use_strided_gather_scatters_p, vect_build_all_ones_mask)
8453 (vect_build_zero_merge_argument, vect_get_gather_scatter_ops)
8454 (vect_gen_widened_results_half, vect_get_loop_based_defs)
8455 (vect_create_vectorized_promotion_stmts, can_vectorize_live_stmts):
8456 Take a stmt_vec_info instead of a gimple stmt and pass stmt_vec_infos
8457 down to subroutines.
8459 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8461 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Change the type
8462 of the worklist from a vector of gimple stmts to a vector of
8464 * tree-vect-stmts.c (vect_mark_relevant, process_use)
8465 (vect_mark_stmts_to_be_vectorized): Likewise
8467 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8469 * tree-vect-loop.c (vect_analyze_loop_operations): Look up the
8470 statement before passing it to vect_analyze_stmt.
8471 (vect_create_epilog_for_reduction): Use a stmt_vec_info to walk
8472 the chain of phi vector definitions. Track the exit phi via its
8474 (vectorizable_reduction): Set cond_stmt_vinfo directly from the
8475 STMT_VINFO_REDUC_DEF.
8476 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Use
8477 stmt_vec_infos to handle the statement chains.
8478 (vect_get_slp_defs): Record the first statement in the node
8479 using a stmt_vec_info.
8480 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Look up
8481 statements here and pass their stmt_vec_info down to subroutines.
8482 (vect_init_vector_1): Hoist call to vinfo_for_stmt and pass it
8483 down to vect_finish_stmt_generation.
8484 (vect_init_vector, vect_get_vec_defs, vect_finish_replace_stmt)
8485 (vect_finish_stmt_generation): Call vinfo_for_stmt and pass
8486 stmt_vec_infos to subroutines.
8487 (vect_remove_stores): Use stmt_vec_infos to handle the statement
8490 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8492 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences):
8493 (vect_check_gather_scatter, vect_create_data_ref_ptr, bump_vector_ptr)
8494 (vect_permute_store_chain, vect_setup_realignment)
8495 (vect_permute_load_chain, vect_shift_permute_load_chain)
8496 (vect_transform_grouped_load): Use stmt_vec_info rather than gimple
8497 stmts internally, and when passing values to other vectorizer routines.
8498 * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
8499 * tree-vect-loop.c (vect_analyze_scalar_cycles_1)
8500 (vect_analyze_loop_operations, get_initial_def_for_reduction)
8501 (vect_create_epilog_for_reduction, vectorize_fold_left_reduction)
8502 (vectorizable_reduction, vectorizable_induction)
8503 (vectorizable_live_operation, vect_transform_loop_stmt)
8504 (vect_transform_loop): Likewise.
8505 * tree-vect-patterns.c (vect_reassociating_reduction_p)
8506 (vect_recog_widen_op_pattern, vect_recog_mixed_size_cond_pattern)
8507 (vect_recog_bool_pattern, vect_recog_gather_scatter_pattern): Likewise.
8508 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
8509 (vect_slp_analyze_node_operations_1): Likewise.
8510 * tree-vect-stmts.c (vect_mark_relevant, process_use)
8511 (exist_non_indexing_operands_for_use_p, vect_init_vector_1)
8512 (vect_mark_stmts_to_be_vectorized, vect_get_vec_def_for_operand)
8513 (vect_finish_stmt_generation_1, get_group_load_store_type)
8514 (get_load_store_type, vect_build_gather_load_calls)
8515 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
8516 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
8517 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
8518 (vectorizable_store, vectorizable_load, vectorizable_condition)
8519 (vectorizable_comparison, vect_analyze_stmt, vect_transform_stmt)
8520 (supportable_widening_operation): Likewise.
8521 (vect_get_vector_types_for_stmt): Likewise.
8522 * tree-vectorizer.h (vect_dr_behavior): Likewise.
8524 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8526 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
8527 (vect_slp_analyze_node_dependences, vect_analyze_data_ref_accesses)
8528 (vect_permute_store_chain, vect_permute_load_chain)
8529 (vect_shift_permute_load_chain, vect_transform_grouped_load): Avoid
8530 repeated stmt_vec_info lookups.
8531 * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
8532 (vect_update_ivs_after_vectorizer): Likewise.
8533 * tree-vect-loop.c (vect_is_simple_reduction): Likewise.
8534 (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
8535 * tree-vect-patterns.c (adjust_bool_stmts): Likewise.
8536 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
8537 (vect_bb_slp_scalar_cost): Likewise.
8538 * tree-vect-stmts.c (get_group_alias_ptr_type): Likewise.
8540 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8542 * tree-vect-data-refs.c (vect_check_gather_scatter): Pass the
8543 gcall rather than the generic gimple stmt to gimple_call_internal_fn.
8544 (vect_get_smallest_scalar_type, can_group_stmts_p): Use dyn_cast
8545 to get gassigns and gcalls, rather than operating on generc gimple
8547 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p)
8548 (vect_mark_stmts_to_be_vectorized, vectorizable_store)
8549 (vectorizable_load, vect_analyze_stmt): Likewise.
8550 * tree-vect-loop.c (vectorizable_reduction): Likewise gphi.
8552 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8554 * tree-vectorizer.h (get_earlier_stmt, get_later_stmt): Take and
8555 return stmt_vec_infos rather than gimple stmts. Do not accept
8557 (vect_find_last_scalar_stmt_in_slp): Return a stmt_vec_info instead
8559 * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
8560 Update use of get_later_stmt.
8561 (vect_get_constant_vectors): Update call accordingly.
8562 (vect_schedule_slp_instance): Likewise
8563 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Likewise.
8564 (vect_slp_analyze_instance_dependence): Likewise.
8565 (vect_preserves_scalar_order_p): Update use of get_earlier_stmt.
8567 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8569 * tree-vectorizer.h (stmt_info_for_cost::stmt): Replace with...
8570 (stmt_info_for_cost::stmt_info): ...this new field.
8571 (add_stmt_costs): Update accordingly.
8572 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
8573 (vect_get_known_peeling_cost): Likewise.
8574 (vect_estimate_min_profitable_iters): Likewise.
8575 * tree-vect-stmts.c (record_stmt_cost): Likewise.
8577 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8579 * tree-vectorizer.h (_loop_vec_info::may_misalign_stmts): Change
8580 from an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
8581 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
8583 * tree-vect-loop-manip.c (vect_create_cond_for_align_checks): Likewise.
8585 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8587 * tree-vectorizer.h (_stmt_vec_info::same_dr_stmt): Change from
8588 a gimple stmt to a stmt_vec_info.
8589 * tree-vect-stmts.c (vectorizable_load): Update accordingly.
8591 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8593 * tree-vectorizer.h (vec_info::grouped_stores): Change from
8594 an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
8595 (_loop_vec_info::reduction_chains): Likewise.
8596 * tree-vect-loop.c (vect_fixup_scalar_cycles_with_patterns): Update
8598 * tree-vect-slp.c (vect_analyze_slp): Likewise.
8600 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8602 * tree-vectorizer.h (_stmt_vec_info::first_element): Change from
8603 a gimple stmt to a stmt_vec_info.
8604 (_stmt_vec_info::next_element): Likewise.
8605 * tree-vect-data-refs.c (vect_update_misalignment_for_peel)
8606 (vect_slp_analyze_and_verify_node_alignment)
8607 (vect_analyze_group_access_1, vect_analyze_group_access)
8608 (vect_small_gap_p, vect_prune_runtime_alias_test_list)
8609 (vect_create_data_ref_ptr, vect_record_grouped_load_vectors)
8610 (vect_supportable_dr_alignment): Update accordingly.
8611 * tree-vect-loop.c (vect_fixup_reduc_chain): Likewise.
8612 (vect_fixup_scalar_cycles_with_patterns, vect_is_slp_reduction)
8613 (vect_is_simple_reduction, vectorizable_reduction): Likewise.
8614 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
8615 * tree-vect-slp.c (vect_build_slp_tree_1)
8616 (vect_attempt_slp_rearrange_stmts, vect_supported_load_permutation_p)
8617 (vect_split_slp_store_group, vect_analyze_slp_instance)
8618 (vect_analyze_slp, vect_transform_slp_perm_load): Likewise.
8619 * tree-vect-stmts.c (vect_model_store_cost, vect_model_load_cost)
8620 (get_group_load_store_type, get_load_store_type)
8621 (get_group_alias_ptr_type, vectorizable_store, vectorizable_load)
8622 (vect_transform_stmt, vect_remove_stores): Likewise.
8624 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8626 * tree-vectorizer.h (vect_dr_stmt): Return a stmt_vec_info rather
8628 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
8629 (vect_slp_analyze_data_ref_dependence, vect_record_base_alignments)
8630 (vect_calculate_target_alignmentm, vect_compute_data_ref_alignment)
8631 (vect_update_misalignment_for_peel, vect_verify_datarefs_alignment)
8632 (vector_alignment_reachable_p, vect_get_data_access_cost)
8633 (vect_get_peeling_costs_all_drs, vect_peeling_hash_get_lowest_cost)
8634 (vect_peeling_supportable, vect_enhance_data_refs_alignment)
8635 (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
8636 (vect_analyze_group_access_1, vect_analyze_group_access)
8637 (vect_analyze_data_ref_access, vect_analyze_data_ref_accesses)
8638 (vect_vfa_access_size, vect_small_gap_p, vect_analyze_data_refs)
8639 (vect_supportable_dr_alignment): Remove vinfo_for_stmt from the
8640 result of vect_dr_stmt and use the stmt_vec_info instead of
8641 the associated gimple stmt.
8642 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
8643 (vect_gen_prolog_loop_niters): Likewise.
8644 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
8646 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8648 * tree-vectorizer.h (_slp_tree::stmts): Change from a vec<gimple *>
8649 to a vec<stmt_vec_info>.
8650 * tree-vect-slp.c (vect_free_slp_tree): Update accordingly.
8651 (vect_create_new_slp_node): Take a vec<gimple *> instead of a
8653 (_slp_oprnd_info::def_stmts): Change from a vec<gimple *>
8654 to a vec<stmt_vec_info>.
8655 (bst_traits::value_type, bst_traits::value_type): Likewise.
8656 (bst_traits::hash): Update accordingly.
8657 (vect_get_and_check_slp_defs): Change the stmts parameter from
8658 a vec<gimple *> to a vec<stmt_vec_info>.
8659 (vect_two_operations_perm_ok_p, vect_build_slp_tree_1): Likewise.
8660 (vect_build_slp_tree): Likewise.
8661 (vect_build_slp_tree_2): Likewise. Update uses of
8662 SLP_TREE_SCALAR_STMTS.
8663 (vect_print_slp_tree): Update uses of SLP_TREE_SCALAR_STMTS.
8664 (vect_mark_slp_stmts, vect_mark_slp_stmts_relevant)
8665 (vect_slp_rearrange_stmts, vect_attempt_slp_rearrange_stmts)
8666 (vect_supported_load_permutation_p, vect_find_last_scalar_stmt_in_slp)
8667 (vect_detect_hybrid_slp_stmts, vect_slp_analyze_node_operations_1)
8668 (vect_slp_analyze_node_operations, vect_slp_analyze_operations)
8669 (vect_bb_slp_scalar_cost, vect_slp_analyze_bb_1)
8670 (vect_get_constant_vectors, vect_get_slp_defs)
8671 (vect_transform_slp_perm_load, vect_schedule_slp_instance)
8672 (vect_remove_slp_scalar_calls, vect_schedule_slp): Likewise.
8673 (vect_analyze_slp_instance): Build up a vec of stmt_vec_infos
8674 instead of gimple stmts.
8675 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Change
8676 the stores parameter for a vec<gimple *> to a vec<stmt_vec_info>.
8677 (vect_slp_analyze_instance_dependence): Update uses of
8678 SLP_TREE_SCALAR_STMTS.
8679 (vect_slp_analyze_and_verify_node_alignment): Likewise.
8680 (vect_slp_analyze_and_verify_instance_alignment): Likewise.
8681 * tree-vect-loop.c (neutral_op_for_slp_reduction): Likewise.
8682 (get_initial_defs_for_reduction): Likewise.
8683 (vect_create_epilog_for_reduction): Likewise.
8684 (vectorize_fold_left_reduction): Likewise.
8685 * tree-vect-stmts.c (vect_prologue_cost_for_slp_op): Likewise.
8686 (vect_model_simple_cost, vectorizable_shift, vectorizable_load)
8687 (can_vectorize_live_stmts): Likewise.
8689 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8691 * tree-vectorizer.h (_loop_vec_info::reductions): Change from an
8692 auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
8693 (vect_force_simple_reduction): Take and return stmt_vec_infos rather
8695 * tree-parloops.c (valid_reduction_p): Take a stmt_vec_info instead
8697 (gather_scalar_reductions): Update after above interface changes.
8698 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Likewise.
8699 (vect_is_simple_reduction): Take and return stmt_vec_infos rather
8701 (vect_force_simple_reduction): Likewise.
8702 * tree-vect-patterns.c (vect_pattern_recog_1): Update use of
8703 LOOP_VINFO_REDUCTIONS.
8704 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
8706 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8708 * tree-vectorizer.h (_stmt_vec_info::reduc_def): Change from
8709 a gimple stmt to a stmt_vec_info.
8710 * tree-vect-loop.c (vect_active_double_reduction_p)
8711 (vect_force_simple_reduction, vectorizable_reduction): Update
8714 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8716 * tree-vectorizer.h (_slp_tree::vec_stmts): Change from a
8717 vec<gimple *> to a vec<stmt_vec_info>.
8718 * tree-vect-loop.c (vect_create_epilog_for_reduction): Change
8719 the reduction_phis argument from a vec<gimple *> to a
8721 (vectorizable_reduction): Likewise the phis local variable that
8722 is passed to vect_create_epilog_for_reduction. Update for new type
8723 of SLP_TREE_VEC_STMTS.
8724 (vectorizable_induction): Update for new type of SLP_TREE_VEC_STMTS.
8725 (vectorizable_live_operation): Likewise.
8726 * tree-vect-slp.c (vect_get_slp_vect_defs): Likewise.
8727 (vect_transform_slp_perm_load, vect_schedule_slp_instance): Likewise.
8729 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8731 * tree-vectorizer.h (_stmt_vec_info::vectorized_stmt): Change from
8732 a gimple stmt to a stmt_vec_info.
8733 (vectorizable_condition, vectorizable_live_operation)
8734 (vectorizable_reduction, vectorizable_induction): Pass back the
8735 vectorized statement as a stmt_vec_info.
8736 * tree-vect-data-refs.c (vect_record_grouped_load_vectors): Update
8737 use of STMT_VINFO_VEC_STMT.
8738 * tree-vect-loop.c (vect_create_epilog_for_reduction): Likewise,
8739 accumulating the inner phis that feed the STMT_VINFO_VEC_STMT
8740 as stmt_vec_infos rather than gimple stmts.
8741 (vectorize_fold_left_reduction): Change vec_stmt from a gimple stmt
8743 (vectorizable_live_operation): Likewise.
8744 (vectorizable_reduction, vectorizable_induction): Likewise,
8745 updating use of STMT_VINFO_VEC_STMT.
8746 * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Update use
8747 of STMT_VINFO_VEC_STMT.
8748 (vect_build_gather_load_calls, vectorizable_bswap, vectorizable_call)
8749 (vectorizable_simd_clone_call, vectorizable_conversion)
8750 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
8751 (vectorizable_store, vectorizable_load, vectorizable_condition)
8752 (vectorizable_comparison, can_vectorize_live_stmts): Change vec_stmt
8753 from a gimple stmt to a stmt_vec_info.
8754 (vect_transform_stmt): Update use of STMT_VINFO_VEC_STMT. Pass a
8755 pointer to a stmt_vec_info to the vectorizable_* routines.
8757 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8759 * tree-vectorizer.h (_stmt_vec_info::related_stmt): Change from
8760 a gimple stmt to a stmt_vec_info.
8761 (is_pattern_stmt_p): Update accordingly.
8762 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Likewise.
8763 (vect_record_grouped_load_vectors): Likewise.
8764 * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
8765 (vect_fixup_reduc_chain, vect_update_vf_for_slp): Likewise.
8766 (vect_model_reduction_cost): Likewise.
8767 (vect_create_epilog_for_reduction): Likewise.
8768 (vectorizable_reduction, vectorizable_induction): Likewise.
8769 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
8770 Return the stmt_vec_info for the pattern statement.
8771 (vect_set_pattern_stmt): Update use of STMT_VINFO_RELATED_STMT.
8772 (vect_split_statement, vect_mark_pattern_stmts): Likewise.
8773 * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
8774 (vect_detect_hybrid_slp, vect_get_slp_defs): Likewise.
8775 * tree-vect-stmts.c (vect_mark_relevant): Likewise.
8776 (vect_get_vec_def_for_operand_1, vectorizable_call): Likewise.
8777 (vectorizable_simd_clone_call, vect_analyze_stmt, new_stmt_vec_info)
8778 (free_stmt_vec_info, vect_is_simple_use): Likewise.
8780 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8782 * tree-vectorizer.h (vect_finish_replace_stmt): Return a stmt_vec_info
8783 (vect_finish_stmt_generation): Likewise.
8784 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
8785 (vect_finish_replace_stmt, vect_finish_stmt_generation): Likewise.
8786 (vect_build_gather_load_calls): Use the return value of the above
8787 functions instead of a separate call to vinfo_for_stmt. Use narrow
8788 scopes for the input gimple stmt and wider scopes for the associated
8789 stmt_vec_info. Use vec_info::lookup_def when setting these
8790 stmt_vec_infos from an SSA_NAME definition.
8791 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
8792 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
8793 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
8794 (vectorizable_store, vectorizable_load, vectorizable_condition)
8795 (vectorizable_comparison): Likewise.
8796 * tree-vect-loop.c (vectorize_fold_left_reduction): Likewise.
8797 (vectorizable_reduction): Likewise.
8799 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8801 * tree-vectorizer.h (vect_is_simple_use): Add an optional
8802 stmt_vec_info * parameter before the optional gimple **.
8803 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
8804 (process_use, vect_get_vec_def_for_operand_1): Update callers.
8805 (vect_get_vec_def_for_operand, vectorizable_shift): Likewise.
8806 * tree-vect-loop.c (vectorizable_reduction): Likewise.
8807 (vectorizable_live_operation): Likewise.
8808 * tree-vect-patterns.c (type_conversion_p): Likewise.
8809 (vect_look_through_possible_promotion): Likewise.
8810 (vect_recog_rotate_pattern): Likewise.
8811 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
8813 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8815 * tree-vectorizer.h (stmt_vec_info): Temporarily change from
8816 a typedef to a wrapper class.
8817 (NULL_STMT_VEC_INFO): New macro.
8818 (vec_info::stmt_infos): Change to vec<stmt_vec_info>.
8819 (stmt_vec_info::operator*): New function.
8820 (stmt_vec_info::operator gimple *): Likewise.
8821 (set_vinfo_for_stmt): Use NULL_STMT_VEC_INFO.
8822 (add_stmt_costs): Likewise.
8823 * tree-vect-loop-manip.c (iv_phi_p): Likewise.
8824 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
8825 (vect_get_known_peeling_cost): Likewise.
8826 (vect_estimate_min_profitable_iters): Likewise.
8827 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
8828 * tree-vect-slp.c (vect_remove_slp_scalar_calls): Likewise.
8829 * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
8830 (vectorizable_store, free_stmt_vec_infos): Likewise.
8831 (new_stmt_vec_info): Change return type of xcalloc to
8834 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8836 * tree-vectorizer.h (vec_info::lookup_single_use): Declare.
8837 * tree-vectorizer.c (vec_info::lookup_single_use): New function.
8838 * tree-vect-loop.c (vectorizable_reduction): Use it instead of
8839 a single_imm_use-based sequence.
8840 * tree-vect-stmts.c (supportable_widening_operation): Likewise.
8842 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8844 * tree-vectorizer.h (vec_info::lookup_def): Declare.
8845 * tree-vectorizer.c (vec_info::lookup_def): New function.
8846 * tree-vect-patterns.c (vect_get_internal_def): Use it.
8847 (vect_widened_op_tree): Likewise.
8848 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
8849 * tree-vect-loop.c (vect_analyze_loop_operations): Likewise.
8850 (vectorizable_reduction): Likewise.
8851 (vect_valid_reduction_input_p): Take a stmt_vec_info instead
8853 (vect_is_slp_reduction): Update calls accordingly. Use
8854 vec_info::lookup_def.
8855 (vect_is_simple_reduction): Likewise
8856 * tree-vect-slp.c (vect_detect_hybrid_slp_1): Use vec_info::lookup_def.
8858 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8860 * tree-vectorizer.h (vec_info::lookup_stmt): Declare.
8861 * tree-vectorizer.c (vec_info::lookup_stmt): New function.
8862 * tree-vect-loop.c (vect_determine_vf_for_stmt): Use it instead
8864 (vect_determine_vectorization_factor, vect_analyze_scalar_cycles_1)
8865 (vect_compute_single_scalar_iteration_cost, vect_analyze_loop_form)
8866 (vect_update_vf_for_slp, vect_analyze_loop_operations)
8867 (vect_is_slp_reduction, vectorizable_induction)
8868 (vect_transform_loop_stmt, vect_transform_loop): Likewise.
8869 * tree-vect-patterns.c (vect_init_pattern_stmt):
8870 (vect_determine_min_output_precision_1, vect_determine_precisions)
8871 (vect_pattern_recog): Likewise.
8872 * tree-vect-stmts.c (vect_analyze_stmt, vect_transform_stmt): Likewise.
8873 * config/powerpcspe/powerpcspe.c (rs6000_density_test): Likewise.
8874 * config/rs6000/rs6000.c (rs6000_density_test): Likewise.
8875 * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
8876 (vect_detect_hybrid_slp_1, vect_detect_hybrid_slp_2)
8877 (vect_detect_hybrid_slp): Likewise. Change the walk_stmt_info
8878 info field from a loop to a loop_vec_info.
8880 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8882 * tree-vectorizer.h (stmt_vec_info): Move typedef earlier in file.
8883 (vec_info::add_stmt): Declare.
8884 * tree-vectorizer.c (vec_info::add_stmt): New function.
8885 * tree-vect-data-refs.c (vect_create_data_ref_ptr): Use it.
8886 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Likewise.
8887 (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
8888 (vectorizable_induction): Likewise.
8889 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Likewise.
8890 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
8891 (vectorizable_simd_clone_call, vectorizable_store): Likewise.
8892 (vectorizable_load): Likewise.
8893 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
8894 (vect_recog_bool_pattern, vect_recog_mask_conversion_pattern)
8895 (vect_recog_gather_scatter_pattern): Likewise.
8896 (append_pattern_def_seq): Likewise. Remove a check that is
8897 performed by add_stmt itself.
8899 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8901 * tree-vect-loop.c (vectorizable_reduction): Fix an instance in
8902 which make_ssa_name was called with new_stmt before new_stmt
8905 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8907 * tree-vect-loop.c (vect_valid_reduction_input_p): New function,
8909 (vect_is_slp_reduction): ...here...
8910 (vect_is_simple_reduction): ...and here. Remove repetition of tests
8911 that are already known to be false.
8913 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8915 * tree-vectorizer.h (vect_free_slp_instance): Add a final_p parameter.
8916 * tree-vect-slp.c (vect_free_slp_tree): Likewise. Don't update
8917 STMT_VINFO_NUM_SLP_USES when it's true.
8918 (vect_free_slp_instance): Add a final_p parameter and pass it to
8920 (vect_build_slp_tree_2): Update call to vect_free_slp_instance.
8921 (vect_analyze_slp_instance): Likewise.
8922 (vect_slp_analyze_operations): Likewise.
8923 (vect_slp_analyze_bb_1): Likewise.
8924 * tree-vectorizer.c (vec_info): Likewise.
8925 * tree-vect-loop.c (vect_transform_loop): Likewise.
8927 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8929 * tree-vect-loop.c (vectorizable_reduction): Assert that the
8930 function is not called for second and subsequent members of
8933 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8935 * tree-vect-loop.c (get_initial_def_for_reduction): Move special
8936 cases for nested loops from here to ...
8937 (vect_create_epilog_for_reduction): ...here. Only call
8938 vect_is_simple_use for inner-loop reductions.
8940 2018-07-31 Martin Liska <mliska@suse.cz>
8942 PR gcov-profile/85338
8943 PR gcov-profile/85350
8944 PR gcov-profile/85372
8945 * profile.c (struct location_triplet): New.
8946 (struct location_triplet_hash): Likewise.
8947 (output_location): Do not output a BB that
8948 is already recorded for a line.
8949 (branch_prob): Use streamed_locations.
8951 2018-07-31 Martin Liska <mliska@suse.cz>
8953 PR gcov-profile/85370
8954 * coverage.c (coverage_begin_function): Do not mark target
8955 clones as artificial functions.
8957 2018-07-31 Martin Liska <mliska@suse.cz>
8959 PR gcov-profile/83813
8960 PR gcov-profile/84758
8961 PR gcov-profile/85217
8962 PR gcov-profile/85332
8963 * profile.c (branch_prob): Do not record GOTO expressions
8964 for GIMPLE statements which locations are already streamed.
8966 2018-07-31 Olivier Hainque <hainque@adacore.com>
8968 * gcc.c (handle_spec_function): Accept a soft_matched_part
8969 argument, as do_spec_1. Pass it down to ...
8970 (eval_spec_function): Accept a soft_matched_part argument,
8971 and pass it down to ...
8972 (do_spec_2): Accept a soft_matched_part argument, and pass
8973 it down to do_spec_1.
8974 (do_spec_1): Pass soft_matched_part to handle_spec_function.
8975 (handle_braces): Update call to handle_spec_function.
8976 (driver::set_up_specs): Update calls to do_spec_2.
8977 (compare_debug_dump_opt_spec_function): Likewise.
8978 (compare_debug_self_opt_spec_function): Likewise.
8980 2018-07-31 Olivier Hainque <hainque@adacore.com>
8982 * common.opt (nolibc): New option.
8983 * doc/invoke.texi (Link Options): Document it.
8984 * gcc.c (LINK_GCC_C_SEQUENCE_SPEC): Honor nolibc.
8985 * config/alpha/linux.h: Likewise.
8986 * config/arc/elf.h: Likewise.
8987 * config/arm/uclinux-elf.h: Likewise.
8988 * config/arm/unknown-elf.h: Likewise.
8989 * config/avr/avrlibc.h: Likewise.
8990 * config/bfin/bfin.h: Likewise.
8991 * config/bfin/linux.h: Likewise.
8992 * config/bfin/uclinux.h: Likewise.
8993 * config/darwin.h: Likewise.
8994 * config/darwin10.h: Likewise.
8995 * config/darwin12.h: Likewise.
8996 * config/gnu-user.h: Likewise.
8997 * config/lm32/uclinux-elf.h: Likewise.
8998 * config/pa/pa-hpux11.h: Likewise.
8999 * config/pa/pa64-hpux.h: Likewise.
9000 * config/sparc/sparc.h: Likewise.
9002 2018-07-31 Olivier Hainque <hainque@adacore.com>
9004 * gcc.c (getenv_spec_function): Prepend '/' to value for allowed
9005 undefined variables.
9007 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
9010 * config/arm/arm.c (arm_block_set_aligned_vect): Use gen_int_mode
9013 2018-07-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
9015 * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
9016 terminated string literal.
9018 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
9020 PR rtl-optimization/85160
9021 * combine.c (is_just_move): New function.
9022 (try_combine): Allow combining two instructions into two if neither of
9023 the original instructions was a move.
9025 2018-07-30 Alexander Monakov <amonakov@ispras.ru>
9028 * doc/extend.texi (Global Register Variables): Discourage use of type
9030 (Local Register Variables): Likewise.
9032 2018-07-30 Richard Sandiford <richard.sandiford@arm.com>
9034 PR tree-optimization/86506
9035 * hwint.h (ceil_log2): Resync with hwint.c implementation.
9037 2018-07-30 Ilya Leoshkevich <iii@linux.ibm.com>
9040 * lra-constraints.c (spill_hard_reg_in_range): When selecting the
9041 hard_regno, make sure no insn between `from` and `to` clobbers it.
9043 2018-07-30 Cesar Philippidis <cesar@codesourcery.com>
9044 Tom de Vries <tdevries@suse.de>
9046 * config/nvptx/nvptx.c (PTX_GANG_DEFAULT): Rename to ...
9047 (PTX_DEFAULT_RUNTIME_DIM): ... this.
9048 (nvptx_goacc_validate_dims): Set default worker and gang dims to
9049 PTX_DEFAULT_RUNTIME_DIM.
9050 (nvptx_dim_limit): Ignore GOMP_DIM_WORKER.
9052 2018-07-29 John David Anglin <danglin@gcc.gnu.org>
9054 * config/pa/pa.c (pa_output_addr_vec): Align address table.
9055 * config/pa/pa.h (JUMP_TABLES_IN_TEXT_SECTION): Revise comment.
9056 * config/pa/pa32-linux.h (JUMP_TABLES_IN_TEXT_SECTION): Define.
9058 2018-07-27 Michael Meissner <meissner@linux.ibm.com>
9060 * config/rs6000/constraints.md (wG constraint): Delete, no longer
9062 * config/rs6000/predicates.md (p9_fusion_reg_operand): Rename
9063 predicate to reflect toc fusion has been deleted.
9064 (toc_fusion_mem_raw): Delete, no longer used.
9065 (toc_fusion_mem_wrapped): Likewise.
9066 * config/rs6000/rs6000-cpus.def (POWERPC_MASKS): Delete toc
9068 * config/rs6000/rs6000-protos.h (fusion_wrap_memory_address):
9069 Delete, no longer used.
9070 * config/rs6000/rs6000.c (struct rs6000_reg_addr): Delete fields
9071 meant to be used for toc fusion.
9072 (rs6000_debug_print_mode): Delete toc fusion debugging.
9073 (rs6000_debug_reg_global): Likewise.
9074 (rs6000_init_hard_regno_mode_ok): Delete setting up fields for toc
9075 fusion and secondary reload support that were never used.
9076 (rs6000_option_override_internal): Delete TOC fusion, that was only
9077 partially defined, and it did not work unless you also used the
9079 (rs6000_legitimate_address_p): Delete TOC fusion support.
9080 (rs6000_opt_masks): Likewise.
9081 (fusion_wrap_memory_address): Delete function, no longer used.
9082 (fusion_split_address); Delete TOC fusion support.
9083 * config/rs6000/rs6000.h (TARGET_TOC_FUSION_INT): Delete, no
9084 longer used with toc fusion being deleted.
9085 (TARGET_TOC_FUSION_FP): Likewise.
9086 * config/rs6000/rs6000.md (UNSPEC_FUSION_ADDIS): Delete TOC fusion
9088 (toc fusion spliter): Delete TOC fusion support.
9089 (toc_fusionload_<mode>): Likewise.
9090 (toc_fusionload_di): Likewise.
9091 (fusion_gpr_load_<mode>): Delete generator function, this insn no
9092 longer needs to be named. Rename predicate to delete TOC fusion.
9093 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
9094 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
9095 (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
9096 (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
9097 (p9 fusion peephole2s): Rename predicate to delete TOC fusion.
9099 2018-07-27 Kelvin Nilsen <kelvin@gcc.gnu.org>
9101 * doc/extend.texi (Basic PowerPC Built-in Functions Available on
9102 ISA 2.05): Replace __uint128_t with __uint128 and __int128_t with
9103 __int128 in built-in function prototypes.
9104 (PowerPC AltiVec Built-in Functions on ISA 2.07): Likewise.
9105 (PowerPC AltiVec Built-in Functions on ISA 3.0): Likewise.
9107 2018-07-27 Martin Sebor <msebor@redhat.com>
9109 PR tree-optimization/86696
9110 * tree-ssa-strlen.c (get_min_string_length): Handle all integer
9111 types, including enums.
9112 (handle_char_store): Be prepared for the above function to fail.
9114 2018-07-26 Qing Zhao <qing.zhao@oracle.com>
9116 * builtins.c (inline_expand_builtin_string_cmp): Disable inlining
9117 when optimization level is lower than 2 or optimize for size.
9119 2018-07-26 Martin Sebor <msebor@redhat.com>
9121 PR tree-optimization/86043
9122 PR tree-optimization/86042
9123 * tree-ssa-strlen.c (handle_builtin_memcpy): Handle strict overlaps.
9124 (get_string_cst_length): Rename...
9125 (get_min_string_length): ...to this. Add argument.
9126 (handle_char_store): Extend to handle multi-character stores by
9128 * tree.c (initializer_zerop): Use new argument. Handle MEM_REF.
9129 * tree.h (initializer_zerop): Add argument.
9131 2018-07-26 Jakub Jelinek <jakub@redhat.com>
9134 * omp-low.c (scan_sharing_clauses): Don't ignore map clauses for
9135 declare target to variables if they have always,{to,from,tofrom} map
9138 2018-07-26 Martin Liska <mliska@suse.cz>
9141 * lto-wrapper.c: Add linker_output as prefix
9142 for ltrans_output_file.
9144 2018-07-26 Segher Boessenkool <segher@kernel.crashing.org>
9146 PR rtl-optimization/85805
9147 * combine.c (reg_nonzero_bits_for_combine): Only use the last set
9148 value for hard registers if that was written in the same mode.
9150 2018-07-26 Martin Liska <mliska@suse.cz>
9152 PR gcov-profile/86536
9153 * gcov.c (format_gcov): Use printf format %.*f directly
9154 and do not handle special values.
9156 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
9158 * common/config/arc/arc-common.c (arc_option_optimization_table):
9159 Update default optimizations for size.
9161 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
9163 * config/arc/arc.md (movsf_insn): Add short instruction selection.
9164 * config/arc/constraints.md (CfZ): New constraint.
9165 * config/arc/fpu.md (addssf3_fpu): Use CfZ constraint.
9166 (subsf3_fpu): Likewise.
9167 (cmpsf_fpu): Likewise.
9168 (cmpsf_fpu_uneq): Likewise.
9170 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
9172 * config/arc/arc.c (compact_memory_operand_p): Check for uncached
9174 (arc_is_uncached_mem_p): uncached applies to both the variable and
9177 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
9179 * config/arc/arc.h (ADDITIONAL_REGISTER_NAMES): Add additional
9182 2018-07-25 David Malcolm <dmalcolm@redhat.com>
9184 * optinfo-emit-json.cc (class optrecord_json_writer): Convert
9185 field "m_scopes" from vec to auto_vec.
9187 2018-07-25 Martin Liska <mliska@suse.cz>
9189 * config/powerpcspe/powerpcspe-protos.h (rs6000_loop_align): Fix
9192 2018-07-25 Richard Biener <rguenther@suse.de>
9195 * dwarf2out.c (dwarf2out_decl): Do not handle nested functions
9196 special wrt context_die late.
9197 (gen_subprogram_die): Re-use DIEs in local scope.
9199 2018-07-25 Richard Sandiford <richard.sandiford@arm.com>
9201 PR tree-optimization/86644
9202 * hwint.c (ceil_log2): Fix comment. Return 0 for 0.
9204 2018-07-25 Martin Liska <mliska@suse.cz>
9207 * dumpfile.c: And excluded values with TDF_ALL_VALUES.
9208 * dumpfile.h (enum dump_flag): Defince TDF_ALL_VALUES.
9210 2018-07-25 Martin Liska <mliska@suse.cz>
9213 * params.def: Explain ASan abbreviation and provide
9214 a documentation link.
9216 2018-07-24 Martin Sebor <msebor@redhat.com>
9218 PR tree-optimization/86622
9219 PR tree-optimization/86532
9220 * builtins.h (string_length): Declare.
9221 * builtins.c (c_strlen): Correct handling of non-constant offsets.
9222 (check_access): Be prepared for non-constant length ranges.
9223 (string_length): Make extern.
9224 * expr.c (string_constant): Only handle the minor non-constant
9225 array index. Use string_constant to compute the length of
9226 a generic string constant.
9228 2018-07-24 Richard Sandiford <richard.sandiford@arm.com>
9230 PR tree-optimization/86618
9231 * tree-vect-stmts.c (vectorizable_call): Don't take the address
9232 of LOOP_VINFO_MASKS (loop_vinfo) when loop_vinfo is null.
9234 2018-07-24 David Malcolm <dmalcolm@redhat.com>
9236 PR tree-optimization/86636
9237 * json.cc (json::object::set): Fix comment. Add assertions.
9238 (json::array::append): Move here from json.h. Add comment and an
9240 (json::string::string): Likewise.
9241 * json.h (json::array::append): Move to json.cc.
9242 (json::string::string): Likewise.
9243 * optinfo-emit-json.cc
9244 (optrecord_json_writer::impl_location_to_json): Assert that we
9245 aren't attempting to write out UNKNOWN_LOCATION, or an ad-hoc
9246 wrapper around it. Expand the location once, rather than three
9248 (optrecord_json_writer::inlining_chain_to_json): Fix the check for
9249 UNKNOWN_LOCATION, to use LOCATION_LOCUS to look through ad-hoc
9251 (optrecord_json_writer::optinfo_to_json): Likewise, in four
9252 places. Fix some overlong lines.
9254 2018-07-24 Matthew Malcomson <matthew.malcomson@arm.com>
9256 * config/aarch64/aarch64-simd.md
9257 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>): Split into...
9258 (aarch64_<ANY_EXTEND:su>subw<mode>): ... This...
9259 (aarch64_<ANY_EXTEND:su>addw<mode>): ... And this.
9260 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>_internal): Split into...
9261 (aarch64_<ANY_EXTEND:su>subw<mode>_internal): ... This...
9262 (aarch64_<ANY_EXTEND:su>addw<mode>_internal): ... And this.
9263 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w2<mode>_internal): Split into...
9264 (aarch64_<ANY_EXTEND:su>subw2<mode>_internal): ... This...
9265 (aarch64_<ANY_EXTEND:su>addw2<mode>_internal): ... And this.
9267 2018-07-24 Jakub Jelinek <jakub@redhat.com>
9270 * expmed.c (expand_divmod): Punt if d == HOST_WIDE_INT_MIN
9271 and size > HOST_BITS_PER_WIDE_INT. For size > HOST_BITS_PER_WIDE_INT
9272 and abs_d == d, do the power of two handling if profitable.
9274 2018-07-24 Richard Biener <rguenther@suse.de>
9276 * match.pd: Add BIT_FIELD_REF canonicalizations.
9278 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
9281 * genmatch.c (dt_operand::gen_match_op): Avoid folding volatile values.
9283 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
9285 * gimple-fold.c (gimple_fold_builtin_printf): Don't create a not NUL
9286 terminated STRING_CST object.
9288 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
9290 hsa-dump.c (dump_hsa_symbol): Avoid out of scope access to buf.
9292 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
9294 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Adjust.
9295 * config/rs6000/rs6000-protos.h (rs6000_split_v4si_init): Delete.
9296 * config/rs6000/rs6000.c (rs6000_expand_vector_init): Always force
9297 the elements into a register.
9298 (rs6000_split_v4si_init_di_reg): Delete.
9299 (rs6000_split_v4si_init): Delete.
9300 * config/rs6000/vsx.md (unspec): Delete UNSPEC_VSX_VEC_INIT.
9301 (vsx_init_v4si): Rewrite as a define_expand.
9303 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
9305 * config/rs6000/rs6000.md (splitters for rldimi and rlwimi with the
9306 zero_extend argument from memory): New.
9308 2018-07-22 Martin Sebor <msebor@redhat.com>
9311 * gimple-ssa-warn-alloca.c (alloca_call_type_by_arg): Avoid
9312 diagnosing calls with unknown arguments unless -Walloca-larger-than
9313 is restricted to less than PTRDIFF_MAX bytes.
9315 2018-07-22 Gerald Pfeifer <gerald@pfeifer.com>
9317 * doc/gcov.texi (Invoking Gcov): Editorial changes.
9319 2018-07-20 David Malcolm <dmalcolm@redhat.com>
9321 * pretty-print.c (text_info::set_location): Remove redundant
9322 "line_table" parameter from call to rich_location::set_range.
9324 2018-07-20 Martin Sebor <msebor@redhat.com>
9327 * builtins.c (expand_builtin_alloca): Adjust.
9328 * calls.c (alloc_max_size): Simplify.
9329 * cgraphunit.c (cgraph_node::expand): Adjust.
9330 * common.opt (larger_than_size, warn_frame_larger_than): Remove
9332 (frame_larger_than_size): Same.
9333 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Change options
9334 to take a HOST_WIDE_INT argument and accept a byte-size suffix.
9336 * doc/invoke.texi (GCC Command Options): Document option arguments.
9337 Explain byte-size arguments and suffixes.
9338 (-Wvla-larger-than, -Wno-alloc-size-larger-than): Update.
9339 (-Wno-alloca-larger-than, -Wno-vla-larger-than): Same.
9340 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Same.
9341 * doc/options.texi (UInteger): Expand.
9342 (Host_Wide_Int, ByteSize): Document new properties.
9343 * final.c (final_start_function_1): Include sizes in an error message.
9344 * function.c (frame_offset_overflow): Same.
9345 * gimple-ssa-warn-alloca.c (pass_walloca::gate): Adjust.
9346 (alloca_call_type_by_arg): Change function argument to HOST_WIDE_INT.
9347 Diagnose unbounded alloca calls only for limits of less than
9349 (alloca_call_type): Adjust. Diagnose possibly out-of-bounds alloca
9350 calls and VLA size only for limits of less than PTRDIFF_MAX. Same
9352 (pass_walloca::execute): Adjust. Diagnose alloca calls in loops
9353 only for limits of less than PTRDIFF_MAX.
9354 * langhooks-def.h (lhd_handle_option): Change function argument
9356 * langhooks.c (lhd_handle_option): Same.
9357 * langhooks.h (handle_option): Same.
9358 * opt-functions.awk (switch_bit_fields): Handle Host_Wide_Int and
9360 (var_type, var_type_struct): Same.
9361 (var_set): Handle ByteSize flag.
9362 * optc-gen.awk: Add comments to output to ease debugging. Make
9363 use of HOST_WIDE_INT where appropriate.
9364 * opts-gen-save.awk: Use %lx to format unsigned long.
9365 * opth-gen.awk: Change function argument to HOST_WIDE_INT.
9366 * opts-common.c (integral_argument): Return HOST_WIDE_INT and add
9367 arguments. Parse bytes-size suffixes.
9368 (enum_arg_to_value): Change function argument to HOST_WIDE_INT.
9369 (enum_value_to_arg): Same.
9370 (decode_cmdline_option): Handle cl_host_wide_int. Adjust.
9371 (handle_option): Adjust.
9372 (generate_option): Change function argument to HOST_WIDE_INT.
9373 (cmdline_handle_error): Adjust.
9374 (read_cmdline_option): Change function argument to HOST_WIDE_INT.
9375 (set_option): Change function argument to HOST_WIDE_INT.
9376 (option_enabled): Handle cl_host_wide_int.
9377 (get_option_state): Handle CLVC_SIZE.
9378 (control_warning_option): Same.
9379 * opts.c (common_handle_option): Change function argument to
9380 HOST_WIDE_INT. Remove handling of OPT_Walloca_larger_than_ and
9381 OPT_Wvla_larger_than_.
9382 * opts.h (enum cl_var_type): Add an enumerator.
9383 * stor-layout.c (layout_decl): Print a more meaningful warning.
9384 * toplev.c (output_stack_usage): Adjust.
9386 2018-07-20 Qing Zhao <qing.zhao@oracle.com>
9388 * builtins.c (expand_builtin_memcmp): Delete the last parameter for
9389 call to inline_expand_builtin_string_cmp.
9390 (expand_builtin_strcmp): Likewise.
9391 (expand_builtin_strncmp): Likewise.
9392 (inline_string_cmp): Delete the last parameter, change char_type_node
9393 to unsigned_char_type_node for strcmp/strncmp, add conversions to the
9395 (inline_expand_builtin_string_cmp): Delete the last parameter, give up
9396 the inlining expansion on target where the type of the call has same or
9397 narrower precision than unsigned char.
9399 2018-07-20 David Malcolm <dmalcolm@redhat.com>
9401 * Makefile.in (OBJS): Add json.o and optinfo-emit-json.o.
9402 (CFLAGS-optinfo-emit-json.o): Define TARGET_NAME.
9403 * common.opt (fsave-optimization-record): New option.
9404 * coretypes.h (struct kv_pair): Move here from dumpfile.c.
9405 * doc/invoke.texi (-fsave-optimization-record): New option.
9406 * dumpfile.c: Include "optinfo-emit-json.h".
9407 (struct kv_pair): Move to coretypes.h.
9408 (optgroup_options): Make non-static.
9409 (dump_context::end_scope): Call
9410 optimization_records_maybe_pop_dump_scope.
9411 * dumpfile.h (optgroup_options): New decl.
9412 * json.cc: New file.
9414 * optinfo-emit-json.cc: New file.
9415 * optinfo-emit-json.h: New file.
9416 * optinfo.cc: Include "optinfo-emit-json.h".
9417 (optinfo::emit): Call optimization_records_maybe_record_optinfo.
9418 (optinfo_enabled_p): Check optimization_records_enabled_p.
9419 (optinfo_wants_inlining_info_p): Likewise.
9420 * optinfo.h: Update comment.
9421 * profile-count.c (profile_quality_as_string): New function.
9422 * profile-count.h (profile_quality_as_string): New decl.
9423 (profile_count::quality): New accessor.
9424 * selftest-run-tests.c (selftest::run_tests): Call json_cc_tests
9425 and optinfo_emit_json_cc_tests.
9426 * selftest.h (selftest::json_cc_tests): New decl.
9427 (selftest::optinfo_emit_json_cc_tests): New decl.
9428 * toplev.c: Include "optinfo-emit-json.h".
9429 (compile_file): Call optimization_records_finish.
9430 (do_compile): Call optimization_records_start.
9431 * tree-ssa-live.c: Include optinfo.h.
9432 (remove_unused_scope_block_p): Retain inlining information if
9433 optinfo_wants_inlining_info_p returns true.
9435 2018-07-20 Richard Biener <rguenther@suse.de>
9438 * dwarf2out.c (dwarf2out_die_ref_for_decl): Test in_lto_p
9439 to cover -flto-partition=none.
9441 2018-07-20 Martin Liska <mliska@suse.cz>
9443 * tree.h (DECL_LOCATION_RANGE): Remove unused macro.
9444 (get_decl_source_range): Remove unused function.
9446 2018-07-20 Richard Biener <rguenther@suse.de>
9448 * tree-ssa-sccvn.h (struct vn_nary_op_s): Add next member.
9449 (struct vn_phi_s): Likewise.
9450 (struct vn_reference_s): Likewise.
9451 * tree-ssa-sccvn.c (vn_nary_op_hasher::equal): Add shortcut
9452 for searching the slot of an entry known to be in the hash itself.
9453 (vn_phi_hasher::equal): Likewise.
9454 (vn_reference_hasher::equal): Likewise.
9455 (last_inserted_ref, last_inserted_phi, last_inserted_nary): New
9457 (optimistic_info, current_info): Remove, keeping only valid_info.
9458 (vn_reference_lookup_1): Remove fallback lookup.
9459 (vn_reference_lookup_2): Likewise.
9460 (vn_nary_op_lookup_1): Likewise.
9461 (vn_phi_lookup): Likewise.
9462 (vn_nary_build_or_lookup_1): Make sure to not chain the built
9464 (vn_reference_insert): Adjust, chain the inserted hash element
9465 at last_inserted_ref.
9466 (vn_reference_insert_pieces): Likewise.
9467 (visit_reference_op_call): Likewise.
9468 (vn_nary_op_insert_into): Chain the inserted hash element at
9470 (vn_nary_op_insert_pieces): Adjust.
9471 (vn_nary_op_insert): Likewise.
9472 (vn_nary_op_insert_stmt): Likewise.
9473 (vn_phi_insert): Adjust, chain the inserted hash element at
9475 (process_scc): Remove clearing and copying the optimistic
9476 table. Instead remove elements inserted during an optimistic
9477 iteration from the single table we maintain.
9478 (init_scc_vn): Adjust.
9479 (free_scc_vn): Likewise.
9480 (sccvn_dom_walker::record_cond): Likewise.
9481 (sccvn_dom_walker::after_dom_children): Likewise.
9483 2018-07-19 Martin Sebor <msebor@redhat.com>
9485 PR tree-optimization/84047
9486 PR tree-optimization/83776
9487 * tree-vrp.c (vrp_prop::check_mem_ref): New function.
9488 (check_array_bounds): Call it.
9490 2018-07-19 Martin Sebor <msebor@redhat.com>
9492 * align.h (align_flags): Use member initialization.
9494 2018-07-19 David Malcolm <dmalcolm@redhat.com>
9496 * Makefile.in (OBJS): Add optinfo.o.
9497 * coretypes.h (class symtab_node): New forward decl.
9498 (struct cgraph_node): New forward decl.
9499 (class varpool_node): New forward decl.
9500 * dump-context.h: New file.
9501 * dumpfile.c: Include "optinfo.h", "dump-context.h", "cgraph.h",
9503 (refresh_dumps_are_enabled): Use optinfo_enabled_p.
9504 (set_dump_file): Call dumpfile_ensure_any_optinfo_are_flushed.
9505 (set_alt_dump_file): Likewise.
9506 (dump_context::~dump_context): New dtor.
9507 (dump_gimple_stmt): Move implementation to...
9508 (dump_context::dump_gimple_stmt): ...this new member function.
9509 Add the stmt to any pending optinfo, creating one if need be.
9510 (dump_gimple_stmt_loc): Move implementation to...
9511 (dump_context::dump_gimple_stmt_loc): ...this new member function.
9512 Start a new optinfo and add the stmt to it.
9513 (dump_gimple_expr): Move implementation to...
9514 (dump_context::dump_gimple_expr): ...this new member function.
9515 Add the stmt to any pending optinfo, creating one if need be.
9516 (dump_gimple_expr_loc): Move implementation to...
9517 (dump_context::dump_gimple_expr_loc): ...this new member function.
9518 Start a new optinfo and add the stmt to it.
9519 (dump_generic_expr): Move implementation to...
9520 (dump_context::dump_generic_expr): ...this new member function.
9521 Add the tree to any pending optinfo, creating one if need be.
9522 (dump_generic_expr_loc): Move implementation to...
9523 (dump_context::dump_generic_expr_loc): ...this new member
9524 function. Add the tree to any pending optinfo, creating one if
9526 (dump_printf): Move implementation to...
9527 (dump_context::dump_printf_va): ...this new member function. Add
9528 the text to any pending optinfo, creating one if need be.
9529 (dump_printf_loc): Move implementation to...
9530 (dump_context::dump_printf_loc_va): ...this new member function.
9531 Start a new optinfo and add the stmt to it.
9532 (dump_dec): Move implementation to...
9533 (dump_context::dump_dec): ...this new member function. Add the
9534 value to any pending optinfo, creating one if need be.
9535 (dump_context::dump_symtab_node): New member function.
9536 (dump_context::get_scope_depth): New member function.
9537 (dump_context::begin_scope): New member function.
9538 (dump_context::end_scope): New member function.
9539 (dump_context::ensure_pending_optinfo): New member function.
9540 (dump_context::begin_next_optinfo): New member function.
9541 (dump_context::end_any_optinfo): New member function.
9542 (dump_context::s_current): New global.
9543 (dump_context::s_default): New global.
9544 (dump_scope_depth): Delete global.
9545 (dumpfile_ensure_any_optinfo_are_flushed): New function.
9546 (dump_symtab_node): New function.
9547 (get_dump_scope_depth): Reimplement in terms of dump_context.
9548 (dump_begin_scope): Likewise.
9549 (dump_end_scope): Likewise.
9550 (selftest::temp_dump_context::temp_dump_context): New ctor.
9551 (selftest::temp_dump_context::~temp_dump_context): New dtor.
9552 (selftest::verify_item): New function.
9553 (ASSERT_IS_TEXT): New macro.
9554 (ASSERT_IS_TREE): New macro.
9555 (ASSERT_IS_GIMPLE): New macro.
9556 (selftest::test_capture_of_dump_calls): New test.
9557 (selftest::dumpfile_c_tests): Call it.
9558 * dumpfile.h (dump_printf, dump_printf_loc, dump_basic_block)
9559 (dump_generic_expr_loc, dump_generic_expr, dump_gimple_stmt_loc)
9560 (dump_gimple_stmt, dump_dec): Gather these related decls and add a
9561 descriptive comment.
9562 (dump_function, print_combine_total_stats, enable_rtl_dump_file)
9563 (dump_node, dump_bb): Move these unrelated decls.
9564 (class dump_manager): Add leading comment.
9565 * optinfo.cc: New file.
9566 * optinfo.h: New file.
9568 2018-07-19 Michael Collison <michael.collison@arm.com>
9569 Richard Henderson <rth@redhat.com>
9571 * config/aarch64/aarch64.md (subv<GPI>4, usubv<GPI>4): New patterns.
9572 (subti): Handle op1 zero.
9573 (subvti4, usub4ti4): New.
9574 (*sub<GPI>3_compare1_imm): New.
9575 (sub<GPI>3_carryinCV): New.
9576 (*sub<GPI>3_carryinCV_z1_z2, *sub<GPI>3_carryinCV_z1): New.
9577 (*sub<GPI>3_carryinCV_z2, *sub<GPI>3_carryinCV): New.
9579 2018-07-19 Michael Collison <michael.collison@arm.com>
9580 Richard Henderson <rth@redhat.com>
9582 * config/aarch64/aarch64.md: (addv<GPI>4, uaddv<GPI>4): New.
9583 (addti3): Create simpler code if low part is already known to be 0.
9584 (addvti4, uaddvti4): New.
9585 (*add<GPI>3_compareC_cconly_imm): New.
9586 (*add<GPI>3_compareC_cconly): New.
9587 (*add<GPI>3_compareC_imm): New.
9588 (*add<GPI>3_compareC): Rename from add<GPI>3_compare1; do not
9589 handle constants within this pattern..
9590 (*add<GPI>3_compareV_cconly_imm): New.
9591 (*add<GPI>3_compareV_cconly): New.
9592 (*add<GPI>3_compareV_imm): New.
9593 (add<GPI>3_compareV): New.
9594 (add<GPI>3_carryinC, add<GPI>3_carryinV): New.
9595 (*add<GPI>3_carryinC_zero, *add<GPI>3_carryinV_zero): New.
9596 (*add<GPI>3_carryinC, *add<GPI>3_carryinV): New.
9597 ((*add<GPI>3_compareC_cconly_imm): Replace 'ne' operator
9598 with 'comparison' operator.
9599 (*add<GPI>3_compareV_cconly_imm): Ditto.
9600 (*add<GPI>3_compareV_cconly): Ditto.
9601 (*add<GPI>3_compareV_imm): Ditto.
9602 (add<GPI>3_compareV): Ditto.
9603 (add<mode>3_carryinC): Ditto.
9604 (*add<mode>3_carryinC_zero): Ditto.
9605 (*add<mode>3_carryinC): Ditto.
9606 (add<mode>3_carryinV): Ditto.
9607 (*add<mode>3_carryinV_zero): Ditto.
9608 (*add<mode>3_carryinV): Ditto.
9610 2018-07-19 Michael Collison <michael.collison@arm.com>
9611 Richard Henderson <rth@redhat.com>
9613 * config/aarch64/aarch64-modes.def (CC_V): New.
9614 * config/aarch64/aarch64-protos.h
9615 (aarch64_addti_scratch_regs): Declare
9616 (aarch64_subvti_scratch_regs): Declare.
9617 (aarch64_expand_subvti): Declare.
9618 (aarch64_gen_unlikely_cbranch): Declare
9619 * config/aarch64/aarch64.c (aarch64_select_cc_mode): Test
9620 for signed overflow using CC_Vmode.
9621 (aarch64_get_condition_code_1): Handle CC_Vmode.
9622 (aarch64_gen_unlikely_cbranch): New function.
9623 (aarch64_addti_scratch_regs): New function.
9624 (aarch64_subvti_scratch_regs): New function.
9625 (aarch64_expand_subvti): New function.
9627 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
9629 * config/aarch64/aarch64-option-extensions.def: New entry for profile
9631 * config/aarch64/aarch64.h (AARCH64_FL_PROFILE): New.
9632 * doc/invoke.texi (aarch64-feature-modifiers): New entry for profile
9635 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
9638 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
9639 address check not strict.
9641 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
9643 * config/aarch64/aarch64-simd.md (aarch64_simd_mov<VQ:mode>): Replace
9645 (store_pair_lanes<mode>): Likewise.
9646 * config/aarch64/aarch64-protos.h (aarch64_addr_query_type): Add new
9647 enum value 'ADDR_QUERY_LDP_STP_N'.
9648 * config/aarch64/aarch64.c (aarch64_addr_query_type): Likewise.
9649 (aarch64_print_address_internal): Add declaration.
9650 (aarch64_print_ldpstp_address): Remove.
9651 (aarch64_classify_address): Adapt mode for 'ADDR_QUERY_LDP_STP_N'.
9652 (aarch64_print_operand): Change printing of 'y'.
9653 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Use
9654 new enum value 'ADDR_QUERY_LDP_STP_N', don't hardcode mode and use
9655 'true' rather than '1'.
9656 * config/aarch64/constraints.md (Uml): Likewise.
9657 (Uml): Rename to Umn.
9660 2018-07-19 Richard Biener <rguenther@suse.de>
9662 * tree-ssa-sccvn.h (struct vn_phi_s): Make phiargs member
9664 * tree-ssa-sccvn.c: Remove alloc-pool.h use.
9665 (vn_phi_hasher): Derive from nofree_ptr_hash and remove remove method.
9666 (vn_reference_hasher): Likewise.
9667 (struct vn_tables_s): Remove obstack and alloc-pool members.
9668 (vn_tables_obstack, vn_tables_insert_obstack): New global obstacks.
9669 (vn_nary_build_or_lookup_1): Manually build in vn_tables_insert_obstack.
9670 (vn_reference_insert): Allocate from obstack instead of from alloc-pool.
9671 (vn_reference_insert_pieces): Likewise.
9672 (alloc_vn_nary_op_noinit): Adjust.
9673 (vn_nary_op_insert_stmt): Allocate phiargs in-place.
9674 (vn_phi_eq): Adjust.
9675 (shared_lookup_phiargs): Remove.
9676 (vn_phi_lookup): Allocate temporary vn_phi_s on the stack.
9677 (vn_phi_insert): Allocate from obstack instead of from alloc-pool.
9678 (visit_reference_op_call): Likewise.
9679 (copy_nary, copy_phi, copy_reference): Remove.
9680 (process_scc): Rewind the obstack when iterating. Do not
9681 copy the elements to valid_info but just move them from one
9682 hashtable to the other.
9683 (allocate_vn_table): Adjust.
9684 (free_vn_table): Likewise.
9685 (init_scc_vn): Likewise.
9686 (free_scc_vn): Likewise.
9688 2018-07-19 H.J. Lu <hongjiu.lu@intel.com>
9691 * config/i386/i386.c (rest_of_insert_endbranch): Lookup
9692 indirect_return as function type attribute.
9693 (ix86_attribute_table): Change indirect_return to function
9695 * doc/extend.texi: Update indirect_return attribute.
9697 2018-07-19 Aldy Hernandez <aldyh@redhat.com>
9699 * wide-int.h (widest2_int): New.
9700 * gimple-fold.c (arith_overflowed_p): Use it.
9701 * tree.h (widest2_int_cst): New.
9702 * tree-vrp.c (wide_int_binop_overflow): Rename from
9703 vrp_int_const_binop.
9704 Rewrite to work on trees.
9705 (extract_range_from_multiplicative_op_1): Abstract code to...
9706 (wide_int_range_min_max): ...here.
9707 (wide_int_range_cross_product): ...and here.
9708 (extract_range_from_binary_expr_1): Abstract overflow code to...
9709 (wide_int_range_mult_wrapping): ...here.
9710 * tree-vrp.h (wide_int_range_cross_product): New.
9711 (wide_int_range_mult_wrapping): New.
9713 2018-07-19 Andrew Senkevich <andrew.senkevich@intel.com>
9714 Julia Koval <julia.koval@intel.com>
9716 * config/i386/x86-tune-costs.h (skylake_memcpy,
9717 skylake_memset): Replace rep_prefix with unrolling for size 512.
9719 2018-07-18 Kugan Vivekanandarajah <kuganv@linaro.org>
9722 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): Handle
9723 comparision with EQ_EXPR in last stmt.
9725 2018-07-18 Kelvin Nilsen <kelvin@gcc.gnu.org>
9727 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Rename
9728 this subsection to "PowerPC AltiVec/VSX Built-in Functions".
9729 (PowerPC AltiVec/VSX Built-in Functions): New name for subsection
9730 previously known as "PowerPC AltiVec Built-in Functions". Move
9731 some material to new subsubsections "PowerPC AltiVec Built-in
9732 Functions on ISA 2.06" and "PowerPC AltiVec Built-in Functions on
9734 (PowerPC Altivec Built-in Functions on ISA 2.05): New subsubsection.
9735 (PowerPC Altivec Built-in Functions on ISA 2.06): Likewise.
9736 (PowerPC Altivec Built-in Functions on ISA 2.07): Likewise.
9737 (PowerPC Altivec Built-in Functions on ISA 3.0): Likewise.
9739 2018-07-18 Richard Biener <rguenther@suse.de>
9741 PR tree-optimization/86557
9742 * tree-vect-patterns.c (vect_recog_divmod_pattern): Also handle
9745 2018-07-18 Ilya Leoshkevich <iii@linux.ibm.com>
9747 * config/s390/s390.c (s390_function_profiler): Generate CFI.
9749 2018-07-17 Jeff Law <law@redhat.com>
9751 * config/arm/arm.c (get_label_padding): Update for recent
9752 changes to label_to_alignment.
9754 PR tree-optimization/86010
9755 * tree-ssa-dse.c (compute_trims): Fix typo/thinko.
9757 * config/mips/mips.c (vr4130_align_insns): Update for recent
9758 changes to label_to_alignment.
9760 * config/frv/frv.c (frv_label_align): Update for recent changes
9761 to label_to_alignment.
9763 * config/nios2/nios2.c (nios2_label_align): Update for recent
9764 changes which dropped ALIGN_LABELS_LOG.
9766 2018-07-17 Andreas Schwab <schwab@linux-m68k.org>
9768 * config/m68k/m68k.md (umulsi3_highpart+1, const_umulsi3_highpart)
9769 (smulsi3_highpart+1, const_smulsi3_highpart): Add CC_STATUS_INIT.
9771 2018-07-17 Claudiu Zissulescu <claziss@synopsys.com>
9773 * config/arc/arc.c (arc_label_align): Use align_labels instead of
9774 deprecated align_labels_log.
9776 2018-07-17 Richard Biener <rguenther@suse.de>
9779 * dwarf2out.c (init_sections_and_labels): Always generate
9780 a debug_line_str_section for early LTO debug.
9781 (dwarf2out_finish): Reset debug_line_str_hash output early.
9782 Bump counter for extra dwarf5 .debug_loc labels to not conflict
9784 (dwarf2out_early_finish): Output debug_line_str.
9786 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
9788 * config/s390/s390.c (preferred_la_operand_p): Do not use LA with
9789 index register on z196 or later.
9791 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
9793 * config/s390/s390.c (s390_default_align): Set default function
9795 (s390_override_options_after_change): Call s390_default align.
9796 (s390_option_override_internal): Call s390_default_align.
9797 (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Define.
9799 2018-07-17 Jakub Jelinek <jakub@redhat.com>
9802 * omp-low.c (create_task_copyfn): Copy over also fields corresponding
9803 to _looptemp_ clauses, other than the first two.
9805 2018-07-17 Martin Liska <mliska@suse.cz>
9807 * opts.c: Do not enable OPT_falign_* for -Os.
9809 2018-07-17 Martin Liska <mliska@suse.cz>
9811 * align.h (MAX_CODE_ALIGN): New.
9812 (MAX_CODE_ALIGN_VALUE): New.
9813 * common/config/i386/i386-common.c (ix86_handle_option):
9814 (MAX_CODE_ALIGN): Moved to align.h.
9815 * final.c (MAX_CODE_ALIGN): Likewise.
9816 * opts.c (parse_and_check_align_values):
9817 (MAX_CODE_ALIGN): Likewise.
9818 (MAX_CODE_ALIGN_VALUE): Likewise.
9820 2018-07-17 Martin Liska <mliska@suse.cz>
9822 * config/i386/att.h (ASM_OUTPUT_ALIGN): Fix spacing
9823 in order to fulfil coding style.
9824 * config/i386/cygming.h (ASM_OUTPUT_ALIGN): Likewise.
9825 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
9826 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
9827 * config/iq2000/iq2000.h (ASM_OUTPUT_ALIGN): Likewise.
9828 * config/pa/pa.h (ASM_OUTPUT_ALIGN): Likewise.
9829 * config/sparc/sol2.h (ASM_OUTPUT_ALIGN_WITH_NOP): Likewise.
9830 * config/sparc/sparc.h (ASM_OUTPUT_ALIGN): Likewise.
9831 * config/visium/visium.h (ASM_OUTPUT_ALIGN): Likewise.
9832 (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
9834 2018-07-17 Martin Liska <mliska@suse.cz>
9836 * align.h: New file.
9837 * config/alpha/alpha.c (alpha_align_insns_1): Use align_functions
9839 * config/i386/i386.c (ix86_avoid_jump_mispredicts): Use new return type
9840 align_flags of label_to_alignment.
9841 * config/m32r/m32r.h (LOOP_ALIGN): Wrap returned values into
9843 * config/m68k/m68k.c: Do not use removed align_labels_value and
9845 * config/nds32/nds32.h (JUMP_ALIGN): Wrap result into align_flags class.
9846 (LOOP_ALIGN): Likewise.
9847 (LABEL_ALIGN): Likewise.
9848 * config/powerpcspe/powerpcspe.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
9849 Remove not used macro.
9850 (rs6000_loop_align): Change return type to align_flags.
9851 (rs6000_loop_align_max_skip): Remove.
9852 * config/rs6000/rs6000-protos.h (rs6000_loop_align):
9853 Change return type to align_flags.
9854 * config/rs6000/rs6000.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
9855 Remove not used macro.
9856 (rs6000_loop_align): Change return type to align_flags.
9857 (rs6000_loop_align_max_skip): Remove.
9858 * config/rx/rx.h (JUMP_ALIGN): Wrap integer values
9859 * config/rx/rx-protos.h (rx_align_for_label): Make it
9861 * config/rx/rx.c (rx_align_for_label): Change return type
9863 (rx_max_skip_for_label): Remove TARGET_ASM_*_ALIGN_MAX_SKIP
9865 into align_flags class.
9866 (LABEL_ALIGN): Likewise.
9867 (LOOP_ALIGN): Likewise.
9868 * config/s390/s390.c (s390_label_align): Use align_flags
9870 (s390_asm_output_function_label): Likewise.
9871 * config/sh/sh.c (sh_override_options_after_change):
9872 Use align_flags class directly without macros.
9873 (find_barrier): Likewise.
9874 (barrier_align): Likewise.
9875 (sh_loop_align): Likewise.
9876 * config/spu/spu.c (spu_option_override):
9877 Use align_flags_tuple::get_value instead of removed macros.
9878 (spu_sched_init): Likewise.
9879 * config/spu/spu.h (GTY): Likewise.
9880 * config/visium/visium.c (visium_option_override):
9881 Set "8" as default secondary alignment.
9882 * config/visium/visium.h (SUBALIGN_LOG): Define to 3
9883 in order to guarantee secondary alignment of 8.
9884 * coretypes.h: Include align.h header file.
9885 * doc/tm.texi: Remove TARGET_ASM_JUMP_ALIGN_MAX_SKIP,
9886 TARGET_ASM_LOOP_ALIGN_MAX_SKIP, TARGET_ASM_LABEL_ALIGN_MAX_SKIP
9887 and TARGET_ASM_LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP macros.
9888 * doc/tm.texi.in: Likewise.
9889 * final.c (struct label_alignment): Remove not used structure.
9890 (LABEL_ALIGN): Change type to align_flags.
9891 (LOOP_ALIGN): Likewise.
9892 (JUMP_ALIGN): Likewise.
9893 (default_loop_align_max_skip): Remove.
9894 (default_label_align_max_skip): Likewise.
9895 (default_jump_align_max_skip): Likewise.
9896 (default_label_align_after_barrier_max_skip):
9897 (LABEL_TO_ALIGNMENT): Change to access label_align vector.
9898 (LABEL_TO_MAX_SKIP): Remove.
9899 (label_to_alignment): Return align_flags type instead of integer.
9900 (label_to_max_skip): Remove.
9901 (align_fuzz): Use align_flags type.
9902 (compute_alignments): Use align_flags type and use align_flags::max
9903 to combine multiple alignments.
9904 (grow_label_align): Grow vec instead of C array.
9905 (update_alignments): Assign just LABEL_TO_ALIGNMENT.
9906 (shorten_branches): Use align_flags type and use align_flags::max
9907 to combine multiple alignments.
9908 (final_scan_insn_1): Remove usage of secondary alignment that comes
9909 from label alignment, but instead use proper secondary alignment
9910 which is computed in grow_label_align.
9911 * flags.h (struct align_flags_tuple): Move to align.h.
9912 (struct align_flags): Likewise.
9913 (state_align_loops): Rename to align_loops.
9914 (state_align_jumps): Rename to align_jumps.
9915 (state_align_labels): Rename to align_labels.
9916 (state_align_functions): Rename to align_functions.
9917 (align_loops_log): Remove.
9918 (align_jumps_log): Remove.
9919 (align_labels_log): Remove.
9920 (align_functions_log): Remove.
9921 (align_loops_max_skip): Remove.
9922 (align_jumps_max_skip): Remove.
9923 (align_labels_max_skip): Remove.
9924 (align_functions_max_skip): Remove.
9925 (align_loops_value): Remove.
9926 (align_jumps_value): Remove.
9927 (align_labels_value): Remove.
9928 (align_functions_value): Remove.
9929 * output.h (label_to_alignment): Change return type to align_flags.
9930 (label_to_max_skip): Remove.
9931 * target.def: Remove loop_align_max_skip, label_align_max_skip,
9932 jump_align_max_skip macros.
9933 * targhooks.h (default_loop_align_max_skip): Remove.
9934 (default_label_align_max_skip): Likewise.
9935 (default_jump_align_max_skip): Likewise.
9936 (default_label_align_after_barrier_max_skip): Remove.
9937 * toplev.c (read_log_maxskip): Use ::normalize function.
9938 (parse_N_M): Remove not used argument and also call ::normalize.
9939 (parse_alignment_opts): Do not pass unused arguments.
9940 * varasm.c (assemble_start_function): Use directly align_functions
9941 instead of removed macros.
9942 * system.h: Do not poison removed macros.
9944 2018-07-17 Jakub Jelinek <jakub@redhat.com>
9947 * gimplify.c (gimplify_omp_for): Ensure taskloop firstprivatized init
9948 and cond temporaries don't have reference type if iterator has
9949 pointer type. For init use &for_pre_body instead of pre_p if
9950 for_pre_body is non-empty.
9952 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
9954 * config/rs6000/rs6000.md (trunc<mode>sf2): Expand truncates of
9955 double-double modes to SFmode directly directly.
9956 (trunc<mode>sf2_fprs): Delete.
9958 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
9960 * config/rs6000/rs6000.c (init_float128_ibm): Use the correct names
9961 for conversions between IFmode and the decimal floating point modes.
9962 (init_float128_ieee): Use the correct names for conversions between
9963 KFmode and the decimal floating point modes.
9965 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
9967 * config/rs6000/rs6000.c (init_float128_ibm): Use more correct names
9968 for the conversions between TDmode and IFmode.
9969 (init_float128_ieee): Use more correct names for the conversions
9970 between TDmode and KFmode.
9972 2018-07-16 Jakub Jelinek <jakub@redhat.com>
9974 PR tree-optimization/86526
9975 * builtins.c (expand_builtin_memcmp): Formatting fixes.
9976 (inline_expand_builtin_string_cmp): Likewise.
9977 (inline_string_cmp): Likewise. Use c_readstr instead of
9978 builtin_memcpy_read_str. Add unit_mode temporary.
9980 2018-07-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
9983 * builtins.c (check_access): Bail out if range[0] is no INTEGER_CST.
9984 * expr.c (string_constant): Fix the element size of ARRAY_TYPE.
9986 2018-07-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
9988 * doc/extend.texi (PowerPC AltiVec Built-in Functions):
9989 Alphabetize prototypes of built-in functions, separating out
9990 built-in functions that are listed in this section but should be
9991 described elsewhere.
9993 2018-07-16 Uros Bizjak <ubizjak@gmail.com>
9996 * expmed.c (emit_store_flag): Do not emit setcc followed by a
9997 conditional move when trapping comparison was split to a
9998 non-trapping one (and vice versa).
10000 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
10002 * config/s390/s390.c (s390_function_profiler): Generate nops
10003 instead of profiler call sequences.
10004 * config/s390/s390.opt: Add the new option.
10006 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
10008 * config/s390/s390.c (s390_function_profiler): Generate
10009 __mcount_loc section.
10010 * config/s390/s390.opt: Add the new option.
10012 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
10014 * common.opt: Add the new warning.
10015 * config/s390/s390.c (s390_function_profiler): Emit "brasl
10016 %r0,__fentry__" when -mfentry is specified.
10017 (s390_option_override_internal): Disallow -mfentry for 31-bit
10019 * config/s390/s390.opt: Add the new option.
10021 2018-07-16 Richard Biener <rguenther@suse.de>
10024 * dwarf2out.c (dwarf2out_register_external_die): Assign DIE parents
10025 for function-local FUNCTION_DECL and RESULT_DECL immediately.
10027 2018-07-16 Martin Liska <mliska@suse.cz>
10030 * ipa-pure-const.c (malloc_candidate_p): Revert ::get
10033 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
10035 * config/arc/arcHS.md: Update ARCHS scheduling rules.
10037 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
10039 * config/arc/arc-arch.h (arc_tune_attr): Add new tune parameters
10041 * config/arc/arc-cpus.def (hs4x): New cpu.
10043 * config/arc/arc-tables.opt: Regenerate.
10044 * config/arc/arc.c (arc_sched_issue_rate): New function.
10045 (TARGET_SCHED_ISSUE_RATE): Define.
10046 (TARGET_SCHED_EXPOSED_PIPELINE): Likewise.
10047 * config/arc/arc.md (attr type): Add fpu_fuse, fpu_sdiv, fpu_ddiv,
10049 (attr tune): Add ARCHS4x tune values.
10050 (attr tune_dspmpy): Define.
10051 (*tst): Correct instruction type.
10052 * config/arc/arcHS.md: Don't use this automaton for ARCHS4x cpus.
10053 * config/arc/arcHS4x.md: New file.
10054 * config/arc/fpu.md: Update instruction type attributes.
10055 * config/arc/t-multilib: Regenerate.
10057 2018-07-16 Tom de Vries <tdevries@suse.de>
10060 * var-tracking.c (vt_initialize): Fix pre_dec handling.
10062 2018-07-16 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
10064 * config/aarch64/atomics.md (aarch64_store_execlusive<mode>): Add
10067 2018-07-16 Eric Botcazou <ebotcazou@adacore.com>
10069 PR tree-optimization/86514
10070 * tree-ssa-reassoc.c (init_range_entry) <CASE_CONVERT>: Return for a
10071 conversion to a boolean type from a type with greater precision.
10073 2018-07-16 Tom de Vries <tdevries@suse.de>
10075 * var-tracking.c (vt_initialize): Print adjusted insn slim if
10076 dump_flags request TDF_SLIM.
10078 2018-07-16 Aldy Hernandez <aldyh@redhat.com>
10080 * fold-const.c (int_const_binop_1): Abstract...
10081 (wide_int_binop): ...wide int code here.
10082 (poly_int_binop): ...poly int code here.
10083 Abstract the rest of int_const_binop_1 into int_const_binop.
10084 * fold-const.h (wide_int_binop): New.
10085 * tree-vrp.c (vrp_int_const_binop): Call wide_int_binop.
10086 Remove useless PLUS/MINUS_EXPR case.
10087 (zero_nonzero_bits_from_vr): Move wide int code...
10088 (zero_nonzero_bits_from_bounds): ...here.
10089 (extract_range_from_binary_expr_1): Move mask optimization code...
10090 (range_easy_mask_min_max): ...here.
10091 * tree-vrp.h (zero_nonzero_bits_from_bounds): New.
10092 (range_easy_mask_min_max): New.
10094 2018-07-15 Jeff Law <law@redhat.com>
10097 * config/sh/sh.c (output_mi_thunk): Remove dead conditional
10100 2018-07-14 Jim Wilson <jimw@sifive.com>
10102 * config/riscv/linux.h (TARGET_ASM_FILE_END): New.
10104 2018-07-14 Paul Koning <ni1d@arrl.net>
10106 * config/pdp11/pdp11.c (pdp11_rtx_costs): Bugfixes.
10108 2018-07-13 Jan Hubicka <hubicka@ucw.cz>
10110 * lto-streamer-out.c (copy_function_or_variable): Dump info about
10113 2018-07-13 Bill Schmidt <wschmidt@linux.ibm.com>
10114 Steve Munroe <munroesj52@gmail.com>
10116 * config/rs6000/emmintrin.h (_mm_and_si128): New function.
10117 (_mm_andnot_si128): Likewise.
10118 (_mm_or_si128): Likewise.
10119 (_mm_xor_si128): Likewise.
10121 2018-07-13 Qing Zhao <qing.zhao@oracle.com>
10123 PR middle-end/78809
10124 * builtins.c (expand_builtin_memcmp): Inline the calls first
10125 when result_eq is false.
10126 (expand_builtin_strcmp): Inline the calls first.
10127 (expand_builtin_strncmp): Likewise.
10128 (inline_string_cmp): New routine. Expand a string compare
10129 call by using a sequence of char comparison.
10130 (inline_expand_builtin_string_cmp): New routine. Inline expansion
10131 a call to str(n)cmp/memcmp.
10132 * doc/invoke.texi (--param builtin-string-cmp-inline-length):
10134 * params.def (BUILTIN_STRING_CMP_INLINE_LENGTH): New.
10136 2018-07-13 Richard Earnshaw <rearnsha@arm.com>
10138 * config/arm/driver-arm.c: Include arm-native.h.
10139 (host_detect_local_cpu): Use auto-generated data tables.
10140 (vendors, arm_cpu_table): Delete. Move part information to ...
10141 * config/arm/arm-cpus.in: ... here.
10142 * config/arm/parsecpu.awk (gen_native): New function.
10143 (vendor, part): New CPU fields.
10144 (END): Add support for building the native CPU detection tables.
10145 * config/arm/t-arm (arm-native.h): Add build rule.
10146 (driver-arm.o): Add dependency on arm-native.h.
10148 2018-07-13 Richard Biener <rguenther@suse.de>
10150 PR middle-end/85974
10151 * match.pd (addr1 - addr2): Allow either of the operand to
10154 2018-07-13 Tom de Vries <tdevries@suse.de>
10156 * tree-inline.c (remap_ssa_name): Save and reuse debug exprs generated
10159 2018-07-13 Jackson Woodruff <jackson.woodruff@arm.com>
10161 * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp): Use
10162 arrays instead of numbered variables.
10164 2018-07-13 Eric Botcazou <ebotcazou@adacore.com>
10166 * config/sparc/sparc-protos.h (sparc_compute_frame_size): Delete.
10167 * config/sparc/sparc.c (sparc_compute_frame_size): Make static.
10169 2018-07-13 Richard Biener <rguenther@suse.de>
10172 * dwarf2out.c (gen_type_die_with_usage): Use scope_die_for
10173 instead of get_context_die.
10175 2018-07-13 Kugan Vivekanandarajah <kuganv@linaro.org>
10176 Richard Biener <rguenther@suse.de>
10178 PR middle-end/86489
10179 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Check
10180 that the loop latch destination where phi is defined.
10182 2018-07-12 Kito Cheng <kito.cheng@gmail.com>
10184 * config/riscv/riscv.c (enum riscv_privilege_levels): Add UNKNOWN_MODE.
10185 (riscv_expand_epilogue): Add assertion to check interrupt mode.
10186 (riscv_set_current_function): Extract getting interrupt type to new
10188 (riscv_get_interrupt_type): New function.
10189 (riscv_merge_decl_attributes): New function, checking interrupt type is
10191 (TARGET_MERGE_DECL_ATTRIBUTES): Define.
10193 2018-07-12 Paul Koning <ni1d@arrl.net>
10195 * config/pdp11/pdp11.c (pdp11_output_def): Fix typo in .set
10198 2018-07-12 Paul Koning <ni1d@arrl.net>
10200 * doc/rtl.texi (REG_NONNEG): Remove decrement and branch until
10201 zero reference, add doloop_end instead.
10202 * doc/md.texi (decrement_and_branch_until_zero): Remove.
10203 (Looping patterns): Remove decrement_and_branch_until_zero. Add
10204 detail for doloop_end.
10206 2018-07-12 Martin Sebor <msebor@redhat.com>
10209 * attribs.c (decl_attributes): Reject conflicting attributes before
10210 calling attribute handlers.
10212 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
10214 * dumpfile.c (gcc::dump_manager::get_dump_file_name): Add PART
10216 (gcc::dump_manager::get_dump_file_name): likewise.
10217 (dump_begin): Likewise.
10218 * dumpfile.h (dump_begin): Update prototype.
10219 (gcc::dump_manager::get_dump_file_name,
10220 gcc::dump_manager::get_dump_file_name): Update prototype.
10222 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
10224 * internal-fn.h (vectorizable_internal_fn_p): New function.
10225 * tree-vect-slp.c (compatible_calls_p): Likewise.
10226 (vect_build_slp_tree_1): Remove nops argument. Handle calls
10227 to internal functions.
10228 (vect_build_slp_tree_2): Update call to vect_build_slp_tree_1.
10230 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
10232 * fold-const.h (inverse_conditions_p): Declare.
10233 * fold-const.c (inverse_conditions_p): New function.
10234 * match.pd: Use inverse_conditions_p. Add folds of view_converts
10235 that test the inverse condition of a conditional internal function.
10236 * internal-fn.h (vectorized_internal_fn_supported_p): Declare.
10237 * internal-fn.c (internal_fn_mask_index): Handle conditional
10238 internal functions.
10239 (vectorized_internal_fn_supported_p): New function.
10240 * tree-if-conv.c: Include internal-fn.h and fold-const.h.
10241 (any_pred_load_store): Replace with...
10242 (need_to_predicate): ...this new variable.
10243 (redundant_ssa_names): New variable.
10244 (ifcvt_can_use_mask_load_store): Move initial checks to...
10245 (ifcvt_can_predicate): ...this new function. Handle tree codes
10246 for which a conditional internal function exists.
10247 (if_convertible_gimple_assign_stmt_p): Use ifcvt_can_predicate
10248 instead of ifcvt_can_use_mask_load_store. Update after variable
10250 (predicate_load_or_store): New function, split out from
10251 predicate_mem_writes.
10252 (check_redundant_cond_expr): New function.
10253 (value_available_p): Likewise.
10254 (predicate_rhs_code): Likewise.
10255 (predicate_mem_writes): Rename to...
10256 (predicate_statements): ...this. Use predicate_load_or_store
10257 and predicate_rhs_code.
10258 (combine_blocks, tree_if_conversion): Update after above name changes.
10259 (ifcvt_local_dce): Handle redundant_ssa_names.
10260 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): Handle
10261 general conditional functions.
10262 * tree-vect-stmts.c (vectorizable_call): Likewise.
10264 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
10265 Alan Hayward <alan.hayward@arm.com>
10266 David Sherwood <david.sherwood@arm.com>
10268 * internal-fn.h (can_interpret_as_conditional_op_p): Declare.
10269 * internal-fn.c (can_interpret_as_conditional_op_p): New function.
10270 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Handle conditional
10271 plus and minus and convert them into IFN_COND_FMA-based sequences.
10272 (convert_mult_to_fma): Handle conditional plus and minus.
10274 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
10276 * doc/md.texi (cond_fma, cond_fms, cond_fnma, cond_fnms): Document.
10277 * optabs.def (cond_fma_optab, cond_fms_optab, cond_fnma_optab)
10278 (cond_fnms_optab): New optabs.
10279 * internal-fn.def (COND_FMA, COND_FMS, COND_FNMA, COND_FNMS): New
10280 internal functions.
10281 (FMA): Use DEF_INTERNAL_FLT_FN rather than DEF_INTERNAL_FLT_FLOATN_FN.
10282 * internal-fn.h (get_conditional_internal_fn): Declare.
10283 (get_unconditional_internal_fn): Likewise.
10284 * internal-fn.c (cond_ternary_direct): New macro.
10285 (expand_cond_ternary_optab_fn): Likewise.
10286 (direct_cond_ternary_optab_supported_p): Likewise.
10287 (FOR_EACH_COND_FN_PAIR): Likewise.
10288 (get_conditional_internal_fn): New function.
10289 (get_unconditional_internal_fn): Likewise.
10290 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 5.
10291 (gimple_match_op::gimple_match_op): Add a new overload for 5
10293 (gimple_match_op::set_op): Likewise.
10294 (gimple_resimplify5): Declare.
10295 * genmatch.c (decision_tree::gen): Generate simplifications for
10297 * gimple-match-head.c (gimple_simplify): Define an overload for
10298 5 operands. Handle calls with 5 arguments in the top-level overload.
10299 (convert_conditional_op): Handle conversions from unconditional
10300 internal functions to conditional ones.
10301 (gimple_resimplify5): New function.
10302 (build_call_internal): Pass a fifth operand.
10303 (maybe_push_res_to_seq): Likewise.
10304 (try_conditional_simplification): Try converting conditional
10305 internal functions to unconditional internal functions.
10306 Handle 3-operand unconditional forms.
10307 * match.pd (UNCOND_TERNARY, COND_TERNARY): Operator lists.
10308 Define ternary equivalents of the current rules for binary conditional
10309 internal functions.
10310 * config/aarch64/aarch64.c (aarch64_preferred_else_value): Handle
10311 ternary operations.
10312 * config/aarch64/iterators.md (UNSPEC_COND_FMLA, UNSPEC_COND_FMLS)
10313 (UNSPEC_COND_FNMLA, UNSPEC_COND_FNMLS): New unspecs.
10314 (optab): Handle them.
10315 (SVE_COND_FP_TERNARY): New int iterator.
10316 (sve_fmla_op, sve_fmad_op): New int attributes.
10317 * config/aarch64/aarch64-sve.md (cond_<optab><mode>)
10318 (*cond_<optab><mode>_2, *cond_<optab><mode_4)
10319 (*cond_<optab><mode>_any): New SVE_COND_FP_TERNARY patterns.
10321 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
10323 * target.def (preferred_else_value): New target hook.
10324 * doc/tm.texi.in (TARGET_PREFERRED_ELSE_VALUE): New hook.
10325 * doc/tm.texi: Regenerate.
10326 * targhooks.h (default_preferred_else_value): Declare.
10327 * targhooks.c (default_preferred_else_value): New function.
10328 * internal-fn.h (conditional_internal_fn_code): Declare.
10329 * internal-fn.c (FOR_EACH_CODE_MAPPING): New macro.
10330 (get_conditional_internal_fn): Use it.
10331 (conditional_internal_fn_code): New function.
10332 * gimple-match.h (gimple_match_cond): New struct.
10333 (gimple_match_op): Add a cond member function.
10334 (gimple_match_op::gimple_match_op): Update all forms to take a
10336 * genmatch.c (expr::gen_transform): Use the same condition as res_op
10337 for the suboperation, but don't specify a particular else_value.
10338 * tree-ssa-sccvn.c (vn_nary_simplify, vn_reference_lookup_3)
10339 (visit_nary_op, visit_reference_op_load): Pass
10340 gimple_match_cond::UNCOND to the gimple_match_op constructor.
10341 * gimple-match-head.c: Include tree-eh.h
10342 (convert_conditional_op): New function.
10343 (maybe_resimplify_conditional_op): Likewise.
10344 (gimple_resimplify1): Call maybe_resimplify_conditional_op.
10345 (gimple_resimplify2): Likewise.
10346 (gimple_resimplify3): Likewise.
10347 (gimple_resimplify4): Likewise.
10348 (maybe_push_res_to_seq): Return null for conditional operations.
10349 (try_conditional_simplification): New function.
10350 (gimple_simplify): Call it. Pass conditions to the gimple_match_op
10352 * match.pd: Fold VEC_COND_EXPRs of an IFN_COND_* call to a new
10354 * config/aarch64/aarch64.c (aarch64_preferred_else_value): New
10356 (TARGET_PREFERRED_ELSE_VALUE): Redefine.
10358 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
10360 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
10362 (hash_tree): Do not hash DECL_FCONTEXT
10363 * tree-streamer-in.c (lto_input_ts_field_decl_tree_pointers):
10364 Do not stream DECL_FCONTEXT.
10365 * tree-streamer-out.c (write_ts_field_decl_tree_pointers): Likewise.
10366 * tree.c (free_lang_data_in_decl): Free DECL_FCONTEXT.
10368 2018-07-12 Richard Biener <rguenther@suse.de>
10371 * dwarf2out.c (gen_block_die): Only output blocks when they have
10372 at least one !DECL_IGNORED_P variable.
10374 2018-07-12 Richard Biener <rguenther@suse.de>
10377 * config/gnu-user.h (GNU_USER_TARGET_NO_PTHREADS_LIB_SPEC):
10378 Remove -mieee-fp handling.
10380 2018-07-12 Richard Biener <rguenther@suse.de>
10382 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Remove bogus
10383 left-over from last patch.
10385 2018-07-12 Jakub Jelinek <jakub@redhat.com>
10387 PR tree-optimization/86492
10388 * gimple-ssa-store-merging.c
10389 (imm_store_chain_info::coalesce_immediate_stores): Call
10390 check_no_overlap even for the merge_overlapping case. Formatting fix.
10392 2018-07-12 Richard Biener <rguenther@suse.de>
10394 PR middle-end/86479
10395 * fold-const.c (fold_binary_op_with_conditional_arg): Do not
10396 move possibly trapping operations into the conditional.
10398 2018-07-12 Richard Biener <rguenther@suse.de>
10400 * tree-ssa-sccvn.c (mprts_hook_cnt): Remove.
10401 (vn_lookup_simplify_result): Remove recursion limit applied
10403 (vn_nary_build_or_lookup_1): Adjust.
10404 (try_to_simplify): Likewise.
10405 * gimple-match-head.c (gimple_resimplify1): Instead apply one
10407 (gimple_resimplify2): Likewise.
10408 (gimple_resimplify3): Likewise.
10409 (gimple_resimplify4): Likewise.
10411 2018-07-11 Jakub Jelinek <jakub@redhat.com>
10413 * config/i386/avx512bitalgintrin.h (_mm512_mask_bitshuffle_epi64_mask):
10414 Use __mmask64 type instead of __mmask8 for __M argument.
10415 * config/i386/avx512fintrin.h (_mm512_mask_xor_epi64,
10416 _mm512_maskz_xor_epi64): Use __mmask8 type instead of __mmask16 for
10418 (_mm512_mask_cmpneq_epi64_mask): Use __mmask8 type instead of
10419 __mmask16 for __M argument.
10420 (_mm512_maskz_insertf32x4, _mm512_maskz_inserti32x4,
10421 _mm512_mask_insertf32x4, _mm512_mask_inserti32x4): Cast last argument
10422 to __mmask16 instead of __mmask8.
10423 * config/i386/avx512vlintrin.h (_mm_mask_add_ps, _mm_maskz_add_ps,
10424 _mm256_mask_add_ps, _mm256_maskz_add_ps, _mm_mask_sub_ps,
10425 _mm_maskz_sub_ps, _mm256_mask_sub_ps, _mm256_maskz_sub_ps,
10426 _mm256_maskz_cvtepi32_ps, _mm_maskz_cvtepi32_ps): Use __mmask8 type
10427 instead of __mmask16 for __U argument.
10428 * config/i386/avx512vlbwintrin.h (_mm_mask_cmp_epi8_mask): Use
10429 __mmask16 instead of __mmask8 for __U argument.
10430 (_mm256_mask_cmp_epi8_mask): Use __mmask32 instead of __mmask16 for
10432 (_mm256_cmp_epi8_mask): Use __mmask32 return type instead of
10434 (_mm_mask_cmp_epu8_mask): Use __mmask16 instead of __mmask8 for __U
10436 (_mm256_mask_cmp_epu8_mask): Use __mmask32 instead of __mmask16 for
10438 (_mm256_cmp_epu8_mask): Use __mmask32 return type instead of
10440 (_mm_mask_cmp_epi16_mask): Cast last argument to __mmask8 instead
10442 (_mm256_mask_cvtepi8_epi16): Use __mmask16 instead of __mmask32 for
10444 (_mm_mask_cvtepi8_epi16): Use __mmask8 instead of __mmask32 for
10446 (_mm256_mask_cvtepu8_epi16): Use __mmask16 instead of __mmask32 for
10448 (_mm_mask_cvtepu8_epi16): Use __mmask8 instead of __mmask32 for
10450 (_mm256_mask_cmpneq_epu8_mask, _mm256_mask_cmplt_epu8_mask,
10451 _mm256_mask_cmpge_epu8_mask, _mm256_mask_cmple_epu8_mask): Change
10452 return type as well as __M argument type and all casts from __mmask8
10454 (_mm256_mask_cmpneq_epu16_mask, _mm256_mask_cmplt_epu16_mask,
10455 _mm256_mask_cmpge_epu16_mask, _mm256_mask_cmple_epu16_mask): Change
10456 return type as well as __M argument type and all casts from __mmask8
10458 (_mm256_mask_cmpneq_epi8_mask, _mm256_mask_cmplt_epi8_mask,
10459 _mm256_mask_cmpge_epi8_mask, _mm256_mask_cmple_epi8_mask): Change
10460 return type as well as __M argument type and all casts from __mmask8
10462 (_mm256_mask_cmpneq_epi16_mask, _mm256_mask_cmplt_epi16_mask,
10463 _mm256_mask_cmpge_epi16_mask, _mm256_mask_cmple_epi16_mask): Change
10464 return type as well as __M argument type and all casts from __mmask8
10466 * config/i386/avx512vbmi2vlintrin.h (_mm_mask_shrdi_epi32,
10467 _mm_mask_shldi_epi32): Cast last argument to __mmask8 instead of
10470 2018-07-11 Grazvydas Ignotas <notasas@gmail.com>
10472 * config/i386/avx512bwintrin.h: (_mm512_mask_cmp_epi8_mask,
10473 _mm512_mask_cmp_epu8_mask): Use __mmask64 type instead of __mmask32
10476 2018-07-11 Paul Koning <ni1d@arrl.net>
10478 * doc/md.texi (define_subst): Document how multiple occurrences of
10479 the same argument in the replacement pattern are handled.
10481 2018-07-11 Paul Koning <ni1d@arrl.net>
10483 * doc/extend.texi (Common Variable Attributes): Move "mode" into
10484 alphabetical order.
10485 (Common Type Attributes): Add "mode" attribute.
10487 2018-07-11 Jan Hubicka <hubicka@ucw.cz>
10489 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not
10490 stream DECL_ORIGINAL_TYPE.
10491 (DFS::DFS_write_tree_body): Drop hack handling local external decls.
10492 (hash_tree): Do not walk DECL_ORIGINAL_TYPE.
10493 * tree-streamer-in.c (lto_input_ts_decl_non_common_tree_pointers):
10494 Do not walk original type.
10495 * tree-streamer-out.c (streamer_write_chain): Drop hack handling
10497 (write_ts_decl_non_common_tree_pointers): Do not stream
10499 * tree.c (free_lang_data_in_decl): Clear DECL_ORIGINAL_TYPE.
10500 (find_decls_types_r): Do not walk DEC_ORIGINAL_TYPE.
10502 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
10504 * tree-ssa-threadupdate.c (thread_through_all_blocks): Do not jump
10505 thread twice from the same starting edge.
10507 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
10509 * vr-values.c (gimple_stmt_nonzero_p): Abstract common code to...
10510 * gimple.c (gimple_call_nonnull_result_p): ...here...
10511 (gimple_call_nonnull_arg): ...and here.
10512 * gimple.h (gimple_call_nonnull_result_p): New.
10513 (gimple_call_nonnull_arg): New.
10515 2018-07-11 Richard Earnshaw <rearnsha@arm.com>
10517 * config/arm/arm-cpus.in: Move information from fpu field of each
10518 cpu definition to the isa field.
10519 * config/arm/parsecpu.awk (fpu): Delete match rule.
10520 (gen_comm_data): Don't add bits from the CPU's FPU entry.
10522 2018-07-11 Richard Biener <rguenther@suse.de>
10525 * dwarf2out.c (init_sections_and_labels): Use
10526 output_asm_line_debug_info consistently.
10527 (dwarf2out_early_finish): Likewise.
10528 (dwarf2out_finish): Remove DW_AT_stmt_list from early generated
10531 2018-07-11 Richard Biener <rguenther@suse.de>
10533 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1):
10534 Rework father_bb setting in a way to avoid propagating constants
10535 multiple times on a loop body.
10537 2018-07-10 Mark Wielaard <mark@klomp.org>
10540 * dwarf2out.c (output_macinfo_op): Fix dwarf_FORM typo in gcc_assert.
10542 2018-07-10 Richard Biener <rguenther@suse.de>
10544 * hash-map.h (hash_map::iterator::operator*): Return
10545 references to key and value.
10547 2018-07-10 Jakub Jelinek <jakub@redhat.com>
10550 * gimplify.c (find_combined_omp_for): Add DATA argument, in addition
10551 to finding the inner OMP_FOR/OMP_SIMD stmt find non-trivial wrappers,
10552 BLOCKs with BLOCK_VARs, OMP_PARALLEL in between, OMP_FOR in between.
10553 (gimplify_omp_for): For composite loops, move outer
10554 OMP_{DISTRIBUTE,TASKLOOP,FOR,PARALLEL} right around innermost
10555 OMP_FOR/OMP_SIMD if there are any non-trivial wrappers. For class
10556 iterators add any needed clauses. Allow OMP_FOR_ORIG_DECLS to contain
10557 TREE_LIST for both the original class iterator and the "last" helper
10558 var. Gimplify OMP_FOR_PRE_BODY before the outermost composite
10559 loop, remember has_decl_expr from outer composite loops for the
10560 innermost OMP_SIMD in TREE_PRIVATE bit on OMP_FOR_INIT.
10562 2018-07-09 Martin Sebor <msebor@redhat.com>
10564 PR middle-end/77357
10565 PR middle-end/86428
10566 * builtins.c (c_strlen): Avoid out-of-bounds warnings when
10567 accessing implicitly initialized array elements.
10568 * expr.c (string_constant): Handle string initializers of
10569 character arrays within aggregates.
10570 * gimple-fold.c (fold_array_ctor_reference): Add argument.
10571 Store element offset. As a special case, handle zero size.
10572 (fold_nonarray_ctor_reference): Same.
10573 (fold_ctor_reference): Add argument. Store subobject offset.
10574 * gimple-fold.h (fold_ctor_reference): Add argument.
10576 2018-07-09 Paul Koning <ni1d@arrl.net>
10578 * config/pdp11/pdp11.c (pdp11_addr_cost): New function.
10579 (pdp11_insn_cost): New function.
10580 (pdp11_md_asm_adjust): New function.
10581 (TARGET_INVALID_WITHIN_DOLOOP): Define.
10582 (pdp11_rtx_costs): Update to match machine better.
10583 (output_addr_const_pdp11): Correct format mismatch warnings.
10584 * config/pdp11/pdp11.h (SLOW_BYTE_ACCESS): Correct definition.
10585 * config/pdp11/pdp11.md: General change to add base_cost and/or
10586 length attributes for use by new pdp11_insn_cost function.
10587 (MIN_BRANCH): Correct definition.
10589 (doloop_end): Use standard pattern name for looping pattern.
10590 (doloop_end_nocc): New.
10591 (movsf): Add another constraint alternative.
10592 (zero_extendqihi2): Add constraint alternatives for not in place
10594 (zero_extendhisi2): Remove.
10595 (shift patterns): Add CC handling variants.
10599 (define_peephole2): New peephole to recognize mov that sets CC for
10602 2018-07-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10604 * config/sparc/sparc.c (sparc_fold_builtin) <SPARC_BUILTIN_PDIST,
10605 SPARC_BUILTIN_PDISTN>: Adapt for signature change of wi::neg,
10608 2018-07-09 Jakub Jelinek <jakub@redhat.com>
10611 * real.c (real_nextafter): Return true if result is denormal.
10613 2018-07-09 Martin Liska <mliska@suse.cz>
10615 * common.opt: Add back wrongly removed attribute.
10617 2018-07-09 Richard Biener <rguenther@suse.de>
10620 * dwarf2out.c (gen_block_die): For an early generated DIE
10621 always output high/low PC attributes.
10623 2018-07-09 Tom de Vries <tdevries@suse.de>
10625 * cfgexpand.c (expand_debug_source_expr): Handle VAR_DECL.
10626 * tree-inline.c (remap_ssa_name): Handle default def ssa_name mapping
10627 onto VAR_DECL with abstract origin.
10629 2018-07-07 Jim Wilson <jimw@sifive.com>
10631 * config/riscv/riscv.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): New.
10633 2018-07-07 Tom de Vries <tdevries@suse.de>
10635 * tree-dfa.c (dump_enumerated_decls): Handle cfun->cfg == NULL.
10637 2018-07-07 Aldy Hernandez <aldyh@redhat.com>
10639 * tree-vrp.c (vrp_int_const_binop): Change overflow type to
10641 (combine_bound): Use wide-int overflow calculation instead of
10643 * calls.c (maybe_warn_alloc_args_overflow): Change overflow type to
10645 * fold-const.c (int_const_binop_2): Same.
10646 (extract_muldiv_1): Same.
10647 (fold_div_compare): Same.
10648 (fold_abs_const): Same.
10650 * poly-int.h (add): Same.
10654 * predict.c (predict_iv_comparison): Same.
10655 * profile-count.c (slow_safe_scale_64bit): Same.
10656 * simplify-rtx.c (simplify_const_binary_operation): Same.
10657 * tree-chrec.c (tree_fold_binomial): Same.
10658 * tree-data-ref.c (split_constant_offset_1): Same.
10659 * tree-if-conv.c (idx_within_array_bound): Same.
10660 * tree-scalar-evolution.c (iv_can_overflow_p): Same.
10661 * tree-ssa-phiopt.c (minmax_replacement): Same.
10662 * tree-vect-loop.c (is_nonwrapping_integer_induction): Same.
10663 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Same.
10664 * vr-values.c (vr_values::adjust_range_with_scev): Same.
10665 * wide-int.cc (wi::add_large): Same.
10666 (wi::mul_internal): Same.
10667 (wi::sub_large): Same.
10668 (wi::divmod_internal): Same.
10669 * wide-int.h: Change overflow type to overflow_type for neg, add,
10670 mul, smul, umul, div_trunc, div_floor, div_ceil, div_round,
10671 mod_trunc, mod_ceil, mod_round, add_large, sub_large,
10672 mul_internal, divmod_internal.
10673 (overflow_type): New enum.
10674 (accumulate_overflow): New.
10676 2018-07-06 Kugan Vivekanandarajah <kugan.vivekanandarajah@linaro.org>
10678 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): New.
10679 (tree_ssa_phiopt_worker): Call cond_removal_in_popcount_pattern.
10681 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
10683 * tree-ssa-loop-niter.c (number_of_iterations_popcount): If popcount
10684 argument is checked for zero before entering loop, avoid checking again.
10686 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
10688 * gimplify.h (generic_expr_could_trap_p): Set as global function.
10689 * gimplify.h (generic_expr_could_trap_p): Likwise.
10690 * tree-scalar-evolution.c (expression_expensive_p): Handle COND_EXPR.
10692 2018-07-06 Jakub Jelinek <jakub@redhat.com>
10694 PR tree-optimization/86401
10695 * fold-const.c (fold_binary_loc) <case BIT_AND_EXPR>: Move the
10696 ((A & N) + B) & M -> (A + B) & M etc. optimization into ...
10697 (fold_bit_and_mask): ... here. New helper function for match.pd.
10698 * fold-const.h (fold_bit_and_mask): Declare.
10699 * match.pd (((A & N) + B) & M -> (A + B) & M): New optimization.
10701 2018-07-06 Peter Bergner <bergner@linux.ibm.com>
10704 * target.def (translate_mode_attribute): New hook.
10705 * targhooks.h (default_translate_mode_attribute): Declare.
10706 * targhooks.c (default_translate_mode_attribute): New function.
10707 * doc/tm.texi.in (TARGET_TRANSLATE_MODE_ATTRIBUTE): New hook.
10708 * doc/tm.texi: Regenerate.
10709 * config/rs6000/rs6000.c (TARGET_TRANSLATE_MODE_ATTRIBUTE): Define.
10710 (rs6000_translate_mode_attribute): New function.
10712 2018-07-06 Paul Koning <ni1d@arrl.net>
10714 * doc/md.texi (define_split): Document DONE and FAIL.
10715 (define_peephole2): Ditto.
10717 2018-07-05 Jeff Law <law@redhat.com>
10719 PR tree-optimization/86010
10720 * tree-ssa-dse.c (compute_trims): More aggressively trim at
10721 both the head and tail of mem* and str* calls.
10723 2018-07-05 Jim Wilson <jimw@sifive.com>
10725 * config.gcc (riscv*-*-*): When setting xlen, handle riscv-*.
10727 2018-07-05 Indu Bhagat <indu.bhagat@oracle.com>
10729 * config/aarch64/aarch64-simd.md: correct flags text for
10730 MIN_EXPR replacement.
10732 2018-07-05 James Clarke <jrtc27@jrtc27.com>
10734 * configure: Regenerated.
10736 2018-07-05 Carl Love <cel@us.ibm.com>
10738 * config/rs6000/rs6000-c.c: Map ALTIVEC_BUILTIN_VEC_UNPACKH for
10739 float argument to VSX_BUILTIN_DOUBLEH_V4SF.
10740 Map ALTIVEC_BUILTIN_VEC_UNPACKL for float argument to
10741 VSX_BUILTIN_DOUBLEL_V4SF.
10743 2018-07-05 Martin Sebor <msebor@redhat.com>
10746 * tree-ssa-strlen.c (maybe_set_strlen_range): Use type size rather
10747 than its domain to compute its the upper bound of a char array.
10749 2018-07-05 Nathan Sidwell <nathan@acm.org>
10751 Replace NO_IMPLICIT_EXTERN_C with SYSTEM_IMPLICIT_EXTERN_C.
10752 * doc/cpp.texi: Update comment.
10753 * doc/tm.texi: Rebuilt.
10754 * doc/tm.texi.in (NO_IMPLICIT_EXTERN_C): Replace with ...
10755 (SYSTEM_IMPLICIT_EXTERN_C): ... this, opposite sense.
10756 * doc/extend.texi (Backwards Compatibility): Clarify it is system
10757 headers affected by extern "C".
10758 * system.h: Poison NO_IMPLICIT_EXTERN_C.
10759 * config/alpha/alpha.h, config/arm/uclinux-elf.h,
10760 config/bfin/elf.h, config/cris/cris.h, config/darwin.h,
10761 config/dragonfly.h, config/freebsd.h, config/gnu-user.h,
10762 config/i386/cygming.h, config/i386/djgpp.h, config/i386/nto.h,
10763 config/ia64/hpux.h, config/lm32/lm32.h, config/lm32/uclinux-elf.h,
10764 config/lynx.h, config/mips/elf.h, config/mmix/mmix.h,
10765 config/netbsd.h, config/pa/pa-hpux.h, config/powerpcspe/sysv4.h,
10766 config/riscv/elf.h, config/rs6000/sysv4.h, config/rtems.h,
10767 config/s390/tpf.h, config/sh/newlib.h, config/sol2.h,
10768 config/sparc/openbsd64.h, config/sparc/sp-elf.h,
10769 config/sparc/sp64-elf.h, config/spu/spu.h,
10770 config/stormy16/stormy16.h, config/v850/v850.h,
10771 config/visium/visium.h, config/vx-common.h, config/xtensa/elf.h: Don't
10772 define NO_IMPLICIT_EXTERN_C.
10773 * config/rs6000/aix.h: Set SYSTEM_IMPLICIT_EXTERN_C.
10775 2018-07-05 Tamar Christina <tamar.christina@arm.com>
10778 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
10779 instead of GET_MODE_SIZE when comparing Units.
10781 2018-07-05 Tamar Christina <tamar.christina@arm.com>
10784 * rtlanal.c (set_noop_p): Constrain on mode change,
10785 include hard-reg-set.h
10787 2018-07-05 Tamar Christina <tamar.christina@arm.com>
10789 * config/aarch64/aarch64.c (aarch64_expand_movmem): Fix mode size.
10791 2018-07-05 Jakub Jelinek <jakub@redhat.com>
10794 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
10797 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
10799 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
10801 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
10804 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
10806 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
10808 2018-07-04 Eric Botcazou <ebotcazou@adacore.com>
10810 PR middle-end/86380
10811 * expmed.c (choose_multiplier): Fix incorrect comparison with mask.
10813 2018-07-04 Aldy Hernandez <aldyh@redhat.com>
10815 * tree-vrp.c (extract_range_from_binary_expr_1): Initialize
10816 neg_*_op* variables.
10818 2018-07-04 Martin Liska <mliska@suse.cz>
10820 * tree-switch-conversion.c: Define
10821 max_ratio_for_speed and max_ratio_for_size constants.
10823 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
10824 Martin Liska <mliska@suse.cz>
10826 PR middle-end/66240
10829 * common.opt: Rename align options with 'str_' prefix.
10830 * common/config/i386/i386-common.c (set_malign_value): New
10832 (ix86_handle_option): Use it to set -falign-* options/
10833 * config/aarch64/aarch64-protos.h (struct tune_params): Change
10834 type from int to string.
10835 * config/aarch64/aarch64.c: Update default values from int
10837 * config/alpha/alpha.c (alpha_override_options_after_change):
10839 * config/arm/arm.c (arm_override_options_after_change_1): Likewise.
10840 * config/i386/dragonfly.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
10841 max skip conditionally.
10842 * config/i386/freebsd.h (SUBALIGN_LOG): New.
10843 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
10844 max skip conditionally.
10845 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
10846 max skip conditionally.
10847 * config/i386/gnu-user.h (SUBALIGN_LOG): New.
10848 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
10849 max skip conditionally.
10850 * config/i386/i386.c (struct ptt): Change type from int to
10852 (ix86_default_align): Set default values.
10853 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Print
10854 max skip conditionally.
10855 * config/i386/iamcu.h (SUBALIGN_LOG): New.
10856 (ASM_OUTPUT_MAX_SKIP_ALIGN):
10857 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN):
10858 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
10859 max skip conditionally.
10860 * config/i386/openbsdelf.h (SUBALIGN_LOG): New.
10861 (ASM_OUTPUT_MAX_SKIP_ALIGN) Print max skip conditionally.:
10862 * config/i386/x86-64.h (SUBALIGN_LOG): New.
10863 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
10864 max skip conditionally.
10865 (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
10866 * config/ia64/ia64.c (ia64_option_override): Set default values
10867 for alignment options.
10868 * config/m68k/m68k.c: Handle new str_align_* options.
10869 * config/mips/mips.c (mips_set_compression_mode): Change
10871 (mips_option_override): Set default values for options.
10872 * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
10874 * config/rs6000/rs6000.c (rs6000_option_override_internal):
10876 * config/rx/rx.c (rx_option_override): Likewise.
10877 * config/rx/rx.h (JUMP_ALIGN): Use align_jumps_log.
10878 (LABEL_ALIGN): Use align_labels_log.
10879 (LOOP_ALIGN): Use align_loops_align.
10880 * config/s390/s390.c (s390_asm_output_function_label): Use new
10882 * config/sh/sh.c (sh_override_options_after_change):
10883 Change type of constants.
10884 * config/spu/spu.c (spu_sched_init): Likewise.
10885 * config/sparc/sparc.c (sparc_option_override): Set default
10886 values for options.
10887 * config/visium/visium.c (visium_option_override): Likewise.
10888 * config/visium/visium.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Do not
10889 emit p2align format with last argument if it's not needed.
10890 * doc/invoke.texi: Document extended format of -falign-*.
10891 * final.c: Use align_labels alignment.
10892 * flags.h (struct target_flag_state): Change type to use
10894 (struct align_flags_tuple): New.
10895 (struct align_flags): Likewise.
10896 (align_loops_log): Redefine macro to use new types.
10897 (align_loops_max_skip): Redefine macro to use new types.
10898 (align_jumps_log): Redefine macro to use new types.
10899 (align_jumps_max_skip): Redefine macro to use new types.
10900 (align_labels_log): Redefine macro to use new types.
10901 (align_labels_max_skip): Redefine macro to use new types.
10902 (align_functions_log): Redefine macro to use new types.
10903 (align_loops): Redefine macro to use new types.
10904 (align_jumps): Redefine macro to use new types.
10905 (align_labels): Redefine macro to use new types.
10906 (align_functions): Redefine macro to use new types.
10907 (align_functions_max_skip): Redefine macro to use new types.
10908 (align_loops_value): New macro.
10909 (align_jumps_value): New macro.
10910 (align_labels_value): New macro.
10911 (align_functions_value): New macro.
10912 * function.c (invoke_set_current_function_hook): Propagate
10913 alignment values from flags to global variables default in
10915 * ipa-icf.c (sem_function::equals_wpa): Use
10916 cl_optimization_option_eq instead of memcmp.
10917 * lto-streamer.h (cl_optimization_stream_out): Support streaming
10919 (cl_optimization_stream_in): Likewise.
10920 * optc-save-gen.awk: Support strings in cl_optimization.
10921 * opth-gen.awk: Likewise.
10922 * opts.c (finish_options): Remove error checking of invalid
10924 (MAX_CODE_ALIGN): Remove.
10925 (MAX_CODE_ALIGN_VALUE): Likewise.
10926 (parse_and_check_align_values): New function.
10927 (check_alignment_argument): Likewise.
10928 (common_handle_option): Use check_alignment_argument.
10929 * opts.h (parse_and_check_align_values): Declare.
10930 * toplev.c (init_alignments): Remove.
10931 (read_log_maxskip): New.
10932 (parse_N_M): Likewise.
10933 (parse_alignment_opts): Likewise.
10934 (backend_init_target): Remove usage of init_alignments.
10935 * toplev.h (parse_alignment_opts): Declare.
10936 * tree-streamer-in.c (streamer_read_tree_bitfields): Add new
10938 * tree-streamer-out.c (streamer_write_tree_bitfields): Likewise.
10939 * tree.c (cl_option_hasher::equal): New.
10940 * varasm.c: Use new global macros.
10942 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
10944 * config/i386/dragonfly.h: (ASM_OUTPUT_MAX_SKIP_ALIGN):
10945 Use a simpler align directive also if MAXSKIP = ALIGN-1.
10946 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
10947 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
10948 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
10949 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
10950 * config/i386/freebsd.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Remove "If N
10951 is large, do at least 8 byte alignment" code. Add SUBALIGN_LOG
10952 define. Use a simpler align directive also if MAXSKIP = ALIGN-1.
10953 * config/i386/gnu-user.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
10954 * config/i386/iamcu.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
10955 * config/i386/openbsdelf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
10956 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
10958 2018-07-04 Martin Liska <mliska@suse.cz>
10959 Jonathan Wakely <jwakely@redhat.com>
10961 * coverage.c: Use correct type.
10962 * doc/invoke.texi: Language correction.
10964 2018-07-03 H.J. Lu <hongjiu.lu@intel.com>
10967 * config/i386/i386.c (rest_of_insert_endbranch): Also generate
10968 ENDBRANCH for non-tail call which may return via indirect branch.
10969 * doc/extend.texi: Document indirect_return attribute.
10971 2018-07-03 Martin Sebor <msebor@redhat.com>
10973 PR tree-optimization/86274
10974 * gimple-ssa-sprintf.c (fmtresult::type_max_digits): Verify
10976 (format_floating): Correct handling of infinities and NaNs.
10978 2018-07-03 Martin Sebor <msebor@redhat.com>
10980 * print-tree.c (print_real_cst): New function.
10981 (print_node_brief): Call it.
10982 (print_node): Ditto.
10984 2018-07-03 Jeff Law <law@redhat.com>
10986 * config/h8300/h8300.md (logical<mode>3_sn, logical<mode>3): Merge
10987 into a single pattern.
10989 * config/h8300/h8300.md (ors code_iterator): New.
10990 (bsetqi_msx, bnotqi_msx patterns and splitters): Consolidate into
10991 a single pattern and single splitter.
10992 (bsethi_msx, bnothi_msx patterns): Consolidate into a single pattern.
10993 (iorqi3_1, xorqi3_1): Likewise.
10994 (iorqi3, xorqi3 expanders): Similarly.
10996 * config/h8300/h8300.md (movmd_internal_normal): Consolidated with
10997 (movmd_internal) into a single pattern using the P mode iterator.
10998 (movmd splitters): Similarly.
10999 (stpcpy_internal_normal, stpcpy_internal): Similarly for thes patterns.
11000 (movsd splitters): Similarly.
11002 * config/h8300/h8300.c (h8300_insn_length_from_table): Consolidate
11003 ADDB, ADDW and ADDL into a single ADD attribute which selects the
11004 right table based on the size of the operand.
11005 * config/h8300/h8300.md (length_table): Corresponding changes. All
11006 references to "addb", "addw" and "addl" changed to "add".
11007 (btst patterns): Merge two variants into a single pattern.
11008 (tstqi, tsthi): Likewise.
11009 (addhi3_incdec, addsi3_incdec): Likewise.
11010 (subhi3_h8300hs, subsi3_h8300hs): Likewise.
11011 (mulhi3, mulsi3): Likewise.
11012 (udivhi3, udivsi3): Likewise.
11013 (divhi3, divsi3): Likewise.
11014 (andorqi3, andorhi3, andorsi3): Likewise.
11016 2018-07-03 Uros Bizjak <ubizjak@gmail.com>
11019 * config/i386/sse.md (uavg<mode>3_ceil): New expander.
11020 (<sse2_avx2>_uavg<mode>3<mask_name>): Simplify expander.
11022 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
11024 PR tree-optimization/85694
11025 * config/aarch64/iterators.md (HADD, RHADD): New int iterators.
11026 (u): Handle UNSPEC_SHADD, UNSPEC_UHADD, UNSPEC_SRHADD and
11028 * config/aarch64/aarch64-simd.md (<u>avg<mode>3_floor)
11029 (<u>avg<mode>3_ceil): New patterns.
11031 2018-07-03 David Malcolm <dmalcolm@redhat.com>
11033 * gcc.dg/vect/slp-perm-1.c: Remove "note: " prefix from
11034 scan-tree-dump directive.
11035 * gcc.dg/vect/slp-perm-2.c: Likewise.
11036 * gcc.dg/vect/slp-perm-3.c: Likewise.
11037 * gcc.dg/vect/slp-perm-5.c: Likewise.
11038 * gcc.dg/vect/slp-perm-6.c: Likewise.
11039 * gcc.dg/vect/slp-perm-7.c: Likewise.
11040 * gcc.dg/vect/slp-perm-8.c: Likewise.
11042 2018-07-03 Marek Polacek <polacek@redhat.com>
11044 PR middle-end/86202
11045 * gimple-fold.c (size_must_be_zero_p): Check the type of the size.
11047 2018-07-03 Richard Biener <rguenther@suse.de>
11050 * tree-ssa-structalias.c (find_func_clobbers): Properly
11051 handle indirect calls.
11053 2018-07-03 Jeff Law <law@redhat.com>
11055 * config/h8300/h8300.md (HSI, QHSI, QHSIF): New mode iterators.
11056 (shifts): New code iterator.
11057 (movqi, movhi, movsi, movsf expanders): Consolidate into a single
11058 expander. Fix HImode handling on H8/SX.
11059 (addqi3, addhi3, addsi3 expanders): Consolidate into a single expander.
11060 (subqi3, subhi3, subsi3 expanders): Likewise.
11061 (andqi3, andhi3, andsi3 expanders): Likewise.
11062 (iorqi3, iorhi3, iorsi3 expanders): Likewise.
11063 (xorqi3, xorhi3, xorsi3 expanders): Likewise.
11064 (negqi2, neghi2, negsi2, negsf2 expanders): Likewise.
11065 (one_cmplqi2, one_cmplhi2, one_cmplsi2): Likewise.
11066 (zero_extendqihi2, zero_extendqisi2): Likewise.
11067 (extendqihi2, extendqisi2): Likewise.
11068 (rotlqi3, rotlhi3, rotlsi3): Likewise.
11069 (neghi2_h8300, negsi2_h8300): Likewise for these patterns.
11070 (rotlqi3_1, rotlhi3_1): Likewise.
11071 (logicalhi3_sn, logicalsi3_sn): Likewise.
11072 (logicalhi3, logicalsi3): Likewise.
11074 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
11076 * tree-vect-patterns.c (vect_recog_rotate_pattern)
11077 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
11078 (vect_recog_mixed_size_cond_pattern, adjust_bool_pattern_cast)
11079 (adjust_bool_pattern, vect_recog_bool_pattern): Pass the vector
11080 type to append_pattern_def_seq instead of creating a stmt_vec_info
11082 (build_mask_conversion): Likewise. Remove vinfo argument.
11083 (vect_add_conversion_to_patterm): Likewise, renaming to...
11084 (vect_add_conversion_to_pattern): ...this.
11085 (vect_recog_mask_conversion_pattern): Update call to
11086 build_mask_conversion. Pass the vector type to
11087 append_pattern_def_seq here too.
11088 (vect_recog_gather_scatter_pattern): Update call to
11089 vect_add_conversion_to_pattern.
11091 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
11093 * tree-vect-patterns.c (new_pattern_def_seq): Delete.
11094 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
11095 (vect_recog_widen_op_pattern, vect_recog_over_widening_pattern)
11096 (vect_recog_rotate_pattern, vect_synth_mult_by_constant): Don't set
11097 STMT_VINFO_PATTERN_DEF_SEQ to null here.
11098 (vect_recog_pow_pattern, vect_recog_vector_vector_shift_pattern)
11099 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern): Use
11100 append_pattern_def_seq instead of new_pattern_def_seq.
11101 (vect_recog_divmod_pattern): Do both of the above.
11102 (vect_pattern_recog_1): Assert that STMT_VINO_PATTERN_DEF_SEQ
11105 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
11107 * tree-vect-patterns.c (vect_recog_dot_prod_pattern):
11108 (vect_recog_sad_pattern, vect_recog_widen_op_pattern)
11109 (vect_recog_widen_mult_pattern, vect_recog_pow_pattern):
11110 (vect_recog_widen_sum_pattern, vect_recog_over_widening_pattern)
11111 (vect_recog_average_pattern, vect_recog_cast_forwprop_pattern)
11112 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
11113 (vect_recog_vector_vector_shift_pattern, vect_synth_mult_by_constant)
11114 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
11115 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
11116 (vect_recog_mask_conversion_pattern): Replace vec<gimple *>
11117 parameter with a single stmt_vec_info.
11118 (vect_recog_func_ptr): Likewise.
11119 (vect_recog_gather_scatter_pattern): Likewise, folding in...
11120 (vect_try_gather_scatter_pattern): ...this.
11121 (vect_pattern_recog_1): Remove stmts_to_replace and just pass
11122 the stmt_vec_info of the statement to be matched. Don't clear
11123 STMT_VINFO_RELATED_STMT.
11124 (vect_pattern_recog): Update call accordingly.
11126 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
11128 PR tree-optimization/85694
11129 * doc/md.texi (avgM3_floor, uavgM3_floor, avgM3_ceil)
11130 (uavgM3_ceil): Document new optabs.
11131 * doc/sourcebuild.texi (vect_avg_qi): Document new target selector.
11132 * internal-fn.def (IFN_AVG_FLOOR, IFN_AVG_CEIL): New internal
11134 * optabs.def (savg_floor_optab, uavg_floor_optab, savg_ceil_optab)
11135 (savg_ceil_optab): New optabs.
11136 * tree-vect-patterns.c (vect_recog_average_pattern): New function.
11137 (vect_vect_recog_func_ptrs): Add it.
11138 * tree-vect-stmts.c (vectorizable_call): Get the type of the zero
11139 constant directly from the associated lhs.
11141 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
11143 * tree-vect-patterns.c (vect_split_statement): New function.
11144 (vect_convert_input): Use it to try to split an existing cast.
11146 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
11148 * poly-int.h (print_hex): New function.
11149 * dumpfile.h (dump_dec, dump_hex): Declare.
11150 * dumpfile.c (dump_dec, dump_hex): New poly_wide_int functions.
11151 * tree-vectorizer.h (_stmt_vec_info): Add min_output_precision,
11152 min_input_precision, operation_precision and operation_sign.
11153 * tree-vect-patterns.c (vect_get_range_info): New function.
11154 (vect_same_loop_or_bb_p, vect_single_imm_use)
11155 (vect_operation_fits_smaller_type): Delete.
11156 (vect_look_through_possible_promotion): Add an optional
11157 single_use_p parameter.
11158 (vect_recog_over_widening_pattern): Rewrite to use new
11159 stmt_vec_info infomration. Handle one operation at a time.
11160 (vect_recog_cast_forwprop_pattern, vect_narrowable_type_p)
11161 (vect_truncatable_operation_p, vect_set_operation_type)
11162 (vect_set_min_input_precision): New functions.
11163 (vect_determine_min_output_precision_1): Likewise.
11164 (vect_determine_min_output_precision): Likewise.
11165 (vect_determine_precisions_from_range): Likewise.
11166 (vect_determine_precisions_from_users): Likewise.
11167 (vect_determine_stmt_precisions, vect_determine_precisions): Likewise.
11168 (vect_vect_recog_func_ptrs): Put over_widening first.
11170 (vect_pattern_recog): Call vect_determine_precisions.
11172 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
11174 * tree-vect-patterns.c (vect_mark_pattern_stmts): Remove pattern
11175 statements that have been replaced by further pattern statements.
11176 (vect_pattern_recog_1): Clear STMT_VINFO_PATTERN_DEF_SEQ on failure.
11178 2018-07-03 Richard Biener <rguenther@suse.de>
11180 * tree-vect-stmts.c (vect_is_simple_use): Consolidate dumping,
11181 always set *dt. Dump vectype in vectype overload.
11182 * dumpfile.h (dump_gimple_expr): New function.
11183 (dump_gimple_expr_loc): Likewise.
11184 * dumpfile.c (dump_gimple_expr): New function.
11185 (dump_gimple_expr_loc): Likewise.
11187 2018-07-02 Jeff Law <law@redhat.com>
11189 * config/h8300/h8300.md (movqi_h8300, movqi_h8300hs): Consolidate
11190 the H8/300, H8/300H and H8/S variants into a single pattern.
11191 (movhi_h8300, movqi_h8300hs): Similarly.
11192 (pushqi_h8300hs, pushhi_h8300hs): Consolidate into a single pattern.
11193 (QHI mode iterator): New.
11195 * config/h8300/h8300.md: Remove trailing whitespace.
11197 2018-07-02 Jim Wilson <jimw@sifive.com>
11199 * config/riscv/riscv.c (riscv_expand_epilogue): Use emit_jump_insn
11200 instead of emit_insn for interrupt returns.
11201 * config/riscv/riscv.md (riscv_met): Add (return) to rtl.
11202 (riscv_sret, riscv_uret): Likewise.
11204 2018-07-02 David Malcolm <dmalcolm@redhat.com>
11206 * pretty-print.c (selftest::test_pp_format): Move save and restore
11207 of quotes to class auto_fix_quotes, and add an instance.
11208 * selftest.c: Include "intl.h".
11209 (selftest::auto_fix_quotes::auto_fix_quotes): New ctor.
11210 (selftest::auto_fix_quotes::~auto_fix_quotes): New dtor.
11211 * selftest.h (selftest::auto_fix_quotes): New class.
11213 2018-07-02 Richard Henderson <richard.henderson@linaro.org>
11215 * config/aarch64/aarch64-protos.h, config/aarch64/aarch64.c
11216 (aarch64_sve_prepare_conditional_op): Remove.
11217 * config/aarch64/aarch64-sve.md (cond_<SVE_INT_BINARY><SVE_I>):
11218 Allow aarch64_simd_reg_or_zero as select operand; remove
11219 the aarch64_sve_prepare_conditional_op call.
11220 (cond_<SVE_INT_BINARY_SD><SVE_SDI>): Likewise.
11221 (cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
11222 (*cond_<SVE_INT_BINARY><SVE_I>_z): New pattern.
11223 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_z): New pattern.
11224 (*cond_<SVE_COND_FP_BINARY><SVE_F>_z): New pattern.
11225 (*cond_<SVE_INT_BINARY><SVE_I>_any): New pattern.
11226 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_any): New pattern.
11227 (*cond_<SVE_COND_FP_BINARY><SVE_F>_any): New pattern
11228 and a splitters to match all of the *_any patterns.
11229 * config/aarch64/predicates.md (aarch64_sve_any_binary_operator): New.
11231 * config/aarch64/iterators.md (SVE_INT_BINARY_REV): Remove.
11232 (SVE_COND_FP_BINARY_REV): Remove.
11233 (sve_int_op_rev, sve_fp_op_rev): New.
11234 * config/aarch64/aarch64-sve.md (*cond_<SVE_INT_BINARY><SVE_I>_0): New.
11235 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_0): New.
11236 (*cond_<SVE_COND_FP_BINARY><SVE_F>_0): New.
11237 (*cond_<SVE_INT_BINARY><SVE_I>_2): Rename, add movprfx alternative.
11238 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_2): Similarly.
11239 (*cond_<SVE_COND_FP_BINARY><SVE_F>_2): Similarly.
11240 (*cond_<SVE_INT_BINARY><SVE_I>_3): Similarly; use sve_int_op_rev.
11241 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_3): Similarly.
11242 (*cond_<SVE_COND_FP_BINARY><SVE_F>_3): Similarly; use sve_fp_op_rev.
11244 * config/aarch64/aarch64-sve.md (cond_<SVE_COND_FP_BINARY><SVE_F>):
11245 Remove match_dup 1 from the inner unspec.
11246 (*cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
11248 * config/aarch64/aarch64.md (movprfx): New attr.
11249 (length): Default movprfx to 8.
11250 * config/aarch64/aarch64-sve.md (*mul<SVE_I>3): Add movprfx alt.
11251 (*madd<SVE_I>, *msub<SVE_I): Likewise.
11252 (*<su>mul<SVE_I>3_highpart): Likewise.
11253 (*<SVE_INT_BINARY_SD><SVE_SDI>3): Likewise.
11254 (*v<ASHIFT><SVE_I>3): Likewise.
11255 (*<su><MAXMIN><SVE_I>3): Likewise.
11256 (*<su><MAXMIN><SVE_F>3): Likewise.
11257 (*fma<SVE_F>4, *fnma<SVE_F>4): Likewise.
11258 (*fms<SVE_F>4, *fnms<SVE_F>4): Likewise.
11259 (*div<SVE_F>4): Likewise.
11261 2018-07-02 Richard Sandiford <richard.sandiford@arm.com>
11263 * tree-vect-patterns.c (vect_recog_widen_shift_pattern): Fix typo
11266 2018-07-02 Richard Biener <rguenther@suse.de>
11268 PR tree-optimization/86363
11269 * tree-ssa-sccvn.c (vn_reference_lookup_3): Check the
11270 memset argument refers to a non-variable address.
11272 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
11274 * tree-vrp.c (extract_range_from_binary_expr_1): Abstract a lot of the
11275 {PLUS,MINUS}_EXPR code to...
11276 (adjust_symbolic_bound): ...here,
11277 (combine_bound): ...here,
11278 (set_value_range_with_overflow): ...and here.
11280 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
11282 * tree-vrp.c (extract_range_from_unary_expr): Abstract ABS_EXPR
11284 (extract_range_from_abs_expr): ...here.
11286 2018-07-02 Eric Botcazou <ebotcazou@adacore.com>
11288 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Do not overrule
11289 -fno-omit-frame-pointer when not optimizing.
11291 2018-07-02 Martin Liska <mliska@suse.cz>
11294 * ipa-pure-const.c (malloc_candidate_p): Revert usage of ::get.
11295 (propagate_nothrow): Likewise.
11297 2018-07-02 Martin Liska <mliska@suse.cz>
11300 * ipa-inline.c (early_inliner): Revert wrongly added ::get call.
11302 2018-07-02 David Malcolm <dmalcolm@redhat.com>
11304 * dumpfile.c (dump_generic_expr_loc): Undo removal of this
11305 function in r262149, changing "loc" param from source_location to
11306 const dump_location_t &.
11307 * dumpfile.h (dump_generic_expr_loc): Undo removal of this
11308 declaration, as above.
11310 2018-07-01 Paul Koning <ni1d@arrl.net>
11312 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
11313 -munit-asm, -mgnu-asm, -mdec-asm.
11314 * config/pdp11/pdp11-protos.h (pdp11_gen_int_label): New.
11315 (pdp11_output_labelref): New.
11316 (pdp11_output_def): New.
11317 (pdp11_output_addr_vec_elt): New.
11318 * config/pdp11/pdp11.c: Use tab between opcode and operands. Use
11319 %# and %@ format codes.
11320 (pdp11_option_override): New.
11321 (TARGET_ASM_FILE_START_FILE_DIRECTIVE): Define.
11322 (pdp11_output_ident): New.
11323 (pdp11_asm_named_section): New.
11324 (pdp11_asm_init_sections): New.
11325 (pdp11_file_start): New.
11326 (pdp11_file_end): New.
11327 (output_ascii): Use .ascii/.asciz for -mdec-asm.
11328 (pdp11_asm_print_operand): Update %# and %$ for -mdec-asm. Add
11329 %o, like %c but octal.
11330 (pdp11_option_override): New.
11331 * config/pdp11/pdp11.h (TEXT_SECTION_ASM_OP): Update for
11333 (DATA_SECTION_ASM_OP): Ditto.
11334 (READONLY_DATA_SECTION_ASM_OP): New.
11335 (IS_ASM_LOGICAL_LINE_SEPARATOR): New.
11336 (ASM_GENERATE_INTERNAL_LABEL): Use new function.
11337 (ASM_OUTPUT_LABELREF): Ditto.
11338 (ASM_OUTPUT_DEF): Ditto.
11339 (ASM_OUTPUT_EXTERNAL): New.
11340 (ASM_OUTPUT_SOURCE_FILENAME): New.
11341 (ASM_OUTPUT_ADDR_VEC_ELT): Use new function.
11342 (ASM_OUTPUT_SKIP): Update for -mdec-asm.
11343 * config/pdp11/pdp11.md: Use tab between opcode and operands. Use
11344 %# and %@ format codes.
11345 * config/pdp11/pdp11.opt (mgnu-asm): New.
11346 (mdec-asm): Conflicts with -mgnu-asm and -munix-asm.
11347 (munix-asm): Conflicts with -mdec-asm and -mgnu-asm.
11348 * doc/invoke.txt (PDP-11 Options): Add -mgnu-asm.
11350 2018-07-01 Aldy Hernandez <aldyh@redhat.com>
11352 * tree-ssa-threadupdate.c (mark_threaded_blocks): Avoid
11353 dereferencing path[] beyond its length.
11355 (debug_all_paths): New.
11356 (rewire_first_differing_edge): New.
11357 (adjust_paths_after_duplication): New.
11358 (duplicate_thread_path): Call adjust_paths_after_duplication.
11360 (thread_through_all_blocks): Add new argument to
11361 duplicate_thread_path.
11363 2018-06-30 Jim Wilson <jimw@sifive.com>
11365 * config/riscv/predicates.md (p2m1_shift_operand): New.
11366 (high_mask_shift_operand): New.
11367 * config/riscv/riscv.md (lshrsi3_zero_extend_3+1): New combiner
11368 pattern using p2m1_shift_operand.
11369 (lshsi3_zero_extend_3+2): New combiner pattern using
11370 high_mask_shift_operand.
11372 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
11374 * tree-vect-patterns.c (vect_get_external_def_edge): New function,
11376 (vect_recog_rotate_pattern): ...here.
11377 (vect_convert_input): Try to insert casts of invariants in the
11379 * tree-vect-loop-manip.c (vect_loop_versioning): Don't require the
11380 preheader to be empty.
11382 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
11384 * tree-vect-patterns.c (append_pattern_def_seq): Take an optional
11385 vector type. If given, install it in the new statement's
11386 STMT_VINFO_VECTYPE.
11387 (vect_element_precision): New function.
11388 (vect_unpromoted_value): New struct.
11389 (vect_unpromoted_value::vect_unpromoted_value): New function.
11390 (vect_unpromoted_value::set_op): Likewise.
11391 (vect_look_through_possible_promotion): Likewise.
11392 (vect_joust_widened_integer, vect_joust_widened_type): Likewise.
11393 (vect_widened_op_tree, vect_convert_input): Likewise.
11394 (vect_convert_inputs, vect_convert_output): Likewise.
11395 (vect_recog_dot_prod_pattern): Use vect_look_through_possible_promotion
11396 to handle the optional cast of the multiplication result and
11397 vect_widened_op_tree to detect the widened multiplication itself.
11398 Do not require the input and output of promotion casts to have
11399 the same sign, but base the signedness of the operation on the
11400 input rather than the result. If the pattern includes two
11401 promotions, check that those promotions have the same sign.
11402 Do not restrict the MULT_EXPR handling to a double-width result;
11403 handle quadruple-width results and wider. Use vect_convert_inputs
11404 to convert the inputs to the common type.
11405 (vect_recog_sad_pattern): Use vect_look_through_possible_promotion
11406 to handle the optional cast of the ABS result. Also allow a sign
11407 change or a sign extension between the ABS and MINUS.
11408 Use vect_widened_op_tree to detect the widened subtraction and use
11409 vect_convert_inputs to convert the inputs to the common type.
11410 (vect_handle_widen_op_by_const): Delete.
11411 (vect_recog_widen_op_pattern): New function.
11412 (vect_recog_widen_mult_pattern): Use it.
11413 (vect_recog_widen_shift_pattern): Likewise.
11414 (vect_recog_widen_sum_pattern): Use
11415 vect_look_through_possible_promotion to handle the promoted
11418 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
11420 * gimple-iterator.c (gsi_for_stmt): Add a new overload that takes
11421 the containing gimple_seq *.
11422 * gimple-iterator.h (gsi_for_stmt): Declare it.
11423 * tree-vect-patterns.c (vect_recog_dot_prod_pattern)
11424 (vect_recog_sad_pattern, vect_recog_widen_sum_pattern)
11425 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
11426 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
11427 (vect_recog_mask_conversion_pattern): Remove STMT_VINFO_IN_PATTERN_P
11429 (vect_init_pattern_stmt, vect_set_pattern_stmt): New functions,
11431 (vect_mark_pattern_stmts): ...here. Handle cases in which the
11432 statement being replaced is part of an existing pattern
11433 definition sequence, inserting the new pattern statements before
11435 (vect_pattern_recog_1): Don't return a bool. If the statement
11436 is already part of a pattern, instead apply pattern matching
11437 to the pattern definition statements. Don't clear the
11438 STMT_VINFO_RELATED_STMT if is_pattern_stmt_p.
11439 (vect_pattern_recog): Don't break after the first match;
11440 continue processing the pattern definition statements instead.
11441 Don't bail out for STMT_VINFO_IN_PATTERN_P here.
11443 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
11445 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
11446 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
11447 (vect_recog_widen_sum_pattern): Use it.
11449 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
11451 * tree-vect-loop.c (vectorizable_reduction): Assert that the
11452 phi is not a pattern statement and has not been replaced by
11453 a pattern statement.
11454 * tree-vect-patterns.c (type_conversion_p): Don't check
11455 STMT_VINFO_IN_PATTERN_P.
11456 (vect_recog_vector_vector_shift_pattern): Likewise.
11457 (vect_recog_dot_prod_pattern): Expect vect_is_simple_use to return
11458 the pattern statement rather than the original statement; check
11459 directly for a WIDEN_MULT_EXPR here.
11460 * tree-vect-slp.c (vect_get_and_check_slp_defs): Expect
11461 vect_is_simple_use to return the pattern statement rather
11462 than the original statement; use is_pattern_stmt_p to check
11463 for such a pattern statement.
11464 * tree-vect-stmts.c (process_use): Expect vect_is_simple_use
11465 to return the pattern statement rather than the original statement;
11466 don't do the same transformation here.
11467 (vect_is_simple_use): If the defining statement has been replaced
11468 by a pattern statement, return the pattern statement instead.
11469 Remove the corresponding (local) transformation from the vectype
11472 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
11474 * tree-vectorizer.h (vect_is_simple_use): Move the gimple ** to the
11475 end and default to null.
11476 * tree-vect-loop.c (vect_create_epilog_for_reduction)
11477 (vectorizable_reduction): Update calls accordingly, dropping the
11478 gimple ** argument if the passed-back statement isn't needed.
11479 * tree-vect-patterns.c (vect_get_internal_def, type_conversion_p)
11480 (vect_recog_rotate_pattern): Likewise.
11481 (vect_recog_mask_conversion_pattern): Likewise.
11482 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
11483 (vect_mask_constant_operand_p): Likewise.
11484 * tree-vect-stmts.c (is_simple_and_all_uses_invariant, process_use):
11485 (vect_model_simple_cost, vect_get_vec_def_for_operand): Likewise.
11486 (get_group_load_store_type, get_load_store_type): Likewise.
11487 (vect_check_load_store_mask, vect_check_store_rhs): Likewise.
11488 (vectorizable_call, vectorizable_simd_clone_call): Likewise.
11489 (vectorizable_conversion, vectorizable_assignment): Likewise.
11490 (vectorizable_shift, vectorizable_operation): Likewise.
11491 (vectorizable_store, vect_is_simple_cond): Likewise.
11492 (vectorizable_condition, vectorizable_comparison): Likewise.
11493 (get_same_sized_vectype, vect_get_mask_type_for_stmt): Likewise.
11494 (vect_is_simple_use): Rename the def_stmt argument to def_stmt_out
11495 and move it to the end. Cope with null def_stmt_outs.
11497 2018-06-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
11499 * Makefile.in (FLAGS_TO_PASS): Add RANLIB_FOR_TARGET.
11501 2018-06-29 Jeff Law <law@redhat.com>
11503 * config/v850/v850.c (v850_legitimate_address_p): Handle large
11504 displacements for TARGET_V850E2V3 and newer.
11505 (TARGET_LRA_P): Remove. Defaults to LRA now.
11506 * config/v850/v850.md (sign23byte_load): Remove.
11507 (unsign23byte_load, sign23hword_load, unsign23hword_load): Likewise.
11508 (23word_load, 23byte_store, 23hword_store, 23word_store): Likewise.
11510 2018-06-29 Martin Liska <mliska@suse.cz>
11513 * coverage.c (coverage_init): Mangle full path name.
11514 * doc/invoke.texi: Document the change.
11515 * gcov-io.c (mangle_path): New.
11516 * gcov-io.h (mangle_path): Likewise.
11517 * gcov.c (mangle_name): Use mangle_path for path mangling.
11519 2018-06-29 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11521 * config/arm/arm.c (output_move_double): Don't allow STRD instructions
11522 if starting source register is not even.
11524 2018-06-29 Martin Liska <mliska@suse.cz>
11526 PR tree-optimization/86263
11527 * tree-switch-conversion.c (switch_decision_tree::try_switch_expansion):
11528 Make edge redirection.
11530 2018-06-29 David Malcolm <dmalcolm@redhat.com>
11532 * dumpfile.c (dump_loc): Add indentation based on scope depth.
11533 (dump_scope_depth): New variable.
11534 (get_dump_scope_depth): New function.
11535 (dump_begin_scope): New function.
11536 (dump_end_scope): New function.
11537 * dumpfile.h (get_dump_scope_depth): New declaration.
11538 (dump_begin_scope): New declaration.
11539 (dump_end_scope): New declaration.
11540 (class auto_dump_scope): New class.
11541 (AUTO_DUMP_SCOPE): New macro.
11542 * tree-vectorizer.h (DUMP_VECT_SCOPE): Reimplement in terms of
11545 2018-06-29 Richard Biener <rguenther@suse.de>
11547 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences): Assert
11548 compute_all_dependences succeeds.
11549 * tree-vect-loop.c (vect_get_datarefs_in_loop): Fail early if we
11550 exceed --param loop-max-datarefs-for-datadeps.
11552 2018-06-29 Jakub Jelinek <jakub@redhat.com>
11554 * config/rs6000/t-rs6000: Append rs6000-modes.h to TM_H.
11556 2018-06-28 Uros Bizjak <ubizjak@gmail.com>
11559 * config/i386/sse.md (*vec_extractv4si_0_zext_sse4): Use
11560 alternative 0 in preferred_for_speed attribute.
11562 2018-06-28 Paul Koning <ni1d@arrl.net>
11564 * config/pdp11/pdp11-protos.h (pdp11_shift_length): New function.
11565 * config/pdp11/pdp11.c (pdp11_shift_length): New function.
11566 * config/pdp11/pdp11.h (ADJUST_INSN_LENGTH): Remove.
11567 * config/pdp11/pdp11.md: Correct "length" attribute calculation
11568 for shift insn patterns.
11570 2018-06-28 David Malcolm <dmalcolm@redhat.com>
11572 * cgraph.c (cgraph_node::get_body): Replace assignments to
11573 "dump_file" with calls to set_dump_file.
11574 * dumpfile.c (alt_dump_file): Make static, and group with...
11575 (alt_flags): ...this definition.
11576 (dumps_are_enabled): New variable.
11577 (refresh_dumps_are_enabled): New function.
11578 (set_dump_file): New function.
11579 (set_alt_dump_file): New function.
11580 (gcc::dump_manager::dump_start): Replace assignments to
11581 "dump_file" and "alt_dump_file" with calls to set_dump_file and
11583 (gcc::dump_manager::dump_finish): Likewise.
11584 * dumpfile.h (alt_dump_file): Delete decl.
11585 (dumps_are_enabled): New variable decl.
11586 (set_dump_file): New function decl.
11587 (dump_enabled_p): Rewrite in terms of new "dumps_are_enabled"
11589 * tree-nested.c (lower_nested_functions): Replace assignments to
11590 "dump_file" with calls to set_dump_file.
11592 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
11594 * tree-cfg.c (verify_gimple_in_cfg): Call verify_location on the
11595 goto_locus of each outgoing edge of each basic block.
11597 2018-06-28 Richard Biener <rguenther@suse.de>
11599 * dwarf2out.c (decl_scope_table): Remove.
11600 (push_decl_scope): Likewise.
11601 (pop_decl_scope): Likewise.
11602 (gen_type_die_for_member): Do not call push/pop_decl_scope.
11603 (gen_struct_or_union_type_die): Likewise.
11604 (gen_tagged_type_die): Likewise.
11605 (dwarf2out_init): Do not initialize decl_scope_table.
11606 (dwarf2out_c_finalize): Do not free it.
11608 2018-06-28 Richard Biener <rguenther@suse.de>
11610 * dwarf2out.c (gen_subprogram_die): Use is_unit_die when
11611 deciding whether to not re-use a DIE.
11613 2018-06-28 Richard Biener <rguenther@suse.de>
11615 * dwarf2out.c (gen_subprogram_die): Always re-use DIEs with an
11616 DW_AT_abstract_origin attribute.
11618 2018-06-28 Martin Liska <mliska@suse.cz>
11620 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
11621 Use newly introduced constants.
11622 * tree-switch-conversion.h (struct jump_table_cluster):
11623 Define max_ratio_for_size and max_ratio_for_speed.
11625 2018-06-28 Martin Liska <mliska@suse.cz>
11627 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
11628 Add new checking assert to catch invalid state.
11629 (jump_table_cluster::can_be_handled): Handle single case
11631 (jump_table_cluster::is_beneficial): Bail out for such case.
11632 (bit_test_cluster::find_bit_tests):
11633 Add new checking assert to catch invalid state.
11634 (bit_test_cluster::can_be_handled): Handle single case
11636 (bit_test_cluster::is_beneficial): Bail out for such case.
11637 (switch_decision_tree::analyze_switch_statement):
11640 2018-06-28 Martin Liska <mliska@suse.cz>
11642 * common.opt: Introduce -completion option.
11643 * gcc.c (driver_handle_option): Handle it.
11644 (driver::main): Print completions if completion
11646 * opt-suggestions.c (option_proposer::get_completions):
11648 (option_proposer::suggest_completion): Likewise.
11649 (option_proposer::find_param_completions): Likewise.
11650 (verify_autocompletions): Likewise.
11651 (test_completion_valid_options): Likewise.
11652 (test_completion_valid_params): Likewise.
11653 (in_completion_p): Likewise.
11654 (empty_completion_p): Likewise.
11655 (test_completion_partial_match): Likewise.
11656 (test_completion_garbage): Likewise.
11657 (opt_proposer_c_tests): Likewise.
11658 * opt-suggestions.h: Declare new functions.
11659 * opts.c (common_handle_option): Handle OPT__completion_.
11660 * selftest-run-tests.c (selftest::run_tests): Add
11661 opt_proposer_c_tests.
11662 * selftest.c (assert_str_startswith): New.
11663 * selftest.h (assert_str_startswith): Likewise.
11664 (opt_proposer_c_tests): New.
11665 (ASSERT_STR_STARTSWITH): Likewise.
11667 2018-06-28 Martin Liska <mliska@suse.cz>
11669 * Makefile.in: Add opt-suggestions.o.
11670 * gcc-main.c: Include opt-suggestions.h.
11671 * gcc.c (driver::driver): Likewise.
11672 (driver::~driver): Remove m_option_suggestions.
11673 (driver::build_option_suggestions): Moved to option_proposer.
11674 (driver::suggest_option): Likewise.
11675 (driver::handle_unrecognized_options): Use option_proposer.
11676 * gcc.h (class driver): Add new memver m_option_proposer.
11677 * opt-suggestions.c: New file.
11678 * opt-suggestions.h: New file.
11680 2018-06-28 Martin Liska <mliska@suse.cz>
11682 * vec.h (class auto_string_vec): New (moved from auto_argvec).
11683 (auto_string_vec::~auto_string_vec): Likewise.
11685 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
11687 * tree-inline.h (struct copy_body_data): Move remapping_type_depth and
11688 prevent_decl_creation_for_types fields up and add reset_location field.
11689 * tree-inline.c (remap_gimple_stmt): Force input_location on the new
11690 statement if id->reset_location is true.
11691 (copy_edges_for_bb): Do not set goto_locus on the new edges if
11692 id->reset_location is true.
11693 (copy_phis_for_bb): Force input_location on the arguments if
11694 id->reset_location is true.
11695 (expand_call_inline): Set id->reset_location if DECL_IGNORED_P
11696 is set on the function to be inlined.
11698 2018-06-27 Stephan Bergmann <sbergman@redhat.com>
11700 * doc/invoke.texi (Debugging Options): Add -gsplit-dwarf.
11702 2018-06-27 Dimitar Dimitrov <dimitar@dinux.eu>
11704 * lra-eliminations.c (update_reg_eliminate): Mark all spanning hard
11705 registers for Pmode.
11706 * lra-lives.c (check_pseudos_live_through_calls): Mark all spanning
11707 hard registers for the clobbered pseudo.
11709 2018-06-27 Paul Koning <ni1d@arrl.net>
11711 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
11712 mutually exclusive options.
11713 * config/pdp11/constraints.md (h): New constraint.
11714 (O): Update definition to match shift code generation.
11715 (D): New constraint.
11716 * config/pdp11/pdp11-modes.def (CCNZ): Define mode.
11718 * config/pdp11/pdp11-protos.h (int_no_side_effect_operand): New
11720 (output_jump): Change arguments.
11721 (pdp11_fixed_cc_regs): New function.
11722 (pdp11_cc_mode): Ditto.
11723 (pdp11_expand_shift): Ditto.
11724 (pdp11_assemble_shift): Ditto.
11725 (pdp11_small_shift): Ditto.
11726 (pdp11_branch_cost): Remove.
11727 * config/pdp11/pdp11.c (pdp11_assemble_integer): Remove comments
11729 (pdp11_register_move_cost): Update for CC registers.
11730 (pdp11_rtx_costs): Add case for LSHIFTRT.
11731 (pdp11_output_jump): Add CCNZ mode conditional branches.
11732 (notice_update_cc_on_set): Remove.
11733 (pdp11_cc_mode): New function.
11734 (simple_memory_operand): Correct pre/post decrement case.
11735 (no_side_effect_operand): New function.
11736 (pdp11_regno_reg_class): Add CC_REGS class.
11737 (pdp11_fixed_cc_regs): New function.
11738 (pdp11_small_shift): New function.
11739 (pdp11_expand_shift): New function to expand shift insns.
11740 (pdp11_assemble_shift): New function to output shifts.
11741 (pdp11_branch_cost): Remove.
11742 (pdp11_modes_tieable_p): Make QI/HI modes tieable.
11743 * config/pdp11/pdp11.h (SIZE_TYPE): Ensure 16-bit type.
11744 (WCHAR_TYPE): Ditto.
11745 (PTRDIFF_TYPE): Ditto.
11746 (ADJUST_INSN_LENGTH): New macro.
11747 (FIXED_REGISTERS): Add CC registers.
11748 (CALL_USED_REGISTERS): Ditto.
11749 (reg_class): Ditto.
11750 (REG_CLASS_NAMES): Ditto.
11751 (REG_CLASS_CONTENTS): Ditto.
11752 (SELECT_CC_MODE): Use new function.
11753 (TARGET_FLAGS_REGNUM): New macro.
11754 (TARGET_FIXED_CONDITION_CODE_REGS): Ditto.
11755 (cc0_reg_rtx): Remove.
11756 (CC_STATUS_MDEP): Remove.
11757 (CC_STATUS_MDEFP_INIT): Remove.
11758 (CC_IN_FPU): Remove.
11759 (NOTICE_UPDATE_CC): Remove.
11760 (REGISTER_NAMES): Add CC registers.
11761 (BRANCH_COST): Change to constant 1.
11762 * config/pdp11/pdp11.md: Rewrite for CCmode condition code
11764 * config/pdp11/pdp11.opt (mbcopy): Remove.
11765 (mbcopy-builtin): Remove.
11766 (mbranch-cheap): Remove.
11767 (mbranch-expensive): Remove.
11768 * config/pdp11/predicates.md (expand_shift_operand): Update to
11769 match shift code generation.
11770 (ccnz_operator): New predicate.
11771 * doc/invoke.texi (PDP-11 Options): Remove deleted options
11772 -mbcopy, -mbcopy-builtin, -mbranch-cheap, -mbranch-expensive.
11773 Remove non-existent option -mabshi, -mno-abshi. Document mutually
11775 * doc/md.texi (PDP-11): Document new D and h constraints. Update
11776 description of O constraint.
11778 2018-06-27 Jeff Law <law@redhat.com>
11779 Austin Law <austinklaw@gmail.com>
11781 * config/v850/v850.md (addsi3_set_flags): New pattern.
11782 (subsi3_set_flags, negsi2_set_flags, andsi3_set_flags): Likewise.
11783 (iorsi3_set_flags, xorsi3_set_flags, one_cmplsi2_set_flags): Likewise.
11784 (zero_extendhisi2_v850_set_flags): Likewise.
11785 (zero_extendqisi2_v850_set_flags): Likewise.
11786 (ashlsi3_set_flags, ashlsi3_v850e2_set_flags): Likewise.
11787 (lshrsi3_set_flags, lshrsi3_v850e2_set_flags): Likewise.
11788 (ashrsi3_set_flags, ashrsi3_v850e2_set_flags): Likewise.
11790 * config/v850/v850-protos.h (notice_update_cc): Remove.
11791 * config/v850/v850.c (v850_compare_op0, v850_compare_op1): Remove.
11792 (v850_print_operand): Handle 'D' and "d".
11793 (v850_select_cc_mode): Remove ATTRIBUTE_UNUSED for last argument.
11794 Add handling of arithmetic/logical operations compared against zero.
11795 (v850_gen_float_compare): Remove ATTRIBUTE_UNUSED for last argument.
11796 Do not look at v850_compare_op, instead get mode from last argument.
11797 (v850_gen_compare): Remove
11798 (increment_stack): Use addsi3_clobber_flags to avoid splitting failure
11799 after reload for prologue insns.
11800 (expand_prologue): Account for CLOBBER of CC_REGNUM in various
11802 (construct_save_jarl): Likewise.
11803 (TARGET_FLAGS_REGNUM): Define.
11804 * config/v850/v850.h (v850_compare_op0, v850_compare_op1): Remove.
11805 (NOTICE_UPDATE_CC): Remove.
11806 * config/v850/v850.md (v850_tst1): Use (reg:CCZ CC_REGNUM) rather
11807 than cc0. Conditionalize on reload_completed.
11808 (cmpsi_insn, setfcc_insn): Likewise.
11809 (tst1 splitter): Turn into define_and_split which sets the flags
11811 (cstoresi4, cbranchsf4, cbranchdf4, cbranchsi4_insn): Likewise.
11812 (cbranchsi4, branch_normal, branch_invert): Do not expose cc0 here.
11813 (cstoresf4, cstoredf4): Clobber the flags.
11814 (cmpsi, cmpsf, cmpdf): Remove expanders.
11815 (setf_insn): Remove pattern.
11816 (addsi3): Turn into define_and_split which clobbers the flags after
11817 reload and a suitable pattern (addsi3_clobber_flags) for use after
11819 (subsi3, negsi2, andsi3, iorsi3, xorsi3, one_cmplsi2) Likewise.
11820 (ashlsi3, ashlsi3_v850e2, lshrsi3, lsh4si3_v850e2): Likewise.
11821 (ashrsi3, ashrsi3_v850e2): Likewise.
11822 (bins): Clobber the flags.
11823 (movsicc_normal_cc, movsicc_normal, movsicc_tst1): Likewise.
11824 (movsicc_tst1_revesed, sasf, swap and rotate patterns): Likewise.
11825 (fix_loop_counter, call_internal_short, call_internal_long): Likewise.
11826 (call_value_internal_short, call_value_internal_long): Likewise.
11827 (callt_save_interrupt, callt_return_interrupt): Likewise.
11828 (save_interrupt, return_interrupt): Likewise.
11829 (callt_save_all_interrupt, save_all_interrupt): Likewise.
11830 (_save_all_interrupt, callt_restore_all_interrupt): Likewise.
11831 (restore_all_interrupt, _restore_all_interrupt): Likewise.
11832 (All FP comparisons): Only allow after reload has completed.
11834 (divh, divhu): Tweak output template.
11835 (branch_z_normal, branch_z_invert): Remove
11836 (branch_nz_normal, branch_nz_invert): Likewise.
11837 (extendhisi_insn, extendqisi_insn): Do not clobber flags.
11839 * config/v850/v850-modes.def (CCZ, CCNZ): Add new modes.
11840 * config/v850/v850.c (notice_update_cc): Remove.
11841 * config/v850/v850.h (CC_OVERFLOW_UNUSABLE): Remove
11842 (CC_NO_CARRY): Likewise.
11843 (NOTICE_UPDATE_CC): Define to nothing.
11844 * config/v850/v850.md: Remove block comment on cc0 handling
11845 Remove "cc" attribute from all patterns. Remove cc_status handling
11846 from all patterns. Minor formatting fixes.
11848 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11850 * config/aarch64/aarch64-cores.def (cortex-a76): New entry.
11851 (cortex-a76.cortex-a55): Likewise.
11852 * config/aarch64/aarch64-tune.md: Regenerate.
11853 * doc/invoke.texi (AArch64 Options): Document cortex-a76 and
11854 cortex-a76.cortex-a55.
11856 2018-06-27 Jeff Law <law@redhat.com>
11858 * config/v850/t-v850 (MULTILIB_OPTIONS): Remove 8byte-align.
11859 (MULTILIB_DIRNAMES): Similarly.
11861 2018-06-27 Eric Botcazou <ebotcazou@adacore.com>
11863 * gimple.h (gimple_return_retbnd): Delete.
11864 (gimple_return_set_retbnd): Likewise.
11865 * cgraphunit.c (cgraph_node::expand_thunk): Remove call to
11866 gimple_return_set_retbnd.
11867 * gimple-pretty-print.c (dump_gimple_return): Remove call to
11868 gimple_return_retbnd and adjust.
11869 * tree-inline.h (struct copy_body_data): Remove retbnd field.
11870 * tree-inline.c (remap_gimple_stmt): Remove handling of retbnd.
11871 Explicitly return NULL in a couple more cases. Move assertion
11872 on debug statements and remove unreachable code.
11873 (reset_debug_binding): Do not test id->retbnd.
11874 (expand_call_inline): Do not set it.
11876 2018-06-27 Rasmus Villemoes <rv@rasmusvillemoes.dk>
11878 * configure.ac: Add --disable-gcov option.
11879 * configure: Regenerate.
11880 * Makefile.in: Honour @enable_gcov@.
11881 * doc/install.texi: Document --disable-gcov.
11883 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11885 * config/arm/arm-cpus.in (cortex-a76): New entry.
11886 (cortex-a76.cortex-a55): Likewise.
11887 * config/arm/arm-tables.opt: Regenerate.
11888 * config/arm/arm-tune.md: Likewise.
11889 * config/arm/driver-arm.c (arm_cpu_table): Add Cortex-A76 entry.
11890 * doc/invoke.texi (ARM Options): Document cortex-a76 and
11891 cortex-a76.cortex-a55.
11893 2018-06-27 Tamar Christina <tamar.christina@arm.com>
11896 * config/aarch64/aarch64.md (*movhf_aarch64): Add dup v0.4h pattern.
11898 2018-06-27 Siddhesh Poyarekar <siddhesh@sourceware.org>
11900 * config/aarch64/aarch64.h (CALL_USE_REGISTERS): Fix obsolete
11902 (EPILOGUE_USES): Likewise.
11904 2018-06-26 Eric Botcazou <ebotcazou@adacore.com>
11906 * tree-inline.c (remap_location): New function extracted from...
11907 (copy_edges_for_bb): Add ID parameter. Remap goto_locus.
11908 (copy_phis_for_bb): ...here. Call remap_location.
11909 (copy_cfg_body): Adjust call to copy_edges_for_bb.
11911 2018-06-26 Aaron Sawdey <acsawdey@linux.ibm.com>
11913 * config/rs6000/rs6000-string.c (expand_block_clear): Don't use
11914 unaligned vsx for 16B memset.
11916 2018-06-26 Segher Boessenkool <segher@kernel.crashing.org>
11919 * config/rs6000/rs6000.c (rs6000_init_builtins): Do not set
11920 ieee128_float_type_node to long_double_type_node unless
11921 TARGET_LONG_DOUBLE_128 is set.
11923 2018-06-26 David Malcolm <dmalcolm@redhat.com>
11925 * cfgloop.c (get_loop_location): Convert return type from
11926 location_t to dump_user_location_t, replacing INSN_LOCATION lookups
11927 by implicit construction from rtx_insn *, and using
11928 dump_user_location_t::from_function_decl for the fallback case.
11929 * cfgloop.h (get_loop_location): Convert return type from
11930 location_t to dump_user_location_t.
11931 * cgraphunit.c (walk_polymorphic_call_targets): Update call to
11932 dump_printf_loc to pass in a dump_location_t rather than a
11933 location_t, via the gimple stmt.
11934 * coverage.c (get_coverage_counts): Update calls to
11935 dump_printf_loc to pass in dump_location_t rather than a
11937 * doc/optinfo.texi (Dump types): Convert example of
11938 dump_printf_loc from taking "locus" to taking "insn". Update
11939 description of the "_loc" calls to cover dump_location_t.
11940 * dumpfile.c: Include "backend.h", "gimple.h", "rtl.h", and
11942 (dump_user_location_t::dump_user_location_t): New constructors,
11943 from gimple *stmt and rtx_insn *.
11944 (dump_user_location_t::from_function_decl): New function.
11945 (dump_loc): Make static.
11946 (dump_gimple_stmt_loc): Convert param "loc" from location_t to
11947 const dump_location_t &.
11948 (dump_generic_expr_loc): Delete.
11949 (dump_printf_loc): Convert param "loc" from location_t to
11950 const dump_location_t &.
11951 (selftest::test_impl_location): New function.
11952 (selftest::dumpfile_c_tests): New function.
11953 * dumpfile.h: Include "profile-count.h".
11954 (class dump_user_location_t): New class.
11955 (struct dump_impl_location_t): New struct.
11956 (class dump_location_t): New class.
11957 (dump_printf_loc): Convert 2nd param from source_location to
11958 const dump_location_t &.
11959 (dump_generic_expr_loc): Delete.
11960 (dump_gimple_stmt_loc): Convert 2nd param from source_location to
11961 const dump_location_t &.
11962 * gimple-fold.c (fold_gimple_assign): Update call to
11963 dump_printf_loc to pass in a dump_location_t rather than a
11964 location_t, via the gimple stmt.
11965 (gimple_fold_call): Likewise.
11966 * gimple-loop-interchange.cc
11967 (loop_cand::analyze_iloop_reduction_var): Update for change to
11968 check_reduction_path.
11969 (tree_loop_interchange::interchange): Update for change to
11970 find_loop_location.
11971 * graphite-isl-ast-to-gimple.c (scop_to_isl_ast): Update for
11972 change in return-type of find_loop_location.
11973 (graphite_regenerate_ast_isl): Likewise.
11974 * graphite-optimize-isl.c (optimize_isl): Likewise.
11975 * graphite.c (graphite_transform_loops): Likewise.
11976 * ipa-devirt.c (ipa_devirt): Update call to dump_printf_loc to
11977 pass in a dump_location_t rather than a location_t, via the
11979 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
11980 * ipa.c (walk_polymorphic_call_targets): Likewise.
11981 * loop-unroll.c (report_unroll): Convert "locus" param from
11982 location_t to dump_location_t.
11983 (decide_unrolling): Update for change to get_loop_location's
11985 * omp-grid.c (struct grid_prop): Convert field "target_loc" from
11986 location_t to dump_user_location_t.
11987 (grid_find_single_omp_among_assignments_1): Updates calls to
11988 dump_printf_loc to pass in a dump_location_t rather than a
11989 location_t, via the gimple stmt.
11990 (grid_parallel_clauses_gridifiable): Convert "tloc" from
11991 location_t to dump_location_t. Updates calls to dump_printf_loc
11992 to pass in a dump_location_t rather than a location_t, via the
11994 (grid_inner_loop_gridifiable_p): Likewise.
11995 (grid_dist_follows_simple_pattern): Likewise.
11996 (grid_gfor_follows_tiling_pattern): Likewise.
11997 (grid_target_follows_gridifiable_pattern): Likewise.
11998 (grid_attempt_target_gridification): Convert initialization
11999 of local "grid" from memset to zero-initialization; FIXME: does
12000 this require C++11? Update call to dump_printf_loc to pass in a
12001 optinfo_location rather than a location_t, via the gimple stmt.
12002 * profile.c (read_profile_edge_counts): Updates call to
12003 dump_printf_loc to pass in a dump_location_t rather than a
12005 (compute_branch_probabilities): Likewise.
12006 * selftest-run-tests.c (selftest::run_tests): Call
12008 * selftest.h (dumpfile_c_tests): New decl.
12009 * tree-loop-distribution.c (pass_loop_distribution::execute):
12010 Update for change in return type of find_loop_location.
12011 * tree-parloops.c (parallelize_loops): Likewise.
12012 * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Convert
12013 "locus" from location_t to dump_user_location_t.
12014 (canonicalize_loop_induction_variables): Likewise.
12015 * tree-ssa-loop-ivopts.c (tree_ssa_iv_optimize_loop): Update
12016 for change in return type of find_loop_location.
12017 * tree-ssa-loop-niter.c (number_of_iterations_exit): Update call
12018 to dump_printf_loc to pass in a dump_location_t rather than a
12019 location_t, via the stmt.
12020 * tree-ssa-sccvn.c (eliminate_dom_walker::before_dom_children):
12022 * tree-vect-loop-manip.c (find_loop_location): Convert return
12023 type from source_location to dump_user_location_t.
12024 (vect_do_peeling): Update for above change.
12025 (vect_loop_versioning): Update for change in type of
12027 * tree-vect-loop.c (check_reduction_path): Convert "loc" param
12028 from location_t to dump_user_location_t.
12029 (vect_estimate_min_profitable_iters): Update for change in type
12031 * tree-vect-slp.c (vect_print_slp_tree): Convert param "loc" from
12032 location_t to dump_location_t.
12033 (vect_slp_bb): Update for change in type of vect_location.
12034 * tree-vectorizer.c (vect_location): Convert from source_location
12035 to dump_user_location_t.
12036 (try_vectorize_loop_1): Update for change in vect_location's type.
12037 (vectorize_loops): Likewise.
12038 (increase_alignment): Likewise.
12039 * tree-vectorizer.h (vect_location): Convert from source_location
12040 to dump_user_location_t.
12041 (find_loop_location): Convert return type from source_location to
12042 dump_user_location_t.
12043 (check_reduction_path): Convert 1st param from location_t to
12044 dump_user_location_t.
12045 * value-prof.c (check_counter): Update call to dump_printf_loc to
12046 pass in a dump_user_location_t rather than a location_t; update
12047 call to error_at for change in type of "locus".
12048 (check_ic_target): Update call to dump_printf_loc to
12049 pass in a dump_user_location_t rather than a location_t, via the
12052 2018-06-26 Robin Dapp <rdapp@linux.vnet.ibm.com>
12054 * config/s390/s390.h (enum processor_flags): Do not use
12055 default tune parameter when -march was specified.
12057 2018-06-26 Jakub Jelinek <jakub@redhat.com>
12060 * config/i386/i386.md (setcc + movzbl to xor + setcc peephole2s):
12061 Check reg_overlap_mentioned_p in addition to reg_set_p with the same
12064 2018-06-26 Richard Biener <rguenther@suse.de>
12066 PR tree-optimization/86287
12068 * tree-vect-loop.c (vect_transform_loop_stmt): Fix read-after-free.
12069 (vect_analyze_loop): Initialize n_stmts.
12071 2018-06-26 Richard Biener <rguenther@suse.de>
12073 PR middle-end/86271
12074 * fold-const.c (fold_convertible_p): Pointer extension
12077 2018-06-26 Alexandre Oliva <aoliva@redhat.com>
12080 * dwarf2out.c (loc_list_has_views): Adjust comments.
12081 (dw_loc_list): Split single cross-partition range with
12084 2018-06-25 Jeff Law <law@redhat.com>
12086 * common/config/v850/v850-common.c (TARGET_DEFAULT_TARGET_FLAGS): Turn
12087 on -mbig-switch by default.
12089 * config/v850/predicates.md (const_float_1_operand): Fix match_code
12091 (const_float_0_operand): Remove unused predicate.
12092 * config/v850/v850.md (define_constants): Remove UNSPEC_LOOP.
12093 (define_c_enum unspec): Add LOOP, RCP and RSQRT constants.
12094 (recipsf2): New expander. Original pattern now called
12096 (recipdf2, recipdf2_insn): Similarly.
12097 (rsqrtsf2, rsqrtsf2_insn): Similarly
12098 (rsqrtdf2, rsqrtdf2_insn): Similarly
12100 2018-06-26 Gerald Pfeifer <gerald@pfeifer.com>
12102 * ginclude/stddef.h: Remove an obsolete comment on FreeBSD 5.
12103 Simplify logic for FreeBSD (twice).
12105 2018-06-25 Martin Sebor <msebor@redhat.com>
12107 PR tree-optimization/86204
12108 * tree-ssa-strlen.c (handle_builtin_strlen): Avoid storing
12109 a strnlen result if it's less than the length of the string.
12111 2018-06-25 Martin Sebor <msebor@redhat.com>
12113 PR tree-optimization/85700
12114 * gimple-fold.c (gimple_fold_builtin_strncat): Adjust comment.
12115 * tree-ssa-strlen.c (is_strlen_related_p): Handle integer subtraction.
12116 (maybe_diag_stxncpy_trunc): Distinguish strncat from strncpy.
12118 2018-06-25 Martin Sebor <msebor@redhat.com>
12120 * doc/extend.texi (Zero-length arrays): Update and clarify.
12122 2018-06-25 Michael Meissner <meissner@linux.ibm.com>
12124 * config.gcc (powerpc64le*): Revert January 16th, 2018 patch that
12125 added IEEE/IBM long double multilib support on PowerPC little
12126 endian Linux systems.
12127 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Likewise.
12128 (MULTILIB_DEFAULTS): Likewise.
12129 * config/rs6000/rs6000.c (rs6000_option_override_internal):
12131 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Likewise.
12132 * config/rs6000/t-ldouble-linux64le-ibm: Delete, no longer used.
12133 * config/rs6000/t-ldouble-linux64le-ieee: Delete, no longer used.
12135 2018-06-25 Alexander Monakov <amonakov@ispras.ru>
12137 PR middle-end/86311
12138 * sort.cc (REORDER_23): Avoid memcpy with same destination and source.
12139 (REORDER_45): Likewise.
12141 2018-06-25 Jeff Law <law@redhat.com>
12143 * config/v850/v850.md (divmodhi4): Make sure to sign extend the
12144 dividend to 32 bits. Adjust length.
12145 (udivmodhi4): Cleanup output template. Fix length.
12147 2018-06-25 Carl Love <cel@us.ibm.com>
12149 * config/rs6000/vsx.md: Change word selector to prefered location.
12151 2018-06-25 Richard Biener <rguenther@suse.de>
12153 PR tree-optimization/86304
12154 * tree-vectorizer.c (vectorize_loops): Walk over new possibly
12155 epilogue-if-converted loops as well.
12157 2018-06-25 Jan Hubicka <hubicka@ucw.cz>
12159 * lto-section-out.c (lto_begin_section): Do not print section
12160 name for noaddr and unnumbered dumps.
12162 2018-06-25 Richard Biener <rguenther@suse.de>
12164 * tree-vectorizer.h (struct vec_info_shared): New structure
12165 with parts split out from struct vec_info and loop_nest from
12166 struct _loop_vec_info.
12167 (struct vec_info): Adjust accordingly.
12168 (struct _loop_vec_info): Likewise.
12169 (LOOP_VINFO_LOOP_NEST): Adjust.
12170 (LOOP_VINFO_DATAREFS): Likewise.
12171 (LOOP_VINFO_DDRS): Likewise.
12172 (struct _bb_vec_info): Likewise.
12173 (BB_VINFO_DATAREFS): Likewise.
12174 (BB_VINFO_DDRS): Likewise.
12175 (struct _stmt_vec_info): Add dr_aux member.
12176 (DR_VECT_AUX): Adjust to refer to member of DR_STMTs vinfo.
12177 (DR_MISALIGNMENT_UNINITIALIZED): New.
12178 (set_dr_misalignment): Adjust.
12179 (dr_misalignment): Assert misalign isn't DR_MISALIGNMENT_UNINITIALIZED.
12180 (vect_analyze_loop): Adjust prototype.
12181 (vect_analyze_loop_form): Likewise.
12182 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
12183 Compute dependences lazily.
12184 (vect_record_base_alignments): Use shared datarefs/ddrs.
12185 (vect_verify_datarefs_alignment): Likewise.
12186 (vect_analyze_data_refs_alignment): Likewise.
12187 (vect_analyze_data_ref_accesses): Likewise.
12188 (vect_analyze_data_refs): Likewise.
12189 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Add
12190 constructor parameter for shared part.
12191 (vect_analyze_loop_form): Pass in shared part and adjust.
12192 (vect_analyze_loop_2): Pass in storage for the number of
12193 stmts. Move loop nest finding to the caller. Compute
12195 (vect_analyze_loop): Pass in shared part.
12196 (vect_transform_loop): Verify shared datarefs are unchanged.
12197 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Add
12198 constructor parameter for shared part.
12199 (vect_slp_analyze_bb_1): Pass in shared part and adjust.
12200 (vect_slp_bb): Verify shared datarefs are unchanged before
12202 * tree-vect-stmts.c (ensure_base_align): Adjust for DR_AUX
12204 (new_stmt_vec_info): Initialize DR_AUX misalignment to
12205 DR_MISALIGNMENT_UNINITIALIZED.
12206 * tree-vectorizer.c (vec_info::vec_info): Add constructor
12207 parameter for shared part.
12208 (vec_info::~vec_info): Adjust.
12209 (vec_info_shared::vec_info_shared): New.
12210 (vec_info_shared::~vec_info_shared): Likewise.
12211 (vec_info_shared::save_datarefs): Likewise.
12212 (vec_info_shared::check_datarefs): Likewise.
12213 (try_vectorize_loop_1): Construct shared part live for analyses
12214 of a single loop for multiple vector sizes.
12215 * tree-parloops.c (gather_scalar_reductions): Adjust.
12217 2018-06-25 Richard Biener <rguenther@suse.de>
12219 * tree-vect-data-refs.c (vect_find_stmt_data_reference): Modify
12220 DR for SIMD lane accesses here and mark DR with (void *)-1 aux.
12221 (vect_analyze_data_refs): Remove similar code from here and
12222 simplify accordingly.
12224 2018-06-25 Richard Biener <rguenther@suse.de>
12226 * tree-vect-data-refs.c (vect_check_gather_scatter): Fail
12227 for reverse storage order accesses rather than asserting
12228 they cannot happen here.
12230 2018-06-25 Tom de Vries <tdevries@suse.de>
12233 * config/i386/i386.md (define_insn "*tls_global_dynamic_64_<mode>"):
12234 Use data16 instead of .byte for insn prefix.
12236 2018-06-25 Andreas Krebbel <krebbel@linux.ibm.com>
12239 * parser.c (make_char_string_pack): Pass this literal chars
12240 through cpp_interpret_string.
12241 (cp_parser_userdef_numeric_literal): Check the result of
12242 make_char_string_pack.
12244 2018-06-24 Maya Rashish <coypu@sdf.org>
12246 * ginclude/stddef.h: Simplify conditions around avoiding
12247 re-definition of __size_t.
12249 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
12251 * lto-streamer-out.c (tree_is_indexable): Make LABEL_DECL nonindexable
12252 unless it is forced or nonlocal; assert that we stream no IMPORTED_DECL.
12254 2018-06-22 Maya Rashish <coypu@sdf.org>
12256 * doc/invoke.texi (mno-fancy-math-387): Update for changes
12257 made to OpenBSD and NetBSD through the years.
12259 2018-06-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
12261 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
12262 behavior of vec_pack (vector double, vector double) to match
12263 behavior of vec_float2 (vector double, vector double).
12265 2018-06-22 Olivier Hainque <hainque@adacore.com>
12267 * gimplify.c (gimplify_function_tree): Prevent creation
12268 of a trampoline for the address of the current function
12269 passed to entry/exit instrumentation hooks.
12271 2018-06-22 Aaron Sawdey <acsawdey@linux.ibm.com>
12274 * config/rs6000/rs6000-string.c (expand_strn_compare): Handle -m32
12277 2018-06-22 Martin Liska <mliska@suse.cz>
12279 PR tree-optimization/86263
12280 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
12281 Bail out if is_enabled is false.
12282 * tree-switch-conversion.h (jump_table_cluster::is_enabled):
12284 (jump_table_cluster::is_enabled): New function.
12286 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
12288 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
12289 BINFO_BASE_ACCESSES and BINFO_VPTR_FIELD.
12290 * tree-streamer-in.c (streamer_read_tree_bitfields): Likewise.
12291 (lto_input_ts_binfo_tree_pointers): Likewise.
12292 * tree-streamer-out.c (streamer_write_tree_bitfields,
12293 write_ts_binfo_tree_pointers): Likewise.
12294 * tree.c (free_lang_data_in_binfo): Clear BINFO_VPTR_FIELD.
12296 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
12298 * tree.c (free_lang_data_in_type): Free all TYPE_VFIELDs.
12300 2018-06-22 Martin Liska <mliska@suse.cz>
12302 * symbol-summary.h (get): Make it pure and inline move
12303 functionality from ::get function.
12304 (get): Remove and inline into ::get and ::get_create.
12305 (get_create): Move code from ::get function.
12307 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12310 * config/i386/sol2.h (CPP_SPEC): Don't pass -P for
12311 -x assembler-with-cpp.
12313 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12315 * config/sol2.h (TARGET_OS_CPP_BUILTINS): Define
12316 _FILE_OFFSET_BITS=64 for C++.
12318 2018-06-21 Michael Meissner <meissner@linux.ibm.com>
12320 * config/rs6000/rs6000.md (extendtfif2): Add missing 128-bit
12321 conversion insn that shows up when pr85657-3.c is compiled using
12322 IEEE 128-bit long double.
12323 (neg<mode>2_internal): Use the correct mode to check whether the
12324 mode is IBM extended.
12325 * config/rs6000/rs6000.c (init_float128_ieee): Prevent complex
12326 multiply and divide external functions from being created more
12329 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
12331 * cfgrtl.c (fixup_reorder_chain): Do not emit NOPs in DECL_IGNORED_P
12333 (rtl_merge_blocks): Likewise. Do not emit a NOP if the location of
12334 the edge can be forwarded.
12335 (cfg_layout_merge_blocks): Likewise.
12337 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
12339 * except.c (finish_eh_generation): Commit edge insertions only after
12340 the EH edges have been redirected from post-landing to landing pads.
12342 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
12344 * tree-nested.c (get_frame_type): Use create_tmp_var_raw instead of
12345 create_tmp_var_for to create the FRAME decl.
12346 (finalize_nesting_tree_1): Do not unchain the FRAME decl.
12348 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
12350 * tree-inline.c (copy_edges_for_bb): Minor tweak.
12351 (maybe_move_debug_stmts_to_successors): Also reset the locus of the
12352 debug statement when resetting its value.
12353 (expand_call_inline): Copy the locus of the call onto the assignment
12354 of the return value, if any. Use local variable in more cases.
12356 2018-06-21 Martin Liska <mliska@suse.cz>
12358 * ipa-pure-const.c (propagate_nothrow): Use
12359 funct_state_summaries->get.
12360 (dump_malloc_lattice): Likewise.
12361 (propagate_malloc): Likewise.
12363 2018-06-21 Richard Biener <rguenther@suse.de>
12365 * lto-streamer-out.c (DFS::DFS_write_tree_body): Update outdated
12366 comment. Follow BLOCK_ABSTRACT_ORIGIN unconditionally.
12367 * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Update
12369 * tree-streamer-out.c (write_ts_block_tree_pointers): Stream
12370 BLOCK_ABSTRACT_ORIGIN unconditionally.
12372 2018-06-21 David Malcolm <dmalcolm@redhat.com>
12374 * ipa-cp.c (ipcp_driver): Set edge_clone_summaries to NULL after
12376 * ipa-reference.c (ipa_reference_c_finalize): Delete
12377 ipa_ref_opt_sum_summaries and set it to NULL.
12379 2018-06-21 Tom de Vries <tdevries@suse.de>
12381 PR tree-optimization/85859
12382 * tree-ssa-tail-merge.c (stmt_local_def): Copy gimple_is_call
12383 test with comment from bb_no_side_effects_p.
12385 2018-06-21 Richard Biener <rguenther@suse.de>
12387 PR tree-optimization/86232
12388 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Adjust
12389 max for constant niter.
12391 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
12393 * config/aarch64/aarch64-simd.md
12394 (*aarch64_crypto_aes<aes_op>v16qi_xor_combine): New.
12396 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
12398 * config/aarch64/aarch64-simd.md (aarch64_crypto_aes<aes_op>v16qi):
12399 Make opernads of the unspec commutative.
12401 2018-06-21 Richard Biener <rguenther@suse.de>
12403 * tree-data-ref.c (dr_step_indicator): Handle NULL DR_STEP.
12404 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
12405 Avoid calling vect_mark_for_runtime_alias_test with gathers or scatters.
12406 (vect_analyze_data_ref_dependence): Re-order checks to deal with
12408 (vect_record_base_alignments): Do not record base alignment
12409 for gathers or scatters.
12410 (vect_compute_data_ref_alignment): Drop return value that is always
12411 true. Bail out early for gathers or scatters.
12412 (vect_enhance_data_refs_alignment): Bail out early for gathers
12414 (vect_find_same_alignment_drs): Likewise.
12415 (vect_analyze_data_refs_alignment): Remove dead code.
12416 (vect_slp_analyze_and_verify_node_alignment): Likewise.
12417 (vect_analyze_data_refs): For possible gathers or scatters do
12418 not create an alternate DR, just check their possible validity
12419 and mark them. Adjust DECL_NONALIASED handling to not rely
12420 on DR_BASE_ADDRESS.
12421 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Do not
12422 update inits of gathers or scatters.
12423 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern):
12424 Also copy gather/scatter flag to pattern vinfo.
12426 2018-06-20 Kelvin Nilsen <kelvin@gcc.gnu.org>
12428 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
12429 behavior of vec_packsu (vector unsigned long long, vector unsigned
12430 long long) to match behavior of vec_packs with same signature.
12432 2018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
12433 Thomas Schwinge <thomas@codesourcery.com>
12434 Cesar Philippidis <cesar@codesourcery.com>
12436 * gimplify.c (gimplify_scan_omp_clauses): Add support for
12437 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
12438 (gimplify_adjust_omp_clauses): Likewise.
12439 (gimplify_oacc_declare_1): Add support for GOMP_MAP_RELEASE, remove
12440 support for GOMP_MAP_FORCE_{ALLOC,TO,FROM,TOFROM}.
12441 (gimplify_omp_target_update): Update handling of acc update and
12443 * omp-low.c (install_var_field): Remove unused parameter
12444 base_pointers_restrict.
12445 (scan_sharing_clauses): Remove base_pointers_restrict parameter.
12446 Update call to install_var_field. Handle OMP_CLAUSE_{IF_PRESENT,
12448 (omp_target_base_pointers_restrict_p): Delete.
12449 (scan_omp_target): Update call to scan_sharing_clauses.
12450 * tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_{IF_PRESENT,
12452 * tree-nested.c (convert_nonlocal_omp_clauses): Handle
12453 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
12454 (convert_local_omp_clauses): Likewise.
12455 * tree-pretty-print.c (dump_omp_clause): Likewise.
12456 * tree.c (omp_clause_num_ops): Add entries for OMP_CLAUSE_{IF_PRESENT,
12458 (omp_clause_code_name): Likewise.
12460 2018-06-20 Jakub Jelinek <jakub@redhat.com>
12463 * var-tracking.c (use_narrower_mode_test): Check if shift amount can
12466 PR tree-optimization/86231
12467 * tree-vrp.c (union_ranges): For ( [ ) ] or ( )[ ] range and
12468 anti-range don't overwrite *vr0min before using it to compute *vr0max.
12470 2018-06-20 Tom de Vries <tdevries@suse.de>
12472 PR tree-optimization/86097
12473 * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Also convert *nit to
12474 iv type if signedness of iv type is not the same as that of *nit.
12476 2018-06-20 Jakub Jelinek <jakub@redhat.com>
12478 * cfgrtl.c (rtl_verify_edges): Formatting fix. If bb->preds has any
12479 EDGE_EH edges, verify they are all EDGE_EH.
12481 2018-06-20 Maya Rashish <coypu@sdf.org>
12483 * ginclude/stddef.h: Limit #include <machine/ansi.h> to NetBSD.
12485 2018-06-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12487 * config/aarch64/aarch64-tuning-flags.def (no_ldp_stp_qregs): New.
12488 * config/aarch64/aarch64.c (xgene1_tunings): Add
12489 AARCH64_EXTRA_TUNE_NO_LDP_STP_QREGS to tune_flags.
12490 (aarch64_mode_valid_for_sched_fusion_p):
12491 Allow 16-byte modes.
12492 (aarch64_classify_address): Allow 16-byte modes for load_store_pair_p.
12493 * config/aarch64/aarch64-ldpstp.md: Add peepholes for LDP STP of
12495 * config/aarch64/aarch64-simd.md (load_pair<VQ:mode><VQ2:mode>):
12497 (vec_store_pair<VQ:mode><VQ2:mode>): Likewise.
12498 * config/aarch64/iterators.md (VQ2): New mode iterator.
12500 2018-06-20 Martin Liska <mliska@suse.cz>
12502 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
12503 Change default ratio from 10 to 8.
12505 2018-06-20 Martin Liska <mliska@suse.cz>
12507 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
12509 (bit_test_cluster::find_bit_tests): Likewise.
12510 (switch_decision_tree::analyze_switch_statement): Find clusters.
12511 * tree-switch-conversion.h (struct jump_table_cluster): Document
12514 2018-06-20 Martin Liska <mliska@suse.cz>
12516 * tree-switch-conversion.c (switch_conversion::collect):
12517 Record m_uniq property.
12518 (switch_conversion::expand): Bail out for special conditions.
12519 (group_cluster::~group_cluster): New.
12520 (group_cluster::group_cluster): Likewise.
12521 (group_cluster::dump): Likewise.
12522 (jump_table_cluster::emit): New.
12523 (switch_decision_tree::fix_phi_operands_for_edges): New.
12524 (struct case_node): Remove struct.
12525 (jump_table_cluster::can_be_handled): New.
12526 (case_values_threshold): Moved to header.
12527 (reset_out_edges_aux): Likewise.
12528 (jump_table_cluster::is_beneficial): New.
12529 (bit_test_cluster::can_be_handled): Likewise.
12530 (add_case_node): Remove.
12531 (bit_test_cluster::is_beneficial): New.
12532 (case_bit_test::cmp): New.
12533 (bit_test_cluster::emit): New.
12534 (expand_switch_as_decision_tree_p): Remove.
12535 (bit_test_cluster::hoist_edge_and_branch_if_true): New.
12536 (fix_phi_operands_for_edge): Likewise.
12537 (switch_decision_tree::analyze_switch_statement): New.
12538 (compute_cases_per_edge): Move ...
12539 (switch_decision_tree::compute_cases_per_edge): ... here.
12540 (try_switch_expansion): Likewise.
12541 (switch_decision_tree::try_switch_expansion): Likewise.
12542 (record_phi_operand_mapping): Likewise.
12543 (switch_decision_tree::record_phi_operand_mapping): Likewise.
12544 (emit_case_decision_tree): Likewise.
12545 (switch_decision_tree::emit): Likewise.
12546 (balance_case_nodes): Likewise.
12547 (switch_decision_tree::balance_case_nodes): Likewise.
12548 (dump_case_nodes): Likewise.
12549 (switch_decision_tree::dump_case_nodes): Likewise.
12550 (emit_jump): Likewise.
12551 (switch_decision_tree::emit_jump): Likewise.
12552 (emit_cmp_and_jump_insns): Likewise.
12553 (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
12554 (emit_case_nodes): Likewise.
12555 (switch_decision_tree::emit_case_nodes): Likewise.
12556 (conditional_probability): Remove.
12557 * tree-switch-conversion.h (enum cluster_type): New.
12559 (struct cluster): Likewise.
12560 (cluster::cluster): Likewise.
12561 (struct simple_cluster): Likewise.
12562 (simple_cluster::simple_cluster): Likewise.
12563 (struct group_cluster): Likewise.
12564 (struct jump_table_cluster): Likewise.
12565 (struct bit_test_cluster): Likewise.
12566 (struct min_cluster_item): Likewise.
12567 (struct case_tree_node): Likewise.
12568 (case_tree_node::case_tree_node): Likewise.
12569 (jump_table_cluster::case_values_threshold): Likewise.
12570 (struct case_bit_test): Likewise.
12571 (struct switch_decision_tree): Likewise.
12572 (struct switch_conversion): Likewise.
12573 (switch_decision_tree::reset_out_edges_aux): Likewise.
12575 2018-06-20 Martin Liska <mliska@suse.cz>
12577 * tree-switch-conversion.c (MAX_CASE_BIT_TESTS): Remove.
12578 (hoist_edge_and_branch_if_true): Likewise.
12579 (expand_switch_using_bit_tests_p): Likewise.
12580 (struct case_bit_test): Likewise.
12581 (case_bit_test_cmp): Likewise.
12582 (emit_case_bit_tests): Likewise.
12583 (switch_conversion::switch_conversion): New class.
12584 (struct switch_conv_info): Remove old struct.
12585 (collect_switch_conv_info): More to ...
12586 (switch_conversion::collect): ... this.
12587 (check_range): Likewise.
12588 (switch_conversion::check_range): Likewise.
12589 (check_all_empty_except_final): Likewise.
12590 (switch_conversion::check_all_empty_except_final): Likewise.
12591 (check_final_bb): Likewise.
12592 (switch_conversion::check_final_bb): Likewise.
12593 (create_temp_arrays): Likewise.
12594 (switch_conversion::create_temp_arrays): Likewise.
12595 (free_temp_arrays): Likewise.
12596 (gather_default_values): Likewise.
12597 (switch_conversion::gather_default_values): Likewise.
12598 (build_constructors): Likewise.
12599 (switch_conversion::build_constructors): Likewise.
12600 (constructor_contains_same_values_p): Likewise.
12601 (switch_conversion::contains_same_values_p): Likewise.
12602 (array_value_type): Likewise.
12603 (switch_conversion::array_value_type): Likewise.
12604 (build_one_array): Likewise.
12605 (switch_conversion::build_one_array): Likewise.
12606 (build_arrays): Likewise.
12607 (switch_conversion::build_arrays): Likewise.
12608 (gen_def_assigns): Likewise.
12609 (switch_conversion::gen_def_assigns): Likewise.
12610 (prune_bbs): Likewise.
12611 (switch_conversion::prune_bbs): Likewise.
12612 (fix_phi_nodes): Likewise.
12613 (switch_conversion::fix_phi_nodes): Likewise.
12614 (gen_inbound_check): Likewise.
12615 (switch_conversion::gen_inbound_check): Likewise.
12616 (process_switch): Use the newly created class.
12617 (switch_conversion::expand): New.
12618 (switch_conversion::~switch_conversion): New.
12619 * tree-switch-conversion.h: New file.
12621 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
12623 * tree-vectorizer.h (NUM_PATTERNS, vect_recog_func_ptr): Move to
12624 tree-vect-patterns.c.
12625 * tree-vect-patterns.c (vect_supportable_direct_optab_p): New function.
12626 (vect_recog_dot_prod_pattern): Use it. Remove the type_in argument.
12627 (vect_recog_sad_pattern): Likewise.
12628 (vect_recog_widen_sum_pattern): Likewise.
12629 (vect_recog_pow_pattern): Likewise. Check for a null vectype.
12630 (vect_recog_widen_shift_pattern): Remove the type_in argument.
12631 (vect_recog_rotate_pattern): Likewise.
12632 (vect_recog_mult_pattern): Likewise.
12633 (vect_recog_vector_vector_shift_pattern): Likewise.
12634 (vect_recog_divmod_pattern): Likewise.
12635 (vect_recog_mixed_size_cond_pattern): Likewise.
12636 (vect_recog_bool_pattern): Likewise.
12637 (vect_recog_mask_conversion_pattern): Likewise.
12638 (vect_try_gather_scatter_pattern): Likewise.
12639 (vect_recog_widen_mult_pattern): Likewise. Check for a null vectype.
12640 (vect_recog_over_widening_pattern): Likewise.
12641 (vect_recog_gather_scatter_pattern): Likewise.
12642 (vect_recog_func_ptr): Move from tree-vectorizer.h
12643 (vect_vect_recog_func_ptrs): Move further down the file.
12644 (vect_recog_func): Likewise. Remove the third argument.
12645 (NUM_PATTERNS): Define based on vect_vect_recog_func_ptrs.
12646 (vect_pattern_recog_1): Expect the pattern function to do any
12647 necessary target tests. Also expect it to provide a vector type.
12648 Remove the type_in handling.
12650 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
12652 * tree-vect-patterns.c (vect_pattern_detected): New function.
12653 (vect_recog_dot_prod_patternm, vect_recog_sad_pattern)
12654 (vect_recog_widen_mult_pattern, vect_recog_widen_sum_pattern)
12655 (vect_recog_over_widening_pattern, vect_recog_widen_shift_pattern
12656 (vect_recog_rotate_pattern, vect_recog_vector_vector_shift_pattern)
12657 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
12658 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
12659 (vect_recog_mask_conversion_pattern)
12660 (vect_try_gather_scatter_pattern): Likewise.
12662 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
12664 * tree-vect-patterns.c (vect_get_internal_def): New function.
12665 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
12666 (vect_recog_vector_vector_shift_pattern, check_bool_pattern)
12667 (search_type_for_mask_1): Use it.
12669 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
12671 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
12672 redundant WIDEN_SUM_EXPR handling.
12673 (vect_recog_sad_pattern): Likewise.
12675 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
12677 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
12678 redundant check that the types of a PLUS_EXPR or MULT_EXPR agree.
12679 (vect_recog_sad_pattern): Likewise PLUS_EXPR, ABS_EXPR and MINUS_EXPR.
12680 (vect_recog_widen_mult_pattern): Likewise MULT_EXPR.
12681 (vect_recog_widen_sum_pattern): Likewise PLUS_EXPR.
12683 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
12685 * tree-vect-stmts.c (vectorizable_call): Make sure that we
12686 use the stmt_vec_info of the original bb statement for the
12687 new zero assignment, even if the call is part of a pattern.
12689 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
12691 * tree-vectorizer.h (_stmt_vec_info): Note above pattern_def_seq
12692 that the sequence is attached to the original statement rather
12693 than the pattern statement.
12694 * tree-vect-loop.c (vect_determine_vf_for_stmt): Take the
12695 PATTERN_DEF_SEQ from the original statement rather than
12696 the main pattern statement.
12697 * tree-vect-stmts.c (free_stmt_vec_info): Likewise.
12698 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Likewise.
12699 (vect_mark_pattern_stmts): Don't copy the PATTERN_DEF_SEQ.
12701 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
12703 * tree-vect-stmts.c (vect_analyze_stmt): Move the handling of pattern
12704 definition statements before the early exit for statements that aren't
12706 * tree-vect-loop.c (vect_transform_loop_stmt): New function,
12708 (vect_transform_loop): ...here. Process pattern definition
12709 statements without first checking whether the main pattern
12710 statement is live or relevant.
12712 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
12714 * tree-cfgcleanup.c (tree_forwarder_block_p): Do not return false at
12715 -O0 if the locus represent UNKNOWN_LOCATION but have different values.
12717 2018-06-19 Aaron Sawdey <acsawdey@linux.ibm.com>
12719 * config/rs6000/rs6000-string.c (select_block_compare_mode): Check
12720 TARGET_EFFICIENT_OVERLAPPING_UNALIGNED here instead of in caller.
12721 (do_and3, do_and3_mask, do_compb3, do_rotl3): New functions.
12722 (expand_block_compare): Change select_block_compare_mode call.
12723 (expand_strncmp_align_check): Use new functions, fix comment.
12724 (emit_final_str_compare_gpr): New function.
12725 (expand_strn_compare): Refactor and clean up code.
12726 * config/rs6000/vsx.md (vsx_mov<mode>_64bit): Remove *.
12728 2018-06-19 Tony Reix <tony.reix@atos.com>
12729 Damien Bergamini <damien.bergamini@atos.com>
12730 David Edelsohn <dje.gcc@gmail.com>
12732 * collect2.c (static_obj): New variable.
12733 (static_libs): New variable.
12734 (is_in_list): Uncomment declaration.
12735 (main): Track AIX libraries linked statically.
12736 (is_in_list): Uncomment definition.
12737 (scan_prog_file): Don't add AIX shared libraries initializer
12738 to constructor list if linking statically.
12740 2018-06-19 Max Filippov <jcmvbkbc@gmail.com>
12742 * config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec
12744 (allocate_stack, frame_blockage, *frame_blockage): New patterns.
12746 2018-06-19 Jan Hubicka <hubicka@ucw.cz>
12748 * tree.c (find_decls_types_r): Remove all non-VAR_DECLs from
12751 2018-06-19 Martin Liska <mliska@suse.cz>
12753 * config/i386/i386.c (ix86_can_inline_p): Do not use
12754 ipa_fn_summaries::get_create.
12755 * ipa-cp.c (ipcp_cloning_candidate_p): Replace get_create with
12757 (devirtualization_time_bonus): Likewise.
12758 (ipcp_propagate_stage): Likewise.
12759 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
12760 (edge_set_predicate): Likewise.
12761 (evaluate_conditions_for_known_args): Likewise.
12762 (evaluate_properties_for_edge): Likewise.
12763 (ipa_call_summary::reset): Tranform to ...
12764 (ipa_call_summary::~ipa_call_summary): ... this.
12765 (ipa_fn_summary::reset): Transform to ...
12766 (ipa_fn_summary::~ipa_fn_summary): ... this.
12767 (ipa_fn_summary_t::remove): Rename to ...
12768 (ipa_fn_summary_t::remove_callees): ... this.
12769 (ipa_fn_summary_t::duplicate): Use placement new
12770 instead of memory copy.
12771 (ipa_call_summary_t::duplicate): Likewise.
12772 (ipa_call_summary_t::remove): Remove.
12773 (dump_ipa_call_summary): Change get_create to get.
12774 (ipa_dump_fn_summary): Dump only when summary exists.
12775 (analyze_function_body): Use symbol_summary::get instead
12777 (compute_fn_summary): Likewise.
12778 (estimate_edge_devirt_benefit): Likewise.
12779 (estimate_edge_size_and_time): Likewise.
12780 (inline_update_callee_summaries): Likewise.
12781 (remap_edge_change_prob): Likewise.
12782 (remap_edge_summaries): Likewise.
12783 (ipa_merge_fn_summary_after_inlining): Likewise.
12784 (write_ipa_call_summary): Likewise.
12785 (ipa_fn_summary_write): Likewise.
12786 (ipa_free_fn_summary): Likewise.
12787 * ipa-fnsummary.h (struct GTY): Add new ctor and copy ctor.
12788 (struct ipa_call_summary): Likewise.
12789 * ipa-icf.c (sem_function::merge): Use symbol_summary::get instead
12791 * ipa-inline-analysis.c (do_estimate_edge_time): Likewise.
12792 (estimate_size_after_inlining): Likewise.
12793 (estimate_growth): Likewise.
12794 (growth_likely_positive): Likewise.
12795 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
12796 (inline_call): Likewise.
12797 * ipa-inline.c (caller_growth_limits): Likewise.
12798 (can_inline_edge_p): Likewise.
12799 (can_inline_edge_by_limits_p): Likewise.
12800 (compute_uninlined_call_time): Likewise.
12801 (compute_inlined_call_time): Likewise.
12802 (want_inline_small_function_p): Likewise.
12803 (edge_badness): Likewise.
12804 (update_caller_keys): Likewise.
12805 (update_callee_keys): Likewise.
12806 (inline_small_functions): Likewise.
12807 (inline_to_all_callers_1): Likewise.
12808 (dump_overall_stats): Likewise.
12809 (early_inline_small_functions): Likewise.
12810 (early_inliner): Likewise.
12811 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
12812 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
12813 * ipa-pure-const.c (malloc_candidate_p): Likewise.
12814 * ipa-split.c (execute_split_functions): Likewise.
12815 * symbol-summary.h: Likewise.
12816 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
12818 2018-06-19 Richard Biener <rguenther@suse.de>
12820 * tree-vectorizer.c (try_vectorize_loop_1): Split out of ...
12821 (vectorize_loops): ... here. Fix dbgcnt handling.
12822 (try_vectorize_loop): Wrap try_vectorize_loop_1.
12824 2018-06-19 Segher Boessenkool <segher@kernel.crashing.org>
12827 * config/rs6000/rs6000.md (rs6000_discover_homogeneous_aggregate): An
12828 ieee128 argument takes up only one (vector) register, not two (floating
12831 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
12833 * gimplify.c (gimplify_init_constructor): Really never clear for an
12834 incomplete constructor if CONSTRUCTOR_NO_CLEARING is set.
12836 2018-06-19 Richard Biener <rguenther@suse.de>
12838 PR tree-optimization/86179
12839 * tree-vect-patterns.c (vect_pattern_recog_1): Clean up
12840 after failed recognition.
12842 2018-06-18 Martin Sebor <msebor@redhat.com>
12844 PR middle-end/85602
12845 * calls.c (maybe_warn_nonstring_arg): Handle strncat.
12846 * tree-ssa-strlen.c (is_strlen_related_p): Make extern.
12847 Handle integer subtraction.
12848 (maybe_diag_stxncpy_trunc): Handle nonstring source arguments.
12849 * tree-ssa-strlen.h (is_strlen_related_p): Declare.
12851 2018-06-18 David Malcolm <dmalcolm@redhat.com>
12853 * config/frv/frv-protos.h (frv_ifcvt_modify_insn): Strengthen 3rd
12854 param from rtx to rtx_insn *.
12855 * config/frv/frv.c (frv_ifcvt_add_insn): Likewise for "insn"
12857 (frv_ifcvt_modify_insn): Likwise.
12858 (frv_ifcvt_modify_final): Likwise for local "existing_insn",
12859 adding an as_a <rtx_insn *> cast. Likewise for local "insn".
12860 * config/mips/mips.c (r10k_insert_cache_barriers): Add an
12861 as_a <rtx_insn *> cast to local "unprotected_region" once
12862 it's been established that it's not NULL or pc_rtx.
12863 * config/nds32/nds32-relax-opt.c (nds32_group_insns): Strengthen
12864 param "sethi" from rtx to rtx_insn *.
12865 (nds32_group_float_insns): Likewise for param "insn".
12866 * config/vax/vax-protos.h (vax_output_int_add): Likewise for 1st
12868 (vax_output_int_subtract): Likewise.
12869 * config/vax/vax.c (vax_output_int_add): Likewise for param
12871 (vax_output_int_subtract): Likewise.
12872 * emit-rtl.c (set_insn_deleted): Likewise, removing cast.
12873 (emit_pattern_after): Likewise for param "after".
12874 (emit_insn_after): Likewise.
12875 (emit_jump_insn_after): Likewise.
12876 (emit_call_insn_after): Likewise.
12877 (emit_debug_insn_after): Likewise.
12878 (emit_pattern_before): Likewise for param "before".
12879 (emit_insn_before): Likewise.
12880 (emit_jump_insn_before): Likewise.
12881 * final.c (get_insn_template): Likewise for param "insn", removing
12883 * output.h (get_insn_template): Likewise for 2nd param.
12884 * rtl.h (emit_insn_before): Likewise.
12885 (emit_jump_insn_before): Likewise.
12886 (emit_debug_insn_before_noloc): Likewise.
12887 (emit_insn_after): Likewise.
12888 (emit_jump_insn_after): Likewise.
12889 (emit_call_insn_after): Likewise.
12890 (emit_debug_insn_after): Likewise.
12891 (set_insn_deleted): Likewise for param.
12893 2018-06-18 Michael Meissner <meissner@linux.ibm.com>
12896 * config/rs6000/rs6000-modes.def (toplevel): Rework the 128-bit
12897 floating point modes, so that IFmode is numerically greater than
12898 TFmode, which is greater than KFmode using FRACTIONAL_FLOAT_MODE
12899 to declare the ordering. This prevents IFmode from being
12900 converted to TFmode when long double is IEEE 128-bit on an ISA 3.0
12901 machine. Include rs6000-modes.h to share the fractional values
12902 between genmodes* and the rest of the compiler.
12903 (IFmode): Likewise.
12904 (KFmode): Likewise.
12905 (TFmode): Likewise.
12906 * config/rs6000/rs6000-modes.h: New file.
12907 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Change the
12908 meaning of rs6000_long_double_size so that 126..128 selects an
12909 appropriate 128-bit floating point type.
12910 (rs6000_option_override_internal): Likewise.
12911 * config/rs6000/rs6000.h (toplevel): Include rs6000-modes.h.
12912 (TARGET_LONG_DOUBLE_128): Change the meaning of
12913 rs6000_long_double_size so that 126..128 selects an appropriate
12914 128-bit floating point type.
12915 (LONG_DOUBLE_TYPE_SIZE): Update comment.
12916 * config/rs6000/rs6000.md (trunciftf2): Correct the modes of the
12917 source and destination to match the standard usage.
12918 (truncifkf2): Likewise.
12919 (copysign<mode>3, IEEE iterator): Rework copysign of float128 on
12920 ISA 2.07 to use an explicit clobber, instead of passing in a
12922 (copysign<mode>3_soft): Likewise.
12924 2018-06-18 David Malcolm <dmalcolm@redhat.com>
12926 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
12927 Replace dump_printf_loc call with DUMP_VECT_SCOPE.
12928 (vect_slp_analyze_instance_dependence): Likewise.
12929 (vect_enhance_data_refs_alignment): Likewise.
12930 (vect_analyze_data_refs_alignment): Likewise.
12931 (vect_slp_analyze_and_verify_instance_alignment
12932 (vect_analyze_data_ref_accesses): Likewise.
12933 (vect_prune_runtime_alias_test_list): Likewise.
12934 (vect_analyze_data_refs): Likewise.
12935 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Likewise.
12936 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
12937 (vect_analyze_scalar_cycles_1): Likewise.
12938 (vect_get_loop_niters): Likewise.
12939 (vect_analyze_loop_form_1): Likewise.
12940 (vect_update_vf_for_slp): Likewise.
12941 (vect_analyze_loop_operations): Likewise.
12942 (vect_analyze_loop): Likewise.
12943 (vectorizable_induction): Likewise.
12944 (vect_transform_loop): Likewise.
12945 * tree-vect-patterns.c (vect_pattern_recog): Likewise.
12946 * tree-vect-slp.c (vect_analyze_slp): Likewise.
12947 (vect_make_slp_decision): Likewise.
12948 (vect_detect_hybrid_slp): Likewise.
12949 (vect_slp_analyze_operations): Likewise.
12950 (vect_slp_bb): Likewise.
12951 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Likewise.
12952 (vectorizable_bswap): Likewise.
12953 (vectorizable_call): Likewise.
12954 (vectorizable_simd_clone_call): Likewise.
12955 (vectorizable_conversion): Likewise.
12956 (vectorizable_assignment): Likewise.
12957 (vectorizable_shift): Likewise.
12958 (vectorizable_operation): Likewise.
12959 * tree-vectorizer.h (DUMP_VECT_SCOPE): New macro.
12961 2018-06-18 Martin Sebor <msebor@redhat.com>
12963 PR tree-optimization/81384
12964 * builtin-types.def (BT_FN_SIZE_CONST_STRING_SIZE): New.
12965 * builtins.c (expand_builtin_strnlen): New function.
12966 (expand_builtin): Call it.
12967 (fold_builtin_n): Avoid setting TREE_NO_WARNING.
12968 * builtins.def (BUILT_IN_STRNLEN): New.
12969 * calls.c (maybe_warn_nonstring_arg): Handle BUILT_IN_STRNLEN.
12970 Warn for bounds in excess of maximum object size.
12971 * tree-ssa-strlen.c (maybe_set_strlen_range): Return tree representing
12972 single-value ranges. Handle strnlen.
12973 (handle_builtin_strlen): Handle strnlen.
12974 (strlen_check_and_optimize_stmt): Same.
12975 * doc/extend.texi (Other Builtins): Document strnlen.
12977 2018-06-18 Maya Rashish <coypu@sdf.org>
12979 * config/alpha/openbsd.h (TARGET_DEFAULT): Define.
12980 (LINK_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Likewise.
12981 (INTMAX_TYPE, UINTMAX_TYPE, WINT_TYPE): Likewise.
12983 * config/alpha/elf.h (STARTFILE_SPEC, ENDFILE_SPEC): Move from
12985 * config/alpha/linux.h (STARTFILE_SPEC, ENDFILE_SPEC): Here.
12987 2018-06-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
12989 * tree.c (escaped_string::escape): Replace cast to char * by
12990 const_cast<char *> (unescaped).
12992 2018-06-18 Nick Clifton <nickc@redhat.com>
12995 * tree.c (escaped_string): New class. Converts an unescaped
12996 string into its escaped equivalent.
12997 (warn_deprecated_use): Use the new class to convert the
12998 deprecation message, if present.
12999 (test_escaped_strings): New self test.
13000 (test_c_tests): Add test_escaped_strings.
13001 * doc/extend.texi (deprecated): Add a note that the
13002 deprecation message is affected by the -fmessage-length
13003 option, and that control characters will be escaped.
13004 (#pragma GCC error): Document this pragma.
13005 (#pragma GCC warning): Likewise.
13006 * doc/invoke.texi (-fmessage-length): Document this option's
13007 effect on the #warning and #error preprocessor directives and
13008 the deprecated attribute.
13010 2018-06-18 Eric Botcazou <ebotcazou@adacore.com>
13012 * tree.c (decl_value_expr_lookup): Revert latest change.
13013 (decl_value_expr_insert): Likewise.
13015 2018-06-17 Eric Botcazou <ebotcazou@adacore.com>
13017 * gimplify.c (nonlocal_vlas): Delete.
13018 (nonlocal_vla_vars): Likewise.
13019 (gimplify_var_or_parm_decl): Do not add debug VAR_DECLs for non-local
13021 (gimplify_body): Do not create and destroy nonlocal_vlas.
13022 * tree-nested.c: Include diagnostic.h.
13023 (use_pointer_in_frame): Tweak.
13024 (lookup_field_for_decl): Add assertion and declare the transformation.
13025 (convert_nonlocal_reference_op) <PARM_DECL>: Rework and issue an
13026 internal error when the reference is in a wrong context. Do not
13027 create a debug decl by default.
13028 (note_nonlocal_block_vlas): Delete.
13029 (convert_nonlocal_reference_stmt) <GIMPLE_BIND>: Do not call it.
13030 (convert_local_reference_op) <PARM_DECL>: Skip the frame decl. Do not
13031 create a debug decl by default.
13032 (convert_gimple_call) <GIMPLE_CALL>: Issue an internal error when the
13033 call is in a wrong context.
13034 (fixup_vla_decls): New function.
13035 (finalize_nesting_tree_1): Adjust comment. Call fixup_vla_decls if no
13036 debug variables were created.
13037 * tree.c (decl_value_expr_lookup): Add checking assertion.
13038 (decl_value_expr_insert): Likewise.
13040 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
13042 PR middle-end/82479
13043 * ipa-fnsummary.c (will_be_nonconstant_expr_predicate): Handle CALL_EXPR.
13044 * tree-scalar-evolution.c (interpret_expr): Likewise.
13045 (expression_expensive_p): Likewise.
13046 * tree-ssa-loop-ivopts.c (contains_abnormal_ssa_name_p): Likewise.
13047 * tree-ssa-loop-niter.c (number_of_iterations_popcount): New.
13048 (number_of_iterations_exit_assumptions): Use number_of_iterations_popcount.
13049 (ssa_defined_by_minus_one_stmt_p): New.
13051 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
13053 PR middle-end/64946
13054 * cfgexpand.c (expand_debug_expr): Hande ABSU_EXPR.
13055 * config/i386/i386.c (ix86_add_stmt_cost): Likewise.
13056 * dojump.c (do_jump): Likewise.
13057 * expr.c (expand_expr_real_2): Check operand type's sign.
13058 * fold-const.c (const_unop): Handle ABSU_EXPR.
13059 (fold_abs_const): Likewise.
13060 * gimple-pretty-print.c (dump_unary_rhs): Likewise.
13061 * gimple-ssa-backprop.c (backprop::process_assign_use): Likesie.
13062 (strip_sign_op_1): Likesise.
13063 * match.pd: Add new pattern to generate ABSU_EXPR.
13064 * optabs-tree.c (optab_for_tree_code): Handle ABSU_EXPR.
13065 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
13066 * tree-eh.c (operation_could_trap_helper_p): Likewise.
13067 * tree-inline.c (estimate_operator_cost): Likewise.
13068 * tree-pretty-print.c (dump_generic_node): Likewise.
13069 * tree-vect-patterns.c (vect_recog_sad_pattern): Likewise.
13070 * tree.def (ABSU_EXPR): New.
13072 2018-06-16 Jakub Jelinek <jakub@redhat.com>
13074 PR middle-end/86095
13075 * common.opt (Wunsafe-loop-optimizations): Add Ignore, remove Var,
13076 documented as preserved for backward compatibility only.
13077 * doc/invoke.texi: Remove -Wunsafe-loop-optimizations documentation.
13079 PR rtl-optimization/86108
13080 * bb-reorder.c (create_forwarder_block): Renamed to ...
13081 (create_eh_forwarder_block): ... this. Split OLD_BB after labels and
13082 jump from new landing pad to the second part.
13083 (sjlj_fix_up_crossing_landing_pad, dw2_fix_up_crossing_landing_pad):
13086 2018-06-15 Jakub Jelinek <jakub@redhat.com>
13088 PR middle-end/85878
13089 * expr.c (expand_assignment): Remove now redundant COMPLEX_MODE_P
13090 check from first store_expr, use to_mode instead of GET_MODE (to_rtx).
13091 Only call store_expr for halves if the mode is the same.
13093 PR middle-end/86123
13094 * match.pd ((X / Y) == 0 -> X < Y): Don't transform complex divisions.
13095 Fix up comment formatting.
13097 2018-06-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
13099 * typed-splay-tree.h (typed_splay_tree::remove): New function.
13100 (typed_splay_tree::closure,
13101 typed_splay_tree::inner_foreach_fn, typed_splay_tree::m_inner): Deleted.
13102 (typed_splay_tree::typed_splay_tree,
13103 typed_splay_tree::operator =): Declared private.
13104 (typed_splay_tree::splay_tree_key, typed_splay_tree::splay_tree_value,
13105 typed_splay_tree::splay_tree_node_s, typed_splay_tree::KDEL,
13106 typed_splay_tree::VDEL, typed_splay_tree::splay_tree_delete_helper,
13107 typed_splay_tree::rotate_left, typed_splay_tree::rotate_right,
13108 typed_splay_tree::splay_tree_splay,
13109 typed_splay_tree::splay_tree_foreach_helper,
13110 typed_splay_tree::splay_tree_insert,
13111 typed_splay_tree::splay_tree_remove,
13112 typed_splay_tree::splay_tree_lookup,
13113 typed_splay_tree::splay_tree_predecessor,
13114 typed_splay_tree::splay_tree_successor,
13115 typed_splay_tree::splay_tree_min,
13116 typed_splay_tree::splay_tree_max): Took over from splay-tree.c/.h.
13117 (typed_splay_tree::root, typed_splay_tree::comp,
13118 typed_splay_tree::delete_key,
13119 typed_splay_tree::delete_value): New data members.
13120 * typed-splay-tree.c (selftest::test_str_to_int): Add a test for
13121 typed_splay_tree::remove.
13123 2018-06-15 Matthew Fortune <matthew.fortune@mips.com>
13125 * config/mips/mips.h (ASM_SPEC): Pass through -mcrc, -mno-crc,
13126 -mginv and -mno-ginv to the assembler.
13127 * config/mips/mips.opt (-mcrc): New option.
13128 (-mginv): Likewise.
13129 * doc/invoke.text (-mcrc): Document.
13130 (-mginv): Likewise.
13132 2018-06-15 Nick Clifton <nickc@redhat.com>
13135 * tree.c (escaped_string): New class. Converts an unescaped
13136 string into its escaped equivalent.
13137 (warn_deprecated_use): Use the new class to convert the
13138 deprecation message, if present.
13139 (test_escaped_strings): New self test.
13140 (test_c_tests): Add test_escaped_strings.
13141 * doc/extend.texi (deprecated): Add a note that the
13142 deprecation message is affected by the -fmessage-length
13143 option, and that control characters will be escaped.
13144 (#pragma GCC error): Document this pragma.
13145 (#pragma GCC warning): Likewise.
13146 * doc/invoke.texi (-fmessage-length): Document this option's
13147 effect on the #warning and #error preprocessor directives and
13148 the deprecated attribute.
13150 2018-06-15 Richard Biener <rguenther@suse.de>
13152 * tree-vect-slp.c (vect_slp_bb): Dump MSG_OPTIMIZED_LOCATIONS
13153 here, also noting vector size used.
13154 * tree-vectorizer.c (vectorize_loops): Adjust. Note vector
13155 size used in MSG_OPTIMIZED_LOCATIONS dump.
13156 (pass_slp_vectorize::execute): Adjust.
13158 2018-06-15 Claudiu Zissulescu <claziss@synopsys.com>
13161 * config/arc/arc.c (arc_return_address_register): Fix
13164 2018-06-15 Richard Biener <rguenther@suse.de>
13166 PR middle-end/86159
13167 * tree-cfg.c (gimplify_build3): Do not strip sign conversions,
13168 leave useless conversion stripping to force_gimple_operand_gsi.
13169 (gimplify_build2): Likewise.
13170 (gimplify_build1): Likewise.
13172 2018-06-15 Richard Biener <rguenther@suse.de>
13174 PR middle-end/86076
13175 * tree-cfg.c (move_stmt_op): unshare invariant addresses
13176 before adjusting their block.
13178 2018-06-15 Sebastian Huber <sebastian.huber@embedded-brains.de>
13180 * config.gcc (riscv*-*-elf* | riscv*-*-rtems*): Use custom
13181 multilibs for *-*-rtems*.
13182 * config/riscv/t-rtems: New file.
13184 2018-06-14 Jakub Jelinek <jakub@redhat.com>
13186 PR middle-end/86122
13187 * match.pd ((A +- CST1) +- CST2): Punt if last resort
13188 unsigned_type_for returns NULL.
13191 * lower-subreg.c (find_decomposable_subregs): Don't decompose float
13192 subregs of multi-word pseudos unless the float mode has word size.
13194 2018-06-14 Richard Biener <rguenther@suse.de>
13196 PR middle-end/86139
13197 * tree-vect-generic.c (build_word_mode_vector_type): Remove
13198 duplicate and harmful type_hash_canon.
13199 * tree.c (type_hash_canon): Assert we didn't find ourselves.
13201 2018-06-14 Richard Biener <rguenther@suse.de>
13204 * tree-ssa-struct-alias.c (create_variable_info_for): Handle
13207 2018-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
13209 * config/rtems.h (STDINT_LONG32): Define.
13211 2018-06-13 Matthew Fortune <matthew.fortune@mips.com>
13212 Prachi Godbole <prachi.godbole@imgtec.com>
13214 * config/mips/mips-cpus.def: Define P6600.
13215 * config/mips/mips-tables.opt: Regenerate.
13216 * config/mips/mips.c (mips_ucbranch_type): New enum.
13217 (mips_rtx_cost_data): Add support for P6600.
13218 (mips_issue_rate): Likewise.
13219 (mips_multipass_dfa_lookahead): Likewise.
13220 (mips_avoid_hazard): Likewise.
13221 (mips_reorg_process_insns): Likewise.
13222 (mips_classify_branch_p6600): New function.
13223 * config/mips/mips.h (TUNE_P6600): New define.
13224 (MIPS_ISA_LEVEL_SPEC): Infer mips64r6 from p6600.
13225 (ENABLE_LD_ST_PAIRS): Enable load/store bonding for p6600.
13226 * config/mips/mips.md: Include p6600.md.
13227 (processor): Add p6600.
13228 * config/mips/p6600.md: New file.
13229 * doc/invoke.texi: Add p6600 to supported architectures.
13231 2018-06-13 Martin Sebor <msebor@redhat.com>
13233 PR tree-optimization/86114
13234 * gimple-fold.c (gimple_fold_builtin_strlen): Only handle LHS
13236 * tree-ssa-strlen.c (maybe_set_strlen_range): Same.
13238 2018-06-13 Richard Biener <rguenther@suse.de>
13240 * tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern):
13241 Properly set vector type of the intermediate stmt.
13242 * tree-vect-stmts.c (vectorizable_operation): The destination
13243 var always has vectype_out type.
13245 2018-06-13 Jeff Law <law@redhat.com>
13247 * config/rl78/rl78.c (move_elim_pass): Use TDF_NONE rather than
13248 integer 0 for argument to print_rtl_with_bb.
13249 (rl78_reorg): Likewise.
13251 2018-06-13 David Malcolm <dmalcolm@redhat.com>
13253 * config/arc/arc.c (hwloop_optimize): Strengthen local "end_label"
13254 from rtx to rtx_insn *.
13255 * config/bfin/bfin.c (hwloop_optimize): Likewise for local
13257 (add_sched_insns_for_speculation): Likewise for local "target",
13258 converting usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
13259 * config/c6x/c6x.c (reorg_split_calls): Strengthen param "call_labels"
13260 from rtx_insn ** to rtx_code_label **.
13261 (reorg_emit_nops): Likewise.
13262 (c6x_reorg): Likewise for local "call_labels".
13263 * config/sh/sh-protos.h (get_dest_uid): Strengthen 1st param from
13265 * config/sh/sh.c (dump_table): Strengthen local "lab" from rtx to
13266 rtx_code_label *, adding safe_as_a <rtx_code_label *> casts to
13267 the loops over LABEL_REFS.
13268 (fixup_addr_diff_vecs): Add as_a <rtx_insn *> to usage of
13270 (barrier_align): Convert usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
13271 (get_dest_uid): Strengthen param "label" from rtx to rtx_insn *.
13272 (split_branches): Strengthen local "olabel" from rtx to
13273 rtx_insn *, adding a safe_as_a cast.
13274 * emit-rtl.c (next_real_insn): Strengthen param from "rtx"
13276 (add_insn_after): Likewise for first two params.
13277 (add_insn_before): Likewise.
13278 (remove_insn): Likewise for param.
13279 (emit_pattern_before_noloc): Likewise for second and third params.
13280 (emit_jump_insn_before_noloc): Convert NULL_RTX to NULL.
13281 (emit_call_insn_before_noloc): Likewise.
13282 (emit_debug_insn_before_noloc): Strengthen "before" param from "rtx"
13284 (emit_barrier_before): Likewise.
13285 (emit_label_before): Strengthen "label" param from "rtx" to
13286 "rtx_code_label *". Strengthen "before" param from "rtx" to
13288 (emit_insn_after_1): Strengthen "after" param from "rtx" to
13290 (emit_pattern_after_noloc): Likewise.
13291 (emit_insn_after_noloc): Likewise.
13292 (emit_jump_insn_after_noloc): Likewise.
13293 (emit_call_insn_after_noloc): Likewise.
13294 (emit_debug_insn_after_noloc): Likewise.
13295 (emit_barrier_after): Likewise.
13296 (emit_label_after): Likewise for both params.
13297 (emit_pattern_after_setloc): Likewise for "after" param. Convert
13298 "loc" param from "int" to "location_t".
13299 (emit_insn_after_setloc): Likewise.
13300 (emit_jump_insn_after_setloc): Likewise.
13301 (emit_call_insn_after_setloc): Likewise.
13302 (emit_debug_insn_after_setloc): Likewise.
13303 (emit_pattern_before_setloc): Likewise for "before" param. Convert
13304 "loc" param from "int" to "location_t".
13305 (emit_pattern_before): Convert NULL_RTX to NULL.
13306 (emit_insn_before_setloc): Convert "loc" param from "int" to
13308 (emit_jump_insn_before_setloc): Likewise.
13309 (emit_call_insn_before_setloc): Likewise.
13310 (emit_debug_insn_before_setloc): Strengthen "before" param from rtx to
13311 rtx_insn *. Convert "loc" param from "int" to "location_t".
13312 * rtl.h (emit_insn_before_setloc, emit_jump_insn_before_setloc,
13313 emit_call_insn_before_setloc, emit_debug_insn_before_setloc):
13314 Convert 3rd param from "int" to "location_t".
13315 (emit_barrier_before, emit_barrier_after, next_real_insn):
13316 Strengthen param from rtx to rtx_insn *.
13317 (emit_label_before): Strengthen 1st param from "rtx" to
13318 "rtx_code_label *". Strengthen 2nd param from "rtx" to
13320 (emit_insn_after_noloc, emit_jump_insn_after_noloc,
13321 emit_call_insn_after_noloc, emit_debug_insn_after_noloc):
13322 Strengthen 2nd param from "rtx" to "rtx_insn *".
13323 (emit_insn_after_setloc, emit_jump_insn_after_setloc)
13324 emit_call_insn_after_setloc, emit_debug_insn_after_setloc):
13325 Likewise. Convert 3rd param from "int" to "location_t".
13326 (emit_label_after): Strengthen 1st param from "rtx" to
13327 "rtx_code_label *".
13328 (next_real_insn, remove_insn): Strengthen param from "rtx" to
13330 (add_insn_before, add_insn_after): Strengthen 1st and 2nd params
13331 from "rtx" to "rtx_insn *".
13333 2018-06-13 Jan Hubicka <hubicka@gcc.gnu.org>
13335 * cgraph.c (cgraph_node::get_untransformed_body): Dump function
13336 bodies streamed in with -Q.
13337 * dumpfile.c (dump_files): Add lto-stream-out dump file.
13338 * dumpfile.h (tree_dump_index): Add lto_stream_out.
13339 * gimple-streamer-out.c: Include gimple-pretty-print.h
13340 (output_bb): Dump stmts streamed.
13341 * lto-section-out.c: Include print-tree.h
13342 (lto_begin_section): Dump sections created.
13343 (lto_output_decl_index): Dump decl encoded.
13344 * lto-streamer-out.c: Include print-tree.h
13345 (create_output_block): Dump output block created.
13346 (DFS::DFS_write_tree_body): Dump DFS SCCs streamed.
13347 (output_function): Dump function output.
13348 (output_constructor): Dump constructor streamed.
13349 (write_global_stream): Output indexes encoded.
13350 (produce_asm_for_decls): Dump streams encoded.
13351 * lto-streamer.c (streamer_dump_file): New global var.
13352 * lto-streamer.h (streamer_dump_file): Declare.
13353 * passes.c (ipa_write_summaries): Initialize streamer dump.
13354 * varpool.c (varpool_node::get_constructor): Dump constructors streamed
13357 2018-06-13 Eric Botcazou <ebotcazou@adacore.com>
13360 * config/i386/winnt.c (i386_pe_seh_cold_init): Do not emit negative
13361 offsets for register save directives. Emit a second batch of save
13362 directives, if need be, when the function accesses prior frames.
13364 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
13366 * config/arc/fpu.md (fmasf4): Force operand to register.
13367 (fnmasf4): Likewise.
13369 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
13371 * config/arc/arc-protos.h (arc_pad_return): Remove.
13372 * config/arc/arc.c (machine_function): Remove force_short_suffix
13374 (arc_print_operand): Adjust printing of '&'.
13375 (arc_verify_short): Remove conditional printing of short suffix.
13376 (arc_final_prescan_insn): Remove reference to size_reason.
13377 (pad_return): New function.
13378 (arc_reorg): Call pad_return.
13379 (arc_pad_return): Remove.
13380 (arc_init_machine_status): Remove reference to force_short_suffix.
13381 * config/arc/arc.md (vunspec): Add VUNSPEC_ARC_BLOCKAGE.
13382 (attr length): When attribute iscompact is true force to 2
13383 regardless; in the case of maybe check if we want to force the
13384 instruction to have 4 bytes length.
13385 (nopv): Change it to generate 4 byte long nop as well.
13386 (blockage): New pattern.
13387 (simple_return): Remove call to arc_pad_return.
13388 (p_return_i): Likewise.
13390 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
13392 * config/arc/elf.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
13394 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
13396 * config/arc/builtins.def (SYNC): SYNC instruction is valid on all
13399 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
13401 * config/arc/arc.c (atomic_exchangesi): EX instruction is default
13402 for ARC700 and ARCv2.
13404 2018-06-13 Chenghua Xu <paul.hua.gm@gmail.com>
13407 * config/mips/loongson.md (vec_setv4hi): Gen_lowpart for
13408 operands[2] instead of operands[1].
13411 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
13413 * lra-constraints.c (simplify_operand_subreg): In the paradoxical
13414 case, check whether the outer register overlaps an unallocatable
13415 register, not just whether it fits the required class.
13417 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
13419 * poly-int.h (can_div_trunc_p): Add new overload in which all values
13421 * alias.c (get_addr): Extend CONST_INT handling to poly_int_rtx_p.
13422 (memrefs_conflict_p): Likewise.
13423 (init_alias_analysis): Likewise.
13424 * cfgexpand.c (expand_debug_expr): Likewise.
13425 * combine.c (combine_simplify_rtx, force_int_to_mode): Likewise.
13426 * cse.c (fold_rtx): Likewise.
13427 * explow.c (adjust_stack, anti_adjust_stack): Likewise.
13428 * expr.c (emit_block_move_hints): Likewise.
13429 (clear_storage_hints, push_block, emit_push_insn): Likewise.
13430 (store_expr_with_bounds, reduce_to_bit_field_precision): Likewise.
13431 (emit_group_load_1): Use rtx_to_poly_int64 for group offsets.
13432 (emit_group_store): Likewise.
13433 (find_args_size_adjust): Use strip_offset. Use rtx_to_poly_int64
13434 to read the PRE/POST_MODIFY increment.
13435 * calls.c (store_one_arg): Use strip_offset.
13436 * rtlanal.c (rtx_addr_can_trap_p_1): Extend CONST_INT handling to
13438 (set_noop_p): Use rtx_to_poly_int64 for the elements selected
13440 * simplify-rtx.c (avoid_constant_pool_reference): Use strip_offset.
13441 (simplify_binary_operation_1): Extend CONST_INT handling to
13443 * var-tracking.c (compute_cfa_pointer): Take a poly_int64 rather
13444 than a HOST_WIDE_INT.
13445 (hard_frame_pointer_adjustment): Change from HOST_WIDE_INT to
13447 (adjust_mems, add_stores): Update accodingly.
13448 (vt_canonicalize_addr): Track polynomial offsets.
13449 (emit_note_insn_var_location): Likewise.
13450 (vt_add_function_parameter): Likewise.
13451 (vt_initialize): Likewise.
13453 2018-06-12 Jeff Law <law@redhat.com>
13455 * config.gcc (alpha*-*-freebsd*): Remove.
13456 * config/alpha/freebsd.h: Remove.
13458 2018-06-12 David Malcolm <dmalcolm@redhat.com>
13461 * spellcheck-tree.c (levenshtein_distance): Rename to...
13462 (get_edit_distance): ...this, and update for underlying renaming.
13463 * spellcheck-tree.h (levenshtein_distance): Rename to...
13464 (get_edit_distance): ...this.
13465 * spellcheck.c (levenshtein_distance): Rename to...
13466 (get_edit_distance): ...this. Convert from Levenshtein distance
13467 to Damerau-Levenshtein distance by supporting transpositions of
13468 adjacent characters. Rename "v1" to "v_next" and "v0" to
13470 (selftest::levenshtein_distance_unit_test_oneway): Rename to...
13471 (selftest::test_edit_distance_unit_test_oneway): ...this, and
13472 update for underlying renaming.
13473 (selftest::levenshtein_distance_unit_test): Rename to...
13474 (selftest::test_get_edit_distance_unit): ...this, and update for
13475 underlying renaming.
13476 (selftest::test_find_closest_string): Add example from PR 69968
13477 where transposition helps
13478 (selftest::test_metric_conditions): Update for renaming.
13479 (selftest::test_metric_conditions): Likewise.
13480 (selftest::spellcheck_c_tests): Likewise.
13481 * spellcheck.h (levenshtein_distance): Rename both overloads to...
13482 (get_edit_distance): ...this.
13483 (best_match::consider): Update for renaming.
13485 2018-06-12 Martin Sebor <msebor@redhat.com>
13487 PR tree-optimization/85259
13488 * builtins.c (compute_objsize): Handle constant offsets.
13489 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return
13490 true iff a warning has been issued.
13491 * gimple.h (gimple_nonartificial_location): New function.
13492 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Call
13493 gimple_nonartificial_location and handle -Wno-system-headers.
13494 (handle_builtin_stxncpy): Same.
13496 2018-06-12 Martin Sebor <msebor@redhat.com>
13499 * fold-const.c (operand_equal_p): Handle SAVE_EXPR.
13501 2018-06-12 Will Schmidt <will_schmidt@vnet.ibm.com>
13503 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
13504 BUILTIN_VEC_XST entries for pointer to double and long long.
13506 2018-06-12 H.J. Lu <hongjiu.lu@intel.com>
13509 * config/i386/gnu-user.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
13511 * config/i386/gnu-user64.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
13514 2018-06-12 Martin Liska <mliska@suse.cz>
13516 * doc/options.texi: Document IntegerRange.
13518 2018-06-12 Martin Liska <mliska@suse.cz>
13520 * config/i386/i386.opt: Make MPX-related options as Deprecated.
13521 * opt-functions.awk: Handle Deprecated flag.
13522 * opts-common.c (decode_cmdline_option): Handle cl_deprecated
13524 (read_cmdline_option): Report warning for a deprecated option.
13525 * opts.h (struct cl_option): Add new field cl_deprecated.
13526 (CL_ERR_DEPRECATED): New.
13528 2018-06-12 Martin Liska <mliska@suse.cz>
13530 * doc/options.texi: Document Deprecated option flag.
13532 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
13534 * config/arc/arc-arch.h (arc_extras): New enum.
13535 (arc_cpu_t):Add field extra.
13536 (arc_cpu_types): Consider the extras.
13537 * config/arc/arc-cpus.def: Add extras info.
13538 * config/arc/arc-opts.h (processor_type): Consider extra field.
13539 * config/arc/arc.c (arc_override_options): Handle extra field.
13541 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
13543 * config/arc/arc-arch.h: Update ARC_OPTX macro.
13544 * config/arc/arc-options.def (ARC_OPTX): Introduce a new doc
13546 * config/arc/arc.c (arc_init): Update pic warning.
13547 (irq_range): Update irq range parsing warnings.
13548 (arc_override_options): Update various warning messages.
13549 (arc_handle_aux_attribute): Likewise.
13551 2018-06-12 Robert Suchanek <robert.suchanek@mips.com>
13553 * config/mips/i6400.md (i6400_fpu_fadd): Remove frint.
13555 2018-06-12 Jozef Lawrynowicz <jozef.l@mittosystems.com>
13557 * doc/sourcebuild.texi: Document usage of line number 0 in verify
13558 compiler messages directives.
13560 2018-06-12 Matthew Fortune <mfortune@gmail.com>
13562 * config/mips/mips-cpus.def: New MIPS_CPU for i6500.
13563 * config/mips/mips-tables.opt: Regenerate.
13564 * config/mips/mips.h (MIPS_ISA_LEVEL_SPEC): Mark i6500 as
13566 * doc/invoke.texi: Document -march=i6500.
13568 2018-06-12 Prachi Godbole <prachi.godbole@imgtec.com>
13570 * config/mips/i6400.md (i6400_gpmuldiv): Remove cpu_unit.
13571 (i6400_gpmul): Add cpu_unit.
13572 (i6400_gpdiv): Likewise.
13573 (i6400_msa_add_d): Update reservations.
13574 (i6400_msa_int_add) Likewise.
13575 (i6400_msa_short_logic3) Likewise.
13576 (i6400_msa_short_logic2) Likewise.
13577 (i6400_msa_short_logic) Likewise.
13578 (i6400_msa_move) Likewise.
13579 (i6400_msa_cmp) Likewise.
13580 (i6400_msa_short_float2) Likewise.
13581 (i6400_msa_div_d) Likewise.
13582 (i6400_msa_long_logic1) Likewise.
13583 (i6400_msa_long_logic2) Likewise.
13584 (i6400_msa_mult) Likewise.
13585 (i6400_msa_long_float2) Likewise.
13586 (i6400_msa_long_float4) Likewise.
13587 (i6400_msa_long_float5) Likewise.
13588 (i6400_msa_long_float8) Likewise.
13589 (i6400_fpu_fadd): Include frint type.
13590 (i6400_fpu_store): New define_insn_reservation.
13591 (i6400_fpu_load): Likewise.
13592 (i6400_fpu_move): Likewise.
13593 (i6400_fpu_fcmp): Likewise.
13594 (i6400_fpu_fmadd): Likewise.
13595 (i6400_int_mult): Include imul3nc type and update reservation.
13596 (i6400_int_div): Include idiv3 type and update reservation.
13597 (i6400_int_load): Update to check type not move_type.
13598 (i6400_int_store): Likewise.
13599 (i6400_int_prefetch): Set zero latency.
13601 2018-06-12 Eric Botcazou <ebotcazou@adacore.com>
13603 * gcc.c: Document new %@{...} sequence.
13604 (LINK_COMMAND_SPEC): Use it for the -L switches.
13605 (cpp_unique_options): Use it for the -I switches.
13606 (at_file_argbuf): New global variable.
13607 (in_at_file): Likewise.
13608 (alloc_args): Create at_file_argbuf.
13609 (clear_args): Truncate at_file_argbuf.
13610 (store_arg): If in_at_file, push the argument onto at_file_argbuf.
13611 (open_at_file): New function.
13612 (close_at_file): Likewise.
13613 (create_at_file): Delete.
13614 (do_spec_1) <'i'>: Use open_at_file/close_at_file.
13617 (validate_switches_from_spec): Deal with %@{...} sequence.
13618 (validate_switches): Likewise.
13619 (driver::finalize): Call clear_args.
13621 2018-06-11 Rasmus Villemoes <rasmus.villemoes@prevas.dk>
13623 * config/vx-common.h (USE_TM_CLONE_REGISTRY): #define to 0.
13625 2018-06-11 Martin Sebor <msebor@redhat.com>
13627 * doc/invoke.texi (-Wall): List -Wc++17-compat.
13628 (Wno-class-memaccess): Add @opindex.
13629 (Wno-templates, Wno-multiple-inheritance): Same.
13630 (Wno-virtual-inheritance, Wno-namespaces): Same.
13631 (Wno-pedantic, Wno-chkp, Wcoverage-mismatch): Same.
13632 (Wno-format-overflow, Wno-format-truncation): Same.
13633 (Wno-unused-local-typedefs, Walloc-size-larger-than): Same.
13634 (Wno-alloc-size-larger-than, Wframe-larger-than): Same
13635 (Wno-stack-usage, Wno-c++-compat, Wno-c++11-compat): Same.
13636 (Wno-c++14-compat, Wno-c++17-compat, Wno-openmp-simd): Same.
13637 (Wno-unsuffixed-float-constants, Wno-addr-space-convert): Same.
13638 (Wno-misspelled-isr): Same.
13640 2018-06-11 Martin Sebor <msebor@redhat.com>
13642 * PR tree-optimization/86083
13643 * tree-ssa-strlen.c (handle_char_store): Use tree_expr_nonzero_p.
13645 2018-06-11 Zhouyi Zhou <zhouzhouyi@gmail.com>
13647 * tree-eh.c (lower_eh_constructs_2): Add a comma to comment.
13649 2018-06-11 Segher Boessenkool <segher@kernel.crashing.org>
13652 * config/rs6000/rs6000.md (*movdi_internal32): Put constraint modifiers
13653 on the correct operand.
13654 (*movdi_internal64): Ditto.
13656 2018-06-11 Martin Liska <mliska@suse.cz>
13658 PR tree-optimization/86089
13659 * tree-ssa-strlen.c (get_string_length): Move back removed hunk.
13661 2018-06-11 Julia Koval <julia.koval@intel.com>
13663 * config/i386/vaesintrin.h (_mm_aesdec_epi128, _mm_aesdeclast_epi128)
13664 _mm_aesenc_epi128, _mm_aesenclast_epi128: Remove.
13665 * config/i386/vpclmulqdqintrin.h (_mm_clmulepi64_epi128): Remove.
13667 2018-06-11 Olivier Hainque <hainque@adacore.com>
13669 * dwarf2out.c (gen_compile_unit_die): Fallout to DW_LANG_Ada83
13670 for Ada with strict dwarf2.
13672 2018-06-08 Peter Bergner <bergner@vnet.ibm.com>
13675 * config/rs6000/rs6000.c (mem_operand_gpr): Enable PRE_INC and PRE_DEC
13678 2018-06-08 Jan Hubicka <hubicka@ucw.cz>
13680 * dumpfile.c (FIRST_ME_AUTO_NUMBERED_DUMP): Bump to 4.
13682 2018-06-08 David Edelsohn <dje.gcc@gmail.com>
13684 * config/rs6000/rs6000.c (rs6000_passes_ieee128): Protect with #if
13687 2018-06-08 Martin Liska <mliska@suse.cz>
13689 * tree-cfg.h (debug_function): Fix argument type to match
13692 2018-06-08 Martin Liska <mliska@suse.cz>
13694 * config/powerpcspe/powerpcspe.c (rs6000_xcoff_visibility):
13695 Remove usage of MPX-related (and removed) fields.
13696 * config/rs6000/rs6000.c (rs6000_xcoff_visibility): Likewise.
13698 2018-06-08 David Malcolm <dmalcolm@redhat.com>
13700 * cfg.c (debug): Use TDF_NONE rather than 0.
13701 * cfghooks.c (debug): Likewise.
13702 * dumpfile.c (DUMP_FILE_INFO): Likewise; also for OPTGROUP.
13703 (struct dump_option_value_info): Convert to...
13704 (struct kv_pair): ...this template type.
13705 (dump_options): Convert to kv_pair<dump_flags_t>; use TDF_NONE
13707 (optinfo_verbosity_options): Likewise.
13708 (optgroup_options): Convert to kv_pair<optgroup_flags_t>; use
13710 (gcc::dump_manager::dump_register): Use optgroup_flags_t rather
13711 than int for "optgroup_flags" param.
13712 (dump_generic_expr_loc): Use dump_flags_t rather than int for
13714 (dump_dec): Likewise.
13715 (dump_finish): Use TDF_NONE rather than 0.
13716 (gcc::dump_manager::opt_info_enable_passes): Use optgroup_flags_t
13717 rather than int for "optgroup_flags" param. Use TDF_NONE rather
13718 than 0. Update for change to option_ptr.
13719 (opt_info_switch_p_1): Convert "optgroup_flags" param from int *
13720 to optgroup_flags_t *. Use TDF_NONE and OPTGROUP_NONE rather than
13721 0. Update for changes to optinfo_verbosity_options and
13723 (opt_info_switch_p): Convert optgroup_flags from int to
13725 (dump_basic_block): Use dump_flags_t rather than int
13726 for "dump_kind" param.
13727 * dumpfile.h (TDF_ADDRESS, TDF_SLIM, TDF_RAW, TDF_DETAILS,
13728 TDF_STATS, TDF_BLOCKS, TDF_VOPS, TDF_LINENO, TDF_UID)
13729 TDF_STMTADDR, TDF_GRAPH, TDF_MEMSYMS, TDF_RHS_ONLY, TDF_ASMNAME,
13730 TDF_EH, TDF_NOUID, TDF_ALIAS, TDF_ENUMERATE_LOCALS, TDF_CSELIB,
13731 TDF_SCEV, TDF_GIMPLE, TDF_FOLDING, MSG_OPTIMIZED_LOCATIONS,
13732 MSG_MISSED_OPTIMIZATION, MSG_NOTE, MSG_ALL, TDF_COMPARE_DEBUG,
13733 TDF_NONE): Convert from macros to...
13734 (enum dump_flag): ...this new enum.
13735 (dump_flags_t): Update to use enum.
13736 (operator|, operator&, operator~, operator|=, operator&=):
13737 Implement for dump_flags_t.
13738 (OPTGROUP_NONE, OPTGROUP_IPA, OPTGROUP_LOOP, OPTGROUP_INLINE,
13739 OPTGROUP_OMP, OPTGROUP_VEC, OPTGROUP_OTHER, OPTGROUP_ALL):
13740 Convert from macros to...
13741 (enum optgroup_flag): ...this new enum.
13742 (optgroup_flags_t): New typedef.
13743 (operator|, operator|=): Implement for optgroup_flags_t.
13744 (struct dump_file_info): Convert field "alt_flags" to
13745 dump_flags_t. Convert field "optgroup_flags" to
13747 (dump_basic_block): Use dump_flags_t rather than int for param.
13748 (dump_generic_expr_loc): Likewise.
13749 (dump_dec): Likewise.
13750 (dump_register): Convert param "optgroup_flags" to
13752 (opt_info_enable_passes): Likewise.
13753 * early-remat.c (early_remat::dump_edge_list): Use TDF_NONE rather
13755 * gimple-pretty-print.c (debug): Likewise.
13756 * gimple-ssa-store-merging.c (bswap_replace): Likewise.
13757 (merged_store_group::apply_stores): Likewise.
13758 * gimple-ssa-strength-reduction.c (insert_initializers): Likewise.
13759 * gimple.c (verify_gimple_pp): Likewise.
13760 * graphite-poly.c (print_pbb_body): Likewise.
13761 * passes.c (pass_manager::register_one_dump_file): Convert
13762 local "optgroup_flags" to optgroup_flags_t.
13763 * print-tree.c (print_node): Use TDF_NONE rather than 0.
13765 (debug_body): Likewise.
13766 * tree-pass.h (struct pass_data): Convert field "optgroup_flags"
13767 to optgroup_flags_t.
13768 * tree-pretty-print.c (print_struct_decl): Use TDF_NONE rather
13770 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Likewise.
13771 (convert_mult_to_fma): Likewise.
13772 * tree-ssa-reassoc.c (undistribute_ops_list): Likewise.
13773 * tree-ssa-sccvn.c (vn_eliminate): Likewise.
13774 * tree-vect-data-refs.c (dump_lower_bound): Convert param
13775 "dump_kind" to dump_flags_t.
13777 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
13779 * config/rs6000/rs6000.c (min, max): Delete.
13781 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
13783 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete mention of
13784 -mabi=spe and -mabi=no-spe.
13786 2018-06-08 Martin Liska <mliska@suse.cz>
13788 * ipa-pure-const.c (propagate_pure_const): Use ::get at places
13789 where we expect an existing summary.
13791 2018-06-08 Martin Liska <mliska@suse.cz>
13793 * ipa-inline-analysis.c (simple_edge_hints): Use ::get method.
13794 * ipa-inline.h (estimate_edge_growth): Likewise.
13796 2018-06-08 Martin Liska <mliska@suse.cz>
13798 * cgraph.c (function_version_hasher::hash): Use
13799 cgraph_node::get_uid ().
13800 (function_version_hasher::equal):
13801 * cgraph.h (cgraph_node::get_uid): New method.
13802 * ipa-inline.c (update_caller_keys): Use
13803 cgraph_node::get_uid ().
13804 (update_callee_keys): Likewise.
13805 * ipa-utils.c (searchc): Likewise.
13806 (ipa_reduced_postorder): Likewise.
13807 * lto-cgraph.c (input_node): Likewise.
13808 * passes.c (is_pass_explicitly_enabled_or_disabled): Likewise.
13809 * symbol-summary.h (symtab_insertion): Likewise.
13810 (symtab_removal): Likewise.
13811 (symtab_duplication): Likewise.
13812 * tree-pretty-print.c (dump_function_header): Likewise.
13813 * tree-sra.c (convert_callers_for_node): Likewise.
13815 2018-06-08 Martin Liska <mliska@suse.cz>
13817 * cgraph.c (symbol_table::create_edge): Always assign a new
13819 (symbol_table::free_edge): Do not recycle numbers.
13820 * cgraph.h (cgraph_edge::get): New method.
13821 * symbol-summary.h (symtab_removal): Use it.
13822 (symtab_duplication): Likewise.
13823 (call_summary::hashable_uid): Remove.
13825 2018-06-08 Martin Liska <mliska@suse.cz>
13827 * ipa-inline-analysis.c (inline_edge_removal_hook): Remove.
13828 (initialize_growth_caches): Remove.
13829 (free_growth_caches): Likewise.
13830 (do_estimate_edge_time): Use edge_growth_cache.
13831 (do_estimate_edge_size): Likewise.
13832 (do_estimate_edge_hints): Likewise.
13833 * ipa-inline.c (reset_edge_caches): Likewise.
13834 (recursive_inlining): Likewise.
13835 (inline_small_functions): Likewise.
13836 * ipa-inline.h (initialize_growth_caches): Remove.
13837 (estimate_edge_size): Likewise.
13838 (estimate_edge_time): Likewise.
13839 (estimate_edge_hints): Likewise.
13840 (reset_edge_growth_cache): Likewise.
13841 * symbol-summary.h (call_summary::remove): New method.
13843 2018-06-08 Martin Liska <mliska@suse.cz>
13845 * ipa-cp.c (class edge_clone_summary): New summary.
13846 (grow_edge_clone_vectors): Remove.
13847 (ipcp_edge_duplication_hook): Remove.
13848 (class edge_clone_summary_t): New call_summary class.
13849 (ipcp_edge_removal_hook): Remove.
13850 (edge_clone_summary_t::duplicate): New function.
13851 (get_next_cgraph_edge_clone): Use edge_clone_summaries.
13852 (create_specialized_node): Likewise.
13853 (ipcp_driver): Initialize edge_clone_summaries and do not
13856 2018-06-08 Martin Liska <mliska@suse.cz>
13858 * symbol-summary.h (get): New function.
13859 (call_summary::m_initialize_when_cloning): New class member.
13861 2018-06-08 Martin Liska <mliska@suse.cz>
13863 * cgraph.c (cgraph_node::remove): Do not recycle uid.
13864 * cgraph.h (symbol_table::release_symbol): Do not pass uid.
13865 (symbol_table::allocate_cgraph_symbol): Do not set uid.
13866 * passes.c (uid_hash_t): Record removed_nodes by their uids.
13867 (remove_cgraph_node_from_order): Use the removed_nodes set.
13868 (do_per_function_toporder): Likwise.
13869 * symbol-summary.h (symtab_insertion): Use cgraph_node::uid
13870 instead of summary_uid.
13871 (symtab_removal): Likewise.
13872 (symtab_duplication): Likewise.
13874 2018-06-08 Martin Liska <mliska@suse.cz>
13876 * ipa-cp.c (ipcp_store_bits_results): Use
13877 ipcp_transformation_sum.
13878 (ipcp_store_vr_results): Likewise.
13879 * ipa-prop.c (ipcp_grow_transformations_if_necessary): Renamed
13881 (ipcp_transformation_initialize): ... this.
13882 (ipa_set_node_agg_value_chain):
13883 (ipa_node_params_t::duplicate): Use ipcp_transformation_sum.
13884 (write_ipcp_transformation_info): Likewise.
13885 (read_ipcp_transformation_info): Likewise.
13886 (ipcp_update_bits): Likewise.
13887 (ipcp_update_vr): Likewise.
13888 (ipcp_transform_function): Likewise.
13889 * ipa-prop.h: Rename ipcp_transformation_summary to
13890 ipcp_transformation.
13891 (class ipcp_transformation_t): New function summary.
13892 (ipcp_get_transformation_summary): Use ipcp_transformation_sum.
13893 (ipa_get_agg_replacements_for_node): Likewise.
13895 2018-06-08 Martin Liska <mliska@suse.cz>
13897 * ipa-pure-const.c (struct funct_state_d): Do it class instead
13899 (class funct_state_summary_t): New function_summary class.
13900 (has_function_state): Remove.
13901 (get_function_state): Likewise.
13902 (set_function_state): Likewise.
13903 (add_new_function): Likewise.
13904 (funct_state_summary_t::insert): New function.
13905 (duplicate_node_data): Remove.
13906 (remove_node_data): Remove.
13907 (funct_state_summary_t::duplicate): New function.
13908 (register_hooks): Create new funct_state_summaries.
13909 (pure_const_generate_summary): Use it.
13910 (pure_const_write_summary): Likewise.
13911 (pure_const_read_summary): Likewise.
13912 (propagate_pure_const): Likewise.
13913 (propagate_nothrow): Likewise.
13914 (dump_malloc_lattice): Likewise.
13915 (propagate_malloc): Likewise.
13916 (execute): Do not register hooks, just remove summary
13918 (pass_ipa_pure_const::pass_ipa_pure_const): Simplify
13921 2018-06-08 Martin Liska <mliska@suse.cz>
13923 * ipa-reference.c (remove_node_data): Remove.
13924 (duplicate_node_data): Likewise.
13925 (class ipa_ref_var_info_summary_t): New class.
13926 (class ipa_ref_opt_summary_t): Likewise.
13927 (get_reference_vars_info): Use ipa_ref_var_info_summaries.
13928 (get_reference_optimization_summary): Use
13929 ipa_ref_opt_sum_summaries.
13930 (set_reference_vars_info): Remove.
13931 (set_reference_optimization_summary): Likewise.
13932 (ipa_init): Create summaries.
13933 (init_function_info): Use function summary.
13934 (ipa_ref_opt_summary_t::duplicate): New function.
13935 (ipa_ref_opt_summary_t::remove): New function.
13936 (get_read_write_all_from_node): Fix GNU coding style.
13937 (propagate): Use function summary.
13938 (write_node_summary_p): Fix GNU coding style.
13939 (stream_out_bitmap): Likewise.
13940 (ipa_reference_read_optimization_summary): Use function summary.
13941 (ipa_reference_c_finalize): Do not release hooks.
13943 2018-06-08 Martin Liska <mliska@suse.cz>
13945 * ipa-fnsummary.c (dump_ipa_call_summary): Use ::get method.
13946 (analyze_function_body): Extract multiple calls of get_create.
13947 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
13948 * ipa-inline.c (recursive_inlining): Use ::get method.
13949 * ipa-inline.h (estimate_edge_growth): Likewise.
13951 2018-06-08 Martin Liska <mliska@suse.cz>
13953 * hsa-common.h (enum hsa_function_kind): Rename HSA_NONE to
13955 (hsa_function_summary::hsa_function_summary): Use the new enum
13957 (hsa_gpu_implementation_p): Use hsa_summaries::get.
13958 * hsa-gen.c (hsa_get_host_function): Likewise.
13959 (get_brig_function_name): Likewise.
13960 * ipa-hsa.c (process_hsa_functions): Likewise.
13961 (ipa_hsa_write_summary): Likewise.
13962 * symbol-summary.h (symtab_duplication): Use ::get function/
13963 (get): New function.
13965 2018-06-08 Martin Liska <mliska@suse.cz>
13967 * config/i386/i386.c (ix86_can_inline_p): Use get_create instead
13969 * hsa-common.c (hsa_summary_t::link_functions): Likewise.
13970 (hsa_register_kernel): Likewise.
13971 * hsa-common.h (hsa_gpu_implementation_p): Likewise.
13972 * hsa-gen.c (hsa_get_host_function): Likewise.
13973 (get_brig_function_name): Likewise.
13974 (generate_hsa): Likewise.
13975 (pass_gen_hsail::execute): Likewise.
13976 * ipa-cp.c (ipcp_cloning_candidate_p): Likewise.
13977 (devirtualization_time_bonus): Likewise.
13978 (ipcp_propagate_stage): Likewise.
13979 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
13980 (edge_set_predicate): Likewise.
13981 (evaluate_conditions_for_known_args): Likewise.
13982 (evaluate_properties_for_edge): Likewise.
13983 (ipa_fn_summary::reset): Likewise.
13984 (ipa_fn_summary_t::duplicate): Likewise.
13985 (dump_ipa_call_summary): Likewise.
13986 (ipa_dump_fn_summary): Likewise.
13987 (analyze_function_body): Likewise.
13988 (compute_fn_summary): Likewise.
13989 (estimate_edge_devirt_benefit): Likewise.
13990 (estimate_edge_size_and_time): Likewise.
13991 (estimate_calls_size_and_time): Likewise.
13992 (estimate_node_size_and_time): Likewise.
13993 (inline_update_callee_summaries): Likewise.
13994 (remap_edge_change_prob): Likewise.
13995 (remap_edge_summaries): Likewise.
13996 (ipa_merge_fn_summary_after_inlining): Likewise.
13997 (ipa_update_overall_fn_summary): Likewise.
13998 (read_ipa_call_summary): Likewise.
13999 (inline_read_section): Likewise.
14000 (write_ipa_call_summary): Likewise.
14001 (ipa_fn_summary_write): Likewise.
14002 (ipa_free_fn_summary): Likewise.
14003 * ipa-hsa.c (process_hsa_functions): Likewise.
14004 (ipa_hsa_write_summary): Likewise.
14005 (ipa_hsa_read_section): Likewise.
14006 * ipa-icf.c (sem_function::merge): Likewise.
14007 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
14008 (do_estimate_edge_time): Likewise.
14009 (estimate_size_after_inlining): Likewise.
14010 (estimate_growth): Likewise.
14011 (growth_likely_positive): Likewise.
14012 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
14013 (inline_call): Likewise.
14014 * ipa-inline.c (caller_growth_limits): Likewise.
14015 (can_inline_edge_p): Likewise.
14016 (can_inline_edge_by_limits_p): Likewise.
14017 (compute_uninlined_call_time): Likewise.
14018 (compute_inlined_call_time): Likewise.
14019 (want_inline_small_function_p): Likewise.
14020 (edge_badness): Likewise.
14021 (update_caller_keys): Likewise.
14022 (update_callee_keys): Likewise.
14023 (recursive_inlining): Likewise.
14024 (inline_small_functions): Likewise.
14025 (inline_to_all_callers_1): Likewise.
14026 (dump_overall_stats): Likewise.
14027 (early_inline_small_functions): Likewise.
14028 (early_inliner): Likewise.
14029 * ipa-inline.h (estimate_edge_growth): Likewise.
14030 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
14031 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
14032 * ipa-prop.h (IPA_NODE_REF): Likewise.
14033 (IPA_EDGE_REF): Likewise.
14034 * ipa-pure-const.c (malloc_candidate_p): Likewise.
14035 (propagate_malloc): Likewise.
14036 * ipa-split.c (execute_split_functions): Likewise.
14037 * symbol-summary.h: Rename get to get_create.
14039 (get_create): Likewise.
14040 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
14042 2018-06-08 Martin Liska <mliska@suse.cz>
14044 * symbol-summary.h (release): Move definition out of class
14046 (symtab_removal): Likewise.
14047 (symtab_duplication): Likewise.
14049 2018-06-08 Martin Liska <mliska@suse.cz>
14051 * symbol-summary.h (function_summary): Move constructor
14052 implementation out of class declaration.
14053 (release): Likewise.
14054 (symtab_insertion): Likewise.
14055 (symtab_removal): Likewise.
14056 (symtab_duplication): Likewise.
14059 2018-06-08 Martin Liska <mliska@suse.cz>
14061 * Makefile.in: Remove support for MPX (macros, related functions,
14062 fields in cgraph_node, ...).
14063 * builtin-types.def (BT_BND): Likewise.
14064 (BT_FN_BND_CONST_PTR): Likewise.
14065 (BT_FN_CONST_PTR_BND): Likewise.
14066 (BT_FN_VOID_PTR_BND): Likewise.
14067 (BT_FN_BND_CONST_PTR_SIZE): Likewise.
14068 (BT_FN_VOID_CONST_PTR_BND_CONST_PTR): Likewise.
14069 * builtins.c (expand_builtin_memcpy_with_bounds): Likewise.
14070 (expand_builtin_mempcpy_with_bounds): Likewise.
14071 (expand_builtin_memset_with_bounds): Likewise.
14072 (expand_builtin_memset_args): Likewise.
14073 (std_expand_builtin_va_start): Likewise.
14074 (expand_builtin): Likewise.
14075 (expand_builtin_with_bounds): Likewise.
14076 * builtins.def (DEF_BUILTIN_CHKP): Likewise.
14077 (DEF_LIB_BUILTIN_CHKP): Likewise.
14078 (DEF_EXT_LIB_BUILTIN_CHKP): Likewise.
14079 (DEF_CHKP_BUILTIN): Likewise.
14080 (BUILT_IN_MEMCPY): Likewise.
14081 (BUILT_IN_MEMMOVE): Likewise.
14082 (BUILT_IN_MEMPCPY): Likewise.
14083 (BUILT_IN_MEMSET): Likewise.
14084 (BUILT_IN_STPCPY): Likewise.
14085 (BUILT_IN_STRCAT): Likewise.
14086 (BUILT_IN_STRCHR): Likewise.
14087 (BUILT_IN_STRCPY): Likewise.
14088 (BUILT_IN_STRLEN): Likewise.
14089 (BUILT_IN_MEMCPY_CHK): Likewise.
14090 (BUILT_IN_MEMMOVE_CHK): Likewise.
14091 (BUILT_IN_MEMPCPY_CHK): Likewise.
14092 (BUILT_IN_MEMSET_CHK): Likewise.
14093 (BUILT_IN_STPCPY_CHK): Likewise.
14094 (BUILT_IN_STRCAT_CHK): Likewise.
14095 (BUILT_IN_STRCPY_CHK): Likewise.
14096 * calls.c (store_bounds): Likewise.
14097 (emit_call_1): Likewise.
14098 (special_function_p): Likewise.
14099 (maybe_warn_nonstring_arg): Likewise.
14100 (initialize_argument_information): Likewise.
14101 (finalize_must_preallocate): Likewise.
14102 (compute_argument_addresses): Likewise.
14103 (expand_call): Likewise.
14104 * cfgexpand.c (expand_call_stmt): Likewise.
14105 (expand_return): Likewise.
14106 (expand_gimple_stmt_1): Likewise.
14107 (pass_expand::execute): Likewise.
14108 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
14109 (cgraph_node::remove): Likewise.
14110 (cgraph_node::dump): Likewise.
14111 (cgraph_node::verify_node): Likewise.
14112 * cgraph.h (chkp_function_instrumented_p): Likewise.
14113 (symtab_node::get_alias_target): Likewise.
14114 (cgraph_node::can_remove_if_no_direct_calls_and_refs_p): Likewise.
14115 (cgraph_local_p): Likewise.
14116 * cgraphbuild.c (cgraph_edge::rebuild_edges): Likewise.
14117 (cgraph_edge::rebuild_references): Likewise.
14118 * cgraphunit.c (varpool_node::finalize_decl): Likewise.
14119 (walk_polymorphic_call_targets): Likewise.
14120 (cgraph_node::expand_thunk): Likewise.
14121 (symbol_table::output_weakrefs): Likewise.
14122 * common/config/i386/i386-common.c (OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET): Likewise.
14123 (ix86_handle_option): Likewise.
14124 * config/i386/constraints.md: Likewise.
14125 * config/i386/i386-builtin-types.def (BND): Likewise.
14129 * config/i386/i386-builtin.def (BDESC_END): Likewise.
14130 (BDESC_FIRST): Likewise.
14132 * config/i386/i386-c.c (ix86_target_macros_internal): Likewise.
14133 * config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): Likewise.
14134 * config/i386/i386.c (enum reg_class): Likewise.
14135 (ix86_target_string): Likewise.
14136 (ix86_option_override_internal): Likewise.
14137 (ix86_conditional_register_usage): Likewise.
14138 (ix86_valid_target_attribute_inner_p): Likewise.
14139 (ix86_set_indirect_branch_type): Likewise.
14140 (ix86_set_current_function): Likewise.
14141 (ix86_function_arg_regno_p): Likewise.
14142 (init_cumulative_args): Likewise.
14143 (ix86_function_arg_advance): Likewise.
14144 (ix86_function_arg): Likewise.
14145 (ix86_pass_by_reference): Likewise.
14146 (ix86_function_value_regno_p): Likewise.
14147 (ix86_function_value_1): Likewise.
14148 (ix86_function_value_bounds): Likewise.
14149 (ix86_return_in_memory): Likewise.
14150 (ix86_setup_incoming_vararg_bounds): Likewise.
14151 (ix86_va_start): Likewise.
14152 (indirect_thunk_need_prefix): Likewise.
14153 (print_reg): Likewise.
14154 (ix86_print_operand): Likewise.
14155 (ix86_expand_call): Likewise.
14156 (ix86_output_function_return): Likewise.
14157 (reg_encoded_number): Likewise.
14158 (BDESC_VERIFYS): Likewise.
14159 (ix86_init_mpx_builtins): Likewise.
14160 (ix86_init_builtins): Likewise.
14161 (ix86_emit_cmove): Likewise.
14162 (ix86_emit_move_max): Likewise.
14163 (ix86_expand_builtin): Likewise.
14164 (ix86_builtin_mpx_function): Likewise.
14165 (ix86_get_arg_address_for_bt): Likewise.
14166 (ix86_load_bounds): Likewise.
14167 (ix86_store_bounds): Likewise.
14168 (ix86_load_returned_bounds): Likewise.
14169 (ix86_store_returned_bounds): Likewise.
14170 (ix86_class_likely_spilled_p): Likewise.
14171 (ix86_hard_regno_mode_ok): Likewise.
14172 (x86_order_regs_for_local_alloc): Likewise.
14173 (ix86_mitigate_rop): Likewise.
14174 (ix86_bnd_prefixed_insn_p): Likewise.
14175 (ix86_mpx_bound_mode): Likewise.
14176 (ix86_make_bounds_constant): Likewise.
14177 (ix86_initialize_bounds): Likewise.
14178 (TARGET_LOAD_BOUNDS_FOR_ARG): Likewise.
14179 (TARGET_STORE_BOUNDS_FOR_ARG): Likewise.
14180 (TARGET_LOAD_RETURNED_BOUNDS): Likewise.
14181 (TARGET_STORE_RETURNED_BOUNDS): Likewise.
14182 (TARGET_CHKP_BOUND_MODE): Likewise.
14183 (TARGET_BUILTIN_CHKP_FUNCTION): Likewise.
14184 (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): Likewise.
14185 (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): Likewise.
14186 (TARGET_CHKP_INITIALIZE_BOUNDS): Likewise.
14187 * config/i386/i386.h (TARGET_MPX): Likewise.
14188 (TARGET_MPX_P): Likewise.
14189 (VALID_BND_REG_MODE): Likewise.
14190 (FIRST_BND_REG): Likewise.
14191 (LAST_BND_REG): Likewise.
14192 (enum reg_class): Likewise.
14193 (BND_REG_P): Likewise.
14194 (BND_REGNO_P): Likewise.
14195 (BNDmode): Likewise.
14196 (ADJUST_INSN_LENGTH): Likewise.
14197 * config/i386/i386.md: Likewise.
14198 * config/i386/i386.opt: Likewise.
14199 * config/i386/linux-common.h (LIBMPX_LIBS): Likewise.
14200 (defined): Likewise.
14201 (LINK_MPX): Likewise.
14202 (MPX_SPEC): Likewise.
14203 (LIBMPX_SPEC): Likewise.
14204 (LIBMPXWRAPPERS_SPEC): Likewise.
14205 (CHKP_SPEC): Likewise.
14206 * config/i386/predicates.md: Likewise.
14207 * dbxout.c (dbxout_type): Likewise.
14208 * doc/extend.texi: Likewise.
14209 * doc/invoke.texi: Likewise.
14210 * doc/md.texi: Likewise.
14211 * doc/tm.texi: Likewise.
14212 * doc/tm.texi.in: Likewise.
14213 * dwarf2out.c (is_base_type): Likewise.
14214 (gen_formal_types_die): Likewise.
14215 (gen_subprogram_die): Likewise.
14216 (gen_type_die_with_usage): Likewise.
14217 (gen_decl_die): Likewise.
14218 (dwarf2out_late_global_decl): Likewise.
14219 * expr.c (expand_assignment): Likewise.
14220 (emit_storent_insn): Likewise.
14221 (store_expr_with_bounds): Likewise.
14222 (store_expr): Likewise.
14223 (expand_expr_real_1): Likewise.
14224 * expr.h (store_expr_with_bounds): Likewise.
14225 * function.c (use_register_for_decl): Likewise.
14226 (struct bounds_parm_data): Likewise.
14227 (assign_parms_augmented_arg_list): Likewise.
14228 (assign_parm_find_entry_rtl): Likewise.
14229 (assign_parm_is_stack_parm): Likewise.
14230 (assign_parm_load_bounds): Likewise.
14231 (assign_bounds): Likewise.
14232 (assign_parms): Likewise.
14233 (expand_function_start): Likewise.
14234 * gcc.c (CHKP_SPEC): Likewise.
14235 * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
14236 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Likewise.
14237 (wrestrict_dom_walker::check_call): Likewise.
14238 * gimple.c (gimple_build_call_from_tree): Likewise.
14239 * gimple.h (enum gf_mask): Likewise.
14240 (gimple_call_with_bounds_p): Likewise.
14241 (gimple_call_set_with_bounds): Likewise.
14242 * gimplify.c (gimplify_init_constructor): Likewise.
14243 * ipa-cp.c (initialize_node_lattices): Likewise.
14244 (propagate_constants_across_call): Likewise.
14245 (find_more_scalar_values_for_callers_subset): Likewise.
14246 * ipa-hsa.c (process_hsa_functions): Likewise.
14247 * ipa-icf-gimple.c (func_checker::compare_gimple_call): Likewise.
14248 * ipa-icf.c (sem_function::merge): Likewise.
14249 * ipa-inline.c (early_inliner): Likewise.
14250 * ipa-pure-const.c (warn_function_noreturn): Likewise.
14251 (warn_function_cold): Likewise.
14252 (propagate_pure_const): Likewise.
14253 * ipa-ref.h (enum GTY): Likewise.
14254 * ipa-split.c (find_retbnd): Likewise.
14255 (consider_split): Likewise.
14256 (split_function): Likewise.
14257 * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
14258 * ipa.c (walk_polymorphic_call_targets): Likewise.
14259 (symbol_table::remove_unreachable_nodes): Likewise.
14260 (process_references): Likewise.
14261 (cgraph_build_static_cdtor_1): Likewise.
14262 * lto-cgraph.c (lto_output_node): Likewise.
14263 (output_refs): Likewise.
14264 (compute_ltrans_boundary): Likewise.
14265 (input_overwrite_node): Likewise.
14266 (input_node): Likewise.
14267 (input_cgraph_1): Likewise.
14268 * params.def (PARAM_CHKP_MAX_CTOR_SIZE): Likewise.
14269 * passes.c (pass_manager::execute_early_local_passes): Likewise.
14270 (class pass_chkp_instrumentation_passes): Likewise.
14271 (make_pass_chkp_instrumentation_passes): Likewise.
14272 * passes.def: Likewise.
14273 * rtl.h (struct GTY): Likewise.
14274 (CALL_EXPR_WITH_BOUNDS_P): Likewise.
14275 * stor-layout.c (layout_type): Likewise.
14276 * symtab.c: Likewise.
14277 * target.def: Likewise.
14278 * targhooks.c (default_chkp_bound_type): Likewise.
14279 (default_chkp_bound_mode): Likewise.
14280 (default_builtin_chkp_function): Likewise.
14281 (default_chkp_function_value_bounds): Likewise.
14282 (default_chkp_make_bounds_constant): Likewise.
14283 (default_chkp_initialize_bounds): Likewise.
14284 * targhooks.h (default_chkp_bound_type): Likewise.
14285 (default_chkp_bound_mode): Likewise.
14286 (default_builtin_chkp_function): Likewise.
14287 (default_chkp_function_value_bounds): Likewise.
14288 (default_chkp_make_bounds_constant): Likewise.
14289 (default_chkp_initialize_bounds): Likewise.
14290 * toplev.c (compile_file): Likewise.
14291 (process_options): Likewise.
14292 * tree-core.h (DEF_BUILTIN): Likewise.
14293 (DEF_BUILTIN_CHKP): Likewise.
14294 * tree-inline.c (declare_return_variable): Likewise.
14295 (remap_gimple_stmt): Likewise.
14296 (copy_bb): Likewise.
14297 (initialize_inlined_parameters): Likewise.
14298 (expand_call_inline): Likewise.
14299 * tree-pass.h (make_pass_ipa_chkp_versioning): Likewise.
14300 (make_pass_ipa_chkp_early_produce_thunks): Likewise.
14301 (make_pass_ipa_chkp_produce_thunks): Likewise.
14302 (make_pass_chkp): Likewise.
14303 (make_pass_chkp_opt): Likewise.
14304 (make_pass_chkp_instrumentation_passes): Likewise.
14305 * tree-pretty-print.c (dump_generic_node): Likewise.
14306 * tree-ssa-ccp.c (insert_clobber_before_stack_restore): Likewise.
14307 * tree-ssa-dce.c (propagate_necessity): Likewise.
14308 (eliminate_unnecessary_stmts): Likewise.
14309 * tree-ssa-pre.c (create_expression_by_pieces): Likewise.
14310 * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
14311 * tree-ssa-sccvn.h: Likewise.
14312 * tree-ssa-strlen.c (get_string_length): Likewise.
14313 (valid_builtin_call): Likewise.
14314 (adjust_last_stmt): Likewise.
14315 (handle_builtin_strchr): Likewise.
14316 (handle_builtin_strcpy): Likewise.
14317 (handle_builtin_stxncpy): Likewise.
14318 (handle_builtin_memcpy): Likewise.
14319 (handle_builtin_strcat): Likewise.
14320 (strlen_check_and_optimize_stmt): Likewise.
14321 * tree-stdarg.c (expand_ifn_va_arg_1): Likewise.
14322 * tree-streamer-in.c: Likewise.
14323 * tree-streamer.c (record_common_node): Likewise.
14324 * tree.c (tree_code_size): Likewise.
14325 (wide_int_to_tree_1): Likewise.
14326 (type_contains_placeholder_1): Likewise.
14327 (build_common_tree_nodes): Likewise.
14328 * tree.def (POINTER_BOUNDS_TYPE): Likewise.
14329 * tree.h (POINTER_BOUNDS_TYPE_P): Likewise.
14330 (POINTER_BOUNDS_P): Likewise.
14331 (BOUNDED_TYPE_P): Likewise.
14332 (BOUNDED_P): Likewise.
14333 (CALL_WITH_BOUNDS_P): Likewise.
14334 (pointer_bounds_type_node): Likewise.
14335 * value-prof.c (gimple_ic): Likewise.
14336 * var-tracking.c (vt_add_function_parameters): Likewise.
14337 * varasm.c (make_decl_rtl): Likewise.
14338 (assemble_start_function): Likewise.
14339 (output_constant): Likewise.
14340 (maybe_assemble_visibility): Likewise.
14341 * varpool.c (ctor_for_folding): Likewise.
14342 * chkp-builtins.def: Remove.
14343 * ipa-chkp.c: Remove.
14344 * ipa-chkp.h: Remove.
14345 * rtl-chkp.c: Remove.
14346 * rtl-chkp.h: Remove.
14347 * tree-chkp-opt.c: Remove.
14348 * tree-chkp.c: Remove.
14349 * tree-chkp.h: Remove.
14351 2018-06-07 Carl Love <cel@us.ibm.com>
14353 * config/rs6000/vsx.md (vextract_fp_from_shorth,
14354 vextract_fp_from_shortl): Add BE support.
14356 2018-06-07 Paul Koning <ni1d@arrl.net>
14358 * compare-elim.c (try_merge_compare): Don't merge compare if
14359 address contains a side effect.
14360 (try_eliminate_compare): Likewise.
14362 2018-06-07 Olga Makhotina <olga.makhotina@intel.com>
14364 * config.gcc: Support "tremont".
14365 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "tremont".
14366 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
14368 * config/i386/i386.c (m_TREMONT): Define.
14369 (processor_target_table): Add "tremont".
14370 (PTA_TREMONT): Define.
14371 (ix86_lea_outperforms): Add TARGET_TREMONT.
14372 (get_builtin_code_for_version): Handle PROCESSOR_TREMONT.
14373 (fold_builtin_cpu): Add M_INTEL_TREMONT, replace M_INTEL_GOLDMONT
14374 and M_INTEL_GOLDMONT_PLUS.
14375 (fold_builtin_cpu): Add "tremont".
14376 (ix86_add_stmt_cost): Add TARGET_TREMONT.
14377 (ix86_option_override_internal): Add "tremont".
14378 * config/i386/i386.h (processor_costs): Define TARGET_TREMONT.
14379 (processor_type): Add PROCESSOR_TREMONT.
14380 * config/i386/x86-tune.def: Add m_TREMONT.
14381 * doc/invoke.texi: Add tremont as x86 -march=/-mtune= CPU type.
14383 2018-06-07 Jozef Lawrynowicz <jozef.l@mittosystems.com>
14385 * config/msp430/msp430.c (msp430_mcu_name): Set the "i" in the
14386 symbol defined for msp430i* devices to be lower case.
14388 2018-06-07 Richard Biener <rguenther@suse.de>
14390 * graphite-sese-to-poly.c (extract_affine): Avoid unneded
14391 wrapping. Properly wrap the result of a BIT_NOT_EXPR.
14392 Properly wrap signed arithmetic if overflow wraps.
14394 2018-06-07 Jakub Jelinek <jakub@redhat.com>
14396 PR tree-optimization/69615
14397 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If rhs2 is lhs
14398 of a cast from a same precision integral SSA_NAME in a bb dominated
14399 by first_bb, retry with rhs2 set to the rhs1 of the cast. Don't emit
14400 cast to utype if rhs2 has already a compatible type.
14402 2018-06-07 Richard Biener <rguenther@suse.de>
14404 PR tree-optimization/85935
14405 * graphite-scop-detection.c (find_params_in_bb): Analyze
14406 condition operands with respect to the correct loop. Assert
14407 the analysis doesn't fail.
14409 2018-06-04 Carl Love <cel@us.ibm.com>
14411 * config/rs6000/vsx.md (first_match_index_<mode>): Calculate index
14412 using natural element order. Use gen_lshrsi3 instead of gen_ashrsi3
14413 as it is slightly cheaper.
14414 (first_match_or_eos_index_<mode>):
14415 Calculate index using natural element order.
14416 (first_match_index_<mode>):
14417 Calculate index using natural element order.
14418 (first_match_or_eos_index_<mode>):
14419 Calculate index using natural order.
14420 (define_insn vclzlsbb): Change to define_insn vclzlsbb_<mode>.
14421 for BE and LE modes.
14422 * config/rs6000/rs6000-c.c: Rename P9V_BUILTIN_VCLZLSBB,
14423 P9V_BUILTIN_VCLZLSBB_V16QI.
14424 * config/rs6000/rs6000-builtin.def: Make VCLZLSBB mode
14427 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
14429 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
14430 indentation and line wrap for many prototypes. Add missing
14431 @smallexample directives around block of prototypes for vec_xl and
14434 2018-06-05 Michael Meissner <meissner@linux.ibm.com>
14436 * config/rs6000/rs6000.c (rs6000_passes_ieee128): New boolean to
14437 track if we pass or return IEEE 128-bit floating point.
14438 (ieee128_mangling_gcc_8_1): New boolean to say whether to generate
14439 C++ mangling that is compatible with GCC 8.1.
14440 (TARGET_ASM_GLOBALIZE_DECL_NAME): Override target hook.
14441 (init_cumulative_args): Note if we pass or return IEEE 128-bit
14442 floating point types.
14443 (rs6000_function_arg_advance_1): Likewise.
14444 (rs6000_mangle_type): Optionally generate mangled names that match
14445 what GCC 8.1 generated for IEEE 128-bit floating point types.
14446 (rs6000_globalize_decl_name): If we have an external function that
14447 passes or returns IEEE 128-bit types, generate a weak reference
14448 from the mangled name used in GCC 8.1 to the current mangled
14450 (rs6000_init_builtins): Make __ibm128 use the long double type if
14451 long double is IBM extended double. Make __float128 use the long
14452 double type if long double is IEEE 128-bit.
14455 * config/rs6000/rs6000-builtin.def (BU_IBM128_2): New helper
14456 macro for __ibm128 built-in functions.
14457 (PACK_IF): Add __ibm128 pack/unpack functions.
14458 (UNPACK_IF): Likewise.
14459 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Do not
14460 enable long double built-in functions if long double is IEEE
14461 128-bit floating point.
14462 (rs6000_invalid_builtin): Update long double built-in function
14464 (rs6000_expand_builtin): For PACK_IF and UNPACK_IF built-in
14465 functions, adjust the built-in function to use the long double
14466 built-in function if __ibm128 and long double are the same type.
14467 * doc/extend.texi (PowerPC builtins): Update documention for
14468 __builtin_{,un}pack_longdouble. Add documentation for
14469 __builtin_{,un}pack_ibm128.
14471 2018-06-06 Jim Wilson <jimw@sifive.com>
14473 * config/riscv/riscv.c (enum riscv_privilege_levels): New.
14474 (struct machine_function): New field interrupt_mode.
14475 (riscv_handle_type_attribute): New function. Add forward declaration.
14476 (riscv_attribute_table) <interrupt>: Use riscv_handle_type_attribute.
14477 (riscv_expand_epilogue): Check interrupt_mode field.
14478 (riscv_set_current_function): Check interrupt attribute args and
14479 set interrupt_mode field.
14480 * config/riscv/riscv.md (UNSPECV_SRET, UNSPECV_URET): New.
14481 (riscv_sret, riscv_uret): New.
14482 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: Document
14483 new arguments to interrupt attribute.
14485 2018-06-06 Peter Bergner <bergner@vnet.ibm.com>
14488 * /config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for -mpower9.
14489 Don't handle -mcpu=power8 if -mpower9-vector is also used.
14491 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
14493 * config/rs6000/rs6000-builtin.def (VSX_BUILTIN_VEC_LD,
14494 VSX_BUILTIN_VEC_ST): Add comment to explain non-traditional uses.
14495 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
14496 several redundant entries.
14498 2018-06-06 David Malcolm <dmalcolm@redhat.com>
14500 * config/i386/i386-protos.h (ix86_expand_call): Strengthen return
14501 type from "rtx" to "rtx_insn *".
14502 * config/i386/i386.c (ix86_expand_split_stack_prologue): Likewise
14503 for local "call_insn", removing cast.
14504 (ix86_expand_call): Likewise, introducing a "call_insn" local.
14506 2018-06-06 Eric Botcazou <ebotcazou@adacore.com>
14508 PR tree-optimization/86066
14509 * gimple-ssa-store-merging.c (process_store): Do not bypass BIT_NOT_EXPR
14510 for BIT_INSERT_EXPR stores.
14512 2018-06-06 Richard Biener <rguenther@suse.de>
14514 PR tree-optimization/86062
14515 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
14516 component refs ontop
14517 of to be offsetted base.
14519 2018-06-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
14521 * config/msp430/msp430.c (msp430_attr): Allow interrupt handlers
14522 to be static and remove check on interrupt attribute name.
14524 2018-06-05 Kelvin Nilsen <kelvin@gcc.gnu.org>
14526 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
14527 volatile qualifier from vec_lvsl and vec_lvsr argument prototypes.
14529 2018-06-05 Steve Ellcey <sellcey@cavium.com>
14532 * config/aarch64/aarch64-protos.h (aarch64_err_no_fpadvsimd): Remove
14534 * config/aarch64/aarch64-protos..c (aarch64_err_no_fpadvsimd):
14535 Remove second argument, change how error is called.
14536 (aarch64_layout_arg): Remove second argument from
14537 aarch64_err_no_fpadvsimd call.
14538 (aarch64_init_cumulative_args): Ditto.
14539 (aarch64_gimplify_va_arg_expr): Ditto.
14540 * config/aarch64/aarch64.md (mov<mode>): Ditto.
14542 2018-06-05 Uros Bizjak <ubizjak@gmail.com>
14544 * config/i386/i386.md (simple_return_indirect_internal): New expander.
14545 (*simple_return_indirect_internal<mode>): Rename from
14546 simple_return_indirect_internal. Use W mode iterator.
14547 (rstorssp): New expander.
14548 (*rstorssp<mode>): Rename from rstorssp. Use P mode iterator.
14549 (clrssbsy): New expander.
14550 (*clrssbsy<mode>): Rename from clrssbsy. Use P mode iterator.
14552 2018-06-05 Andre Vieira <andre.simoesdiasvieira@arm.com>
14554 * config/arm/arm_cmse.h (cmse_nsfptr_create): Change typeof to
14556 (cmse_check_pointed_object): Likewise.
14558 2018-06-05 Martin Liska <mliska@suse.cz>
14560 PR gcov-profile/47618
14561 * doc/invoke.texi: Document how -fprofile-dir format
14564 2018-06-05 Richard Biener <rguenther@suse.de>
14566 * tree-cfgcleanup.c (cleanup_control_flow_pre): For edge
14567 removal pretend DOM info isn't available so we do not update
14568 it and only remove edges, not dominated blocks. Actually free
14569 DOM info in case we removed something. Remove unreachable blocks.
14570 (mfb_keep_latches): Work with either DOM info or marked backedges.
14571 (cleanup_tree_cfg_noloop): Do not remove unreachable blocks
14572 first. Mark backedges if DOM info isn't available.
14573 (Re-)compute DOM info after cleanup_control_flow_pre.
14575 2018-06-05 Richard Biener <rguenther@suse.de>
14577 * tree-cfg.c (struct locus_discrim_map): Store line, not location.
14578 (locus_discrim_hasher::hash): Adjust.
14579 (locus_discrim_hasher::equal): Likewise.
14580 (next_discriminator_for_locus): Work on line directly.
14581 (same_line_p): Pass in expanded locus1 as well.
14582 (assign_discriminators): Avoid redundant location expansions.
14584 2018-06-05 Richard Biener <rguenther@suse.de>
14586 PR tree-optimization/86046
14587 * tree-ssa.c (maybe_optimize_var): Clear DECL_GIMPLE_REG_P
14588 if required after clearing TREE_ADDRESSABLE.
14590 2018-06-05 Richard Biener <rguenther@suse.de>
14592 PR tree-optimization/86047
14593 * tree-ssa-loop.c (for_each_index): Glob handling of all
14594 decls and constants and really handle all of them.
14596 2018-06-05 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
14599 * config/arm/arm-builtins.c (arm_type_qualifiers): Add
14600 qualifier_void_pointer and qualifier_const_void_pointer.
14601 (arm_ldc_qualifiers, arm_stc_qualifiers): Use the above.
14602 (arm_init_builtins): Handle the above.
14603 * config/arm/arm_acle.h (__arm_cdp, __arm_ldc, __arm_ldcl, __arm_stc,
14604 __arm_stcl, __arm_mcr, __arm_cdp2, __arm_ldc2, __arm_ldcl2, __arm_stc2,
14605 __arm_stcl2,__arm_mcr2, __arm_mcrr, __arm_mcrr2): Remove return for
14608 2018-06-05 Martin Liska <mliska@suse.cz>
14610 * auto-profile.c (read_autofdo_file): Do not use
14611 gcov_ctr_summary struct.
14612 (afdo_callsite_hot_enough_for_early_inline): Likewise.
14613 * coverage.c (struct counts_entry): Likewise.
14614 (read_counts_file): Read just single summary entry.
14615 (get_coverage_counts): Use gcov_summary struct.
14616 * coverage.h (get_coverage_counts): Likewise.
14617 * gcov-dump.c (dump_working_sets): Likewise.
14618 (tag_summary): Dump just single summary.
14619 * gcov-io.c (gcov_write_summary): Write just histogram
14621 (gcov_read_summary): Read just single summary.
14622 (compute_working_sets): Use gcov_summary struct.
14623 * gcov-io.h (GCOV_TAG_SUMMARY_LENGTH): Remove usage
14624 of GCOV_COUNTERS_SUMMABLE.
14625 (GCOV_COUNTERS_SUMMABLE): Remove.
14626 (GCOV_FIRST_VALUE_COUNTER): Replace with
14627 GCOV_COUNTER_V_INTERVAL.
14628 (struct gcov_ctr_summary): Remove.
14629 (struct gcov_summary): Directly use fields of former
14631 (compute_working_sets): Use gcov_summary struct.
14632 * gcov.c (read_count_file): Do not use ctrs fields.
14633 * lto-cgraph.c (merge_profile_summaries): Use gcov_summary
14635 * lto-streamer.h (struct GTY): Make profile_info gcov_summary
14637 * profile.c: Likewise.
14638 * profile.h: Likewise.
14640 2018-06-05 Martin Liska <mliska@suse.cz>
14642 PR gcov-profile/84846
14643 * gcov.c (output_lines): Print working directory only
14644 in intermediate format.
14646 2018-06-05 Andreas Krebbel <krebbel@linux.ibm.com>
14648 * config/s390/s390-builtin-types.def: Add void function type.
14649 * config/s390/s390-builtins.def: Use the function type for the
14652 2018-06-04 Jim Wilson <jimw@sifive.com>
14654 * config/riscv/riscv-protos.h (riscv_expand_epilogue): Change bool arg
14656 * config/riscv/riscv.c (riscv_for_each_saved_reg): New args epilogue
14657 and maybe_eh_return. Change regno to unsigned int. Use new args to
14658 handle EH_RETURN_DATA_REGNO registers properly.
14659 (riscv_expand_prologue): Pass new args to riscv_for_each_saved_reg.
14660 (riscv_expand_epilogue): Update comment. Change argument name and
14661 type. Update code to use new name and type. Pass new args to
14662 riscv_for_each_saved_reg. Only use EH_RETURN_STACKADJ_RTX when
14664 * config/riscv/riscv.md (NORMAL_RETURN): New.
14665 (SIBCALL_RETURN, EXCEPTION_RETURN): New.
14666 (epilogue, sibcall_epilogue): Update riscv_expand_epilogue arg.
14667 (eh_return): Call gen_eh_return_internal and emit barrier.
14668 (eh_return_internal): Call riscv_expand_epilogue.
14670 2018-06-04 Eric Botcazou <ebotcazou@adacore.com>
14672 * gimple-ssa-store-merging.c (struct merged_store_group): Move up
14673 bit_insertion field and declare can_be_merged_into method.
14674 (merged_store_group::can_be_merged_into): New method.
14675 (imm_store_chain_info::coalesce_immediate): Call it to decide whether
14676 consecutive non-overlapping stores can be merged. Turn MEM_REF stores
14677 into BIT_INSERT_EXPR stores if the group contains a non-MEM_REF store.
14679 2018-06-04 Richard Biener <rguenther@suse.de>
14681 PR tree-optimization/85955
14682 * builtins.c (fold_builtin_sincos): Convert pointers to
14683 destination to appropriate type before dereferencing.
14685 2018-06-04 Segher Boessenkool <segher@kernel.crashing.org>
14687 * config/rs6000/rs6000.md (abs<mode>2 for FLOAT128): Handle IFmode.
14689 2018-06-04 Richard Sandiford <richard.sandiford@linaro.org>
14691 * expr.c (expand_expr_real_1): Force the operand into memory if
14692 its TYPE_MODE is BLKmode and if there is no integer mode for
14693 the number of bits being extracted.
14695 2018-06-04 Jakub Jelinek <jakub@redhat.com>
14699 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
14700 Use vptestnm rather than vptestm in (=Yc,v,C) variant.
14702 2018-06-04 Richard Biener <rguenther@suse.de>
14704 * tree-cfgcleanup.c (cleanup_tree_cfg_1): Fold into...
14705 (cleanup_tree_cfg_noloop): ... single caller. Do
14706 start_recording_case_labels later.
14708 2018-06-04 Sebastian Peryt <sebastian.peryt@intel.com>
14710 * config/i386/cldemoteintrin.h: Change define from _X86INTRIN_H_INCLUDED
14711 to _IMMINTRIN_H_INCLUDED.
14712 * config/i386/pconfigintrin.h: Ditto.
14713 * config/i386/waitpkgintrin.h: Ditto.
14714 * config/i386/immintrin.h: Add includes for sgxintrin.h,
14715 pconfigintrin.h, waitpkgintrin.h and cldemoteintrin.h.
14716 * config/i386/x86intrin.h: Remove includes for mintrin.h, xmmintrin.h,
14717 emmintrin.h, pmmintrin.h, tmmintrin.h, smmintrin.h, wmmintrin.h,
14718 bmiintrin.h, bmi2intrin.h, lzcntintrin.h, sgxintrin.h, pconfigintrin.h,
14719 waitpkgintrin.h and cldemoteintrin.h.
14721 2018-06-04 Richard Biener <rguenther@suse.de>
14723 PR tree-optimization/86038
14724 * tracer.c (find_best_successor): Check probability for
14725 being initialized, bail out if not.
14727 2018-06-04 Richard Earnshaw <rearnsha@arm.com>
14730 * config/arm/arm-cpus.in (ALL_QUIRKS): Add xscale feature to the list
14731 of bits to ignore when comparing architectures.
14733 2018-06-04 Jakub Jelinek <jakub@redhat.com>
14735 PR tree-optimization/69615
14736 * fold-const.c (merge_ranges): If range1 is - [x, x] and x is the
14737 maximum or minimum of the type, try to merge it also as if
14738 range1 is + [-, x - 1] or + [x + 1, -].
14741 * tree.c (inchash::add_expr): Handle IDENTIFIER_NODE.
14743 2018-06-03 Eric Botcazou <ebotcazou@adacore.com>
14745 PR tree-optimization/86034
14746 * gimple-ssa-store-merging.c (output_merged_store): Convert the RHS to
14747 the unsigned bitfield type in a bit insertion sequence if it does not
14748 have a larger precision than the bitfield size.
14749 (process_store): Also bypass widening conversions for BIT_INSERT_EXPR.
14751 2018-06-03 Kito Cheng <kito.cheng@gmail.com>
14753 * config/nds32/nds32-peephole2.md: Add new patterns for code size.
14755 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
14757 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3J.
14758 * config/nds32/nds32.c (nds32_option_override): Consider ARCH_V3J.
14759 * config/nds32/nds32.h (TARGET_ISA_V3): Add ARCH_V3J checking.
14760 * config/nds32/nds32.opt (march): Add enum value Value(ARCH_V3J).
14762 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
14764 * common/config/nds32/nds32-common.c (nds32_option_optimization_table):
14765 Disable -fdelete-null-pointer-checks for ELF toolchain.
14767 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
14768 Kito Cheng <kito.cheng@gmail.com>
14770 * config.gcc (nds32*): Use nds32-linux.opt and nds32-elf.opt.
14771 (nds32le-*-*, nds32be-*-*): Integrate checking process.
14772 (nds32*-*-*): Add glibc and uclibc conditions.
14773 * common/config/nds32/nds32-common.c (nds32_except_unwind_info): New.
14774 (TARGET_EXCEPT_UNWIND_INFO): Define.
14775 * config/nds32/elf.h: New file.
14776 * config/nds32/linux.h: New file.
14777 * config/nds32/nds32-elf.opt: New file.
14778 * config/nds32/nds32-linux.opt: New file.
14779 * config/nds32/nds32-fp-as-gp.c
14780 (pass_nds32_fp_as_gp::gate): Consider TARGET_LINUX_ABI.
14781 * config/nds32/nds32.c (nds32_conditional_register_usage): Consider
14783 (nds32_asm_file_end): Ditto.
14784 (nds32_print_operand): Ditto.
14785 (nds32_insert_attributes): Ditto.
14786 (nds32_init_libfuncs): New function.
14787 (TARGET_HAVE_TLS): Define.
14788 (TARGET_INIT_LIBFUNCS): Define.
14789 * config/nds32/nds32.h (TARGET_DEFAULT_RELAX): Apply different relax
14791 (TARGET_ELF): Apply different mcmodel setting.
14792 (LINK_SPEC, LIB_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): The content has
14793 been migrated into elf.h and linux.h files.
14794 * config/nds32/nds32.md (add_pc): Consider TARGET_LINUX_ABI.
14795 * config/nds32/nds32.opt (mvh): Consider TARGET_LINUX_ABI.
14796 (mcmodel): The content has been migrated into nds32-elf.opt and
14797 nds32-linux.opt files.
14798 * config/nds32/t-elf: New file.
14799 * config/nds32/t-linux: New file.
14801 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
14802 Shiva Chen <shiva0217@gmail.com>
14804 * config/nds32/constants.md (unspec_volatile_element): Add
14805 UNSPEC_VOLATILE_OMIT_FP_BEGIN and UNSPEC_VOLATILE_OMIT_FP_END.
14806 * config/nds32/nds32-fp-as-gp.c: New implementation of fp_as_gp
14808 * config/nds32/nds32-protos.h (nds32_naked_function_p): Declare.
14809 (make_pass_nds32_fp_as_gp): Declare.
14810 * config/nds32/nds32.c (nds32_register_passes): Add fp_as_gp as one
14812 (nds32_asm_function_end_prologue): Remove unused asm output.
14813 (nds32_asm_function_begin_epilogue): Remove unused asm output.
14814 (nds32_asm_file_start): Output necessary fp_as_gp information.
14815 (nds32_option_override): Adjust register usage.
14816 (nds32_expand_prologue): Consider fp_as_gp situation.
14817 (nds32_expand_prologue_v3push): Consider fp_as_gp situation.
14818 * config/nds32/nds32.md (prologue): Check fp_as_gp_p and naked_p.
14821 (simple_return): Ditto.
14822 (omit_fp_begin): Output special directive for fp_as_gp.
14823 (omit_fp_end): Output special directive for fp_as_gp.
14824 * config/nds32/nds32.opt (mfp-as-gp, mno-fp-as-gp, mforce-fp-as-gp,
14825 mforbid-fp-as-gp): New options.
14827 2018-06-01 Mark Wielaard <mark@klomp.org>
14829 * dwarf2out.c (dwarf2out_finish): Remove generation of
14830 DW_AT_loclists_base.
14832 2018-06-01 Eric Botcazou <ebotcazou@adacore.com>
14834 * gimple-ssa-store-merging.c: Include gimple-fold.h.
14835 (struct store_immediate_info): Document BIT_INSERT_EXPR stores.
14836 (struct merged_store_group): Add bit_insertion field.
14837 (dump_char_array): Use standard hexadecimal format.
14838 (merged_store_group::merged_store_group): Set bit_insertion to false.
14839 (merged_store_group::apply_stores): Use optimal buffer size. Deal
14840 with BIT_INSERT_EXPR stores. Move up code updating the mask and
14841 also print the mask in the dump file.
14842 (pass_store_merging::gate): Minor tweak.
14843 (imm_store_chain_info::coalesce_immediate): Fix wrong association
14844 of stores with groups in dump. Allow coalescing of BIT_INSERT_EXPR
14845 stores with INTEGER_CST stores.
14846 (count_multiple_uses) <BIT_INSERT_EXPR>: New case.
14847 (imm_store_chain_info::output_merged_store): Add try_bitpos variable
14848 and use it throughout. Generate bit insertion sequences if need be.
14849 (pass_store_merging::process_store): Remove redundant condition.
14850 Record stores from a SSA name to a bit-field with BIT_INSERT_EXPR.
14852 2018-06-01 Segher Boessenkool <segher@kernel.crashing.org>
14854 * config/rs6000/rs6000.c (rs6000_mangle_type): Change the mangling of
14855 the 128-bit floating point types. Fix function comment.
14857 2018-06-01 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
14859 * config/aarch64/aarch64-simd.md
14860 (aarch64_simd_vec_unpack<su>_lo_<mode>): Use UXTL and SXTL assembler
14862 (aarch64_simd_vec_unpack<su>_hi_<mode>): Use UXTL2 and SXTL2 assembler
14865 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
14867 PR tree-optimization/85989
14868 * gimple-ssa-backprop.c (backprop::m_visited_phis): New member
14870 (backprop::intersect_uses): Check it when deciding whether this
14871 is a backedge reference.
14872 (backprop::process_block): Add each phi to m_visited_phis
14873 after visiting it, then clear it at the end.
14875 2018-06-01 Richard Biener <rguenther@suse.de>
14877 * tree-vectorizer.h (vect_dr_stmt): New function.
14878 (vect_get_load_cost): Adjust.
14879 (vect_get_store_cost): Likewise.
14880 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
14881 Use vect_dr_stmt instead of DR_SMTT.
14882 (vect_record_base_alignments): Likewise.
14883 (vect_calculate_target_alignment): Likewise.
14884 (vect_compute_data_ref_alignment): Likewise and make static.
14885 (vect_update_misalignment_for_peel): Likewise.
14886 (vect_verify_datarefs_alignment): Likewise.
14887 (vector_alignment_reachable_p): Likewise.
14888 (vect_get_data_access_cost): Likewise. Pass down
14889 vinfo to vect_get_load_cost/vect_get_store_cost instead of DR.
14890 (vect_get_peeling_costs_all_drs): Likewise.
14891 (vect_peeling_hash_get_lowest_cost): Likewise.
14892 (vect_enhance_data_refs_alignment): Likewise.
14893 (vect_find_same_alignment_drs): Likewise.
14894 (vect_analyze_data_refs_alignment): Likewise.
14895 (vect_analyze_group_access_1): Likewise.
14896 (vect_analyze_group_access): Likewise.
14897 (vect_analyze_data_ref_access): Likewise.
14898 (vect_analyze_data_ref_accesses): Likewise.
14899 (vect_vfa_segment_size): Likewise.
14900 (vect_small_gap_p): Likewise.
14901 (vectorizable_with_step_bound_p): Likewise.
14902 (vect_prune_runtime_alias_test_list): Likewise.
14903 (vect_analyze_data_refs): Likewise.
14904 (vect_supportable_dr_alignment): Likewise.
14905 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
14906 (vect_gen_prolog_loop_niters): Likewise.
14907 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
14908 * tree-vect-patterns.c (vect_recog_bool_pattern): Do not
14910 (vect_recog_mask_conversion_pattern): Likewise.
14911 (vect_try_gather_scatter_pattern): Likewise.
14912 * tree-vect-stmts.c (vect_model_store_cost): Pass stmt_info
14913 to vect_get_store_cost.
14914 (vect_get_store_cost): Get stmt_info instead of DR.
14915 (vect_model_load_cost): Pass stmt_info to vect_get_load_cost.
14916 (vect_get_load_cost): Get stmt_info instead of DR.
14918 2018-06-01 Richard Biener <rguenther@suse.de>
14920 PR middle-end/86017
14921 * gimple-fold.c (var_decl_component_p): Also allow offsetted
14922 vars wrapped in MEM_REFs.
14924 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
14926 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
14927 Fix subreg tests so that we only return a choice between
14928 GENERAL_REGS and FP_REGS if the original classes included both.
14930 2018-06-01 Richard Biener <rguenther@suse.de>
14933 * tree-ssa-structalias.c (get_function_part_constraint):
14934 Handle NULL fi->decl.
14935 (find_func_aliases_for_call): Properly handle indirect
14936 fi from direct call.
14937 (find_func_clobbers): Likewise.
14938 (ipa_pta_execute): Likewise.
14939 (create_variable_info_for): For functions that are ifunc_resolver
14940 resolve to a varinfo that contains the result of the resolver call.
14941 (associate_varinfo_to_alias): Do not treat ifunc resolvers as
14944 2018-05-31 Michael Collison <michael.collison@arm.com>
14946 * config/aarch64/aarch64.md:
14947 (*fix_to_zero_extenddfdi2): New pattern.
14948 * gcc.target/aarch64/fix_extend1.c: New testcase.
14950 2018-05-31 Qing Zhao <qing.zhao@oracle.com>
14952 PR middle-end/78809
14953 PR middle-end/83026
14954 * builtins.c (expand_builtin): Add the handling of BUILT_IN_STRCMP_EQ
14955 and BUILT_IN_STRNCMP_EQ.
14956 * builtins.def: Add new builtins BUILT_IN_STRCMP_EQ and
14957 BUILT_IN_STRNCMP_EQ.
14958 * gimple-fold.c (gimple_fold_builtin_string_compare): Add the
14959 handling of BUILTIN_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
14960 (gimple_fold_builtin): Likewise.
14961 * tree-ssa-strlen.c (compute_string_length): New function.
14962 (determine_min_obsize): New function.
14963 (handle_builtin_string_cmp): New function to handle calls to
14964 string compare functions.
14965 (strlen_optimize_stmt): Add handling to builtin string compare
14967 * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
14968 Add the handling of BUILT_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
14969 * tree.c (build_common_builtin_nodes): Add new defines of
14970 BUILT_IN_STRNCMP_EQ and BUILT_IN_STRCMP_EQ.
14972 2018-05-31 Jakub Jelinek <jakub@redhat.com>
14975 * bb-reorder.c (pass_partition_blocks::gate): Return false for
14976 functions with naked attribute.
14978 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
14980 * config/i386/sse.md (avx_vec_concat<mode>):
14981 Substitute concat_tg_mode mode attribute with xtg_mode.
14982 (<mask_codefor>avx512dq_broadcast<mode><mask_name>_1): Ditto.
14983 (concat_tg_mode): Remove mode attribute.
14985 2018-05-31 Martin Sebor <msebor@redhat.com>
14988 * calls.c (alloc_max_size): Correct a logic error/typo.
14989 Treat excessive arguments as infinite. Warn for invalid arguments.
14990 * doc/invoke.texi (-Walloc-size-larger-than): Update.
14992 2018-05-31 H.J. Lu <hongjiu.lu@intel.com>
14995 * config/i386/x86-tune.def: Re-enable partial_reg_dependency
14996 and movx for Haswell.
14998 2018-05-31 Chung-Lin Tang <cltang@codesourcery.com>
14999 Cesar Philippidis <cesar@codesourcery.com>
15001 PR middle-end/85879
15002 * gimplify.c (gimplify_adjust_omp_clauses): Add 'remove = true'
15003 when emitting error on private/firstprivate reductions.
15004 * omp-low.c (lower_omp_target): Avoid reference-type processing
15005 on pointers for firstprivate clause.
15007 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
15009 * config/aarch64/aarch64-simd-builtins.def (ld1x3): New.
15012 * config/aarch64/aarch64-simd.md
15013 (aarch64_ld1x3<VALLDIF:mode>): New pattern.
15014 (aarch64_ld1_x3_<mode>): Likewise
15015 (aarch64_st1x2<VALLDIF:mode>): Likewise
15016 (aarch64_st1_x2_<mode>): Likewise
15017 (aarch64_st1x3<VALLDIF:mode>): Likewise
15018 (aarch64_st1_x3_<mode>): Likewise
15019 * config/aarch64/arm_neon.h (vld1_u8_x3): New function.
15020 (vld1_s8_x3): Likewise.
15021 (vld1_u16_x3): Likewise.
15022 (vld1_s16_x3): Likewise.
15023 (vld1_u32_x3): Likewise.
15024 (vld1_s32_x3): Likewise.
15025 (vld1_u64_x3): Likewise.
15026 (vld1_s64_x3): Likewise.
15027 (vld1_f16_x3): Likewise.
15028 (vld1_f32_x3): Likewise.
15029 (vld1_f64_x3): Likewise.
15030 (vld1_p8_x3): Likewise.
15031 (vld1_p16_x3): Likewise.
15032 (vld1_p64_x3): Likewise.
15033 (vld1q_u8_x3): Likewise.
15034 (vld1q_s8_x3): Likewise.
15035 (vld1q_u16_x3): Likewise.
15036 (vld1q_s16_x3): Likewise.
15037 (vld1q_u32_x3): Likewise.
15038 (vld1q_s32_x3): Likewise.
15039 (vld1q_u64_x3): Likewise.
15040 (vld1q_s64_x3): Likewise.
15041 (vld1q_f16_x3): Likewise.
15042 (vld1q_f32_x3): Likewise.
15043 (vld1q_f64_x3): Likewise.
15044 (vld1q_p8_x3): Likewise.
15045 (vld1q_p16_x3): Likewise.
15046 (vld1q_p64_x3): Likewise.
15047 (vst1_s64_x2): Likewise.
15048 (vst1_u64_x2): Likewise.
15049 (vst1_f64_x2): Likewise.
15050 (vst1_s8_x2): Likewise.
15051 (vst1_p8_x2): Likewise.
15052 (vst1_s16_x2): Likewise.
15053 (vst1_p16_x2): Likewise.
15054 (vst1_s32_x2): Likewise.
15055 (vst1_u8_x2): Likewise.
15056 (vst1_u16_x2): Likewise.
15057 (vst1_u32_x2): Likewise.
15058 (vst1_f16_x2): Likewise.
15059 (vst1_f32_x2): Likewise.
15060 (vst1_p64_x2): Likewise.
15061 (vst1q_s8_x2): Likewise.
15062 (vst1q_p8_x2): Likewise.
15063 (vst1q_s16_x2): Likewise.
15064 (vst1q_p16_x2): Likewise.
15065 (vst1q_s32_x2): Likewise.
15066 (vst1q_s64_x2): Likewise.
15067 (vst1q_u8_x2): Likewise.
15068 (vst1q_u16_x2): Likewise.
15069 (vst1q_u32_x2): Likewise.
15070 (vst1q_u64_x2): Likewise.
15071 (vst1q_f16_x2): Likewise.
15072 (vst1q_f32_x2): Likewise.
15073 (vst1q_f64_x2): Likewise.
15074 (vst1q_p64_x2): Likewise.
15075 (vst1_s64_x3): Likewise.
15076 (vst1_u64_x3): Likewise.
15077 (vst1_f64_x3): Likewise.
15078 (vst1_s8_x3): Likewise.
15079 (vst1_p8_x3): Likewise.
15080 (vst1_s16_x3): Likewise.
15081 (vst1_p16_x3): Likewise.
15082 (vst1_s32_x3): Likewise.
15083 (vst1_u8_x3): Likewise.
15084 (vst1_u16_x3): Likewise.
15085 (vst1_u32_x3): Likewise.
15086 (vst1_f16_x3): Likewise.
15087 (vst1_f32_x3): Likewise.
15088 (vst1_p64_x3): Likewise.
15089 (vst1q_s8_x3): Likewise.
15090 (vst1q_p8_x3): Likewise.
15091 (vst1q_s16_x3): Likewise.
15092 (vst1q_p16_x3): Likewise.
15093 (vst1q_s32_x3): Likewise.
15094 (vst1q_s64_x3): Likewise.
15095 (vst1q_u8_x3): Likewise.
15096 (vst1q_u16_x3): Likewise.
15097 (vst1q_u32_x3): Likewise.
15098 (vst1q_u64_x3): Likewise.
15099 (vst1q_f16_x3): Likewise.
15100 (vst1q_f32_x3): Likewise.
15101 (vst1q_f64_x3): Likewise.
15102 (vst1q_p64_x3): Likewise.
15104 2018-05-30 Jozef Lawrynowicz <jozef.l@mittosystems.com>
15106 * config/msp430/msp430.c (msp430_output_labelref): Prepend
15107 user_label_prefix to name.
15109 * tree-core.h: Update comment about the format of NAME string
15110 passed to handler in attribute_spec.
15112 * config/msp430/msp430.md: Remove erroneous subreg expression from
15113 zero_extendqisi2 insn pattern. Remove msp430x ISA restriction on
15114 zero_extend{q,h}isi2.
15116 2018-05-30 Borislav Petkov <bp@suse.de>
15118 * doc/extend.texi: Document some architecture specific
15119 constraints and sort entries.
15121 2018-05-30 Martin Sebor <msebor@redhat.com>
15123 PR middle-end/85369
15124 * builtins.c (expand_builtin_stpcpy_1): New function.
15125 (expand_builtin_stpcpy): Call it, and call maybe_warn_nonstring_arg
15126 only if the former succeeds.
15128 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
15130 * config/aarch64/aarch64-cores.def (saphira) : Add support for ARMv8.4
15133 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
15135 * doc/invoke.texi (-flinker-output): Document
15137 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
15139 * passes.c (ipa_write_summaries): Only modify statements if body
15141 * cgraphunit.c (ipa_passes): Also produce intermeidate code when
15142 incrementally linking.
15143 (ipa_passes): Likewise.
15144 * lto-cgraph.c (lto_output_node): When incrementally linking do not
15145 pass down resolution info.
15146 * common.opt (flag_incremental_link): Update info.
15147 * gcc.c (plugin specs): Turn flinker-output=* to
15148 -plugin-opt=-linker-output-known
15149 * toplev.c (compile_file): Also cut compilation when doing incremental
15151 * flag-types. (enum lto_partition_model): Add
15152 LTO_LINKER_OUTPUT_NOLTOREL.
15153 (invoke.texi): Add -flinker-output docs.
15154 * ipa.c (symbol_table::remove_unreachable_nodes): Handle LTO incremental
15155 link same way as WPA; do not stream in dead initializers.
15157 * dwarf2out.c (dwarf2out_die_ref_for_decl,
15158 darf2out_register_external_decl): Support incremental link.
15160 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
15162 * lto-opts.c (lto_write_options): Skip OPT_dumpdir, OPT_fresolution_.
15164 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
15166 * lto-wrapper.c (debug_objcopy): Add rename parameter; pass
15167 it down to simple_object_copy_lto_debug_sections.
15168 (run_gcc): Determine incremental LTO link time and configure
15169 lto1 into non-wpa mode, disable renaming of debug sections.
15171 2018-05-30 Kelvin Nilsen <kelvin@gcc.gnu.org>
15173 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
15174 descriptions of various incorrectly documented functions.
15176 2018-05-30 Andre Vieira <andre.simoesdiasvieira@arm.com>
15179 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
15180 address check not strict.
15182 2018-05-30 Richard Biener <rguenther@suse.de>
15184 PR tree-optimization/85964
15185 * tracer.c (better_p): Drop initialized count check, we only
15186 call the function with initialized counts now.
15187 (find_best_successor): Do find a best edge if one
15188 has uninitialized count.
15189 (find_best_predecessor): Likewise. Do BB frequency check only
15190 if count is initialized.
15192 2017-05-30 Jackson Woodruff <jackson.woodruff@arm.com>
15194 * config/aarch64/aarch64.c (aarch64_host_wide_int_compare): New.
15195 (aarch64_ldrstr_offset_compare): New.
15196 (aarch64_operands_adjust_ok_for_ldpstp): Update to consider all
15197 load/store orderings.
15198 (aarch64_gen_adjusted_ldpstp): Likewise.
15200 2018-05-30 Wilco Dijkstra <wdijkstr@arm.com>
15202 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
15203 Check for subset of GENERAL_REGS and FP_REGS.
15204 * config/aarch64/aarch64-simd.md (aarch64_get_lane): Increase cost of
15207 2018-05-30 Richard Sandiford <richard.sandiford@linaro.org>
15209 * alias.c (adjust_offset_for_component_ref): Use poly_int_tree_p
15210 and wi::to_poly_offset. Add the current offset and then check
15211 whether the sum fits, rather than using an unchecked addition of
15212 a checked term. Check for a shwi rather than a uhwi.
15213 * expr.c (get_bit_range): Use tree_to_poly_uint64.
15214 (store_constructor): Use poly_int_tree_p.
15215 (expand_expr_real_1): Likewise.
15216 * function.c (assign_temp): Likewise.
15217 * fold-const.c (const_binop): Use poly_int_tree_p and
15218 wi::to_poly_offset.
15219 (fold_indirect_ref_1): Likewise. Use multiple_p to attempt an exact
15221 * ipa-icf-gimple.c (func_checker::compare_operand): Use
15222 to_poly_offset for MEM offsets.
15223 * ipa-icf.c (sem_variable::equals): Likewise.
15224 * stor-layout.c (compute_record_mode): Use poly_int_tree_p.
15225 * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use
15226 wi::to_poly_offset for BIT_FIELD_REF offsets.
15227 (vn_reference_maybe_forwprop_address): Use poly_int_tree_p and
15228 wi::to_poly_offset.
15229 * var-tracking.c (emit_note_insn_var_location): Use
15230 tree_to_poly_uint64.
15232 2018-05-29 Jim Wilson <jimw@sifive.com>
15234 * config/riscv/riscv.c (riscv_interrupt_type): Fix comment typo.
15236 2018-05-29 Uros Bizjak <ubizjak@gmail.com>
15239 * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
15240 Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
15242 (sse4_1_round<mode>2): Use nonimmediate_operand
15243 for operand 1 predicate.
15245 2018-05-29 Martin Sebor <msebor@redhat.com>
15246 Richard Biener <rguenther@suse.de>
15249 * calls.c (get_size_range): Call determine_value_range instead
15250 of get_value_range..
15251 * tree-vrp.h (determine_value_range): Declared new function.
15252 * tree-vrp.c (determine_value_range_1, determine_value_range): New.
15254 2018-05-29 Richard Biener <rguenther@suse.de>
15256 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Make
15257 sure to use non-pattern stmts for get_earlier_stmt arguments.
15258 * tree-vectorizer.h (get_earlier_stmt): Assert we do not get
15259 called on pattern stmts.
15260 (get_later_stmt): Likewise.
15262 2018-05-29 Martin Liska <mliska@suse.cz>
15264 PR gcov-profile/85759
15265 * doc/gcov.texi: Document GCOV_ERROR_FILE and GCOV_EXIT_AT_ERROR
15268 2018-05-29 Jakub Jelinek <jakub@redhat.com>
15270 * tree-cfg.c (verify_gimple_assign_unary): Add checking for
15272 (verify_gimple_assign_binary): Check TYPE_VECTOR_SUBPARTS for
15276 * tree.def (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
15277 VEC_PACK_FLOAT_EXPR): New tree codes.
15278 * tree-pretty-print.c (op_code_prio): Handle
15279 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR.
15280 (dump_generic_node): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
15281 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
15282 * tree-inline.c (estimate_operator_cost): Likewise.
15283 * gimple-pretty-print.c (dump_binary_rhs): Handle VEC_PACK_FLOAT_EXPR.
15284 * fold-const.c (const_binop): Likewise.
15285 (const_unop): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR and
15286 VEC_UNPACK_FIX_TRUNC_LO_EXPR.
15287 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
15288 (verify_gimple_assign_binary): Handle VEC_PACK_FLOAT_EXPR.
15289 * cfgexpand.c (expand_debug_expr): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
15290 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
15291 * expr.c (expand_expr_real_2): Likewise.
15292 * optabs.def (vec_packs_float_optab, vec_packu_float_optab,
15293 vec_unpack_sfix_trunc_hi_optab, vec_unpack_sfix_trunc_lo_optab,
15294 vec_unpack_ufix_trunc_hi_optab, vec_unpack_ufix_trunc_lo_optab): New
15296 * optabs.c (expand_widen_pattern_expr): For
15297 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR use
15298 sign from result type rather than operand's type.
15299 (expand_binop_directly): For vec_packu_float_optab and
15300 vec_packs_float_optab allow result type to be different from operand's
15302 * optabs-tree.c (optab_for_tree_code): Handle
15303 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
15304 VEC_PACK_FLOAT_EXPR. Formatting fixes.
15305 * tree-vect-generic.c (expand_vector_operations_1): Handle
15306 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
15307 VEC_PACK_FLOAT_EXPR.
15308 * tree-vect-stmts.c (supportable_widening_operation): Handle
15310 (supportable_narrowing_operation): Handle FLOAT_EXPR.
15311 * config/i386/i386.md (fixprefix, floatprefix): New code attributes.
15312 * config/i386/sse.md (*float<floatunssuffix>v2div2sf2): Rename to ...
15313 (float<floatunssuffix>v2div2sf2): ... this. Formatting fix.
15314 (vpckfloat_concat_mode, vpckfloat_temp_mode, vpckfloat_op_mode): New
15316 (vec_pack<floatprefix>_float_<mode>): New expander.
15317 (vunpckfixt_mode, vunpckfixt_model, vunpckfixt_extract_mode): New mode
15319 (vec_unpack_<fixprefix>fix_trunc_lo_<mode>,
15320 vec_unpack_<fixprefix>fix_trunc_hi_<mode>): New expanders.
15321 * doc/md.texi (vec_packs_float_@var{m}, vec_packu_float_@var{m},
15322 vec_unpack_sfix_trunc_hi_@var{m}, vec_unpack_sfix_trunc_lo_@var{m},
15323 vec_unpack_ufix_trunc_hi_@var{m}, vec_unpack_ufix_trunc_lo_@var{m}):
15325 * doc/generic.texi (VEC_UNPACK_FLOAT_HI_EXPR,
15326 VEC_UNPACK_FLOAT_LO_EXPR): Fix pasto in description.
15327 (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
15328 VEC_PACK_FLOAT_EXPR): Document.
15330 2018-05-29 Richard Biener <rguenther@suse.de>
15332 * tree-vectorizer.h (struct vec_info): Add stmt_vec_infos
15334 (stmt_vec_info_vec): Make pointer.
15335 (init_stmt_vec_info_vec): Remove.
15336 (free_stmt_vec_info_vec): Likewise.
15337 (set_stmt_vec_info_vec): New function.
15338 (free_stmt_vec_infos): Likewise.
15339 (vinfo_for_stmt): Adjust for stmt_vec_info_vec indirection.
15340 (set_vinfo_for_stmt): Likewise.
15341 (get_earlier_stmt): Likewise.
15342 (get_later_stmt): Likewise.
15343 * tree-vectorizer.c (stmt_vec_info_vec): Make pointer.
15344 (vec_info::vec_info): Allocate stmt_vec_infos and set the global.
15345 (vec_info::~vec_info): Free stmt_vec_infos.
15346 (vectorize_loops): Set the global stmt_vec_info_vec to NULL.
15347 Remove old init_stmt_vec_info_vec/free_stmt_vec_info_vec calls.
15348 (pass_slp_vectorize::execute): Likewise.
15349 * tree-vect-stmts.c (init_stmt_vec_info_vec): Remove.
15350 (free_stmt_vec_info_vec): Likewise.
15351 (set_stmt_vec_info_vec): New function.
15352 (free_stmt_vec_infos): Likewise.
15353 * tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Set
15354 the global stmt_vec_info_vec.
15355 * tree-parloops.c (gather_scalar_reductions): Use
15356 set_stmt_vec_info_vec/free_stmt_vec_infos and maintain a local
15359 2018-05-29 Richard Biener <rguenther@suse.de>
15361 * dominance.c (iterate_fix_dominators): Push/pop TV_DOMINANCE.
15363 2018-05-29 Martin Liska <mliska@suse.cz>
15364 David Malcolm <dmalcolm@redhat.com>
15366 * vec.c (test_reverse): New.
15367 (vec_c_tests): Add new test.
15368 * vec.h (vl_ptr>::reverse): New function.
15370 2018-05-29 Gerald Pfeifer <gerald@pfeifer.com>
15372 * config.gcc: Identify FreeBSD 3.x and 4.x as unsupported.
15374 * config/freebsd-spec.h (FBSD_LIB_SPEC): Only consider FreeBSD 5
15377 2018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
15379 * tree-dump.c (dump_node): Use splay_tree_delete_pointers.
15381 2018-05-28 Richard Biener <rguenther@suse.de>
15383 PR tree-optimization/85933
15384 * tree-vect-data-refs.c (vect_record_base_alignments): Only
15385 look at stmts marked as vectorizable.
15387 2018-05-28 Richard Biener <rguenther@suse.de>
15389 PR tree-optimization/85934
15390 * tree-vect-generic.c (expand_vector_operations_1): Hoist
15391 vector boolean check before scalar optimization.
15393 2018-05-28 Jakub Jelinek <jakub@redhat.com>
15395 * doc/invoke.texi (ARM Options): Use @item instead of @itemx
15398 2018-05-28 Mark Wielaard <mark@klomp.org>
15400 * dwarf2asm.c (dw2_asm_output_delta_uleb128): Add brackets around lab2
15401 if it is an expression containing a minus sign.
15403 2018-05-27 John David Anglin <danglin@gcc.gnu.org>
15405 * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
15407 2018-05-27 Paul Koning <ni1d@arrl.net>
15409 * config/pdp11/pdp11.md (truncsihi2): Remove.
15411 2018-05-27 Monk Chiang <sh.chiang04@gmail.com>
15412 Chung-Ju Wu <jasonwucj@gmail.com>
15414 * config/nds32/nds32-intrinsic.md (unaligned_storedi): Modify patterns
15416 (unaligned_store_dw): Ditto.
15417 * config/nds32/nds32-memory-manipulation.c
15418 (nds32_expand_movmemsi_loop_known_size): Refactoring implementation.
15419 (nds32_gen_dup_4_byte_to_word_value): Rename to ...
15420 (nds32_gen_dup_4_byte_to_word_value_aux): ... this.
15421 (emit_setmem_word_loop): Rename to ...
15422 (emit_setmem_doubleword_loop): ... this.
15423 (nds32_gen_dup_4_byte_to_word_value): New function.
15424 (nds32_gen_dup_8_byte_to_double_word_value): New function.
15425 (nds32_expand_setmem_loop): Refine implementation.
15426 (nds32_expand_setmem_loop_v3m): Ditto.
15427 * config/nds32/nds32-multiple.md (unaligned_store_update_base_dw): New
15430 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
15432 * config/nds32/nds32.md (bswapsi2, bswaphi2): New patterns.
15434 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
15436 * config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
15437 (nds32_init_machine_status): Initialize machine->attr_naked_p and
15438 machine->attr_no_prologue_p.
15439 (nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
15440 (nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
15441 (nds32_expand_epilogue): Consider attr_naked_p.
15442 (nds32_expand_epilogue_v3pop): Likewise.
15443 (nds32_can_use_return_insn): Likewise.
15444 * config/nds32/nds32.h (machine_function): Add attr_naked_p and
15445 attr_no_prologue_p fields.
15446 * config/nds32/nds32.opt (mret-in-naked-func): New option.
15448 2018-05-27 Jakub Jelinek <jakub@redhat.com>
15451 * config/i386/i386.md (fixunssuffix, floatunssuffix): New code
15453 * config/i386/sse.md
15454 (<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>):
15456 (float<floatunssuffix><sseintvecmodelower><mode>2<mask_name><round_name>):
15458 (<floatsuffix>float<sselongvecmodelower><mode>2<mask_name><round_name>):
15460 (float<floatunssuffix><sselongvecmodelower><mode>2<mask_name><round_name>):
15462 (*<floatsuffix>floatv2div2sf2): Rename to ...
15463 (*float<floatunssuffix>v2div2sf2): ... this.
15464 (<floatsuffix>floatv2div2sf2_mask): Rename to ...
15465 (float<floatunssuffix>v2div2sf2_mask): ... this.
15466 (*<floatsuffix>floatv2div2sf2_mask_1): Rename to ...
15467 (*float<floatunssuffix>v2div2sf2_mask_1): ... this.
15468 (<fixsuffix>fix_truncv8dfv8si2<mask_name><round_saeonly_name>): Rename
15470 (fix<fixunssuffix>_truncv8dfv8si2<mask_name><round_saeonly_name>):
15472 (<fixsuffix>fix_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
15474 (fix<fixunssuffix>_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
15476 (<fixsuffix>fix_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
15478 (fix<fixunssuffix>_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
15480 (<fixsuffix>fix_truncv2sfv2di2<mask_name>): Rename to ...
15481 (fix<fixunssuffix>_truncv2sfv2di2<mask_name>): ... this.
15482 (vec_pack_ufix_trunc_<mode>): Use gen_fixuns_truncv8dfv8si2 instead of
15483 gen_ufix_truncv8dfv8si2.
15484 * config/i386/i386-builtin.def (__builtin_ia32_cvttpd2uqq256_mask,
15485 __builtin_ia32_cvttpd2uqq128_mask, __builtin_ia32_cvttps2uqq256_mask,
15486 __builtin_ia32_cvttps2uqq128_mask, __builtin_ia32_cvtuqq2ps256_mask,
15487 __builtin_ia32_cvtuqq2ps128_mask, __builtin_ia32_cvtuqq2pd256_mask,
15488 __builtin_ia32_cvtuqq2pd128_mask, __builtin_ia32_cvttpd2udq512_mask,
15489 __builtin_ia32_cvtuqq2ps512_mask, __builtin_ia32_cvtuqq2pd512_mask,
15490 __builtin_ia32_cvttps2uqq512_mask, __builtin_ia32_cvttpd2uqq512_mask):
15491 Use fixuns instead ufix or floatuns instead ufloat in CODE_FOR_ names.
15493 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
15497 * varasm.c (assemble_alias): Lookup ifunc attribute on error.
15499 2018-05-25 Jim Wilson <jimw@sifive.com>
15501 * config/riscv/riscv-protos.h (riscv_epilogue_uses): New.
15502 * config/riscv/riscv.c (struct machine_function): Add
15503 interrupt_handler_p and attribute_checked_p fields.
15504 (riscv_attribute_table): Add interrupt.
15505 (riscv_interrupt_type_p): New.
15506 (riscv_save_reg_p): Save extra regs for interrupt handler.
15507 (riscv_use_save_libcall): Return false for interrupt handler.
15508 (riscv_first_stack_step): Add forward declaration.
15509 (riscv_compute_frame_info): New local interrupt_save_t1. Set it
15510 for interrupt handler with large frame. Use it for saved reg list.
15511 (riscv_expand_prologue): Move flag_stack_usage_info support to
15512 eliminate duplication.
15513 (riscv_expand_epilogue): Generate mret for interrupt handler.
15514 (riscv_epilogue_uses): New.
15515 (riscv_can_use_return_insn): Return false for interrupt handler.
15516 (riscv_function_ok_for_sibcall): Likewise.
15517 (riscv_set_current_function): Add interrupt handler support.
15518 * config/riscv/riscv.h (EPILOGUE_USES): Call riscv_epilogue_uses.
15519 * config/riscv/riscv.md (UNSPECV_MRET): New.
15521 (riscv_frflags, riscv_fsflags): Use tab after opcode.
15523 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: New.
15525 2018-05-25 Bill Schmidt <wschmidt@linux.ibm.com>
15527 PR tree-optimization/85712
15528 * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
15529 this candidate has already been replaced in-situ by a copy.
15531 2018-05-25 Jason Merrill <jason@redhat.com>
15533 PR c++/80485 - inline function non-zero address.
15534 * symtab.c (nonzero_address): Check DECL_COMDAT.
15536 2018-05-25 Uros Bizjak <ubizjak@gmail.com>
15539 * config/alpha/alpha.md (ashlsi3): New insn pattern.
15540 (*ashlsi_se): Rename from *ashldi_se. Define as sign
15541 extension of SImode operation. Use const123_operand predicate.
15542 (*saddsi_1): Remove.
15543 (*saddl_se_1): Ditto.
15544 (*ssubsi_1): Ditto.
15545 (*ssubl_se_1): Ditto.
15546 * config/alpha/predicates.md (const123_operand): New predicate.
15547 * config/alpha/constraints.md (P): Use IN_RANGE.
15549 2018-05-25 Richard Biener <rguenther@suse.de>
15551 * tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
15553 (ref_maybe_used_by_stmt_p): Likewise.
15554 (stmt_may_clobber_ref_p): Likewise.
15555 (stmt_may_clobber_ref_p_1): Likewise.
15556 * tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
15558 (ref_maybe_used_by_stmt_p): Likewise.
15559 (stmt_may_clobber_ref_p): Likewise.
15560 (stmt_may_clobber_ref_p_1): Likewise.
15561 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
15562 the alias oracle to disambiguate DRs with stmts DR analysis
15564 (vect_analyze_data_refs): Do not give up on not analyzable
15565 DRs for BB vectorization. Remove code truncating the dataref
15568 2018-05-25 Jakub Jelinek <jakub@redhat.com>
15571 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
15572 Add (=Yk,v,C) variant using vptestm insn. Use TARGET_AVX512BW
15573 in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
15575 2018-05-25 Richard Biener <rguenther@suse.de>
15577 * tree-vect-data-refs.c (vect_find_stmt_data_reference): New
15578 function, combining stmt data ref gathering and fatal analysis
15580 (vect_analyze_data_refs): Remove now redudnant code and simplify.
15581 * tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
15582 vect_analyze_loop_2 and use vect_find_stmt_data_reference.
15583 * tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
15584 * tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
15586 2018-05-25 Bin Cheng <bin.cheng@arm.com>
15588 PR tree-optimization/85720
15589 * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
15590 SCC if all partitions are builtins.
15591 (version_loop_by_alias_check): New parameter. Generate cancelable
15592 runtime alias check if all partitions are builtins.
15593 (distribute_loop): Update call to above function.
15595 2018-05-25 Bin Cheng <bin.cheng@arm.com>
15597 * tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
15598 (create_default_def, for_all_parms): Moved from tree-ssa-coalesce.c.
15599 (parm_default_def_partition_arg): Ditto.
15600 (set_parm_default_def_partition): Ditto.
15601 (get_parm_default_def_partitions): Ditto and make it static.
15602 (get_undefined_value_partitions): Ditto and make it static.
15603 (remove_ssa_form): Refactor call to init_var_map here.
15604 * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
15605 computation for loop region.
15606 (coalesce_partitions, compute_optimized_partition_bases): Ditto.
15607 (register_default_def): Delete.
15608 (for_all_parms, create_default_def): Move to tree-outof-ssa.c.
15609 (parm_default_def_partition_arg): Ditto.
15610 (set_parm_default_def_partition): Ditto.
15611 (get_parm_default_def_partitions): Ditto and make it static.
15612 (get_undefined_value_partitions): Ditto and make it static.
15613 (coalesce_with_default, coalesce_with_default): Update comment.
15614 (create_coalesce_list_for_region): New func factored out from
15615 create_outofssa_var_map.
15616 (populate_coalesce_list_for_outofssa): New func factored out from
15617 create_outofssa_var_map and coalesce_ssa_name.
15618 (create_outofssa_var_map): Delete.
15619 (coalesce_ssa_name): Refactor to support live range computation.
15620 * tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
15621 (get_parm_default_def_partitions): Delete.
15622 (get_undefined_value_partitions): Ditto.
15623 * tree-ssa-live.c (init_var_map, delete_var_map): Support live range
15624 computation for loop region.
15625 (new_tree_live_info, loe_visit_block): Ditto.
15626 (live_worklist, set_var_live_on_entry): Ditto.
15627 (calculate_live_on_exit, verify_live_on_entry): Ditto.
15628 * tree-ssa-live.h (struct _var_map): New fields.
15629 (init_var_map): Change decl.
15630 (region_contains_p): New.
15632 2018-05-25 Bin Cheng <bin.cheng@arm.com>
15634 * tree-ssa-live.h (live_merge_and_clear): Delete.
15636 2018-05-25 Richard Biener <rguenther@suse.de>
15639 * tree-dump.c (dequeue_and_dump): Remove access to removed
15640 operand 2 of a SWITCH_EXPR.
15642 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
15644 * doc/sourcebuild.texi (vect_double_cond_arith): Include
15645 multiplication and division.
15646 * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
15647 (cond_udiv@var{m}, cond_umod@var{m}): Document.
15648 * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
15649 (cond_udiv_optab, cond_umod_optab): New optabs.
15650 * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
15651 (IFN_COND_RDIV): New internal functions.
15652 * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
15653 TRUNC_MOD_EXPR and RDIV_EXPR.
15654 * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
15655 * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
15657 (SVE_INT_BINARY): Include mult.
15658 (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
15659 (optab, sve_int_op): Handle mult.
15660 (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
15662 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
15663 for SVE_INT_BINARY_SD.
15665 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
15667 * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
15668 (optab, sve_int_op): Handle div and udiv.
15669 * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
15670 for SVE_INT_BINARY_SD.
15671 (*<optab><mode>3): New insn for the same.
15673 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
15675 * tree-vect-patterns.c: Include predict.h.
15676 (vect_recog_divmod_pattern): Restrict check for division support
15677 to when optimizing for size.
15679 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
15681 * doc/sourcebuild.texi (vect_double_cond_arith: Document.
15682 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
15683 (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
15684 (gimple_match_op::set_op): Likewise.
15685 (gimple_resimplify4): Declare.
15686 * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
15687 (expr::gen_transform): Likewise.
15688 (decision_tree::gen): Generate a simplification routine for 4 operands.
15689 * gimple-match-head.c (gimple_simplify): Add an overload for
15690 4 operands. In the top-level function, handle up to 4 call
15691 arguments and call gimple_resimplify4.
15692 (gimple_resimplify4): New function.
15693 (build_call_internal): Pass a fourth operand.
15694 (maybe_push_to_seq): Likewise.
15695 * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
15696 Fold VEC_COND_EXPRs of an operation and a default value into
15697 an IFN_COND_* function if possible.
15698 * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
15700 (SVE_COND_FP_BINARY): Include them.
15701 (optab, sve_fp_op): Handle them.
15702 (SVE_INT_BINARY_REV): New code iterator.
15703 (SVE_COND_FP_BINARY_REV): New int iterator.
15704 (commutative): New int attribute.
15705 * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
15707 * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
15709 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
15710 (*cond_<optab><mode>): New patterns for reversed operands.
15712 2018-05-25 Richard Biener <rguenther@suse.de>
15714 * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
15715 (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
15716 (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
15717 (STMT_VINFO_GROUPED_ACCESS): Adjust.
15718 * tree-vect-data-refs.c (everywhere): Adjust users.
15719 * tree-vect-loop.c (everywhere): Likewise.
15720 * tree-vect-slp.c (everywhere): Likewise.
15721 * tree-vect-stmts.c (everywhere): Likewise.
15722 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
15724 2018-05-25 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
15726 * configure.ac (gcc_cv_as_section_has_e): Move to common section.
15728 (gcc_cv_as_section_exclude): ... this.
15729 Try Solaris as #exclude syntax.
15730 * configure: Regenerate.
15731 * config.in: Regenerate.
15732 * config/i386/i386.c (i386_solaris_elf_named_section): Handle
15734 * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
15735 [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
15737 * varasm.c (default_elf_asm_named_section): Don't check if
15738 HAVE_GAS_SECTION_EXCLUDE is defined.
15740 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
15742 * doc/md.texi: Update the documentation of the cond_* optabs
15743 to mention the new final operand. Fix GET_MODE_NUNITS call.
15744 Describe the scalar case too.
15745 * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
15746 * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
15748 (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
15749 (get_conditional_internal_fn): Update comment.
15750 * tree-vect-loop.c (vectorizable_reduction): Pass the original
15751 accumulator value as a final argument to conditional functions.
15752 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
15753 a define_expand and add an "else" operand. Assert for now that
15754 the else operand is equal to operand 2. Use SVE_INT_BINARY and
15755 SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
15756 (*cond_<optab><mode>): New patterns.
15757 * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
15758 (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
15759 (UNSPEC_COND_EOR): Delete.
15760 (optab): Remove associated mappings.
15761 (SVE_INT_BINARY): New code iterator.
15762 (sve_int_op): Remove int attribute and add "minus" to the code
15764 (SVE_COND_INT_OP): Delete.
15765 (SVE_COND_FP_OP): Rename to...
15766 (SVE_COND_FP_BINARY): ...this.
15768 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
15770 * optabs.c (can_reuse_operands_p): New function.
15771 (maybe_legitimize_operands): Try to reuse the results for
15774 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
15776 * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
15777 Add {q} suffix to insn mnemonic.
15779 2018-05-23 Jozef Lawrynowicz <jozef.l@mittosystems.com>
15781 * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
15782 (msp430_warn_func_return): New.
15784 2018-05-24 Roger Sayle <roger@nextmovesoftware.com>
15786 * fold-const.c (tree_nonzero_bits): New function.
15787 * fold-const.h (tree_nonzero_bits): Likewise.
15788 * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
15789 friends. POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
15791 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
15795 * varasm.c (assemble_alias): Check ifunc_resolver only on
15798 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
15801 * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
15802 when memory input operand is handled.
15804 2018-05-24 Luis Machado <luis.machado@linaro.org>
15806 * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
15808 (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
15810 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
15812 * match.pd: Delay FMA folds until after vectorization.
15814 2018-05-24 Andre Vieira <andre.simoesdiasvieira@arm.com>
15817 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
15818 address check not strict.
15820 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
15822 * gimple-match.h (gimple_match_op): New class.
15823 (mprts_hook): Replace parameters with a gimple_match_op *.
15824 (maybe_build_generic_op): Likewise.
15825 (gimple_simplified_result_is_gimple_val): Replace parameters with
15826 a const gimple_match_op *.
15827 (gimple_simplify): Replace code_helper * and tree * parameters with
15828 a gimple_match_op * parameter.
15829 (gimple_resimplify1): Replace code_helper *, tree and tree *
15830 parameters with a gimple_match_op * parameter.
15831 (gimple_resimplify2): Likewise.
15832 (gimple_resimplify3): Likewise.
15833 (maybe_push_res_to_seq): Replace code_helper, tree and tree *
15834 parameters with a gimple_match_op * parameter.
15835 * gimple-match-head.c (gimple_simplify): Change prototypes of
15836 auto-generated functions to take a gimple_match_op * instead of
15837 separate code_helper * and tree * parameters. Make the same
15838 change in the top-level overload and update calls to the
15839 gimple_resimplify routines. Update calls to the auto-generated
15840 functions and to maybe_push_res_to_seq in the publicly-facing
15841 operation-specific gimple_simplify overloads.
15842 (gimple_match_op::MAX_NUM_OPS): Define.
15843 (gimple_resimplify1): Replace rcode and ops with a single res_op
15844 parameter. Update call to gimple_simplify.
15845 (gimple_resimplify2): Likewise.
15846 (gimple_resimplify3): Likewise.
15847 (mprts_hook): Replace parameters with a gimple_match_op *.
15848 (maybe_build_generic_op): Likewise.
15849 (build_call_internal): Replace type, nargs and ops with
15850 a gimple_match_op *.
15851 (maybe_push_res_to_seq): Replace res_code, type and ops parameters
15852 with a single gimple_match_op *. Update calls to mprts_hook,
15853 build_call_internal and gimple_simplified_result_is_gimple_val.
15854 Factor out code that is common to the tree_code and combined_fn cases.
15855 * genmatch.c (expr::gen_transform): Replace tem_code and
15856 tem_ops with a gimple_match_op called tem_op. Update calls
15857 to the gimple_resimplify functions and maybe_push_res_to_seq.
15858 (dt_simplify::gen_1): Manipulate res_op instead of res_code and
15859 res_ops. Update call to the gimple_resimplify functions.
15860 (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
15861 (decision_tree::gen): Make the functions take a gimple_match_op *
15862 called res_op instead of separate res_code and res_ops parameters.
15863 Update call accordingly.
15864 * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
15865 and ops with a single res_op parameter. Update calls to
15866 maybe_build_generic_op and maybe_push_res_to_seq.
15867 (fold_stmt_1): Update calls to gimple_simplify and
15868 replace_stmt_with_simplification.
15869 (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
15870 and gimple_simplified_result_is_gimple_val.
15871 * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
15873 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
15874 with a gimple_match_op *.
15875 (vn_nary_build_or_lookup): Likewise. Update call to
15876 vn_nary_build_or_lookup_1.
15877 (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
15878 gimple_match_op *. Update calls to the gimple_resimplify routines
15879 and to gimple_simplified_result_is_gimple_val.
15880 (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
15881 Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
15882 (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
15883 (visit_nary_op): Likewise.
15884 (visit_reference_op_load): Likewise.
15886 2018-05-23 Luis Machado <luis.machado@linaro.org>
15888 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
15889 modifier for printing the step amount.
15891 2018-05-23 Jozef Lawrynowicz <jozef.l@somniumtech.com>
15894 * tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
15897 2018-05-23 Segher Boessenkool <segher@kernel.crashing.org>
15899 * doc/sourcebuild.texi (Endianness): New subsubsection.
15901 2018-05-23 Luis Machado <luis.machado@linaro.org>
15903 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
15904 <prefetch_dynamic_strides>: New const bool field.
15905 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
15906 prefetch_dynamic_strides.
15907 (exynosm1_prefetch_tune): Likewise.
15908 (thunderxt88_prefetch_tune): Likewise.
15909 (thunderx_prefetch_tune): Likewise.
15910 (thunderx2t99_prefetch_tune): Likewise.
15911 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
15913 (aarch64_override_options_internal): Update to set
15914 PARAM_PREFETCH_DYNAMIC_STRIDES.
15915 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
15916 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
15917 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
15918 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
15919 prefetch-dynamic-strides setting.
15921 2018-05-23 Luis Machado <luis.machado@linaro.org>
15923 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
15924 <minimum_stride>: New const int field.
15925 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
15926 minimum_stride field defaulting to -1.
15927 (exynosm1_prefetch_tune): Likewise.
15928 (thunderxt88_prefetch_tune): Likewise.
15929 (thunderx_prefetch_tune): Likewise.
15930 (thunderx2t99_prefetch_tune): Likewise.
15931 (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
15932 <default_opt_level>: Set to 3.
15933 (aarch64_override_options_internal): Update to set
15934 PARAM_PREFETCH_MINIMUM_STRIDE.
15935 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
15936 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
15937 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
15938 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
15939 stride is constant and is below the minimum stride threshold.
15941 2018-05-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
15943 * config/arm/arm-cpus.in (mode26): Delete.
15944 (armv4): Delete mode26 reference.
15945 * config/arm/arm.c (arm_configure_build_target): Delete use of
15948 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
15950 * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
15952 (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
15953 Rewrite expander pattern. Emit gen_floatunssi<mode>2_i387_with_xmm
15955 (floatunsdisf2): Rewrite expander pattern. Hanlde TARGET_AVX512F.
15956 (floatunsdidf2): Ditto.
15958 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
15960 * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
15961 (fixuns_trunc<mode>si2_avx512f): Ditto.
15962 (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
15963 (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
15964 Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
15966 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
15968 PR rtl-optimization/79985
15969 * df-scan.c (df_insn_refs_collect): Remove special case for
15970 global registers and asm statements.
15972 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
15974 * extend.texi (Global Register Variables): Rewrite the bullet list.
15975 Note that the register is available for allocation. Note that access
15976 via inline asm must use constraints. Add note about async-signal
15977 handlers. Remove paragraph about automagic register selection.
15979 2018-05-23 Richard Biener <rguenther@suse.de>
15981 * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
15982 of fixed offset from memset VN.
15984 2018-05-23 Bill Schmidt <wschmidt@linux.ibm.com>
15986 * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
15987 first_interp field.
15988 (alloc_cand_and_find_basis): Initialize first_interp field.
15989 (slsr_process_mul): Modify first_interp field.
15990 (slsr_process_add): Likewise.
15991 (slsr_process_cast): Modify first_interp field for each new
15993 (slsr_process_copy): Likewise.
15994 (dump_candidate): Dump first_interp field.
15995 (replace_mult_candidate): Process all interpretations, not just
15997 (replace_rhs_if_not_dup): Likewise.
15998 (replace_one_candidate): Likewise.
16000 2018-05-23 Wilco Dijkstra <wdijkstr@arm.com>
16002 * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
16004 (aarch64_needs_frame_chain): New function.
16005 (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
16007 2018-05-23 Sudakshina Das <sudi.das@arm.com>
16010 * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
16011 Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
16012 * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
16013 * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
16014 as true for strict-align.
16015 (aarch64_can_inline_p): Perform checks even when callee has no
16016 attributes to check for strict alignment.
16017 * doc/extend.texi (AArch64 Function Attributes): Document
16019 * doc/invoke.texi: (AArch64 Options): Likewise.
16021 2018-05-23 Richard Sandiford <richard.sandiford@linaro.org>
16023 PR tree-optimization/85853
16024 * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
16025 the handling of the root of the node to...
16026 (vect_slp_analyze_node_operations_1): ...this new function,
16027 and run the whole thing with the child nodes' def types
16028 set according to their SLP node's def type.
16030 2018-05-23 Richard Biener <rguenther@suse.de>
16032 PR middle-end/85874
16033 * tree-data-ref.c (create_runtime_alias_checks): Defer
16034 and ignore overflow warnings.
16036 2018-05-23 Yury Gribov <tetra2005@gmail.com>
16038 PR tree-optimization/85822
16039 * tree-vrp.c (is_masked_range_test): Fix handling of negative
16042 2018-05-23 Richard Biener <rguenther@suse.de>
16044 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
16045 memset constants via native_interpret_expr.
16047 2018-05-22 H.J. Lu <hongjiu.lu@intel.com>
16050 * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
16052 (cgraph_node::create_alias): Likewise.
16053 (cgraph_node::get_availability): Check ifunc_resolver instead
16054 of looking up ifunc attribute.
16055 * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
16056 * varasm.c (do_assemble_alias): Likewise.
16057 (assemble_alias): Likewise.
16058 (default_binds_local_p_3): Likewise.
16059 * cgraph.h (cgraph_node): Add ifunc_resolver.
16060 (cgraph_node::only_called_directly_or_aliased_p): Return false
16061 for IFUNC resolver.
16062 * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
16064 * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
16065 is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
16066 (symtab_node::binds_to_current_def_p): Check ifunc_resolver
16067 instead of looking up ifunc attribute.
16069 2018-05-22 Luis Machado <luis.machado@linaro.org>
16071 * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
16073 2018-05-22 Martin Sebor <msebor@redhat.com>
16075 PR middle-end/85359
16076 * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
16077 only when expasion succeeds.
16078 (expand_builtin_strcmp): Same.
16079 (expand_builtin_strncmp): Same.
16081 2018-05-22 Martin Sebor <msebor@redhat.com>
16083 * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
16085 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
16086 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16088 * config/aarch64/aarch64-ldpstp.md: Replace uses of
16089 aarch64_mem_pair_operand with memory_operand and delete operand swapping
16091 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
16092 Add check for legitimate_address.
16093 (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
16094 (aarch64_swap_ldrstr_operands): New.
16095 * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
16098 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
16099 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16101 * config/aarch64/aarch64.md: New patterns to generate stp
16103 (store_pair_sw, store_pair_dw): New patterns to generate stp for
16104 single words and double words.
16105 (load_pair_sw, load_pair_dw): Likewise.
16106 (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
16108 (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
16110 * config/aarch64/aarch64-ldpstp.md: Modify peephole
16111 for different mode ldpstp and add peephole for merged zero stores.
16112 Likewise for loads.
16113 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
16115 (aarch64_gen_store_pair): Rename calls to match new patterns.
16116 (aarch64_gen_load_pair): Rename calls to match new patterns.
16117 * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
16118 (load_pair<DREG:mode><DREG2:mode>): ... This.
16119 (store_pair<mode>): Rename to...
16120 (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
16121 * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
16122 New mode iterators.
16123 (V_INT_EQUIV): Handle SImode.
16124 * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
16127 2018-05-22 Martin Sebor <msebor@redhat.com>
16130 * calls.c (maybe_warn_nonstring_arg): Use string length to set
16131 or ajust the presumed bound on an operation to avoid unnecessary
16134 2018-05-22 Martin Sebor <msebor@redhat.com>
16136 PR tree-optimization/85826
16137 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
16138 assuming that a DECL necesarily has a constant size.
16140 2018-05-22 Richard Sandiford <richard.sandiford@linaro.org>
16142 PR middle-end/85862
16143 * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
16145 2018-05-22 Richard Biener <rguenther@suse.de>
16147 PR tree-optimization/85834
16148 * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
16149 non-constant and non-zero memset arguments.
16151 2018-05-22 Martin Liska <mliska@suse.cz>
16154 * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
16156 2018-05-22 Richard Biener <rguenther@suse.de>
16158 PR tree-optimization/85863
16159 * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
16160 comparisons when vectype is specified.
16161 (vectorizable_condition): Do not specify vectype for
16162 vect_is_simple_cond when SLP vectorizing.
16164 2018-05-21 Michael Meissner <meissner@linux.ibm.com>
16167 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
16168 define __ibm128 as long double.
16169 * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
16170 as a distinct type when IEEE 128-bit support is enabled.
16171 (init_float128_ieee): Fix up conversions between IFmode and IEEE
16172 128-bit types to use the correct functions.
16173 (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
16174 convert between 128-bit floating point types that have different
16175 modes but the same representation, instead of using gen_lowpart to
16177 * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
16179 (IFKF_reg): New attributes to give the register constraints for
16181 (extend<mode>tf2_internal): New insns to mark an explicit
16182 conversion between 128-bit floating point types that have a
16183 different mode but share the same representation.
16185 2018-05-21 Richard Sandiford <richard.sandiford@linaro.org>
16187 PR tree-optimization/85814
16188 * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
16189 a null return from get_strinfo when unsharing the next
16190 strinfo in the chain.
16192 2018-05-21 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
16195 * varasm.c (weak_finish): Clean up weak_decls.
16197 2018-05-21 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16199 * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
16200 UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
16201 UNSPEC_UADALP values.
16202 * config/aarch64/iterators.md (ABAL): New int iterator.
16205 (sur): Add mappings for the above.
16206 * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
16208 (aarch64_<sur>abal<mode>_4): Likewise.
16209 (aarch64_<sur>adalp<mode>_3): Likewise.
16210 (<sur>sadv16qi): New define_expand.
16212 2018-05-21 Alexander Nesterovskiy <alexander.nesterovskiy@intel.com>
16214 * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
16215 (*movdf_internal): Ditto.
16216 (*rcpsf2_sse): Ditto.
16217 (*rsqrtsf2_sse): Ditto.
16218 (*sqrt<mode>2_sse): Ditto.
16220 2018-05-21 Tamar Christina <tamar.christina@arm.com>
16222 * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
16224 (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
16225 * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
16226 veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
16227 vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
16229 * config/aarch64/arm_neon.h: Likewise.
16230 * config/aarch64/iterators.md (VQ_I): New.
16232 2018-05-21 Alexey Brodkin <abrodkin@synopsys.com>
16234 * config.gcc: Add arc/t-multilib-linux to tmake_file for
16236 * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
16239 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
16241 * config/nds32/constraints.md (S): New constraint.
16242 * config/nds32/nds32.md (call_internal): Use constraint S.
16243 (call_value_internal): Likewise.
16244 (sibcall_internal): Likewise.
16245 (sibcall_value_internal): Likewise.
16247 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
16248 Chung-Ju Wu <jasonwucj@gmail.com>
16250 * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
16251 into consideration.
16253 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
16254 Chung-Ju Wu <jasonwucj@gmail.com>
16256 * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
16257 (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
16258 (nds32_rtx_costs_impl): Simplify.
16259 (nds32_address_cost_impl): Simplify.
16260 (nds32_init_rtx_costs): New function.
16261 (nds32_rtx_costs_speed_prefer): Likewise.
16262 (nds32_rtx_costs_size_prefer): Likewise.
16263 (nds32_address_cost_speed_prefer): Likewise.
16264 (nds32_address_cost_speed_fwprop): Likewise.
16265 (nds32_address_cost_size_prefer): Likewise.
16266 * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
16267 * config/nds32/nds32.c (nds32_option_override): Use
16268 nds32_init_rtx_costs function.
16270 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
16272 * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
16273 * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
16274 (TARGET_PIPELINE_N8): Likewise.
16275 (TARGET_PIPELINE_N10): Likewise.
16276 (TARGET_PIPELINE_N13): Likewise.
16277 (TARGET_PIPELINE_GRAYWOLF): Likewise.
16279 2018-05-19 Monk Chiang <sh.chiang04@gmail.com>
16281 * config/nds32/nds32-fpu.md: Update copyright year.
16283 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
16285 * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
16287 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
16289 * config/nds32/nds32.c
16290 (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
16291 * config/nds32/nds32.opt (minline-asm-r15): New option.
16293 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
16295 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
16297 * config/nds32/nds32.md (abssi2): New pattern.
16299 2018-05-19 Uros Bizjak <ubizjak@gmail.com>
16301 * config/i386/i386.md (rex64namesuffix): New mode attribute.
16302 * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
16303 Merge insn pattern from sse_cvtsi2ss<round_name> and
16304 sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
16305 (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
16306 from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
16307 using SWI48 mode iterator.
16308 (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
16309 sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
16310 (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
16311 pattern from sse_cvttss2si<round_saeonly_name>
16312 and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
16313 (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
16314 from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
16315 using SWI48 mode iterator.
16316 (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
16317 insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
16318 avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
16319 (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
16320 from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
16321 using SWI48 mode iterator.
16322 (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
16323 insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
16324 avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
16325 (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
16326 sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
16327 SWI48 mode iterator.
16328 (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
16329 sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
16330 (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
16331 pattern from sse_cvttsd2si<round_saeonly_name>
16332 and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
16334 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
16336 * config/nds32/nds32-md-auxiliary.c
16337 (nds32_valid_smw_lwm_base_p): Refine.
16338 (nds32_output_smw_single_word): Refine.
16339 (nds32_output_smw_double_word): New.
16340 * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
16342 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
16344 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
16345 (nds32_output_stack_pop): Refine.
16346 (nds32_expand_unaligned_load): Refine.
16347 (nds32_expand_unaligned_store): Refine.
16349 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
16350 Chung-Ju Wu <jasonwucj@gmail.com>
16352 * config/nds32/constants.md: Add TP_REGNUM constant.
16353 (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
16354 UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
16356 * config/nds32/nds32-doubleword.md: Consider flag_pic.
16357 * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
16358 * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
16359 * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
16360 and PIC code generation.
16361 * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
16363 * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
16365 * config/nds32/nds32.md: Support TLS and PIC.
16366 * config/nds32/nds32.c: Support TLS and PIC.
16367 * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
16368 * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
16371 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
16373 * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
16374 mode with E_ prefix.
16376 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
16377 Chung-Ju Wu <jasonwucj@gmail.com>
16379 * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
16380 * config/nds32/nds32-md-auxiliary.c
16381 (symbolic_reference_mentioned_p): New.
16382 (nds32_legitimize_ict_address): New.
16383 (nds32_expand_ict_move): New.
16384 (nds32_indirect_call_referenced_p): New.
16385 (nds32_symbol_binds_local_p): Delete.
16386 (nds32_long_call_p): Modify.
16387 * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
16388 * config/nds32/nds32-protos.h
16389 (symbolic_reference_mentioned_p): Declare.
16390 (nds32_legitimize_ict_address): Declare.
16391 (nds32_expand_ict_move): Declare.
16392 (nds32_indirect_call_referenced_p): Declare.
16393 * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
16394 (nds32_relax_group): Use nds32_ict_const_p as condition.
16395 * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
16396 (nds32_asm_file_start): Output ict_model directive in asm code.
16397 (nds32_legitimate_address_p): Consider indirect call.
16398 (nds32_print_operand): Consider indirect call.
16399 (nds32_print_operand_address): Consider indirect call.
16400 (nds32_insert_attributes): Handle "indirect_call" attribute.
16401 (TARGET_LEGITIMATE_ADDRESS_P): Define.
16402 (TARGET_LEGITIMATE_CONSTANT_P): Define.
16403 (TARGET_CANNOT_FORCE_CONST_MEM): Define.
16404 (TARGET_DELEGITIMIZE_ADDRESS): Define.
16405 (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
16406 * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
16407 (TARGET_ICT_MODEL_SMALL): Define.
16408 (TARGET_ICT_MODEL_LARGE): Define.
16409 * config/nds32/nds32.md (movsi): Consider ict model.
16410 (call, call_value): Consider ict model.
16411 (sibcall, sibcall_value): Consider ict model.
16412 * config/nds32/nds32.opt (mict-model): New option.
16413 * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
16416 2018-05-18 Kito Cheng <kito.cheng@gmail.com>
16417 Monk Chiang <sh.chiang04@gmail.com>
16418 Jim Wilson <jimw@sifive.com>
16420 * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
16421 Add support to parse rv32e*. Clear MASK_RVE for rv32i and rv64i.
16422 * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
16423 * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
16424 __riscv_32e when TARGET_RVE. Handle ABI_ILP32E as soft-float ABI.
16425 * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
16426 * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
16427 compute save_libcall_adjustment properly.
16428 (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
16429 (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
16430 * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
16431 (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
16432 (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
16433 (ABI_SPEC): Handle mabi=ilp32e.
16434 * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
16435 (RVE): Add RVE mask.
16436 * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
16437 <-march>: Add rv32e as an example.
16439 2018-05-18 Marc Glisse <marc.glisse@inria.fr>
16442 * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
16443 (intra_create_variable_infos): Handle C++ constructors.
16445 2018-05-18 Martin Liska <mliska@suse.cz>
16447 * passes.def: Remove a redundant pass.
16449 2018-05-18 Eric Botcazou <ebotcazou@adacore.com>
16452 * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
16454 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16456 * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
16458 (ARMv2, ARMv3, ARMv3m): Delete fgroups.
16460 (armv2, armv2a, armv3, armv3m): Delete architectures.
16461 (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
16462 arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
16463 arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
16465 * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
16466 (*mulsidi3adddi): Likewise.
16467 (mulsidi3): Likewise.
16468 (*mulsidi3_nov6): Likewise.
16469 (umulsidi3): Likewise.
16470 (umulsidi3_nov6): Likewise.
16471 (umaddsidi4): Likewise.
16472 (*umulsidi3adddi): Likewise.
16473 (smulsi3_highpart): Likewise.
16474 (*smulsi3_highpart_nov6): Likewise.
16475 (umulsi3_highpart): Likewise.
16476 (*umulsi3_highpart_nov6): Likewise.
16477 * config/arm/arm.h (arm_arch3m): Delete.
16478 * config/arm/arm.c (arm_arch3m): Delete.
16479 (arm_option_override_internal): Update armv3-related comment.
16480 (arm_configure_build_target): Delete use of isa_bit_mode32.
16481 (arm_option_reconfigure_globals): Delete set of arm_ach3m.
16482 (arm_rtx_costs_internal): Delete check of arm_arch3m.
16483 * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
16484 (mulsa3): Likewise.
16485 (mulusa3): Likewise.
16486 * config/arm/arm-protos.h (arm_arch3m): Delete.
16487 * config/arm/arm-tables.opt: Regenerate.
16488 * config/arm/arm-tune.md: Likewise.
16489 * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
16490 deleted architectures.
16492 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16494 * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
16495 (armv5t, armv5te): New features.
16496 (ARMv5, ARMv5e): Delete fgroups.
16497 (ARMv5t, ARMv5te): Adjust for above changes.
16498 (ARMv6m): Likewise.
16499 (armv5, armv5e): Delete arches.
16500 * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
16502 (*call_reg_arm): Likewise.
16503 (*call_value_reg_armv5): Likewise.
16504 (*call_value_reg_arm): Likewise.
16505 (*call_symbol): Likewise.
16506 (*call_value_symbol): Likewise.
16507 (*sibcall_insn): Likewise.
16508 (*sibcall_value_insn): Likewise.
16509 (clzsi2): Likewise.
16510 (prefetch): Likewise.
16511 (define_split and define_peephole2 dependent on arm_arch5):
16513 * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
16515 (TARGET_ARM_QBIT): Likewise.
16516 (TARGET_DSP_MULTIPLY): Likewise.
16517 (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
16518 (arm_arch5, arm_arch5e): Delete.
16519 (arm_arch5t, arm_arch5te): Declare.
16520 * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
16521 (arm_arch5t): Declare.
16522 (arm_option_reconfigure_globals): Update for the above.
16523 (arm_options_perform_arch_sanity_checks): Update comment, replace
16524 use of arm_arch5 with arm_arch5t.
16525 (use_return_insn): Likewise.
16526 (arm_emit_call_insn): Likewise.
16527 (output_return_instruction): Likewise.
16528 (arm_final_prescan_insn): Likewise.
16529 (arm_coproc_builtin_available): Likewise.
16530 * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
16531 arm_arch5e with arm_arch5t and arm_arch5te.
16532 * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
16533 (arm_arch5t, arm_arch5te): Declare.
16534 * config/arm/arm-tables.opt: Regenerate.
16535 * config/arm/t-arm-elf: Remove references to armv5, armv5e.
16536 * config/arm/t-multilib: Likewise.
16537 * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
16538 instead of arm_arch5.
16539 (*call_reg_thumb1): Likewise.
16540 (*call_value_reg_thumb1_v5): Likewise.
16541 (*call_value_reg_thumb1): Likewise.
16542 * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
16544 * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
16546 2018-05-18 Martin Liska <mliska@suse.cz>
16548 PR gcov-profile/84846
16549 * doc/gcov.texi: Document -t option of gcov tool.
16551 2018-05-18 Martin Liska <mliska@suse.cz>
16553 PR gcov-profile/84846
16554 * gcov.c (print_usage): Add new -t option.
16555 (process_args): Handle the option.
16556 (generate_results): Use stdout as output when requested by
16559 2018-05-18 Martin Liska <mliska@suse.cz>
16561 PR gcov-profile/84846
16562 * coverage.c (coverage_init): Write PWD to .gcno file.
16563 * doc/gcov.texi: Document how working directory is printed.
16564 * gcov-dump.c (dump_gcov_file): Print PWD.
16565 * gcov.c (output_intermediate_file): Likewise.
16566 (read_graph_file): Read PWD string.
16567 (output_lines): Print PWD.
16569 2018-05-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
16571 PR middle-end/85817
16572 * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
16573 for retval and return false if all args to phi are zero.
16575 2018-05-18 Richard Biener <rguenther@suse.de>
16577 * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
16579 (evrp_dom_walker::before_dom_children): Call it.
16581 2018-05-18 Richard Biener <rguenther@suse.de>
16583 * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
16584 results when processing array refs with variable index.
16586 2018-05-18 Toon Moene <toon@moene.org>
16588 * doc/invoke.texi: Move -floop-unroll-and-jam documentation
16589 directly after that of -floop-interchange. Indicate that both
16590 options are enabled by default when specifying -O3.
16592 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16594 * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
16595 iterator. Delete separate integer-mode vec_set<mode> expander.
16596 (aarch64_simd_vec_setv2di): Delete.
16597 (vec_setv2di): Delete.
16598 (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
16599 Use VALL_F16 mode iterator. Add LD1 alternative and use vwcore for
16600 the "w, r" alternative.
16602 2018-05-18 Martin Liska <mliska@suse.cz>
16604 * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
16605 * tree-pass.h (make_pass_lower_switch_O0): New function.
16606 * tree-switch-conversion.c (node_has_low_bound): Remove.
16607 (node_has_high_bound): Likewise.
16608 (node_is_bounded): Likewise.
16609 (class pass_lower_switch): Make it a template type and create
16611 (pass_lower_switch::execute): Add template argument.
16612 (make_pass_lower_switch): New function.
16613 (make_pass_lower_switch_O0): New function.
16614 (do_jump_if_equal): Remove.
16615 (emit_case_nodes): Simplify to just handle all 3 cases and leave
16616 all the hard work to tree optimization passes.
16618 2018-05-18 Martin Liska <mliska@suse.cz>
16620 * dbgcnt.c (limit_low): Renamed from limit.
16621 (limit_high): New variable.
16622 (dbg_cnt_is_enabled): Check for upper limit.
16623 (dbg_cnt): Adjust dumping.
16624 (dbg_cnt_set_limit_by_index): Add new argument for high
16626 (dbg_cnt_set_limit_by_name): Likewise.
16627 (dbg_cnt_process_single_pair): Parse new format.
16628 (dbg_cnt_process_opt): Use strtok.
16629 (dbg_cnt_list_all_counters): Remove 'value' and add
16631 * doc/invoke.texi: Document changes.
16633 2018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
16635 * doc/sourcebuild.texi (scalar_all_fma): Document.
16636 * tree.def (FMA_EXPR): Delete.
16637 * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
16638 * internal-fn.c (ternary_direct): New macro.
16639 (expand_ternary_optab_fn): Likewise.
16640 (direct_ternary_optab_supported_p): Likewise.
16641 * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
16642 * builtins.c (fold_builtin_fma): Delete.
16643 (fold_builtin_3): Don't call it.
16644 * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
16645 * expr.c (expand_expr_real_2): Likewise.
16646 * fold-const.c (operand_equal_p): Likewise.
16647 (fold_ternary_loc): Likewise.
16648 * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
16649 * gimple.c (DEFTREECODE): Likewise.
16650 * gimplify.c (gimplify_expr): Likewise.
16651 * optabs-tree.c (optab_for_tree_code): Likewise.
16652 * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
16653 * tree-eh.c (operation_could_trap_p): Likewise.
16654 (stmt_could_throw_1_p): Likewise.
16655 * tree-inline.c (estimate_operator_cost): Likewise.
16656 * tree-pretty-print.c (dump_generic_node): Likewise.
16657 (op_code_prio): Likewise.
16658 * tree-ssa-loop-im.c (stmt_cost): Likewise.
16659 * tree-ssa-operands.c (get_expr_operands): Likewise.
16660 * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
16661 * fold-const-call.h (fold_fma): Delete.
16662 * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
16663 CFN_FNMA and CFN_FNMS.
16664 (fold_fma): Delete.
16665 * genmatch.c (combined_fn): New enum.
16666 (commutative_ternary_tree_code): Remove FMA_EXPR handling.
16667 (commutative_op): New function.
16668 (commutate): Use it. Handle more than 2 operands.
16669 (dt_operand::gen_gimple_expr): Use commutative_op.
16670 (parser::parse_expr): Allow :c to be used with non-binary
16671 operators if the commutative operand is known.
16672 * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
16673 CFN_FMS, CFN_FNMA and CFN_FNMS.
16674 (backprop::process_assign_use): Remove FMA_EXPR handling.
16675 * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
16676 (gen_hsa_fma): New function.
16677 (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
16678 IFN_FNMA and IFN_FNMS.
16679 * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
16680 * gimple-fold.h (follow_all_ssa_edges): Declare.
16681 * gimple-fold.c (follow_all_ssa_edges): New function.
16682 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
16683 gimple_build interface and use follow_all_ssa_edges to fold the result.
16684 (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
16685 instead of checking for optabs directly.
16686 * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
16687 rather than FMA_EXPRs.
16688 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
16689 call to IFN_FMA instead of an FMA_EXPR.
16691 2018-05-17 Jim Wilson <jimw@sifive.com>
16693 * expr.c (do_tablejump): When converting index to Pmode, if we have a
16694 sign extended promoted subreg, and the range does not have the sign bit
16695 set, then do a sign extend.
16697 * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
16698 test, check for sign extended subreg and/or constant operands, and
16699 do a sign extend in that case.
16701 2018-05-17 Steve Ellcey <sellcey@cavium.com>
16703 * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
16704 (thunderx2t99_multiple): Delete psuedo-units from used cpus.
16706 (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
16707 Change logics_shift_reg to logics_shift_imm.
16708 (thunderx2t99_fp_loadpair_basic): Delete.
16709 (thunderx2t99_fp_storepair_basic): Delete.
16710 (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
16711 (thunderx2t99_asimd_polynomial): Delete.
16712 (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
16713 and neon_fp_mul_d_scalar_q.
16714 (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
16715 (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
16716 (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
16717 (thunderx2t99_asimd_lut): Add missing tbl types.
16718 (thunderx2t99_asimd_ext): Delete.
16719 (thunderx2t99_asimd_load1_1_mult): Delete.
16720 (thunderx2t99_asimd_load1_2_mult): Delete.
16721 (thunderx2t99_asimd_load1_ldp): New.
16722 (thunderx2t99_asimd_load1): New.
16723 (thunderx2t99_asimd_load2): Add missing *load2* types.
16724 (thunderx2t99_asimd_load3): New.
16725 (thunderx2t99_asimd_load4): New.
16726 (thunderx2t99_asimd_store1_1_mult): Delete.
16727 (thunderx2t99_asimd_store1_2_mult): Delete.
16728 (thunderx2t99_asimd_store2_mult): Delete.
16729 (thunderx2t99_asimd_store2_onelane): Delete.
16730 (thunderx2t99_asimd_store_stp): New.
16731 (thunderx2t99_asimd_store1): New.
16732 (thunderx2t99_asimd_store2): New.
16733 (thunderx2t99_asimd_store3): New.
16734 (thunderx2t99_asimd_store4): New.
16736 2018-05-17 Jerome Lambourg <lambourg@adacore.com>
16738 * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
16739 #include <stdint.h>. Replace intptr_t with __INTPTR_TYPE__.
16741 2018-05-17 Pat Haugen <pthaugen@us.ibm.com>
16742 Segher Boessenkool <segher@kernel.crashing.org>
16745 * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
16748 2018-05-17 Richard Biener <rguenther@suse.de>
16750 * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
16751 for pruning loop and prune defs feeding only already visited PHIs.
16753 2018-05-17 Richard Biener <rguenther@suse.de>
16755 * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
16757 2018-05-17 Bin Cheng <bin.cheng@arm.com>
16758 Richard Biener <rguenther@suse.de>
16760 PR tree-optimization/85793
16761 * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
16762 for VMAT_ELEMENTWISE.
16764 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
16766 * internal-fn.h (lookup_internal_fn): Declare
16767 * internal-fn.c (lookup_internal_fn): New function.
16768 * gimple.c (gimple_build_call_from_tree): Handle calls to
16769 internal functions.
16770 * gimple-pretty-print.c (dump_gimple_call): Print "." before
16771 internal function names.
16772 * tree-pretty-print.c (dump_generic_node): Likewise.
16773 * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
16775 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
16777 * gimple-fold.h (gimple_build): Make the function forms take
16778 combined_fn rather than built_in_function.
16779 (gimple_simplify): Likewise.
16780 * gimple-match-head.c (gimple_simplify): Likewise.
16781 * gimple-fold.c (gimple_build): Likewise.
16782 * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
16783 rather than gimple_build_call_internal.
16784 (get_initial_defs_for_reduction): Likewise.
16785 (vect_create_epilog_for_reduction): Likewise.
16786 (vectorizable_live_operation): Likewise.
16788 2018-05-17 Martin Liska <mliska@suse.cz>
16790 * gimple-ssa-sprintf.c (format_directive): Do not use
16791 space in between 'G_' and '('.
16793 2018-05-17 Jakub Jelinek <jakub@redhat.com>
16796 * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
16797 even if the mask is not all ones.
16800 * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
16802 (ix86_gimple_fold_builtin): Likewise.
16805 * config/i386/i386.c: Include tree-vector-builder.h.
16806 (ix86_vector_shift_count): New function.
16807 (ix86_fold_builtin): Fold shift builtins by scalar count.
16808 (ix86_gimple_fold_builtin): Likewise.
16810 * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
16811 _mm512_setzero): New intrinsics.
16813 2018-05-17 James Greenhalgh <james.greenhalgh@arm.com>
16814 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16816 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
16817 code generation for cases where splatting a value is not useful.
16818 * simplify-rtx.c (simplify_ternary_operation): Simplify
16819 vec_merge across a vec_duplicate and a paradoxical subreg forming
16820 a vector mode to a vec_concat.
16822 2018-05-17 Olga Makhotina <olga.makhotina@intel.com>
16824 * config.gcc: Support "goldmont-plus".
16825 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
16827 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
16828 PROCESSOR_GOLDMONT_PLUS.
16829 * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
16830 (processor_target_table): Add "goldmont-plus".
16831 (PTA_GOLDMONT_PLUS): Define.
16832 (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
16833 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
16834 (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
16835 (fold_builtin_cpu): Add "goldmont-plus".
16836 (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
16837 (ix86_option_override_internal): Add "goldmont-plus".
16838 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
16839 (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
16840 * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
16841 * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
16843 2018-05-17 Richard Biener <rguenther@suse.de>
16845 PR tree-optimization/85757
16846 * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
16847 remove defs that only feed that PHI from further processing.
16849 2018-05-16 Jim Wilson <jimw@sifive.com>
16851 * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
16853 (<optab>di3_mask, <optab>di3_mask_1): Likewise.
16855 2018-05-16 Mark Wielaard <mark@klomp.org>
16857 * dwarf2out.c (count_index_strings): New function.
16858 (output_indirect_strings): Call count_index_strings and generate
16859 header for dwarf_version >= 5.
16861 2018-05-16 Mark Wielaard <mark@klomp.org>
16863 * dwarf2out.c (dwarf_FORM): New function.
16864 (set_indirect_string): Use dwarf_FORM.
16865 (reset_indirect_string): Likewise.
16866 (size_of_die): Likewise.
16867 (value_format): Likewise.
16868 (output_die): Likewise.
16869 (add_skeleton_AT_string): Likewise.
16870 (output_macinfo_op): Likewise.
16871 (index_string): Likewise.
16872 (output_index_string_offset): Likewise.
16873 (output_index_string): Likewise.
16874 (count_index_strings): Likewise.
16876 2018-05-16 Carl Love <cel@us.ibm.com>
16878 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
16879 dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
16881 2018-05-16 Martin Jambor <mjambor@suse.cz>
16883 * ipa-prop.c (ipa_free_all_edge_args): Remove.
16884 * ipa-prop.h (ipa_free_all_edge_args): Likewise.
16886 2018-05-16 Wilco Dijkstra <wdijkstr@arm.com>
16888 * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
16889 (fnma<mode>4): Likewise.
16890 (fms<mode>4): Likewise.
16891 (fnms<mode>4): Likewise.
16892 (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
16893 (aarch64_fnma<mode>4): Likewise.
16894 (aarch64_fms<mode>4): Likewise.
16895 (aarch64_fnms<mode>4): Likewise.
16896 (aarch64_fnmadd<mode>4): Likewise.
16898 2018-05-16 Jason Merrill <jason@redhat.com>
16900 * tree.c (warn_deprecated_use): Return bool. Simplify logic.
16902 2018-05-16 Richard Biener <rguenther@suse.de>
16904 * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
16905 (dump_stmt_cost): Declare.
16906 (add_stmt_cost): Dump cost we add.
16907 (add_stmt_costs): New function.
16908 (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
16909 No longer exported.
16910 (vect_analyze_stmt): Adjust prototype.
16911 (vectorizable_condition): Likewise.
16912 (vectorizable_live_operation): Likewise.
16913 (vectorizable_reduction): Likewise.
16914 (vectorizable_induction): Likewise.
16915 * tree-vect-loop.c (vect_analyze_loop_operations): Create local
16916 cost vector to pass to vectorizable_ and record afterwards.
16917 (vect_model_reduction_cost): Take cost vector argument and adjust.
16918 (vect_model_induction_cost): Likewise.
16919 (vectorizable_reduction): Likewise.
16920 (vectorizable_induction): Likewise.
16921 (vectorizable_live_operation): Likewise.
16922 * tree-vect-slp.c (vect_create_new_slp_node): Initialize
16923 SLP_TREE_NUMBER_OF_VEC_STMTS.
16924 (vect_analyze_slp_cost_1): Remove.
16925 (vect_analyze_slp_cost): Likewise.
16926 (vect_slp_analyze_node_operations): Take visited args and
16927 a target cost vector. Avoid processing already visited stmt sets.
16928 (vect_slp_analyze_operations): Use a local cost vector to gather
16929 costs and register those of non-discarded instances.
16930 (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
16931 (vect_schedule_slp_instance): Remove copying of
16932 SLP_TREE_NUMBER_OF_VEC_STMTS. Instead assert that it is not
16934 * tree-vect-stmts.c (record_stmt_cost): Remove path directly
16935 adding cost. Record cost entry location.
16936 (vect_prologue_cost_for_slp_op): Function to compute cost of
16937 a constant or invariant generated for SLP vect in the prologue,
16938 split out from vect_analyze_slp_cost_1.
16939 (vect_model_simple_cost): Make static. Adjust for SLP costing.
16940 (vect_model_promotion_demotion_cost): Likewise.
16941 (vect_model_store_cost): Likewise, make static.
16942 (vect_model_load_cost): Likewise.
16943 (vectorizable_bswap): Add cost vector arg and adjust.
16944 (vectorizable_call): Likewise.
16945 (vectorizable_simd_clone_call): Likewise.
16946 (vectorizable_conversion): Likewise.
16947 (vectorizable_assignment): Likewise.
16948 (vectorizable_shift): Likewise.
16949 (vectorizable_operation): Likewise.
16950 (vectorizable_store): Likewise.
16951 (vectorizable_load): Likewise.
16952 (vectorizable_condition): Likewise.
16953 (vectorizable_comparison): Likewise.
16954 (can_vectorize_live_stmts): Likewise.
16955 (vect_analyze_stmt): Likewise.
16956 (vect_transform_stmt): Adjust calls to vectorizable_*.
16957 * tree-vectorizer.c: Include gimple-pretty-print.h.
16958 (dump_stmt_cost): New function.
16960 2018-05-16 Richard Biener <rguenther@suse.de>
16962 * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
16963 * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
16964 * tree-ssa-dse.c: Include tree-ssa-loop.h.
16965 (check_name): New callback.
16966 (dse_classify_store): Track cycles via a visited bitmap of PHI
16967 defs and simplify handling of in-loop and across loop dead stores
16968 and properly fail for loop-variant refs. Handle byte-tracking with
16969 multiple defs. Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
16972 2018-05-16 Richard Sandiford <richard.sandiford@linaro.org>
16974 * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
16975 (vect_get_mask_type_for_stmt): Likewise.
16976 * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
16978 (vect_build_slp_tree_1): ...here. Use vect_get_vector_types_for_stmt
16979 to determine the statement's vector type and the vector type that
16980 should be used for calculating nunits. Deal with cases in which
16981 the type has to be deferred.
16982 (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
16983 and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
16984 * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
16985 (vect_determine_vf_for_stmt): New functions, split out from...
16986 (vect_determine_vectorization_factor): ...here.
16987 * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
16988 (vect_get_mask_type_for_stmt): New functions, split out from
16989 vect_determine_vectorization_factor.
16991 2018-05-16 Richard Biener <rguenther@suse.de>
16993 * tree-cfg.c (verify_gimple_assign_ternary): Properly
16994 verify the [VEC_]COND_EXPR embedded comparison.
16996 2018-05-15 Martin Sebor <msebor@redhat.com>
16998 PR tree-optimization/85753
16999 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
17000 RECORD_TYPE in addition to ARRAY_TYPE.
17002 2018-05-15 Martin Sebor <msebor@redhat.com>
17004 PR middle-end/85643
17005 * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
17007 2018-05-15 Richard Biener <rguenther@suse.de>
17009 * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
17010 add by_clobber_p one. Change algorithm to collect all defs
17011 representing uses we need to walk and try reducing them to
17012 a single one before failing.
17013 (dse_dom_walker::dse_optimize_stmt): Adjust.
17015 2018-05-13 Mark Wielaard <mark@klomp.org>
17017 * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
17018 (size_of_loc_descr): Likewise.
17019 (output_loc_operands): Likewise.
17020 (output_loc_operands_raw): Likewise.
17021 (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
17022 (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
17023 (hash_loc_operands): Likewise.
17024 (compare_loc_operands): Likewise.
17026 2018-05-14 Mark Wielaard <mark@klomp.org>
17028 * dwarf2out.c (count_index_addrs): New function.
17029 (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
17031 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
17033 PR tree-optimization/83648
17034 * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
17035 return value as malloc candidate.
17037 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
17040 * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite
17041 param as true in call to suggest_attribute.
17043 2018-05-14 Segher Boessenkool <segher@kernel.crashing.org>
17045 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
17046 -mreadonly-in-sdata.
17048 2018-05-14 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
17050 * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
17052 (aarch64_crypto_aesd_fused): Likewise.
17054 2018-05-14 Wilco Dijkstra <wdijkstr@arm.com>
17056 * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
17057 (movsi_aarch64): Likewise.
17058 (load_pairsi): Likewise.
17059 (load_pairdi): Likewise.
17060 (store_pairsi): Likewise.
17061 (store_pairdi): Likewise.
17062 (load_pairsf): Likewise.
17063 (load_pairdf): Likewise.
17064 (store_pairsf): Likewise.
17065 (store_pairdf): Likewise.
17066 (zero_extend): Likewise.
17067 (trunc): Swap alternatives.
17068 (fcvt_target): Add '?' to prefer w over r.
17070 2018-05-14 Jakub Jelinek <jakub@redhat.com>
17073 * config/i386/i386.md: Disallow non-commutative arithmetics in
17074 last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
17075 optimization. Use COMMUTATIVE_ARITH_P test rather than != MINUS
17076 in the peephole2 before it.
17078 2018-05-14 Sebastian Peryt <sebastian.peryt@intel.com>
17080 * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
17081 OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
17082 (ix86_handle_option): Handle -mcldemote.
17083 * config.gcc: New header.
17084 * config/i386/cldemoteintrin.h: New file.
17085 * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
17086 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
17088 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
17089 OPTION_MASK_ISA_CLDEMOTE.
17090 * config/i386/i386.c (ix86_target_string): Add -mcldemote.
17091 (ix86_valid_target_attribute_inner_p): Ditto.
17092 (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
17093 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
17094 (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
17095 * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
17096 * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
17098 * config/i386/i386.opt: Add -mcldemote.
17099 * config/i386/x86intrin.h: New header.
17100 * doc/invoke.texi: Add -mcldemote.
17102 2018-05-14 Richard Biener <rguenther@suse.de>
17104 * doc/match-and-simplify.texi: Adjust :s documentation.
17106 2018-05-14 Alexander Monakov <amonakov@ispras.ru>
17108 * sort.cc (REORDER_23): Pass the type for the temporaries instead of
17109 intended memcpy size.
17110 (REORDER_45): Likewise.
17112 2018-05-13 Alexander Monakov <amonakov@ispras.ru>
17114 * sort.cc: New file.
17115 * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
17116 * vec.c (qsort_chk): Use gcc_qsort.
17117 * Makefile.in (OBJS-libcommon): Add sort.o.
17118 (build/sort.o): New target. Use it...
17119 (BUILD_RTL): ... here, and...
17120 (build/gencfn-macros): ... here, and...
17121 (build/genmatch): ... here.
17123 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
17124 Chung-Ju Wu <jasonwucj@gmail.com>
17126 * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
17127 * config/nds32/nds32-graywolf.md: New file.
17128 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
17129 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
17131 * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
17132 * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
17133 * config/nds32/nds32.md (pipeline_model): Add graywolf.
17134 * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
17135 * config/nds32/pipelines.md: Include n15 settings.
17137 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
17138 Chung-Ju Wu <jasonwucj@gmail.com>
17140 * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
17141 * config/nds32/nds32-n13.md: New file.
17142 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
17143 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
17145 * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
17146 * config/nds32/nds32.md (pipeline_model): Add n13.
17147 * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
17148 * config/nds32/pipelines.md: Include n13 settings.
17150 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
17151 Chung-Ju Wu <jasonwucj@gmail.com>
17153 * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
17154 * config/nds32/nds32-n10.md: New file.
17155 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
17156 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
17158 * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
17159 * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
17160 * config/nds32/nds32.md (pipeline_model): Add n10.
17161 * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
17162 * config/nds32/pipelines.md: Include n10 settings.
17164 2018-05-13 Monk Chiang <sh.chiang04@gmail.com>
17165 Kito Cheng <kito.cheng@gmail.com>
17166 Chung-Ju Wu <jasonwucj@gmail.com>
17168 * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
17169 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
17170 Add enum values for DSP extension instructions.
17171 * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
17173 * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
17174 sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
17175 New code iterators.
17176 (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
17177 * config/nds32/nds32-dspext.md: New file for DSP implementation.
17178 * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
17179 * config/nds32/nds32-intrinsic.md: Likewise.
17180 * config/nds32/nds32_intrinsic.h: Likewise.
17181 * config/nds32/nds32-md-auxiliary.c: Likewise.
17182 * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
17183 * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
17184 (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
17185 (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
17186 * config/nds32/nds32-protos.h: New declarations for DSP extension.
17187 * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
17188 TYPE_DMAC in switch statement.
17189 * config/nds32/nds32.c: New checking and implementation for DSP
17190 extension instructions.
17191 * config/nds32/nds32.h: Likewise.
17192 * config/nds32/nds32.md: Likewise.
17193 * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
17194 * config/nds32/predicates.md: Implement new predicates for DSP
17197 2018-05-11 Michael Meissner <meissner@linux.vnet.ibm.com>
17199 * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
17200 Reformat alternatives and attributes so it is easier to identify
17201 which constraints/attributes go with which instruction.
17202 (mov<mode>_hardfloat32, FMOVE64): Likewise.
17203 (mov<mode>_softfloat32, FMOVE64): Likewise.
17204 (mov<mode>_hardfloat64, FMOVE64): Likewise.
17205 (mov<mode>_softfloat64, FMOVE64): Likewise.
17207 2018-05-11 Kelvin Nilsen <kelvin@gcc.gnu.org>
17209 * doc/extend.texi (PowerPC Built-in Functions): Rename this
17211 (Basic PowerPC Built-in Functions): The new name of the
17212 subsection previously known as "PowerPC Built-in Functions".
17213 (Basic PowerPC Built-in Functions Available on all Configurations):
17215 (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
17216 (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
17217 (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
17218 (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
17220 2018-05-11 Martin Jambor <mjambor@suse.cz>
17223 * ipa-cp.c (intersect_with_plats): Check that the lattice contains
17226 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
17229 * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
17231 2018-05-11 Sebastian Peryt <sebastian.peryt@intel.com>
17233 * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
17234 OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
17235 (ix86_handle_option): Handle -mwaitpkg.
17236 * config.gcc: New header.
17237 * config/i386/cpuid.h (bit_WAITPKG): New bit.
17238 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
17239 * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
17241 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
17242 OPTION_MASK_ISA_WAITPKG.
17243 * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
17244 (ix86_option_override_internal): Add PTA_WAITPKG.
17245 (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
17246 (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
17247 IX86_BUILTIN_TPAUSE.
17248 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
17249 __builtin_ia32_umwait and __builtin_ia32_tpause.
17250 (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
17251 IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
17252 * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
17253 * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
17254 UNSPECV_TPAUSE): New.
17255 (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
17256 * config/i386/i386.opt: Add -mwaitpkg.
17257 * config/i386/waitpkgintrin.h: New file.
17258 * config/i386/x86intrin.h: New header.
17259 * doc/invoke.texi: Add -mwaitpkg.
17261 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
17264 * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
17266 (cortex-m0): Use armv6s-m isa.
17267 (cortex-m0plus): Likewise.
17268 (cortex-m1): Likewise.
17269 (cortex-m0.small-multiply): Likewise.
17270 (cortex-m0plus.small-multiply): Likewise.
17271 (cortex-m1.small-multiply): Likewise.
17273 2018-05-11 Allan Sandfeld Jensen <allan.jensen@qt.io>
17274 Jakub Jelinek <jakub@redhat.com>
17276 PR tree-optimization/85692
17277 * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
17278 source permute as well.
17280 2018-05-11 Martin Liska <mliska@suse.cz>
17283 * doc/extend.texi: Document LLVM style format for no_sanitize
17286 2018-05-10 Michael Meissner <meissner@linux.vnet.ibm.com>
17288 * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
17289 mode_supports_vsx_dform_quad to mode_supports_dq_form.
17290 (mode_supports_vsx_dform_quad): Likewise.
17291 (mode_supports_vmx_dform): Move these functions to be next to the
17292 other mode_supports functions.
17293 (mode_supports_dq_form): Likewise.
17294 (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
17295 mode_supports_dq_form.
17296 (reg_offset_addressing_ok_p): Likewise.
17297 (offsettable_ok_by_alignment): Likewise.
17298 (rs6000_legitimate_offset_address_p): Likewise.
17299 (legitimate_lo_sum_address_p): Likewise.
17300 (rs6000_legitimize_address): Likewise.
17301 (rs6000_legitimize_reload_address): Likewise.
17302 (rs6000_secondary_reload_inner): Likewise.
17303 (rs6000_preferred_reload_class): Likewise.
17304 (rs6000_output_move_128bit): Likewise.
17306 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
17308 * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
17309 Generate SImode target register for null target.
17310 <case IX86_BUILTIN_XGETBV>: Ditto.
17311 <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
17312 * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
17314 2018-05-10 Carl Love <cel@us.ibm.com>
17316 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
17317 dcbtt and dcbtstt if operands[2] is 0.
17319 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
17322 * config/i386/sse.md (usadv64qi): New expander.
17324 2018-05-10 Segher Boessenkool <segher@kernel.crashing.org>
17326 * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
17327 altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
17328 -maltivec=be support.
17329 (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
17330 vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
17331 vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
17332 vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
17333 vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
17334 vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
17335 altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
17336 altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
17337 altivec_vsumsws): Adjust.
17338 (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
17339 *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
17340 altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
17342 (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
17343 altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
17344 altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
17345 (altivec_lve<VI_char>x): Delete expand.
17346 (*altivec_lve<VI_char>x_internal): Rename to...
17347 (altivec_lve<VI_char>x): ... this.
17348 (altivec_lvxl_<mode>): Delete expand.
17349 (*altivec_lvxl_<mode>_internal): Rename to ...
17350 (altivec_lvxl_<mode>): ... this.
17351 (altivec_stvxl_<mode>): Delete expand.
17352 (*altivec_stvxl_<mode>_internal): Rename to ...
17353 (altivec_stvxl_<mode>): ... this.
17354 (altivec_stve<VI_char>x): Delete expand.
17355 (*altivec_stve<VI_char>x_internal): Rename to ...
17356 (altivec_stve<VI_char>x): ... this.
17357 (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
17358 doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
17359 reduc_plus_scal_<mode>): Adjust.
17360 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
17362 (rs6000_cpu_cpp_builtins): Adjust.
17363 (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
17364 * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
17365 altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
17366 * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
17367 -maltivec=be support.
17368 (rs6000_split_vec_extract_var): Adjust.
17369 (rs6000_split_v4si_init): Adjust.
17370 (swap_selector_for_mode): Delete.
17371 (altivec_expand_lvx_be, altivec_expand_stvx_be,
17372 altivec_expand_stvex_be): Delete.
17373 (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
17374 -maltivec=be support.
17375 (rs6000_gimple_fold_builtin): Ditto.
17376 (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
17378 * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
17379 (TARGET_DIRECT_MOVE_64BIT): Adjust.
17380 * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
17381 * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
17382 * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
17383 unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
17384 vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
17385 *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
17386 *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
17387 *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
17388 anonymous split): Adjust.
17389 (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
17390 (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
17392 2018-05-10 Eric Botcazou <ebotcazou@adacore.com>
17394 * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
17395 when --with-gxx-include-dir is also specified.
17396 * configure: Regenerate.
17398 2018-05-09 Jim Wilson <jimw@sifive.com>
17401 * config.gcc (riscv*-*-*): Handle --with-multilib-list.
17402 * config/riscv/t-withmultilib: New.
17403 * config/riscv/withmultilib.h: New.
17404 * doc/install.texi: Document RISC-V --with-multilib-list support.
17406 2018-05-09 Richard Biener <rguenther@suse.de>
17408 * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
17410 (vect_bb_vectorization_profitable_p): Adjust. Compute
17411 actual scalar cost using the cost vector and the add_stmt_cost
17414 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
17416 PR rtl-optimization/85645
17417 * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
17418 in the REG_CFA_REGISTER note for LR, don't leave it empty.
17420 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
17422 PR rtl-optimization/85645
17423 * shrink-wrap.c (spread_components): Return a boolean saying if
17424 anything was changed.
17425 (try_shrink_wrapping_separate): Iterate spread_components until
17426 nothing changes anymore.
17428 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
17430 PR rtl-optimization/85645
17431 * regrename.c (build_def_use): Also kill the chains that include the
17432 destination of a REG_CFA_REGISTER note.
17434 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
17436 PR rtl-optimization/85645
17437 * regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
17438 insn that has a REG_CFA_REGISTER note.
17440 2018-05-09 Richard Sandiford <richard.sandiford@linaro.org>
17442 * cfgexpand.c (expand_clobber): New function.
17443 (expand_gimple_stmt_1): Use it.
17444 * tree-vect-stmts.c (vect_clobber_variable): New function,
17446 (vectorizable_simd_clone_call): ...here.
17447 (vectorizable_store): Emit a clobber either side of an
17448 IFN_STORE_LANES sequence.
17449 (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
17451 2018-05-09 Tom de Vries <tom@codesourcery.com>
17454 * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
17455 (define_insn "trap_if_false"): Add exit after trap.
17457 2018-05-09 Eric Botcazou <ebotcazou@adacore.com>
17459 PR rtl-optimization/85638
17460 * bb-reorder.c: Include common/common-target.h.
17461 (create_forwarder_block): New function extracted from...
17462 (fix_up_crossing_landing_pad): ...here. Rename into...
17463 (dw2_fix_up_crossing_landing_pad): ...this.
17464 (sjlj_fix_up_crossing_landing_pad): New function.
17465 (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
17466 call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
17467 from both partitions and exit the loop after one iteration.
17469 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
17472 * doc/extend.texi (PowerPC Built-in Functions): Rename this
17474 (Basic PowerPC Built-in Functions): The new name of the
17475 subsection previously known as "PowerPC Built-in Functions".
17476 (Basic PowerPC Built-in Functions Available on all Configurations):
17478 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
17480 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
17482 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
17484 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
17487 2018-05-08 Jim Wilson <jimw@sifive.com>
17489 * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
17490 (LD_EMUL_SUFFIX): New.
17491 (LINK_SPEC): Use it.
17493 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
17495 * doc/extend.texi (PowerPC Built-in Functions): Rename this
17497 (Basic PowerPC Built-in Functions): The new name of the
17498 subsection previously known as "PowerPC Built-in Functions".
17499 (Basic PowerPC Built-in Functions Available on all Configurations):
17501 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
17503 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
17505 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
17507 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
17510 2018-05-08 Jakub Jelinek <jakub@redhat.com>
17513 * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
17514 after cmpelim optimization.
17516 2018-05-08 Olga Makhotina <olga.makhotina@intel.com>
17518 * config.gcc: Support "goldmont".
17519 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
17520 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
17521 PROCESSOR_GOLDMONT.
17522 * config/i386/i386.c (m_GOLDMONT): Define.
17523 (processor_target_table): Add "goldmont".
17524 (PTA_GOLDMONT): Define.
17525 (ix86_lea_outperforms): Add TARGET_GOLDMONT.
17526 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
17527 (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
17528 (fold_builtin_cpu): Add "goldmont".
17529 (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
17530 (ix86_option_override_internal): Add "goldmont".
17531 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
17532 (processor_type): Add PROCESSOR_GOLDMONT.
17533 * config/i386/i386.md: Add CPU "glm".
17534 * config/i386/glm.md: New file.
17535 * config/i386/x86-tune.def: Add m_GOLDMONT.
17536 * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
17538 2018-05-08 Jakub Jelinek <jakub@redhat.com>
17541 * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
17543 * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
17544 VI1248_AVX512VL_AVX512BW. Handle V2DImode and V4DImode if not
17545 TARGET_AVX512VL using ix86_expand_sse2_abs. Formatting fixes.
17548 * config/i386/i386.c (ix86_fold_builtin): Handle
17549 IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
17552 * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
17553 (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
17555 2018-05-08 Richard Earnshaw <rearnsha@arm.com>
17558 * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
17559 (check_arch): Likewise.
17560 (check_fpu): Return the result rather than printing it.
17561 (end arch): Fix operator precedence.
17562 (end cpu): Likewise.
17563 (END): Print the result from check_fpu.
17565 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
17566 Alan Hayward <alan.hayward@arm.com>
17567 David Sherwood <david.sherwood@arm.com>
17569 * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
17570 (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
17571 (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
17572 (*fcmuo<mode>_and): New patterns.
17574 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
17576 * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
17577 (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
17578 (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
17579 (cmp_op, sve_imm_con): New code attributes.
17580 (SVE_COND_INT_CMP, imm_con): Delete.
17581 (cmp_op): Remove above unspecs from int attribute.
17582 * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
17584 (*cmp<cmp_op><mode>): ...this. Use UNSPEC_MERGE_PTRUE instead of
17585 comparison-specific unspecs.
17586 (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
17587 (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
17588 (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
17589 (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
17590 (*vec_fcm<cmp_op><mode>): Rename to...
17591 (*fcm<cmp_op><mode>): ...this and adjust likewise.
17592 (*vec_fcmuo<mode>): Rename to...
17593 (*fcmuo<mode>): ...this and adjust likewise.
17594 (*pred_fcm<cmp_op><mode>): New pattern.
17595 * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
17596 (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
17598 (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
17600 (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
17601 (aarch64_emit_sve_predicated_cond): New function.
17602 (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
17603 (aarch64_emit_unspec_cond_or): Replace with...
17604 (aarch64_emit_sve_or_conds): ...this new function. Use
17605 aarch64_emit_sve_ptrue_op for the individual comparisons and
17606 aarch64_emit_binop to OR them together.
17607 (aarch64_emit_inverted_unspec_cond): Replace with...
17608 (aarch64_emit_sve_inverted_cond): ...this new function. Use
17609 aarch64_emit_sve_ptrue_op for the comparison and
17610 aarch64_emit_unop to invert the result.
17611 (aarch64_expand_sve_vec_cmp_float): Update after the above
17612 changes. Use aarch64_emit_sve_ptrue_op for native comparisons.
17614 2018-05-07 Nathan Sidwell <nathan@acm.org>
17616 * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
17617 * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
17618 (Backwards Compatibility): Likewise.
17620 2018-05-07 Luis Machado <luis.machado@linaro.org>
17624 2018-05-07 Luis Machado <luis.machado@linaro.org>
17626 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
17627 <prefetch_dynamic_strides>: New const bool field.
17628 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
17629 prefetch_dynamic_strides.
17630 (exynosm1_prefetch_tune): Likewise.
17631 (thunderxt88_prefetch_tune): Likewise.
17632 (thunderx_prefetch_tune): Likewise.
17633 (thunderx2t99_prefetch_tune): Likewise.
17634 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
17636 (aarch64_override_options_internal): Update to set
17637 PARAM_PREFETCH_DYNAMIC_STRIDES.
17638 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
17639 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
17640 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
17641 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
17642 prefetch-dynamic-strides setting.
17644 2018-05-07 Luis Machado <luis.machado@linaro.org>
17646 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
17647 <minimum_stride>: New const int field.
17648 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
17649 minimum_stride field.
17650 (exynosm1_prefetch_tune): Likewise.
17651 (thunderxt88_prefetch_tune): Likewise.
17652 (thunderx_prefetch_tune): Likewise.
17653 (thunderx2t99_prefetch_tune): Likewise.
17654 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
17655 (aarch64_override_options_internal): Update to set
17656 PARAM_PREFETCH_MINIMUM_STRIDE.
17657 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
17658 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
17659 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
17660 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
17661 stride is constant and is below the minimum stride threshold.
17663 2018-05-07 Luis Machado <luis.machado@linaro.org>
17665 * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
17668 2018-05-07 Luis Machado <luis.machado@linaro.org>
17670 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
17671 <prefetch_dynamic_strides>: New const bool field.
17672 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
17673 prefetch_dynamic_strides.
17674 (exynosm1_prefetch_tune): Likewise.
17675 (thunderxt88_prefetch_tune): Likewise.
17676 (thunderx_prefetch_tune): Likewise.
17677 (thunderx2t99_prefetch_tune): Likewise.
17678 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
17680 (aarch64_override_options_internal): Update to set
17681 PARAM_PREFETCH_DYNAMIC_STRIDES.
17682 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
17683 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
17684 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
17685 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
17686 prefetch-dynamic-strides setting.
17688 2018-05-07 Luis Machado <luis.machado@linaro.org>
17690 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
17691 <minimum_stride>: New const int field.
17692 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
17693 minimum_stride field.
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 minimum_stride to 2048.
17699 (aarch64_override_options_internal): Update to set
17700 PARAM_PREFETCH_MINIMUM_STRIDE.
17701 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
17702 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
17703 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
17704 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
17705 stride is constant and is below the minimum stride threshold.
17707 2018-05-06 Jakub Jelinek <jakub@redhat.com>
17710 * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
17711 the type is addressable. Don't force op into register if it has
17714 2018-05-05 Roland McGrath <mcgrathr@google.com>
17717 * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
17718 any section for which we don't know a specific type it should have,
17719 regardless of name. Previously this was done only for the exact
17720 names ".init_array", ".fini_array", and ".preinit_array".
17721 (default_elf_asm_named_section): Add comment about
17722 relationship with default_section_type_flags and SECTION_NOTYPE.
17723 (get_section): Don't consider it a type conflict if one side has
17724 SECTION_NOTYPE and the other doesn't, as long as neither has the
17725 SECTION_BSS et al used in the default_section_type_flags logic.
17727 2018-05-05 Tom de Vries <tom@codesourcery.com>
17730 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
17731 (workaround_barsyncs): New function.
17732 (nvptx_reorg): Use workaround_barsyncs.
17733 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
17734 (define_expand "nvptx_membar_cta"): New define_expand.
17735 (define_insn "*nvptx_membar_cta"): New insn.
17737 2018-05-04 Pekka Jääskeläinen <pekka.jaaskelainen@parmance.com>
17739 * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
17740 To improve optimization opportunities.
17741 * builtin-types.def: The new needed builtin types for the above.
17743 2018-05-04 Richard Biener <rguenther@suse.de>
17745 * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
17746 * gimple-ssa-store-merging.c
17747 (imm_store_chain_info::output_merged_store): Remove redundant create,
17748 release split_store vector contents on failure.
17749 * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
17750 scalar stmt vector on cache hit.
17752 2018-05-04 Segher Boessenkool <segher@kernel.crashing.org>
17754 * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
17756 * config.gcc (powerpc-xilinx-eabi*): Remove.
17757 * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
17759 (fusion_addis_mem_combo_load): Ditto.
17760 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
17762 (rs6000_cpu_cpp_builtins): Ditto.
17763 * config/rs6000/rs6000-linux.c
17764 (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
17765 * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
17766 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
17768 (rs6000_setup_reg_addr_masks): Ditto.
17769 (rs6000_init_hard_regno_mode_ok): Ditto.
17770 (rs6000_option_override_internal): Ditto.
17771 (legitimate_lo_sum_address_p): Ditto.
17772 (rs6000_legitimize_address): Ditto.
17773 (rs6000_legitimize_reload_address): Ditto.
17774 (rs6000_legitimate_address_p): Ditto.
17775 (abi_v4_pass_in_fpr): Ditto.
17776 (setup_incoming_varargs): Ditto.
17777 (rs6000_gimplify_va_arg): Ditto.
17778 (rs6000_split_multireg_move): Ditto.
17779 (rs6000_savres_strategy): Ditto.
17780 (rs6000_emit_prologue_components): Ditto.
17781 (rs6000_emit_epilogue_components): Ditto.
17782 (rs6000_emit_prologue): Ditto.
17783 (rs6000_emit_epilogue): Ditto.
17784 (rs6000_elf_file_end): Ditto.
17785 (rs6000_function_value): Ditto.
17786 (rs6000_libcall_value): Ditto.
17787 * config/rs6000/rs6000.h: Ditto.
17788 (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
17789 (TARGET_MINMAX): ... this. New.
17790 (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
17791 * config/rs6000/rs6000.md: Remove Xilinx FP support.
17792 (*movsi_internal1_single): Delete.
17793 * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
17794 mfpu=, mxilinx-fpu): Delete.
17795 * config/rs6000/singlefp.h: Delete.
17796 * config/rs6000/sysv4.h: Remove Xilinx FP support.
17797 * config/rs6000/t-rs6000: Ditto.
17798 * config/rs6000/t-xilinx: Delete.
17799 * config/rs6000/titan.md: Adjust for fp_type removal.
17800 * config/rs6000/vsx.md: Remove Xilinx FP support.
17801 (VStype_simple): Delete.
17802 (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
17803 * config/rs6000/xfpu.h: Delete.
17804 * config/rs6000/xfpu.md: Delete.
17805 * config/rs6000/xilinx.h: Delete.
17806 * config/rs6000/xilinx.opt: Delete.
17807 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove
17808 -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
17810 2018-05-04 Tom de Vries <tom@codesourcery.com>
17813 * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
17816 2018-05-04 Richard Biener <rguenther@suse.de>
17818 PR middle-end/85627
17819 * tree-complex.c (update_complex_assignment): We are always in SSA form.
17820 (expand_complex_div_wide): Likewise.
17821 (expand_complex_operations_1): Likewise.
17822 (expand_complex_libcall): Preserve EH info of the original stmt.
17823 (tree_lower_complex): Handle removed blocks.
17824 * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
17825 on complex multiplication and division libcall builtins.
17827 2018-05-04 Richard Biener <rguenther@suse.de>
17829 PR middle-end/85574
17830 * fold-const.c (negate_expr_p): Restrict negation of operand
17831 zero of a division to when we know that can happen without
17833 (fold_negate_expr_1): Likewise.
17835 2018-05-04 Jakub Jelinek <jakub@redhat.com>
17838 * real.h (real_nextafter): Declare.
17839 * real.c (real_nextafter): New function.
17840 * fold-const-call.c (fold_const_nextafter): New function.
17841 (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
17842 CASE_CFN_NEXTTOWARD.
17843 (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
17844 even when arg1_mode is different from arg0_mode.
17846 2018-05-03 Nathan Sidwell <nathan@acm.org>
17848 * doc/extend.texi (Deprecated Features): Remove
17849 -ffriend-injection.
17850 (Backwards Compatibility): Likewise.
17851 * doc/invoke.texi (C++ Language Options): Likewise.
17852 (C++ Dialect Options): Likewise.
17854 2018-05-03 Jakub Jelinek <jakub@redhat.com>
17857 * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
17858 _mm512_mask_mullox_epi64): New intrinsics.
17860 2018-05-03 Tom de Vries <tom@codesourcery.com>
17863 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
17864 dump files): Add offload-tree.
17866 2018-05-03 Richard Biener <rguenther@suse.de>
17868 PR tree-optimization/85615
17869 * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
17870 to loops not nested in BBs loop father to avoid creating multi-entry
17873 2018-05-03 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
17875 PR tree-optimization/70291
17876 * tree-complex.c (expand_complex_libcall): Add type, inplace_p
17877 arguments. Change return type to tree. Emit libcall as a new
17878 statement rather than replacing existing one when inplace_p is true.
17879 (expand_complex_multiplication_components): New function.
17880 (expand_complex_multiplication): Expand floating-point complex
17881 multiplication using the above.
17882 (expand_complex_division): Rename inner_type parameter to type.
17883 Update expand_complex_libcall call-site.
17884 (expand_complex_operations_1): Update expand_complex_multiplication
17885 and expand_complex_division call-sites.
17887 2018-05-02 Jakub Jelinek <jakub@redhat.com>
17890 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
17891 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
17892 *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
17893 the highest significant bit of the shift count mask is clear. In
17894 check whether and[sq]i3 is needed verify that all significant bits
17895 of the shift count other than the highest are set.
17897 2018-05-02 Tom de Vries <tom@codesourcery.com>
17900 * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
17901 * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
17902 (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
17903 * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
17904 (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
17905 * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
17906 __builtin_goacc_parlevel_size.
17908 2018-05-02 Richard Biener <rguenther@suse.de>
17910 PR tree-optimization/85597
17911 * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
17912 do not use split vect_get_vec_defs call but call vect_get_slp_defs
17915 2018-05-02 Tom de Vries <tom@codesourcery.com>
17918 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
17919 dump files): Add ltrans-tree.
17921 2018-05-02 Tom de Vries <tom@codesourcery.com>
17924 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
17925 dump files): Add wpa-ipa.
17927 2018-05-02 Segher Boessenkool <segher@kernel.crashing.org>
17929 * config.gcc (powerpc*-*-*): Remove paired.h. Unsupport the
17930 powerpc*-*-linux*paired* target.
17931 * config/rs6000/750cl.h: Delete.
17932 * config/rs6000/paired.h: Delete.
17933 * config/rs6000/paired.md: Delete.
17934 * config/rs6000/predicates.md (easy_vector_constant): Remove paired
17936 * config/rs6000/rs6000-builtin.def: Remove paired float support.
17937 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
17938 comment. Remove paired float support.
17939 * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
17940 * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
17942 * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
17943 paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
17945 * config/rs6000/rs6000.c: Remove paired float support.
17946 (paired_expand_vector_init, paired_expand_vector_move,
17947 paired_emit_vector_compare, paired_emit_vector_cond_expr,
17948 (paired_expand_lv_builtin, paired_expand_stv_builtin,
17949 paired_expand_builtin, paired_expand_predicate_builtin,
17950 paired_init_builtins): Delete.
17951 * config/rs6000/rs6000.h: Remove paired float support.
17952 * config/rs6000/rs6000.md: Remove paired float support.
17953 (move_from_CR_ov_bit): Delete.
17954 * config/rs6000/rs6000.opt (mpaired): Delete.
17955 * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
17956 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
17958 2018-05-02 Richard Biener <rguenther@suse.de>
17960 PR middle-end/85567
17961 * gimplify.c (gimplify_save_expr): When in SSA form allow
17962 SAVE_EXPRs to compute to SSA vars.
17964 2018-05-02 Jakub Jelinek <jakub@redhat.com>
17967 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
17968 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
17969 *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
17970 clobber operands[2], instead use a new pseudo. Formatting fixes.
17972 2018-05-02 Richard Sandiford <richard.sandiford@linaro.org>
17974 PR tree-optimization/85586
17975 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
17976 exit early for statements in the same group if the accesses are
17979 2018-05-02 Tom de Vries <tom@codesourcery.com>
17982 * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
17985 2018-05-01 Marc Glisse <marc.glisse@inria.fr>
17987 PR tree-optimization/85143
17988 * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
17990 2018-05-01 Tom de Vries <tom@codesourcery.com>
17993 * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
17994 not found" error message.
17996 2018-05-01 Tom de Vries <tom@codesourcery.com>
17999 * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
18000 * vec.c (test_ordered_remove_if): New function.
18001 (vec_c_tests): Call test_ordered_remove_if.
18002 * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
18003 * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
18004 * tree-vect-patterns.c (vect_pattern_recog_1): Use
18005 VEC_ORDERED_REMOVE_IF.
18007 2018-05-01 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
18009 PR tree-optimization/82665
18010 * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
18011 pointer subtraction where arguments come from a memchr call.
18013 2018-05-01 Jakub Jelinek <jakub@redhat.com>
18015 * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
18016 --push-state --as-needed and --pop-state instead of --as-needed and
18017 --no-as-needed if ld supports it.
18018 * configure: Regenerated.
18021 * doc/install.texi2html: Replace _002d with - and _002a with * in
18022 generated html files using sed.
18024 2018-04-30 David Malcolm <dmalcolm@redhat.com>
18027 * gcc-rich-location.c (blank_line_before_p): New function.
18028 (use_new_line): New function.
18029 (gcc_rich_location::add_fixit_insert_formatted): New function.
18030 * gcc-rich-location.h
18031 (gcc_rich_location::add_fixit_insert_formatted): New function.
18033 2018-04-30 David Malcolm <dmalcolm@redhat.com>
18035 * selftest.c (assert_streq): Rename "expected" and "actual" to
18036 "val1" and "val2". Extend NULL-handling to cover both inputs
18037 symmetrically, while still requiring both to be non-NULL for a pass.
18038 * selftest.h (assert_streq): Rename "expected" and "actual" to
18040 (ASSERT_EQ): Likewise.
18041 (ASSERT_EQ_AT): Likewise.
18042 (ASSERT_KNOWN_EQ): Likewise.
18043 (ASSERT_KNOWN_EQ_AT): Likewise.
18044 (ASSERT_NE): Likewise.
18045 (ASSERT_MAYBE_NE): Likewise.
18046 (ASSERT_MAYBE_NE_AT): Likewise.
18047 (ASSERT_STREQ): Likewise. Clarify that both must be non-NULL for
18048 the assertion to pass.
18049 (ASSERT_STREQ_AT): Likewise.
18051 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
18053 * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
18054 interaction with -pie.
18056 2018-04-30 David Malcolm <dmalcolm@redhat.com>
18058 * selftest.h: Fix alphabetization of per-source-file selftest
18061 2018-04-30 Jason Merrill <jason@redhat.com>
18063 PR c++/61982 - dead stores to destroyed objects.
18064 * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
18067 2018-04-30 Jason Merrill <jason@redhat.com>
18069 * tree.c (build_clobber): New.
18070 * tree.h: Declare it.
18071 * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
18073 2018-04-30 David Malcolm <dmalcolm@redhat.com>
18075 * diagnostic-show-locus.c (layout::layout): Update for
18076 location_get_source_line returning a char_span.
18077 (struct char_span): Move to input.h.
18078 (struct correction): Update for fields in char_span becoming
18080 (struct source_line): Update for location_get_source_line
18081 returning a char_span.
18082 (layout::print_line): Likewise.
18083 * edit-context.c (edited_file::print_content): Likewise.
18084 (edited_file::print_diff_hunk): Likewise.
18085 (edited_file::print_run_of_changed_lines): Likewise.
18086 (edited_file::get_num_lines): Likewise.
18087 (edited_line::edited_line): Likewise.
18088 * final.c (asm_show_source): Likewise.
18089 * input.c (location_get_source_line): Convert return type
18090 from const char * to char_span, losing the final "line_len"
18092 (dump_location_info): Update for the above.
18093 (get_substring_ranges_for_loc): Likewise. Use a char_span
18094 when handling the literal within the line.
18095 (test_reading_source_line): Update for location_get_source_line
18096 returning a char_span.
18097 * input.h (class char_span): Move here from
18098 diagnostic-show-locus.c, converting from a struct to a class.
18099 Make data members private.
18100 (char_span::operator bool): New.
18101 (char_span::length): New.
18102 (char_span::get_buffer): New.
18103 (char_span::operator[]): New.
18104 (char_span::subspan): Make const.
18105 (char_span::xstrdup): New.
18106 (location_get_source_line): Convert return type from const char *
18107 to char_span, losing the final "line_size" param.
18109 2018-04-30 Jan Hubicka <jh@suse.cz>
18111 * lto-wrapper.c (ltrans_priorities): New static var.
18112 (cmp_priority): New.
18113 (run_gcc): Read priorities and if doing parallel build order
18114 the Makefile by them.
18116 2018-04-30 David Malcolm <dmalcolm@redhat.com>
18118 * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
18120 2018-04-30 Richard Biener <rguenther@suse.de>
18122 * tree-cfg.c (verify_address): Remove base argument, add
18123 flag whether to check TREE_ADDRESSABLE and do that.
18124 (verify_expr): Remove.
18125 (verify_types_in_gimple_reference): Add pieces from verify_expr.
18126 (verify_gimple_assign_single): Likewise.
18127 (verify_gimple_switch): Likewise.
18128 (verify_expr_location_1): Dereference tp once. Add (disabled)
18129 piece from verify_expr.
18130 (verify_gimple_in_cfg): Do not call verify_expr on all ops.
18132 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
18134 * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
18136 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
18138 * config/arc/arc-protos.h (prepare_extend_operands): Remove.
18139 (small_data_pattern): Likewise.
18140 (arc_rewrite_small_data): Likewise.
18141 * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
18142 (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
18143 (get_symbol_alignment): New function.
18144 (legitimate_small_data_address_p): Likewise.
18145 (legitimate_scaled_address): Update, call
18146 legitimate_small_data_address_p.
18147 (output_sdata): New static variable.
18148 (arc_print_operand): Update how we handle small data operands.
18149 (arc_print_operand_address): Likewise.
18150 (arc_legitimate_address_p): Update, use
18151 legitimate_small_data_address_p.
18152 (arc_rewrite_small_data_p): Remove.
18153 (arc_rewrite_small_data_1): Likewise.
18154 (arc_rewrite_small_data): Likewise.
18155 (small_data_pattern): Likewise.
18156 (compact_sda_memory_operand): Update to use
18157 legitimate_small_data_address_p and get_symbol_alignment.
18158 (prepare_move_operands): Don't rewite sdata pattern.
18159 (prepare_extend_operands): Remove.
18160 * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
18162 (zero_extendqisi2): Likewise.
18163 (zero_extendhisi2): Likewise.
18164 (extendqihi2): Likewise.
18165 (extendqisi2): Likewise.
18166 (extendhisi2): Likewise.
18167 (addsi3): Likewise.
18168 (subsi3): Likewise.
18169 (andsi3): Likewise.
18170 * config/arc/constraints.md (Usd): Change it to memory constraint.
18172 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
18174 * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
18175 as source of std instructions.
18176 * config/arc/arc.md (movsi_insn): Update pattern predicate to
18177 allow 6-bit constants as source for store instructions.
18178 (movdi_insn): Update instruction pattern to allow 6-bit constants
18179 as source for store instructions.
18181 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
18183 * doc/invoke.texi (-fdebug-types-section): Fix grammar.
18185 2018-04-30 Nathan Sidwell <nathan@acm.org>
18186 Sandra Loosemore <sandra@codesourcery.com>
18188 * dumpfile.c (dump_open): Allow '-' for stdout.
18189 * doc/invoke.texi (Developer Options): Document dump filename
18190 determination early. Document stdin/stdout selection.
18192 2018-04-30 Andrew Sadek <andrew.sadek.se@gmail.com>
18194 Microblaze Target: PIC data text relative
18196 * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
18197 * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
18199 * config/microblaze/microblaze.h (microblaze_constant_address_p):
18200 CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
18201 * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
18202 New addressing mode for data-text relative position indepenedent code.
18203 (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
18204 'ADDRESS_SYMBOLIC_TXT_REL'.
18205 (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
18206 (microblaze_legitimate_pic_operand): Exclude function calls from
18207 pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
18208 (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
18210 (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
18211 (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
18212 (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
18213 for 'address + offset'.
18214 (microblaze_expand_prologue): Add new function prologue call for
18216 (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
18217 'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
18218 table in case of TARGET_PIC_DATA_TEXT_REL.
18219 (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
18220 * config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
18221 Add new macros 'UNSPEC_TEXT',
18222 'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
18223 + exclude function calls from 'UNSPEC_PLT' in case of data text
18225 * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
18226 new target hook for generating address diff vector tables in case of
18228 * doc/tm.texi : Regenerate.
18229 * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
18230 'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
18231 of addr diff vector generation.
18232 * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
18233 target hook definition.
18234 * targhooks.h, targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
18235 Add default function for generate_pic_addr_diff_vec -> flag_pic.
18236 * doc/invoke.texi (Add new pic option): Add new microblaze pic
18237 option for data text relative.
18239 2018-04-30 Richard Biener <rguenther@suse.de>
18241 * tree-chrec.h (evolution_function_is_constant_p): Remove
18243 * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
18245 2018-04-30 Richard Biener <rguenther@suse.de>
18248 * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
18250 2018-04-30 Richard Biener <rguenther@suse.de>
18252 PR tree-optimization/28364
18253 PR tree-optimization/85275
18254 * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
18255 copying first exit test.
18257 2018-04-28 Mark Wielaard <mark@klomp.org>
18259 * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
18260 dwarf_version >= 5.
18261 (dwarf_AT): Handle DW_AT_addr_base.
18262 (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
18264 2018-04-28 Uros Bizjak <ubizjak@gmail.com>
18267 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
18268 (*ashl<dwi>3_doubleword_mask_1): Ditto.
18269 (*<shift_insn><dwi>3_doubleword_mask): Ditto.
18270 (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
18272 2018-04-28 Richard Biener <rguenther@suse.de>
18274 * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
18275 (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
18276 to reflect use. Only add interesting stmts.
18278 2018-04-27 Martin Jambor <mjambor@suse.cz>
18281 * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
18282 the jump function allows for passing through aggregate values.
18284 2018-04-27 David Malcolm <dmalcolm@redhat.com>
18286 * input.h (in_system_header_at): Convert from macro to inline
18288 (from_macro_expansion_at): Likewise.
18289 (from_macro_definition_at): Likewise.
18291 2018-04-27 Jeff Law <law@redhat.com>
18293 * config.gcc: Mark tile* targets as deprecated/obsolete.
18295 2018-04-27 Richard Biener <rguenther@suse.de>
18297 * config/aarch64/aarch64.c: Simplify ap.__stack advance and
18300 2018-04-27 Richard Biener <rguenther@suse.de>
18302 * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
18304 2018-04-27 Uros Bizjak <ubizjak@gmail.com>
18306 * config/i386/i386.md (*movti_internal): Substitute Ye constraint
18307 with Yd constraint. Set "preferred_for_speed" attribute from
18308 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
18309 with Yd constraint.
18310 (*movdi_internal): Ditto.
18311 (movti_interunit splitters): Remove
18312 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
18313 (movdi_interunit splitters): Ditto.
18314 * config/i386/constraints.md (Ye): Remove.
18315 (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
18317 2018-04-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
18320 * config/aarch64/constraints.md (Usg): Limit to 31.
18321 (Usj): Limit to 63.
18323 2018-04-27 Jakub Jelinek <jakub@redhat.com>
18325 PR tree-optimization/85529
18326 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
18327 argument. Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
18328 rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
18329 zero extension or masking of the MSB bit.
18330 (optimize_range_tests): Add FIRST_BB argument, pass it through
18331 to optimize_range_tests_var_bound.
18332 (maybe_optimize_range_tests, reassociate_bb): Adjust
18333 optimize_range_tests callers.
18335 2018-04-26 Richard Biener <rguenther@suse.de>
18336 Jakub Jelinek <jakub@redhat.com>
18338 * cgraph.h (symbol_table): Just declare debug method here.
18339 * symtab.c (symbol_table::debug): Define.
18341 2018-04-26 Eric Botcazou <ebotcazou@adacore.com>
18343 * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
18345 2018-04-26 Uros Bizjak <ubizjak@gmail.com>
18347 * config/i386/i386.md ("isa" attribute): Add x64_sse2.
18348 ("enabled" attribute): Handle x64_sse2 "isa" attribute.
18349 (*movdi_internal): Substitute Yi and Yj constraint with x
18350 and Ym and Yn constraint with y constraint. Update "isa"
18351 attribute and set "preferred_for_speed" attribute from
18352 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
18353 (*movsi_internal): Ditto.
18354 (*movdf_internal): Ditto.
18355 (*movsf_internal): Ditto.
18356 (*zero_extendsidi2): Ditto.
18357 * config/i386/sse.md (vec_set<mode>_0): Ditto.
18358 (sse2_loadld): Ditto.
18359 (*vec_extract<ssevecmodelower>_0): Ditto.
18360 (*vec_extractv4si_0_zext_sse4): Ditto.
18361 (vec_concatv2di): Ditto.
18362 (*vec_dup<mode>): Ditto.
18363 * config/i386/mmx.md (*mov<mode>_internal): Ditto.
18364 * config/i386/constraints.md (Yi): Remove.
18369 2018-04-26 Nathan Sidwell <nathan@acm.org>
18371 * dumpfile.c (dump_open): New.
18372 (dump_open_alternate_stream, dump_start, dump_begin): Call it.
18373 (dump_finish): Detect stdio/stderr by value not name.
18375 2018-04-26 Jonathan Wakely <jwakely@redhat.com>
18377 * doc/invoke.texi (-Wreturn-type): Document default status for C++.
18379 2018-04-26 Tom de Vries <tom@codesourcery.com>
18382 * config/nvptx/nvptx.c (verify_neutering_jumps)
18383 (verify_neutering_labels): New function
18384 (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
18386 2018-04-26 Tom de Vries <tom@codesourcery.com>
18389 * config/nvptx/nvptx.c (needs_neutering_p): New function.
18390 (nvptx_single): Use needs_neutering_p to skip over insns that do not
18393 2018-04-26 Richard Biener <rguenther@suse.de>
18394 Tom de Vries <tom@codesourcery.com>
18397 * lto-streamer-out.c (output_function): Fixup loops if required to match
18398 discovery done in the reader.
18400 2018-04-26 Richard Biener <rguenther@suse.de>
18402 PR tree-optimization/85116
18403 * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
18404 have a loop exit from the single latch predecessor. Remove
18405 case of header with just condition.
18406 (ch_base::copy_headers): Exclude infinite loops from any
18408 (pass_ch::execute): Record exits.
18410 2018-04-26 Richard Biener <rguenther@suse.de>
18412 * tree-vect-data-refs.c (vect_get_data_access_cost): Get
18413 prologue cost vector and pass it to vect_get_load_cost.
18414 (vect_get_peeling_costs_all_drs): Likewise.
18415 (vect_peeling_hash_get_lowest_cost): Likewise.
18416 (vect_enhance_data_refs_alignment): Likewise.
18418 2018-04-26 Richard Biener <rguenther@suse.de>
18420 PR middle-end/85450
18421 * tree-cfg.c (verify_gimple_assign_unary): Restore proper
18422 checking of integer<->pointer conversions.
18423 * omp-expand.c (expand_omp_for_static_nochunk): Avoid
18424 sign-/zero-extending pointer types.
18425 (expand_omp_for_static_chunk): Likewise.
18427 2018-03-22 Hans-Peter Nilsson <hp@axis.com>
18428 Jean Lee <xiaoyur347@gmail.com>
18430 * config/mips/mips.c (mips_asan_shadow_offset): New function.
18431 (TARGET_ASAN_SHADOW_OFFSET): Define.
18432 * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
18433 true for -fsanitize=address.
18435 2018-04-25 Mark Wielaard <mark@klomp.org>
18437 * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
18440 2018-04-25 Jakub Jelinek <jakub@redhat.com>
18442 * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
18443 than "alu", remove explicit "memory" and "imm_disp" attributes.
18444 (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
18446 PR middle-end/85414
18447 * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
18448 case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
18449 gen_lowpart_no_emit.
18451 2018-04-25 Sebastian Peryt <sebastian.peryt@intel.com>
18454 * config/i386/i386.c (ix86_expand_builtin): Change memory
18455 operand to XI, extend p0 to Pmode.
18456 * config/i386/i386.md: Change unspec volatile and operand
18457 1 mode to XI, change operand 0 mode to P.
18459 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
18461 * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
18462 GET_MODE_MASK before any checking.
18463 (nds32_can_use_bset_p): Likewise.
18464 (nds32_can_use_btgl_p): Likewise.
18466 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
18468 * config/nds32/nds32-doubleword.md: New define_split pattern for
18469 illegal register number.
18471 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
18473 * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
18475 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
18477 * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
18479 2018-04-25 Richard Biener <rguenther@suse.de>
18481 * lto-streamer.h (LTO_major_version): Bump to 8.
18483 2018-04-25 Jakub Jelinek <jakub@redhat.com>
18485 * BASE-VER: Set to 9.0.0.
18487 2018-04-24 Segher Boessenkool <segher@kernel.crashing.org>
18489 * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
18490 in __abskf2 and __powikf2.
18492 2018-04-24 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
18495 * config/aarch64/constraints.md (Usg, Usj): New constraints.
18496 * config/aarch64/iterators.md (cmode_simd): New mode attribute.
18497 * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
18498 Use the above on operand 2. Reindent.
18499 (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
18501 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
18504 * common/config/i386/i386-common.c (ix86_handle_option): Don't
18506 * config/i386/i386.opt (mcet): Removed.
18507 * doc/install.texi: Remove -mcet documentation.
18508 * doc/invoke.texi: Likewise.
18510 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
18513 * doc/install.texi: Remove -mcet from bootstrap-cet.
18515 2018-04-24 Jakub Jelinek <jakub@redhat.com>
18518 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
18519 __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
18523 * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
18524 const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
18525 containing a CONST_VECTOR.
18527 2018-04-24 Cesar Philippidis <cesar@codesourcery.com>
18529 * doc/install.texi: Update newlib dependency for nvptx.
18531 2018-04-24 Jakub Jelinek <jakub@redhat.com>
18534 * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
18535 instead of INTVAL when shifting x left.
18537 2018-04-24 Andreas Krebbel <krebbel@linux.ibm.com>
18539 PR tree-optimization/85478
18540 * tree-vect-loop.c (vect_analyze_loop_2): Do not call
18541 vect_grouped_store_supported for single element vectors.
18543 2018-04-24 Richard Biener <rguenther@suse.de>
18546 * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
18547 load cost increase to the case of non-constant step.
18549 2018-04-24 Jakub Jelinek <jakub@redhat.com>
18552 * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
18553 destination if any_malformed_asm.
18555 2018-04-23 Eric Botcazou <ebotcazou@adacore.com>
18557 PR middle-end/85496
18558 * expr.c (store_field): In the bitfield case, if the value comes from
18559 a function call and is returned in registers by means of a PARALLEL,
18560 do not change the mode of the temporary unless BLKmode and VOIDmode.
18562 2018-04-23 Andrey Belevantsev <abel@ispras.ru>
18564 PR rtl-optimization/85423
18565 * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
18566 dependencies to debug insns when the previous insn is non-debug.
18568 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
18570 * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
18571 enums into a single definition.
18572 (fls): Fix predicates and printing.
18575 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
18577 * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
18578 * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
18579 and short u6 immediate.
18580 (check_if_valid_sleep_operand): Remove.
18581 * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
18583 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
18585 * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
18586 flag_always_save_lp condition.
18587 * config/nds32/nds32.opt (malways-save-lp): New option.
18589 2018-04-22 Shiva Chen <shiva0217@gmail.com>
18591 * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
18592 * config/nds32/nds32.c (nds32_use_load_post_increment): New.
18593 * config/nds32/nds32.h
18594 (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
18595 (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
18597 2018-04-22 Shiva Chen <shiva0217@gmail.com>
18599 * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
18600 * config/nds32/nds32.c (nds32_ls_333_p): Remove.
18602 2018-04-22 Shiva Chen <shiva0217@gmail.com>
18603 Chung-Ju Wu <jasonwucj@gmail.com>
18605 * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
18607 * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
18608 * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
18610 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
18612 * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
18614 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
18616 * config/nds32/nds32-protos.h (nds32_data_alignment,
18617 nds32_local_alignment): Declare.
18618 * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
18619 nds32_local_alignment): New functions.
18620 (TARGET_CONSTANT_ALIGNMENT): Define.
18621 * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
18623 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
18625 * config/nds32/nds32.c
18626 (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
18627 (TARGET_MODES_TIEABLE_P): Likewise.
18629 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
18631 * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
18632 level Ofast and Og.
18634 2018-04-22 Monk Chiang <sh.chiang04@gmail.com>
18635 Chung-Ju Wu <jasonwucj@gmail.com>
18637 * config/nds32/constants.md (unspec_volatile_element): Add enum values
18638 for unaligned access.
18639 * config/nds32/nds32-intrinsic.c: Implementation of expanding
18641 * config/nds32/nds32-intrinsic.md: Likewise.
18642 * config/nds32/nds32_intrinsic.h: Likewise.
18643 * config/nds32/nds32.h (nds32_builtins): Likewise.
18644 * config/nds32/nds32.opt (munaligned-access): New option.
18645 * config/nds32/nds32.c (nds32_asm_file_start): Display
18646 flag_unaligned_access status.
18648 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
18650 * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
18651 -mno-relax is present.
18652 * config/riscv/linux.h (LINK_SPEC): Ditto.
18654 2018-04-20 Martin Sebor <msebor@redhat.com>
18657 * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
18659 (gimple_fold_builtin_stxcpy_chk): Same.
18660 * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
18662 2018-04-20 Michael Meissner <meissner@linux.ibm.com>
18665 * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
18666 __powikf2 when long double is IEEE 128-bit.
18668 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
18670 * config/riscv/riscv.c (riscv_first_stack_step): Round up min
18671 step to make sure stack always aligned.
18673 2018-04-20 Carl Love <cel@us.ibm.com>
18676 * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
18677 size check for arg0.
18679 2018-04-20 Nathan Sidwell <nathan@codesourcery.com>
18680 Tom de Vries <tom@codesourcery.com>
18683 * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
18684 Emit insns for calls too.
18685 (nvptx_find_par): Always look for worker-level predecessor insn.
18686 (nvptx_propagate): Add is_call parm, return bool. Copy frame for
18688 (nvptx_vpropagate, nvptx_wpropagate): Adjust.
18689 (nvptx_process_pars): Propagate frames for calls.
18691 2018-04-20 H.J. Lu <hongjiu.lu@intel.com>
18694 * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
18696 (OPTION_MASK_ISA_IBT_UNSET): Likewise.
18697 (ix86_handle_option): Don't handle OPT_mibt.
18698 * config/i386/cet.h: Check __CET__ instead of __IBT__ and
18700 * config/i386/driver-i386.c (host_detect_local_cpu): Remove
18702 * config/i386/i386-c.c (ix86_target_macros_internal): Don't
18703 check OPTION_MASK_ISA_IBT nor flag_cf_protection.
18704 (ix86_target_macros): Define __CET__ with flag_cf_protection
18705 for -fcf-protection.
18706 * config/i386/i386.c (isa2_opts): Remove -mibt.
18707 * config/i386/i386.h (TARGET_IBT): Removed.
18708 (TARGET_IBT_P): Likewise.
18709 (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
18710 * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
18711 * config/i386/i386.opt (mcet): Update help message.
18712 (mshstk): Likewise.
18714 * doc/invoke.texi: Remove -mibt. Document __CET__. Document
18715 -mcet as an alias for -mshstk.
18717 2018-04-20 Richard Biener <rguenther@suse.de>
18719 PR middle-end/85475
18720 * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
18721 complexity by forcing a single use of the multiply operand.
18723 2018-04-20 Martin Jambor <mjambor@suse.cz>
18726 * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
18727 recursion dependency to only apply to non-clones.
18729 2018-04-20 Martin Jambor <mjambor@suse.cz>
18732 * ipa-cp.c (create_specialized_node): Check that clones of
18733 self-recursive edges exist during IPA-CP.
18735 2018-04-19 Toon Moene <toon@moene.org>
18737 * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
18740 2018-04-19 Jakub Jelinek <jakub@redhat.com>
18742 PR tree-optimization/85467
18743 * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
18744 VECTOR_TYPE_P macro. If type is vector type, VIEW_CONVERT_EXPR the
18745 VECTOR_CST element to type.
18747 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
18750 * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
18751 * config/i386/i386.md (builtin_setjmp_setup): Removed.
18752 (builtin_longjmp): Likewise.
18753 (save_stack_nonlocal): New pattern.
18754 (restore_stack_nonlocal): Likewise.
18756 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
18759 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
18760 Replace ASM_OUTPUT_LABEL with fprintf.
18762 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
18765 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
18766 Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
18767 * config/i386/i386-c.c (ix86_target_macros_internal): Also
18768 define __IBT__ and __SHSTK__ for -fcf-protection.
18769 * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
18771 (ix86_trampoline_init): Likewise.
18772 (x86_output_mi_thunk): Likewise.
18773 (ix86_notrack_prefixed_insn_p): Likewise.
18774 (ix86_option_override_internal): Don't disallow -fcf-protection.
18775 * config/i386/i386.md (rdssp<mode>): Also enable for
18777 (incssp<mode>): Likewise.
18778 (nop_endbr): Likewise.
18779 * config/i386/i386.opt (mcet): Change help message to built-in
18782 (mshstk): Likewise.
18783 * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
18784 on -fcf-protection. Change -mcet, -mibt and -mshstk to only
18785 enable CET built-in functions.
18787 2018-04-19 Sebastian Peryt <sebastian.peryt@intel.com>
18789 * common/config/i386/i386-common.c
18790 (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
18791 OPTION_MASK_ISA_MOVDIRI_UNSET,
18792 OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
18793 (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
18794 * config.gcc (movdirintrin.h): New header.
18795 * config/i386/cpuid.h (bit_MOVDIRI,
18796 bit_MOVDIR64B): New bits.
18797 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
18799 * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
18800 (VOID, PVOID, PCVOID)): New function types.
18801 * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
18802 __builtin_ia32_directstoreu_u64,
18803 __builtin_ia32_movdir64b): New builtins.
18804 * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
18805 * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
18807 (ix86_valid_target_attribute_inner_p): Ditto.
18808 (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
18809 and VOID_FTYPE_PUNSIGNED_UNSIGNED.
18810 (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
18811 * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
18812 TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
18813 * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
18814 (movdiri<mode>, movdir64b_<mode>): New.
18815 * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
18816 * config/i386/immintrin.h: Include movdirintrin.h.
18817 * config/i386/movdirintrin.h: New file.
18818 * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
18820 2018-04-19 Richard Biener <rguenther@suse.de>
18822 PR middle-end/85455
18823 * cfg.c (clear_bb_flags): When loop state says we have
18824 marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
18826 2018-04-19 Richard Biener <rguenther@suse.de>
18828 PR tree-optimization/84737
18829 * tree-vect-data-refs.c (vect_copy_ref_info): New function
18830 copying restrict info.
18831 (vect_setup_realignment): Use it.
18832 * tree-vectorizer.h (vect_copy_ref_info): Declare.
18833 * tree-vect-stmts.c (vectorizable_store): Copy ref info from
18834 the first DR to all generated stores.
18835 (vectorizable_load): Likewise for loads.
18837 2018-04-19 Jakub Jelinek <jakub@redhat.com>
18839 PR tree-optimization/85446
18840 * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
18841 the integral and pointer types to have the same precision.
18843 * doc/install.texi: Document --disable-cet being the default and
18846 2018-04-18 Martin Liska <mliska@suse.cz>
18848 * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
18851 2018-04-18 Martin Liska <mliska@suse.cz>
18854 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
18857 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
18858 arguments if they are comparable.
18860 2018-04-18 Martin Liska <mliska@suse.cz>
18863 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
18866 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
18869 2018-04-18 H.J. Lu <hongjiu.lu@intel.com>
18872 * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
18873 ENDBR after calling __morestack.
18875 2018-04-18 David Malcolm <dmalcolm@redhat.com>
18878 * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
18879 by using gcc_base_ver to generate a gcc_driver_version, and use
18880 it when generating GCC_DRIVER_NAME.
18881 * configure: Regenerate.
18883 2018-04-18 Jakub Jelinek <jakub@redhat.com>
18886 * config.gcc: Obsolete powerpc*-*-*spe*.
18888 2018-04-17 Jakub Jelinek <jakub@redhat.com>
18891 * dbxout.c (dbxout_int): Perform negation in unsigned int type.
18892 (stabstr_D): Change type of unum from unsigned int to
18893 unsigned HOST_WIDE_INT. Perform negation in unsigned HOST_WIDE_INT
18896 2018-04-17 Jim Wilson <jimw@sifive.com>
18899 * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
18900 RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
18901 Set arg_pointer_offset after using pretend_args_size.
18903 2018-04-17 Jakub Jelinek <jakub@redhat.com>
18905 PR rtl-optimization/85431
18906 * dse.c (record_store): Ignore zero width stores.
18909 * asan.c (handle_builtin_stack_restore): Adjust comment. Emit
18910 __asan_allocas_unpoison call and last_alloca_addr = new_sp before
18911 __builtin_stack_restore rather than after it.
18912 * builtins.c (expand_asan_emit_allocas_unpoison): Pass
18913 arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
18914 argument instead of virtual_dynamic_stack_rtx.
18916 2018-04-17 Kelvin Nilsen <kelvin@gcc.gnu.org>
18918 * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
18920 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
18921 Add note to error message to explain internal mapping of overloaded
18922 built-in function name to non-overloaded built-in function name.
18923 * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
18926 2018-04-17 Michael Meissner <meissner@linux.vnet.ibm.com>
18929 * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
18930 where the inputs overlap with the output.
18932 2018-04-17 Jakub Jelinek <jakub@redhat.com>
18934 * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
18935 (=v, v) alternative and explicit "memory" attribute.
18936 (vec_extract_lo_<mode><mask_name>): Likewise. Also add
18937 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
18939 (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
18940 "sselog1" type instead of "sselog".
18941 (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
18942 "sselog". Remove explicit "memory" attribute.
18943 (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
18944 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
18946 (vec_extract_hi_v32hi): Merge all alternatives into one, use
18947 "sselog1" type instead of "sselog". Remove explicit "memory"
18949 (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
18950 use "sselog1" type instead of "sselog". Remove explicit "memory"
18952 (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
18953 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
18955 (vec_extract_hi_v64qi): Merge all alternatives into one, use
18956 "sselog1" type instead of "sselog". Remove explicit "memory"
18958 (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
18959 use "sselog1" type instead of "sselog". Remove explicit "memory"
18963 * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
18965 PR middle-end/85414
18966 * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
18969 2018-04-17 Martin Jambor <mjambor@suse.cz>
18972 * ipa-cp.c (create_specialized_node): Call
18973 expand_all_artificial_thunks if necessary.
18975 2018-04-17 Martin Liska <mliska@suse.cz>
18978 * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
18979 in message, remote space in between '_G' and '('.
18981 2018-04-17 Jakub Jelinek <jakub@redhat.com>
18984 * config/i386/sse.md (reduces<mode><mask_scalar_name>,
18985 avx512f_vmcmp<mode>3<round_saeonly_name>,
18986 avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
18987 avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
18988 avx512f_rndscale<mode><round_saeonly_name>,
18989 avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
18990 avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
18991 Use %<iptr>2 instead of %2 for -masm=intel.
18992 (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
18993 avx512f_vcvttss2usi<round_saeonly_name>,
18994 avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
18996 (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
18997 avx512f_vcvttsd2usi<round_saeonly_name>,
18998 avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
18999 Use %q1 instead of %1 for -masm=intel.
19000 (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
19001 avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
19002 of %3 for -masm=intel.
19003 (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
19005 (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
19007 (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
19009 (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
19010 %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
19012 (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
19014 (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
19015 %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
19016 %g1 and one with %0 and %1.
19017 (avx512er_vmrcp28<mode><round_saeonly_name>,
19018 avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
19019 %1 for -masm=intel.
19020 (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
19021 avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
19022 avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
19023 of %0 and %{%4%} for -masm=intel.
19024 (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
19025 avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
19026 avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
19027 order of %0 and %{%5%}%{z%} for -masm=intel.
19029 2018-04-17 Jan Hubicka <jh@suse.cz>
19032 * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
19034 2018-04-17 Martin Liska <mliska@suse.cz>
19037 * multiple_target.c (create_dispatcher_calls): Set apostrophes
19038 for target_clone error message. Make default implementation
19039 clone to be a local declaration.
19040 (separate_attrs): Add new argument and check for an empty
19042 (expand_target_clones): Handle it.
19043 (ipa_target_clone): Make redirection just for target_clones
19046 2018-04-16 Cesar Philippidis <cesar@codesourcery.com>
19047 Tom de Vries <tom@codesourcery.com>
19049 PR middle-end/84955
19050 * omp-expand.c (expand_oacc_for): Add dummy false branch for
19051 tiled basic blocks without omp continue statements.
19053 2018-04-16 Aaron Sawdey <acsawdey@linux.ibm.com>
19056 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
19057 vec_extract expression as having side effects to make sure it gets
19060 2018-04-16 H.J. Lu <hongjiu.lu@intel.com>
19063 * config/i386/i386.c (get_builtin_code_for_version): Check
19066 2018-04-16 Olga Makhotina <olga.makhotina@intel.com>
19069 * config.gcc: Support "skylake".
19070 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
19072 * config/i386/i386.c (m_SKYLAKE): Define.
19073 (processor_target_table): Add "skylake".
19074 (ix86_option_override_internal): Add "skylake".
19075 (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
19076 PROCESSOR_CANNONLAKE.
19077 (get_builtin_code_for_version): Fix priority for
19078 PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
19079 PROCESSOR_SKYLAKE-AVX512.
19080 * config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
19081 (processor_type): Add PROCESSOR_SKYLAKE.
19083 2018-04-16 Paolo Carlini <paolo.carlini@oracle.com>
19084 Jason Merrill <jason@redhat.com>
19087 * convert.c (convert_to_integer_1): Use direct recursion for
19088 enumeral types and types with a precision less than the number
19089 of bits in their mode.
19091 2018-04-16 Julia Koval <julia.koval@intel.com>
19094 * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
19095 X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
19097 2018-04-14 Segher Boessenkool <segher@kernel.crashing.org>
19100 * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
19101 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
19102 and -mno-direct-move.
19104 2018-04-13 Paul A. Clarke <pc@us.ibm.com>
19107 * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
19108 Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
19109 Ensure negative shifts result in {0}.
19111 2018-04-13 Vladimir Makarov <vmakarov@redhat.com>
19113 PR rtl-optimization/79916
19114 * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
19115 regs (if any) to define how to gnerate SD moves when LRA is in
19118 2018-04-13 Jakub Jelinek <jakub@redhat.com>
19120 PR rtl-optimization/85393
19121 * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
19122 * except.c (expand_dw2_landing_pad_for_region): Make static.
19123 * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
19124 a label and unconditional jump to old_bb, rather than
19125 expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
19128 PR rtl-optimization/85376
19129 * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
19130 zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
19131 instead of a specific value.
19133 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
19134 Bin Cheng <bin.cheng@arm.com>
19136 PR tree-optimization/82965
19137 PR tree-optimization/83991
19138 * cfgloopanal.c (expected_loop_iterations_unbounded): Add
19139 by_profile_only parameter.
19140 * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
19141 information if the loop was predicted to iterate too many times.
19142 * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
19144 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
19147 * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
19150 2018-04-13 Martin Liska <mliska@suse.cz>
19151 Jakub Jelinek <jakub@redhat.com>
19153 PR middle-end/81657
19154 * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
19155 * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
19156 * builtins.c (expand_builtin_memory_copy_args): Use
19157 BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
19158 handle dest_addr == pc_rtx.
19160 2018-04-12 Segher Boessenkool <segher@kernel.crashing.org>
19163 * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
19164 asked to not generate direct moves.
19165 (fix_trunc<mode>si2_stfiwx): Similar.
19166 (fix_trunc<mode>si2_internal): Similar.
19168 2018-04-12 Jakub Jelinek <jakub@redhat.com>
19171 * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
19172 * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
19173 lookup if dest in some wider mode is known to be const0_rtx and
19174 if so, record permanent equivalence for it to be ZERO_EXTEND of
19175 the narrower mode destination.
19177 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
19179 * lto-streamer-out.c (output_function): Revert 259346.
19180 * omp-expand.c (expand_oacc_for): Likewise.
19182 2018-04-12 Alexander Monakov <amonakov@ispras.ru>
19184 PR rtl-optimization/85354
19185 * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
19186 * sel-sched.c (sel_global_init): ... here.
19188 2018-04-12 Eric Botcazou <ebotcazou@adacore.com>
19191 * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
19192 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
19193 mode for PE-COFF targets.
19194 * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
19195 (i386_pe_asm_lto_end): Likewise.
19196 * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
19197 (TARGET_ASM_LTO_END): Likewise.
19198 * config/i386/winnt.c (saved_debug_info_level): New static variable.
19199 (i386_pe_asm_lto_start): New function.
19200 (i386_pe_asm_lto_end): Likewise.
19202 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
19203 Richard Biener <rguenther@suse.de>
19205 PR middle-end/84955
19206 * lto-streamer-out.c (output_function): Fix CFG loop state before
19208 * omp-expand.c (expand_oacc_for): Handle calls to internal
19209 functions like regular functions.
19211 2018-04-12 Richard Biener <rguenther@suse.de>
19214 * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
19215 for the early LTO debug to properly generate references to it
19216 during DIE emission. Do not re-use that for the skeleton for
19218 (dwarf2out_early_finish): Likewise.
19220 2018-04-12 Jakub Jelinek <jakub@redhat.com>
19223 * config/i386/sse.md
19224 (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
19225 <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
19226 vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
19227 vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
19228 and output is a reg, avoid creating invalid lowpart subreg, but
19229 instead split into a 512-bit move. Don't split if not AVX512VL,
19230 input is xmm16+ reg and output is a mem.
19231 (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
19232 vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
19233 xmm16+ reg and output is a mem.
19235 2018-04-12 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
19237 * config/s390/s390.c (s390_output_indirect_thunk_function): Check
19238 also for flag_dwarf2_cfi_asm.
19240 2018-04-12 Jakub Jelinek <jakub@redhat.com>
19242 PR rtl-optimization/85342
19243 * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
19244 a bool scalar var inside of the loop instead. Don't try to update
19245 recog_data.operand after failed apply_change_group.
19247 2018-04-12 Tom de Vries <tom@codesourcery.com>
19250 * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
19251 (nvptx_assemble_decl_begin): Add undefined param. Declare undefined
19252 array with flexible array member as array without given dimension.
19253 (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
19254 argument for undefined param to true.
19256 2018-04-11 Aaron Sawdey <acsawdey@linux.ibm.com>
19259 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
19260 -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
19261 from PowerPC section.
19262 * config/rs6000/sysv4.opt (mcall-): Improve help text.
19263 * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
19264 help text that is too long.
19265 * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
19266 help text that is too long.
19267 * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
19268 help text that is too long.
19270 2018-04-11 Uros Bizjak <ubizjak@gmail.com>
19272 * config/alpha/alpha.md (stack_probe_internal): Rename
19273 from "probe_stack". Update all callers.
19275 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
19277 PR rtl-optimization/84566
19278 * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
19279 sched_macro_fuse_insns.
19281 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
19284 * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
19285 (compute_block_dependences): ... from here.
19287 2018-04-11 Jakub Jelinek <jakub@redhat.com>
19289 PR tree-optimization/85331
19290 * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
19291 from int to HOST_WIDE_INT.
19293 2018-04-11 Martin Jambor <mjambor@suse.cz>
19296 * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
19297 (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
19298 not the same as the source val.
19299 (cgraph_edge_brings_value_p): New parameter.
19300 (gather_edges_for_value): Pass destination value to
19301 cgraph_edge_brings_value_p.
19302 (perhaps_add_new_callers): Likewise.
19303 (get_info_about_necessary_edges): Likewise and exclude values brought
19304 only by self-recursive edges.
19305 (create_specialized_node): Redirect only clones of self-calling edges.
19306 (+self_recursive_pass_through_p): New function.
19307 (find_more_scalar_values_for_callers_subset): Use it.
19308 (find_aggregate_values_for_callers_subset): Likewise.
19309 (known_aggs_to_agg_replacement_list): Removed.
19310 (decide_whether_version_node): Re-calculate known constants for all
19311 remaining context clones.
19313 2018-04-11 Richard Biener <rguenther@suse.de>
19316 * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
19317 from early DWARF output.
19318 (dwarf2out_early_finish): Output line info unconditionally into
19319 early DWARF and add reference to it.
19321 2018-04-11 Jakub Jelinek <jakub@redhat.com>
19324 * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
19325 (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
19326 other than V2DFmode using iptr mode attribute.
19327 (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
19329 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
19331 PR rtl-optimization/84659
19332 * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
19334 2018-04-11 Jakub Jelinek <jakub@redhat.com>
19337 * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
19339 (output_loc_list): Pass address of a dummy size variable even in the
19340 locview handling loop.
19341 (index_location_lists): Add comment on why skip_loc_list_entry can't
19344 2018-04-11 Thomas Preud'homme <thomas.preudhomme@arm.com>
19347 * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
19350 2018-04-10 Aaron Sawdey <acsawdey@linux.ibm.com>
19353 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
19354 -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
19355 and -mstring-compare-inline-limit.
19357 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
19360 * config/rs6000/rs6000.md (allocate_stack): Put the residual size
19361 for stack clash protection in a register whenever we need it to be in
19364 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
19366 * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
19367 Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
19369 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
19372 * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
19374 (mlong-double-): Ditto.
19375 * config/rs6000/sysv4.opt (msdata=): Ditto.
19376 (mtls-size=): Ditto.
19378 2018-04-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
19380 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
19381 erroneous entries for
19382 "vector int vec_ldl (int, long int *)", and
19383 "vector unsigned int vec_ldl (int, unsigned long int *)".
19384 Add comments and entries for
19385 "vector bool char vec_ldl (int, bool char *)",
19386 "vector bool short vec_ldl (int, bool short *)",
19387 "vector bool int vec_ldl (int, bool int *)",
19388 "vector bool long long vec_ldl (int, bool long long *)",
19389 "vector pixel vec_ldl (int, pixel *)",
19390 "vector long long vec_ldl (int, long long *)",
19391 "vector unsigned long long vec_ldl (int, unsigned long long *)".
19392 * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
19393 type tree bool_long_long_type_node and correct definition of
19394 bool_V2DI_type_node to make reference to this new type tree.
19395 (rs6000_mangle_type): Replace erroneous reference to
19396 bool_long_type_node with bool_long_long_type_node.
19397 * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
19398 comments to emphasize sign distinctions for char and int types and
19399 replace RS6000_BTI_bool_long constant with
19400 RS6000_BTI_bool_long_long constant. Also add comment to restrict
19401 use of RS6000_BTI_pixel.
19402 (bool_long_type_node): Remove this macro definition.
19403 (bool_long_long_type_node): New macro definition
19405 2018-04-10 Jakub Jelinek <jakub@redhat.com>
19407 PR rtl-optimization/85300
19408 * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
19409 into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
19410 simplify_unary_operation fails.
19412 2018-04-10 Martin Liska <mliska@suse.cz>
19414 * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
19415 cgraph_edge and ipa_ref.
19417 2018-04-10 Jakub Jelinek <jakub@redhat.com>
19421 * config/i386/sse.md
19422 (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
19423 computation of the VEC_MERGE selector from mask.
19424 (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
19425 Fix decoding of the VEC_MERGE selector into mask.
19427 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
19429 PR tree-optimization/85286
19430 * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
19432 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
19434 * final.c (final_1): Set insn_last_address as well as
19435 insn_current_address.
19437 2018-04-10 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
19440 * explow.c (emit_stack_probe): Call validize_mem on memory location
19441 before passing it to gen_probe_stack. Create address operand and
19442 legitimize it for the probe_stack_address case.
19444 2018-04-09 Jan Hubicka <jh@suse.cz>
19447 * ipa-devirt.c (rebuild_type_inheritance-hash): New.
19448 * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
19449 * tree.c (free_lang_data_in_type): Fix handling of binfos;
19451 (free_lang_data): Rebuild type inheritance graph.
19453 2018-04-09 Martin Sebor <msebor@redhat.com>
19455 * invoke.texi (-finline-small-functions): Mention other optimization
19457 (-findirect-inlining, -fpartial-inlining): Same.
19458 (-finline-functions-called-once): Same.
19459 (-freorder-blocks-and-partition): Same.
19461 2018-04-09 Jan Hubicka <jh@suse.cz>
19464 * cfgcleanup.c (try_forward_edges): Do not give up on crossing
19465 jumps; choose last target that matches the criteria (i.e.
19466 no partition changes for non-crossing jumps).
19467 * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
19468 support for redirecting crossing jumps to non-crossing.
19470 2018-04-09 Alexey Brodkin <abrodkin@synopsys.com>
19472 * config/arc/arc.c (arc_expand_prologue): Set stack usage info
19473 also for naked functions.
19475 2018-04-09 Claudiu Zissulescu <claziss@synopsys.com>
19477 * config/arc/arc.md (add_shift): New pattern.
19478 (add_shift2): Likewise.
19479 (sub_shift): Likewise.
19480 (sub_shift_cmp0_noout): Likewise.
19481 (compare_si_ashiftsi): Likewise.
19482 (xbfu_cmp0_noout): New combine pattern.
19483 (xbfu_cmp0"): Likewise.
19484 (movsi_set_cc_insn): Place the predicable variant first.
19485 (commutative_binary_cmp0_noout): Remove clobber.
19486 (commutative_binary_cmp0): New pattern.
19487 (noncommutative_binary_cmp0): Likewise.
19488 (noncommutative_binary_cmp0_noout): Likewise.
19489 (noncommutative_binary_comparison_result_used): Removed.
19490 (rsub_cmp0): New pattern.
19491 (rsub_cmp0_noout): Likewise.
19492 (extzvsi): Changed, keep only meaningful variants.
19493 (SQH, SEZ): New iterators.
19494 (SQH_postfix): New mode attribute.
19495 (SEZ_prefix): New code attribute.
19496 (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
19497 (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
19498 * config/arc/predicates.md (cc_set_register): Use CC_REG instead
19499 of numerical value.
19500 (noncommutative_operator): Check the availability of barrel
19503 2018-04-09 Richard Biener <rguenther@suse.de>
19505 PR tree-optimization/85284
19506 * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
19507 Only use the niter constraining form of simple_iv when the exit
19508 is always executed.
19510 2018-04-09 Tom de Vries <tom@codesourcery.com>
19513 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
19514 (define_expand "*memory_barrier"): New define_expand.
19515 (define_insn "memory_barrier"): New insn.
19517 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
19519 PR rtl-optimization/80463
19520 PR rtl-optimization/83972
19521 PR rtl-optimization/83480
19523 * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
19524 correct producer for the insn.
19525 (tidy_control_flow): Fixup seqnos in case of debug insns.
19527 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
19529 PR rtl-optimization/83913
19531 * sel-sched-ir.c (merge_expr_data): Choose the middle between two
19532 different sched-times when merging exprs.
19534 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
19536 PR rtl-optimization/83962
19538 * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
19539 tidy_fallthru_edge and tidy_control_flow.
19541 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
19543 PR rtl-optimization/83530
19545 * sel-sched.c (force_next_insn): New global variable.
19546 (remove_insn_for_debug): When force_next_insn is true, also leave only
19547 next insn in the ready list.
19548 (sel_sched_region): When the region wasn't scheduled, make another pass
19549 over it with force_next_insn set to 1.
19551 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
19553 * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
19555 * config/nds32/constants.md (unspec_volatile_element): Add enum values
19556 for interrupt control.
19557 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
19558 functions for interrupt control.
19559 * config/nds32/nds32-intrinsic.md: Likewise.
19560 * config/nds32/nds32_intrinsic.h: Likewise.
19561 * config/nds32/nds32.h (nds32_builtins): Likewise.
19563 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
19565 * config/nds32/nds32.c (nds32_init_machine_status,
19566 nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
19567 strict_aligned_p field.
19568 (nds32_expand_to_rtl_hook): New function.
19569 (TARGET_EXPAND_TO_RTL_HOOK): Define.
19570 * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
19572 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
19573 Chung-Ju Wu <jasonwucj@gmail.com>
19575 * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
19576 * config/nds32/nds32-n7.md: New file.
19577 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
19578 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
19580 * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
19581 * config/nds32/nds32.md (pipeline_model): Add n7.
19582 * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
19583 * config/nds32/pipelines.md: Include n7 settings.
19585 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
19586 Chung-Ju Wu <jasonwucj@gmail.com>
19588 * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
19589 * config/nds32/nds32-e8.md: New file.
19590 * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
19591 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
19593 * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
19594 * config/nds32/nds32.md (pipeline_model): Add e8.
19595 * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
19596 * config/nds32/pipelines.md: Include e8 settings.
19598 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
19599 Chung-Ju Wu <jasonwucj@gmail.com>
19601 * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
19602 * config/nds32/nds32-n8.md: New file.
19603 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
19604 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
19606 * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
19607 * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
19608 * config/nds32/nds32.md (pipeline_model): Add n8.
19609 * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
19610 * config/nds32/pipelines.md: Include n8 settings.
19612 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
19613 Chung-Ju Wu <jasonwucj@gmail.com>
19615 * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
19616 * config/nds32/nds32-n9-2r1w.md: New file.
19617 * config/nds32/nds32-n9-3r2w.md: New file.
19618 * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
19619 nds32_register_ports): New or modify for cpu n9.
19620 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
19622 * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
19623 * config/nds32/nds32-utils.c: New file.
19624 * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
19625 TARGET_MUL_SLOW): Define.
19626 * config/nds32/nds32.md (pipeline_model): New attribute.
19627 * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
19628 New options that support cpu n9.
19629 * config/nds32/pipelines.md: Include n9 settings.
19630 * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
19632 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
19634 * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
19635 information if necessary.
19636 (output_cond_branch_compare_zero): Likewise.
19637 * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
19638 (nds32_target_alignment): Refine for alignment.
19639 * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
19640 (FUNCTION_BOUNDARY): Modify.
19641 * config/nds32/nds32.md (call_internal, call_value_internal): Consider
19643 * config/nds32/nds32.opt (malways-align, malign-functions): New.
19645 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
19647 * config/nds32/constants.md (unspec_volatile_element): Add values for
19648 TLB operation and data prefetch.
19649 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
19650 functions for TLB operation and data prefetch.
19651 * config/nds32/nds32-intrinsic.md: Likewise.
19652 * config/nds32/nds32_intrinsic.h: Likewise.
19653 * config/nds32/nds32.c (nds32_dpref_names): Likewise.
19654 (nds32_print_operand): Likewise.
19655 * config/nds32/nds32.h (nds32_builtins): Likewise.
19657 2018-04-07 Thomas Koenig <tkoenig@gcc.gnu.org>
19658 Andrew Pinski <pinsika@gcc.gnu.org>
19660 PR middle-end/82976
19661 * match.pd: Use constant_boolean_node of correct type instead of
19662 boolean_true_node or boolean_false_node for simplifying
19663 pointer comparisons to zero.
19665 2018-04-07 Jakub Jelinek <jakub@redhat.com>
19667 PR tree-optimization/80021
19668 * tree.c (verify_type_variant): Make error call in verify_variant_match
19669 translatable and remove final full stop.
19671 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
19673 * config/nds32/constants.md (unspec_volatile_element): Add
19674 UNSPEC_VOLATILE_EH_RETURN.
19675 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
19676 nds32_output_stack_pop): Support dwarf exception handling process.
19677 * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
19678 * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
19679 exception handling process.
19680 (nds32_compute_stack_frame): Likewise.
19681 (nds32_return_addr_rtx): Likewise.
19682 (nds32_initial_elimination_offset): Likewise.
19683 (nds32_expand_prologue): Likewise.
19684 (nds32_expand_epilogue): Likewise.
19685 (nds32_dynamic_chain_address): New function.
19686 * config/nds32/nds32.h (machine_function): Add fields for dwarf
19687 exception handling.
19688 (DYNAMIC_CHAIN_ADDRESS): Define.
19689 (EH_RETURN_DATA_REGNO): Define.
19690 (EH_RETURN_STACKADJ_RTX): Define.
19691 * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
19692 patterns for dwarf exception handling.
19694 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
19696 * config/nds32/nds32.h: Clean up obsolete macros.
19698 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
19700 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
19701 Add enum values for particular instructions.
19702 * config/nds32/nds32-intrinsic.c: Implementation of expanding
19703 particular intrinsic functions.
19704 * config/nds32/nds32-intrinsic.md: Likewise.
19705 * config/nds32/nds32_intrinsic.h: Likewise.
19706 * config/nds32/nds32.h (nds32_builtins): Likewise.
19707 * config/nds32/nds32.md (type): Add pbsad and pbsada.
19708 (btst, ave): New patterns for particular instructions.
19710 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
19712 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
19713 Add enum values for atomic load/store and memory sync.
19714 * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
19716 * config/nds32/nds32-intrinsic.md: Likewise.
19717 * config/nds32/nds32_intrinsic.h: Likewise.
19718 * config/nds32/nds32.h (nds32_builtins): Likewise.
19720 2018-04-07 Jakub Jelinek <jakub@redhat.com>
19722 PR tree-optimization/85257
19723 * fold-const.c (native_encode_vector): If not all elts could fit
19724 and off is -1, return 0 rather than offset.
19725 * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
19726 (offseti - offset2) / BITS_PER_UNIT as 4th argument to
19727 native_encode_expr. Verify len * BITS_PER_UNIT >= maxsizei. Don't
19728 adjust buffer in native_interpret_expr call.
19730 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
19732 * config/nds32/constants.md (unspec_volatile_element): Add cache
19733 control enum values.
19734 * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
19735 * config/nds32/nds32-intrinsic.md: Add cache control patterns.
19736 * config/nds32/nds32.c (nds32_cctl_names): New.
19737 (nds32_print_operand): Handle cache control register names.
19738 * config/nds32/nds32.h (nds32_builtins): New enum values.
19739 * config/nds32/nds32_intrinsic.h: Add cache control enum types and
19741 * config/nds32/nds32.md (type): Add mmu.
19742 * config/nds32/pipelines.md (simple_insn): Add mmu.
19744 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
19746 * config/nds32/nds32.md (type): Remove call.
19747 * config/nds32/pipelines.md (simple_insn): Likewise.
19749 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
19751 * config/nds32/constants.md (unspec_volatile_element): Add
19752 UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
19753 UNSPEC_VOLATILE_FMFCFG.
19754 * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
19755 description for fmfcfg and fmfcsr.
19756 (bdesc_1arg): Add fmtcsr.
19757 (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
19758 (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
19759 * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
19760 unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
19761 unspec_fmfcfg): New patterns.
19762 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
19763 NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
19764 NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
19765 * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
19766 __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
19767 __nds32__fmfcfg): Define.
19769 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
19771 * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
19772 intrinsic register names.
19773 * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
19774 intrinsic register enum values and macros.
19776 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
19778 * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
19779 for load/store addressing form.
19780 (nds32_print_operand_address): Likewise.
19782 2018-04-06 Eric Botcazou <ebotcazou@adacore.com>
19785 * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
19786 based on LABEL_REF. Remove useless assertion.
19787 (pic_address_needs_scratch): Fix formatting.
19788 (sparc_legitimize_pic_address): Minor tweaks.
19789 (sparc_delegitimize_address): Adjust assertion accordingly.
19790 * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
19791 into symbolic_operand.
19792 (movsi_high_pic_label_ref): Likewise.
19793 (movsi_lo_sum_pic_label_ref): Likewise.
19794 (movdi_pic_label_ref): Likewise.
19795 (movdi_high_pic_label_ref): Likewise.
19796 (movdi_lo_sum_pic_label_ref): Likewise.
19798 2018-04-06 Amaan Cheval <amaan.cheval@gmail.com>
19800 * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
19801 custom LIB_SPEC setup.
19803 2018-04-06 Ruslan Bukin <br@bsdpad.com>
19804 Kito Cheng <kito.cheng@gmail.com>
19806 * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
19807 * config/riscv/freebsd.h: New.
19809 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
19811 * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
19812 * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
19815 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
19816 Kito Cheng <kito.cheng@gmail.com>
19818 * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
19819 nds32_output_call, nds32_symbol_binds_local_p): New functions.
19820 * config/nds32/nds32-protos.h (nds32_output_call,
19821 nds32_output_return): Declare.
19822 * config/nds32/nds32.md: Refine all the call and return patterns.
19824 2018-04-06 Jakub Jelinek <jakub@redhat.com>
19827 * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
19828 build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
19830 PR rtl-optimization/84872
19831 * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
19832 nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
19833 EDGE_CROSSING edge.
19835 2018-04-06 Tamar Christina <tamar.christina@arm.com>
19837 * expr.c (copy_blkmode_to_reg): Revert 254862.
19838 * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
19840 2018-04-06 Richard Biener <rguenther@suse.de>
19842 PR middle-end/85244
19843 * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
19844 after seeing a component reference with an adjacent field. Treat
19845 refs to arrays at struct end of external decls similar to
19846 refs to unconstrained commons.
19848 2018-04-06 Jakub Jelinek <jakub@redhat.com>
19851 * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
19852 look through SAVE_EXPRs with non-side-effects argument. Adjust
19854 (fold_comparison): Adjust twoval_comparison_p caller, don't handle
19857 2018-04-06 Richard Biener <rguenther@suse.de>
19859 PR middle-end/85180
19860 * alias.c (find_base_term): New wrapper around find_base_term
19861 unwinding CSELIB_VAL_PTR changes.
19862 (find_base_term): Do not restore CSELIB_VAL_PTR during the
19865 2018-04-06 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
19867 * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
19869 * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
19870 constant definitions.
19871 ("nop"): lr 0,0 -> nopr r0
19872 ("nop_lr0", "nop_lr1"): New insn definitions.
19874 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
19876 * config/nds32/nds32.md (*stack_push, *stack_pop): Use
19877 NDS32_V3PUSH_AVAILABLE_P macro.
19879 2018-04-06 Monk Chiang <sh.chiang04@gmail.com>
19880 Chung-Ju Wu <jasonwucj@gmail.com>
19882 * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
19883 (nds32*-*-*): Add float and fpu_config into supported_defaults.
19884 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
19885 Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
19886 * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
19887 UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
19888 * config/nds32/constraints.md: New constraints and checking for hard
19889 float configuration.
19890 * config/nds32/iterators.md: New mode iterator and attribute for hard
19891 float configuration.
19892 * config/nds32/nds32-doubleword.md: Use hard float alternatives and
19894 * config/nds32/nds32-fpu.md: New file.
19895 * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
19896 deal with hard float code generation.
19897 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
19899 (abi_type, float_reg_number): New enum type.
19900 * config/nds32/nds32-predicates.c: New predicates for hard float.
19901 * config/nds32/nds32-protos.h: Declare functions for hard float.
19902 * config/nds32/nds32.c: Implementation for hard float configuration.
19903 * config/nds32/nds32.h: Definitions for hard float configuration.
19904 * config/nds32/nds32.md: Include hard float machine description and
19905 modify patterns for hard float configuration.
19906 * config/nds32/nds32.opt: New options for hard float configuration.
19907 * config/nds32/predicates.md: New predicates for hard float
19910 2018-04-06 Kuan-Lin Chen <kuanlinchentw@gmail.com>
19912 * common/config/nds32/nds32-common.c
19913 (nds32_option_optimization_table): Enable -mreleax-hint by default.
19915 2018-04-05 Jakub Jelinek <jakub@redhat.com>
19917 PR middle-end/85195
19918 * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
19919 CONSTRUCTOR_ELT (ctor, ...)->value.
19921 2018-04-05 Uros Bizjak <ubizjak@gmail.com>
19924 * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
19926 2018-04-05 Tom de Vries <tom@codesourcery.com>
19929 * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
19932 2018-04-05 Shiva Chen <shiva0217@gmail.com>
19933 Kito Cheng <kito.cheng@gmail.com>
19935 * config/nds32/constraints.md (U33): Fine-tune checking condition.
19936 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
19937 * config/nds32/nds32.h (nds32_16bit_address_type): Add
19938 ADDRESS_POST_MODIFY_LO_REG_IMM3U.
19940 2018-04-05 Shiva Chen <shiva0217@gmail.com>
19941 Kito Cheng <kito.cheng@gmail.com>
19943 * config/nds32/constraints.md (Ufe): New memory constraint.
19944 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
19945 nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
19946 * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
19948 * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
19949 * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
19951 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
19953 * config/nds32/nds32.md: Use optimize_size in the condition for
19954 alu-shift instructions.
19956 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
19958 * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
19960 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
19962 * config/nds32/nds32.md (negsi2): Refine pattern.
19964 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
19965 Chung-Ju Wu <jasonwucj@gmail.com>
19967 * config/nds32/iterators.md (shift_rotate): New code iterator.
19968 (shift): New code attribute.
19969 * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
19970 * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
19971 * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
19972 * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
19973 bit-wise operations.
19974 (andsi3, *andsi3): Ditto.
19975 (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
19976 (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
19977 (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
19978 * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
19979 nds32_ior_operand, nds32_xor_operand): New predicates.
19981 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
19983 * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
19984 (addsi3, subsi3): ... this.
19986 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
19988 * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
19990 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
19992 * config/nds32/nds32.md: Adjust indention.
19994 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
19996 * config/nds32/nds32.md (feature): New attribute.
19998 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
20000 * config/nds32/nds32.md (subtype): New attribute.
20002 2018-04-04 Thomas Preud'homme <thomas.preudhomme@arm.com>
20005 * config/arm/arm-builtins.c (arm_expand_builtin): Change
20006 expansion to perform a bitwise AND of the argument followed by a
20007 boolean negation of the result.
20009 2018-04-04 Peter Bergner <bergner@vnet.ibm.com>
20011 PR rtl-optimization/84878
20012 * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
20013 the basic block. Assert the use reference is not artificial and that
20014 it has an associated insn.
20016 2018-04-04 Michael Matz <matz@suse.de>
20018 * builtins.c (compute_objsize): Pass correct operand
20019 to array_at_struct_end_p.
20021 2018-04-04 Richard Biener <rguenther@suse.de>
20024 * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
20025 from contexts for DINFO_LEVEL_TERSE and below.
20027 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
20029 * config/nds32/nds32-doubleword.md (move_<mode>): Require
20030 resiter_operand condition.
20031 * config/nds32/nds32.md (*move<mode>): Ditto.
20033 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
20034 Monk Chiang <sh.chiang04@gmail.com>
20036 * config/nds32/nds32.md (movmisalign<mode>): New pattern.
20038 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
20040 * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
20042 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
20043 Kito Cheng <kito.cheng@gmail.com>
20045 * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
20046 nds32_cond_code_str, output_cond_branch,
20047 output_cond_branch_compare_zero, nds32_expand_cbranch,
20048 nds32_expand_cstore, nds32_expand_movcc,
20049 nds32_output_cbranchsi4_equality_zero,
20050 nds32_output_cbranchsi4_equality_reg,
20051 nds32_output_cbranchsi4_equality_reg_or_const_int,
20052 nds32_output_cbranchsi4_greater_less_zero: New functions.
20053 * config/nds32/nds32-protos.h (nds32_expand_cbranch,
20054 nds32_expand_cstore, nds32_expand_movcc,
20055 nds32_output_cbranchsi4_equality_zero,
20056 nds32_output_cbranchsi4_equality_reg,
20057 nds32_output_cbranchsi4_equality_reg_or_const_int,
20058 nds32_output_cbranchsi4_greater_less_zero): Declare.
20059 * config/nds32/predicates.md (nds32_movecc_comparison_operator,
20060 nds32_rimm11s_operand): New predicates.
20061 * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
20062 * config/nds32/nds32.md: Rewrite all the branch and conditional move
20065 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
20067 * config/nds32/nds32-doubleword.md: Refine all the instruction type.
20068 * config/nds32/nds32.md: Ditto.
20069 * config/nds32/pipelines.md: Ditto.
20071 2018-04-04 Richard Biener <rguenther@suse.de>
20073 PR tree-optimization/85168
20074 * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
20075 propagating abnormals.
20077 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
20079 * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
20081 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
20082 Kito Cheng <kito.cheng@gmail.com>
20084 * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
20085 * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
20086 * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
20087 (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
20088 * config/nds32/nds32.md (sibcall_internal): New.
20089 (sibcall_register): Remove.
20090 (sibcall_immediate): Remove.
20091 (sibcall_value_internal): New.
20092 (sibcall_value_register): Remove.
20093 (sibcall_value_immediate): Remove.
20094 * config/nds32/predicates.md (nds32_general_register_operand): New.
20095 (nds32_call_address_operand): New.
20097 2018-04-03 Jakub Jelinek <jakub@redhat.com>
20099 PR rtl-optimization/85167
20100 * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
20101 bb_defs if *split_p, instead preinitialize it to NULL.
20103 PR tree-optimization/85156
20104 * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
20105 evaluating the argument multiple times.
20107 2018-04-03 Bill Schmidt <wschmidt@linux.ibm.com>
20109 * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
20111 (_mm_cvtpd_ps): Likewise.
20112 (_mm_cvttpd_epi32): Likewise.
20113 * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
20114 * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
20115 vector, pixel, and bool following altivec.h include.
20117 2018-04-03 Martin Sebor <msebor@redhat.com>
20119 * doc/extend.texi (Common Function Attributes): Clarify.
20120 (const attribute): Likewise.
20121 (pure attribute): Likewise.
20123 2018-04-03 Jakub Jelinek <jakub@redhat.com>
20126 * config/i386/i386.c (ix86_expand_vector_set): Use
20127 HOST_WIDE_INT_1U << elt instead of 1 << elt. Formatting fix.
20129 2018-04-03 Uros Bizjak <ubizjak@gmail.com>
20131 * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
20132 instructions when changing rounding bits to preserve precision bits
20133 in the x87 control word.
20135 2018-04-03 Martin Liska <mliska@suse.cz>
20137 PR tree-optimization/82491
20138 * rtl.h (strip_offset_and_add): Replace += suboffset with
20139 poly_uint64 () + suboffset.
20141 2018-03-29 Martin Liska <mliska@suse.cz>
20142 Martin Jambor <mjambor@suse.cz>
20145 * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
20146 param_type is not an integral or pointer type.
20148 2018-04-03 Richard Biener <rguenther@suse.de>
20150 * sese.h (recompute_all_dominators): Remove.
20152 2018-04-02 Martin Sebor <msebor@redhat.com>
20154 * doc/invoke.texi (-Wrestrict): Fix typos.
20156 2018-04-02 Jim Wilson <jimw@sifive.com>
20158 * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
20159 * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
20160 (<optab>di3, <optab>si3_extend): Likewise.
20161 (<optab>si3_mask, <optab>si3_mask_1): New.
20162 (<optab>di3_mask, <optab>di3_mask_1): New.
20163 (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
20164 (lshrsi3_zero_extend_1): Use VOIDmode shift count.
20165 * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
20167 2018-04-02 Gerald Pfeifer <gerald@pfeifer.com>
20169 * doc/cpp.texi (Variadic Macros): Fix line continuation in an
20172 2018-04-02 Chung-Ju Wu <jasonwucj@gmail.com>
20174 * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
20175 (nds32_canonicalize_comparison): New function.
20177 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
20178 Kito Cheng <kito.cheng@gmail.com>
20179 Kuan-Lin Chen <kuanlinchentw@gmail.com>
20181 * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
20182 * config/nds32/constants.md (unspec_volatile_element): Add
20183 UNSPEC_VOLATILE_RELAX_GROUP.
20184 * config/nds32/nds32-relax-opt.c: New file.
20185 * config/nds32/nds32-predicates.c
20186 (nds32_symbol_load_store_p): New function.
20187 * config/nds32/nds32-protos.h
20188 (nds32_symbol_load_store_p): Declare function.
20189 (make_pass_nds32_relax_opt): Declare new rtl pass function.
20190 * config/nds32/nds32.c
20191 (nds32_register_pass): New function to register pass.
20192 (nds32_register_passes): New function to register passes.
20193 * config/nds32/nds32.md (relax_group): New pattern.
20194 * config/nds32/nds32.opt (mrelax-hint): New option.
20195 * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
20197 2018-04-01 Kito Cheng <kito.cheng@gmail.com>
20199 * config/nds32/t-nds32: Modify files dependency.
20201 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
20203 * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
20204 (PROFILE_HOOK): Define its implementation.
20206 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
20208 * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
20209 type and 32-bit size.
20211 2018-04-01 Jakub Jelinek <jakub@redhat.com>
20213 PR middle-end/85090
20214 * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
20215 (V_128_256): New mode iterator.
20216 (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
20217 (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
20218 (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
20220 * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
20221 V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
20223 2018-03-31 Segher Boessenkool <segher@kernel.crashing.org>
20226 * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
20227 NaN inputs correctly.
20229 2018-03-30 Peter Bergner <bergner@vnet.ibm.com>
20232 * config/rs6000/vsx.md (??r): New mode attribute.
20233 (*vsx_mov<mode>_64bit): Use it.
20234 (*vsx_mov<mode>_32bit): Likewise.
20236 2018-03-30 Martin Sebor <msebor@redhat.com>
20238 PR tree-optimization/84818
20239 * builtins.c (check_access): Use warning_n.
20241 2018-03-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
20244 * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
20246 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
20249 2018-03-30 Julia Koval <julia.koval@intel.com>
20252 * x86-tune.def (movx, partial_reg_dependency): Enable for
20255 2018-03-29 Vladimir Makarov <vmakarov@redhat.com>
20257 PR inline-asm/84985
20258 * lra-constraints.c (process_alt_operands): Move setting
20259 this_alternative_matches below.
20261 2018-03-29 Martin Liska <mliska@suse.cz>
20264 * doc/invoke.texi: Document how LTO works with debug info.
20265 Describe auto-load support of binutils. Mention 'x86-64'
20266 as valid option value of -march option.
20268 2018-03-29 Jakub Jelinek <jakub@redhat.com>
20270 * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
20273 * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
20274 For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
20275 OEP_NO_HASH_CHECK for recursive call, to avoid exponential
20278 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
20281 * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
20282 (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
20283 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
20284 for RS6000_BTM_POWERPC64.
20285 (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
20286 (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
20287 * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
20290 (DIVDEU): Likewise.
20292 2018-03-28 Carl Love <cel@us.ibm.com>
20295 2017-09-27 Carl Love <cel@us.ibm.com>
20297 * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
20298 (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
20299 * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
20302 2018-03-28 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
20304 * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
20305 instead of __vector bool.
20306 (_mm_max_pu8): Likewise.
20307 (_mm_min_pi16): Likewise.
20309 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
20312 * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
20313 (DIVWEUO): Likewise.
20314 (DIVDEO): Likewise.
20315 (DIVDEUO): Likewise.
20316 * config/rs6000/rs6000.c (builtin_function_type): Remove support for
20317 DIVWEUO and DIVDEUO.
20318 * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
20319 (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
20320 (div_extend): Likewise.
20321 * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
20323 (__builtin_divweuo): Likewise.
20324 (__builtin_divdeo): Likewise.
20325 (__builtin_divdeuo): Likewise.
20327 2018-03-28 Jakub Jelinek <jakub@redhat.com>
20330 * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
20331 *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
20333 PR tree-optimization/82004
20334 * gimple-match-head.c (optimize_pow_to_exp): New function.
20335 * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
20336 Don't fold to exp if optimize_pow_to_exp is false.
20338 2018-03-28 Martin Liska <mliska@suse.cz>
20341 * calls.c (initialize_argument_information): Fix trailing space.
20342 * common.opt: Fix typo and provide better explanation for
20343 -fsanitize-coverage option.
20344 * config/i386/i386.opt: Fix typo.
20346 2018-03-28 Jakub Jelinek <jakub@redhat.com>
20347 Martin Liska <mliska@suse.cz>
20350 * gimplify.c (asan_poison_variable): Don't do the check for
20351 gimplify_omp_ctxp here.
20352 (gimplify_decl_expr): Do it here.
20353 (gimplify_target_expr): Likewise.
20355 2018-03-28 Martin Liska <mliska@suse.cz>
20358 * config/i386/i386.c (ix86_function_arg_advance): Do not call
20359 chkp_type_bounds_count if MPX is not enabled.
20361 2018-03-27 Chung-Ju Wu <jasonwucj@gmail.com>
20363 * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
20365 2018-03-27 Michael Meissner <meissner@linux.vnet.ibm.com>
20368 * config/rs6000/rs6000.c (create_complex_muldiv): New helper
20369 function to create the function decl for complex long double
20370 multiply and divide for -mabi=ieeelongdouble.
20371 (init_float128_ieee): Call it.
20373 2018-03-27 H.J. Lu <hongjiu.lu@intel.com>
20376 * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
20377 -fcf-protection=branch -mibt.
20378 * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
20380 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
20383 * config/arm/arm.c (arm_valid_symbolic_address): Handle
20384 arm_word_relocations.
20386 2018-03-27 Cesar Philippidis <cesar@codesourcery.com>
20389 * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
20390 extern array declarations.
20392 2018-03-27 Richard Biener <rguenther@suse.de>
20394 PR middle-end/84067
20395 * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
20396 explicit single_use checks.
20398 2018-03-27 Richard Biener <rguenther@suse.de>
20400 PR tree-optimization/85082
20401 * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
20404 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
20406 * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
20407 * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
20408 Turn on fasynchronous-unwind-tables and funwind-tables.
20410 2018-03-26 Uros Bizjak <ubizjak@gmail.com>
20413 * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
20414 (*bmi_blsr_<mode>_ccz): Ditto.
20416 2018-03-26 Tom de Vries <tom@codesourcery.com>
20418 PR tree-optimization/85063
20419 * omp-general.c (offloading_function_p): New function. Factor out
20421 * omp-offload.c (pass_omp_target_link::gate): ... here.
20422 * omp-general.h (offloading_function_p): Declare.
20423 * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
20424 with attribute omp declare target for offloading functions.
20426 2018-03-24 Richard Sandiford <richard.sandiford@linaro.org>
20428 PR tree-optimization/84005
20429 * tree-data-ref.h (get_base_for_alignment): Declare.
20430 * tree-data-ref.c (get_base_for_alignment_1): New function.
20431 (get_base_for_alignment): Likewise.
20432 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
20433 get_base_for_alignment to find a suitable base object, instead
20434 of always using drb->base_address.
20436 2018-03-23 Jakub Jelinek <jakub@redhat.com>
20438 PR inline-asm/85022
20439 * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
20440 known size by default.
20442 2018-03-23 Vladimir Makarov <vmakarov@redhat.com>
20444 PR inline-asm/85030
20445 * lra-constraints.c (process_alt_operands): Don't match BLKmode
20446 and non BLKmode operands.
20448 2018-03-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
20451 * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
20452 Clean up attributes.
20454 2018-03-23 Richard Biener <rguenther@suse.de>
20457 * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
20458 we are going to emit early debug for LTO.
20460 2018-03-23 Jakub Jelinek <jakub@redhat.com>
20462 PR inline-asm/85034
20463 * function.c (match_asm_constraints_1): Don't optimize if input
20464 doesn't satisfy general_operand predicate for output's mode.
20466 PR inline-asm/85022
20467 * alias.c (write_dependence_p): Don't require for x_canonicalized
20468 non-VOIDmode if x has VOIDmode.
20471 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
20472 just don't try to optimize it rather than assert it never happens.
20474 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
20476 * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
20477 macro expansions for definition of ST_INTERNAL_<mode> and
20478 LD_INTERNAL_<mode> builtins.
20479 * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
20481 * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
20483 (altivec_expand_st_builtin): Likewise.
20484 (altivec_expand_builtin): Remove calls to deleted functions.
20485 (rs6000_address_for_altivec): Delete this function.
20486 * config/rs6000/vector.md: Remove expands for
20487 vector_altivec_load_<mode> and vector_altivec_store_<mode>.
20489 2018-03-22 Sudakshina Das <sudi.das@arm.com>
20492 * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
20493 * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
20494 re-computing once computed.
20495 (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
20496 (arm_init_machine_status): Initialize
20497 machine->static_chain_stack_bytes.
20499 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
20502 * doc/extend.texi: Add four new prototypes for vec_ld.
20503 * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
20504 definitions for more logical presentation.
20505 * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
20506 entries for V1TI variants of __builtin_altivec_ld builtin.
20507 * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
20508 handling of V1TI variant of LVX icode pattern.
20509 (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
20510 (rs6000_gimple_fold_builtin): Likewise.
20511 (altivec_init_builtins): Add code to define
20512 __builtin_altivec_lvx_v1ti function.
20514 2018-03-22 Jakub Jelinek <jakub@redhat.com>
20516 PR inline-asm/84941
20517 * function.c (match_asm_constraints_1): Don't do the optimization
20518 if input isn't a REG, SUBREG, MEM or constant.
20520 2018-03-22 Tom de Vries <tom@codesourcery.com>
20522 PR tree-optimization/84956
20523 * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
20524 bb_has_abnormal_pred.
20526 2018-03-22 Jakub Jelinek <jakub@redhat.com>
20529 * dwarf2asm.c (dw2_output_indirect_constant_1): Set
20530 DECL_INITIAL (decl) to decl at the end.
20531 * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
20532 adjust the comment.
20534 2018-03-21 Joseph Myers <joseph@codesourcery.com>
20536 * doc/extend.texi (__builtin_tgmath): Document when complex
20537 integer types are treated as _Complex _Float64.
20539 2018-03-21 Tom de Vries <tom@codesourcery.com>
20541 * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
20543 2018-03-21 Jakub Jelinek <jakub@redhat.com>
20545 PR tree-optimization/84960
20546 * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
20547 if it is ENTRY block, move them into single succ of ENTRY in that case.
20549 2018-03-21 Richard Sandiford <richard.sandiford@linaro.org>
20551 PR tree-optimization/84811
20552 * poly-int.h (poly_span_traits): Remove the T3 parameter and
20553 promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
20554 (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
20555 (known_subrange_p): Update accordingly. Cast each value involved
20556 in the size comparison, rather than casting the result of the
20559 2018-03-21 Jakub Jelinek <jakub@redhat.com>
20561 PR tree-optimization/84982
20562 * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
20563 by flipping the least significant bit rather than all bits from
20564 bitpos to bitpos + bitsize - 1.
20566 2018-03-21 Nathan Sidwell <nathan@acm.org>
20568 * doc/extend.texi (Deprecated Features): Remove mention of
20569 long-deleted deprecations.
20571 2018-03-21 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
20574 * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
20575 * configure: Regenerate.
20577 2018-03-21 Tom de Vries <tom@codesourcery.com>
20579 PR tree-optimization/83126
20580 * tree-parloops.c (num_phis): New function.
20581 (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
20583 2018-03-21 Nathan Sidwell <nathan@acm.org>
20585 * doc/extend.texi (Deprecated Features): Update deprecated flags,
20586 mention anon-struct/union members and trailing attributes.
20588 2018-03-21 Bin Cheng <bin.cheng@arm.com>
20590 PR tree-optimization/84969
20591 * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
20592 builtin memset partitions if they set different rhs values.
20594 2018-03-21 Jakub Jelinek <jakub@redhat.com>
20596 PR rtl-optimization/84989
20597 * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
20598 VEC_DUPLICATE with scalar result mode.
20600 2018-03-21 Martin Liska <mliska@suse.cz>
20603 * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
20604 not intended return statement.
20606 2018-03-21 Martin Liska <mliska@suse.cz>
20609 * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
20610 (chkp_find_bound_slots_1): Limit number of iterations.
20612 2018-03-20 David H. Gutteridge <dhgutteridge@sympatico.ca>
20615 * Minor grammar fixes for x86 options.
20617 2018-03-20 Jakub Jelinek <jakub@redhat.com>
20620 * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
20621 holding REG_CFA_RESTORE notes, instead turn them into a USE.
20623 2018-03-20 Peter Bergner <bergner@vnet.ibm.com>
20626 * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
20627 (altivec_lvx_<mode>_1op): Likewise.
20628 (altivec_stvx_<mode>_2op): Likewise.
20629 (altivec_stvx_<mode>_1op): Likewise.
20630 (altivec_lvx_<VM2:mode>): New define_expand.
20631 (altivec_stvx_<VM2:mode>): Likewise.
20632 (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
20633 (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
20634 (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
20635 (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
20636 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
20637 (rs6000_gen_lvx): Likewise.
20638 * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
20639 (altivec_expand_stv_builtin): Likewise.
20640 (altivec_expand_builtin): Likewise.
20641 * config/rs6000/vector.md: Likewise.
20643 2018-03-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
20646 * config/arm/arm.c (arm_array_mode_supported_p): Return false for
20649 2018-03-20 Richard Biener <rguenther@suse.de>
20652 * config/i386/i386.c (ix86_add_stmt_cost): Only cost
20653 sign-conversions as zero, fall back to standard scalar_stmt
20656 2018-03-20 Martin Liska <mliska@suse.cz>
20659 * predict.c (rebuild_frequencies): Handle case when we have
20660 PROFILE_ABSENT, but flag_guess_branch_prob is false.
20662 2018-03-20 Jakub Jelinek <jakub@redhat.com>
20665 * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
20666 flag_section_anchors.
20667 * varasm.c (use_blocks_for_decl_p): Remove hack for
20668 dw2_force_const_mem.
20671 * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
20673 (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this. If pseudos can't
20674 be created, use lowpart_subreg of operands[0] rather than operands[0]
20676 (*aarch64_reg_<mode>3_minus_mask): Rename to ...
20677 (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
20678 (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
20679 and n constraint instead of aarch64_shift_imm_di and Usd.
20680 (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
20681 (*aarch64_<optab>_reg_minus<mode>3): ... this.
20683 2018-03-20 Sudakshina Das <sudi.das@arm.com>
20686 * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
20687 to favor GPR over NEON registers.
20688 (<shift>di3_neon): Likewise.
20690 2018-03-20 Tom de Vries <tom@codesourcery.com>
20693 * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
20694 (nvptx_process_pars): Emit bar.sync asap and alap.
20696 2018-03-20 Tom de Vries <tom@codesourcery.com>
20699 * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
20700 seen_label if seen_label is already set.
20702 2018-03-20 Jakub Jelinek <jakub@redhat.com>
20705 * config/i386/i386.c (fold_builtin_cpu): For features above 31
20706 use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
20707 Use 1U instead of 1. Formatting fixes.
20710 * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
20711 instead of TREE_TYPE (s1) for the return value.
20713 2018-03-19 Jakub Jelinek <jakub@redhat.com>
20715 PR tree-optimization/84946
20716 * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
20717 bitsize + bitsize in poly_uint64 rather than poly_int64.
20720 * dwarf2asm.c: Include fold-const.c.
20721 (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
20722 of decl rather than decl itself.
20724 PR rtl-optimization/84643
20725 * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
20727 2018-03-19 Maxim Ostapenko <m.ostapenko@samsung.com>
20730 * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
20731 calling assemble_variable.
20733 2018-03-19 Sudakshina Das <sudi.das@arm.com>
20736 * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
20737 instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
20739 2018-03-19 Jim Wilson <jimw@sifive.com>
20742 * config/riscv/riscv.c (riscv_function_arg_boundary): Use
20743 PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
20744 (riscv_first_stack_step): Likewise.
20745 (riscv_option_override): Use STACK_BOUNDARY instead of
20746 MIN_STACK_BOUNDARY.
20747 * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
20748 MIN_STACK_BOUNDARY.
20749 (BIGGEST_ALIGNMENT): Set to 128.
20750 (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
20751 (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
20754 2018-03-19 Richard Biener <rguenther@suse.de>
20756 PR tree-optimization/84933
20757 * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
20758 values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
20760 2018-03-19 Richard Biener <rguenther@suse.de>
20762 PR tree-optimization/84859
20763 * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
20764 (cond_if_else_store_replacement): Perform sinking operation on
20765 single-store BBs regardless of MAX_STORES_TO_SINK setting.
20766 Generalize what a BB with a single eligible store is.
20768 2018-03-19 Richard Biener <rguenther@suse.de>
20770 PR tree-optimization/84929
20771 * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
20772 chrec_is_positive against non-chrec arg.
20774 2018-03-19 Tamar Christina <tamar.christina@arm.com>
20777 * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
20779 2018-03-18 Martin Liska <mliska@suse.cz>
20781 PR rtl-optimization/84635
20782 * regrename.c (build_def_use): Use matches_mode only when
20785 2018-03-18 Richard Sandiford <richard.sandiford@linaro.org>
20787 PR tree-optimization/84913
20788 * tree-vect-loop.c (vectorizable_reduction): Don't try to
20789 vectorize chains of COND_EXPRs.
20791 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
20793 * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
20795 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
20797 * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
20799 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
20801 * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
20803 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
20804 Kito Cheng <kito.cheng@gmail.com>
20806 * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
20807 * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
20808 (nds32_adjust_reg_alloc_order): New function.
20809 * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
20811 2018-03-17 Kito Cheng <kito.cheng@gmail.com>
20813 * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
20814 nds32_print_operand, nds32_print_operand_address): Use
20815 HOST_WIDE_INT_PRINT_DEC instead.
20817 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
20819 * config/nds32/nds32.c (nds32_register_priority): Modify cost.
20821 2018-03-17 Jakub Jelinek <jakub@redhat.com>
20824 * config/i386/i386.c (initial_ix86_tune_features,
20825 initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
20826 unsigned long long.
20827 (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
20828 to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
20829 rather than 1u << ix86_tune. Formatting fix.
20830 (ix86_option_override_internal): Change ix86_arch_mask from
20831 unsigned int to unsigned HOST_WIDE_INT, initialize to
20832 HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
20833 (ix86_function_specific_restore): Likewise.
20835 2018-03-16 Jakub Jelinek <jakub@redhat.com>
20838 * postreload.c (reload_combine_recognize_pattern): Perform
20839 INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
20840 truncate_int_for_mode the result for the destination's mode.
20843 * hsa-gen.c (mem_type_for_type): Fix comment typo.
20844 * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
20846 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
20849 2018-03-16 Vladimir Makarov <vmakarov@redhat.com>
20852 * lra-assigns.c (lra_split_hard_reg_for): Don't use
20853 regno_allocno_class_array and sorted_pseudos.
20854 * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
20855 insns where regno is used.
20857 2018-03-16 Martin Liska <mliska@suse.cz>
20860 * multiple_target.c (create_dispatcher_calls): Redirect
20861 reference in the symbol table.
20863 2018-03-16 Martin Liska <mliska@suse.cz>
20866 * multiple_target.c (create_dispatcher_calls): Redirect also
20869 2018-03-16 Jakub Jelinek <jakub@redhat.com>
20873 * tree.h (TARGET_EXPR_NO_ELIDE): Define.
20874 * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
20875 TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
20877 2018-03-16 Julia Koval <julia.koval@intel.com>
20879 * doc/invoke.texi (Skylake Server): Add CLWB.
20880 Cannonlake): Remove CLWB.
20882 2018-03-16 Jakub Jelinek <jakub@redhat.com>
20884 PR tree-optimization/84841
20885 * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
20887 (FLOAT_ONE_CONST_TYPE): Define.
20888 (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
20889 (sort_by_operand_rank): Put entries with higher constant_type last
20890 rather than first to match comments.
20892 2018-03-15 Sandra Loosemore <sandra@codesourcery.com>
20894 * config/nios2/nios2.md (movsi_internal): Fix thinko in
20897 2018-03-15 Jakub Jelinek <jakub@redhat.com>
20900 * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
20901 check and use address of target always.
20903 2018-03-15 H.J. Lu <hongjiu.lu@intel.com>
20906 * config/i386/i386.c (indirect_thunk_needed): Update comments.
20907 (indirect_thunk_bnd_needed): Likewise.
20908 (indirect_thunks_used): Likewise.
20909 (indirect_thunks_bnd_used): Likewise.
20910 (indirect_return_needed): New.
20911 (indirect_return_bnd_needed): Likewise.
20912 (output_indirect_thunk_function): Add a bool argument for
20914 (output_indirect_thunk_function): Don't generate alias for
20915 function return thunk.
20916 (ix86_code_end): Call output_indirect_thunk_function to generate
20917 function return thunks.
20918 (ix86_output_function_return): Set indirect_return_bnd_needed
20919 and indirect_return_needed instead of indirect_thunk_bnd_needed
20920 and indirect_thunk_needed.
20922 2018-03-15 Olga Makhotina <olga.makhotina@intel.com>
20924 * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
20925 (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
20926 (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
20928 2018-03-15 David Malcolm <dmalcolm@redhat.com>
20929 Paul Hua <paul.hua.gm@gmail.com>
20932 * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
20934 2018-03-15 Segher Boessenkool <segher@kernel.crashing.org>
20936 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
20937 TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
20938 resp. SFmode cases.
20940 2018-03-15 Tamar Christina <tamar.christina@arm.com>
20943 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
20944 instead of GET_MODE_SIZE when comparing Units.
20946 2018-03-15 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
20949 * varasm.c (hash_section): Return an unchangeble hash value
20950 * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
20951 Return !aarch64_can_use_per_function_literal_pools_p ().
20953 2018-03-15 Jakub Jelinek <jakub@redhat.com>
20956 * optabs.c (emit_conditional_move): Pass address of cmode's copy
20957 rather than address of cmode as last argument to prepare_cmp_insn.
20959 2018-03-15 Julia Koval <julia.koval@intel.com>
20961 * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
20962 F_AVX512VNNI, F_AVX512BITALG): New.
20964 2018-03-14 John David Anglin <danglin@gcc.gnu.org>
20967 * config/pa/pa.c (pa_emit_move_sequence): Always emit secondary reload
20968 insn for floating-point loads and stores.
20970 2018-03-14 Carl Love <cel@us.ibm.com>
20972 * config/rs6000/rs6000-c.c: Add macro definitions for
20973 ALTIVEC_BUILTIN_VEC_PERMXOR.
20974 * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
20975 * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
20976 * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
20977 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
20979 * config/doc/extend.texi: Add prototypes for vec_permxor.
20981 2018-03-14 David Malcolm <dmalcolm@redhat.com>
20984 * diagnostic-show-locus.c (class layout_point): Convert m_line
20985 from int to linenum_type.
20986 (line_span::comparator): Use linenum "compare" function when
20987 comparing line numbers.
20988 (test_line_span): New function.
20989 (layout_range::contains_point): Convert param "row" from int to
20991 (layout_range::intersects_line_p): Likewise.
20992 (layout::will_show_line_p): Likewise.
20993 (layout::print_source_line): Likewise.
20994 (layout::should_print_annotation_line_p): Likewise.
20995 (layout::print_annotation_line): Likewise.
20996 (layout::print_leading_fixits): Likewise.
20997 (layout::annotation_line_showed_range_p): Likewise.
20998 (struct line_corrections): Likewise for field m_row.
20999 (line_corrections::line_corrections): Likewise for param "row".
21000 (layout::print_trailing_fixits): Likewise.
21001 (layout::get_state_at_point): Likewise.
21002 (layout::get_x_bound_for_row): Likewise.
21003 (layout::print_line): Likewise.
21004 (diagnostic_show_locus): Likewise for locals "last_line" and "row".
21005 (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
21006 * input.c (selftest::test_linenum_comparisons): New function.
21007 (selftest::input_c_tests): Call it.
21008 * selftest.c (selftest::test_assertions): Test ASSERT_GT,
21009 ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
21010 * selftest.h (ASSERT_GT): New macro.
21011 (ASSERT_GT_AT): New macro.
21012 (ASSERT_LT): New macro.
21013 (ASSERT_LT_AT): New macro.
21015 2018-03-14 Segher Boessenkool <segher@kernel.crashing.org>
21017 PR rtl-optimization/84780
21018 * combine.c (distribute_links): Don't make a link based on pc_rtx.
21020 2018-03-14 Martin Liska <mliska@suse.cz>
21022 * tree.c (record_node_allocation_statistics): Use
21023 get_stats_node_kind.
21024 (get_stats_node_kind): New function extracted from
21025 record_node_allocation_statistics.
21026 (free_node): Use get_stats_node_kind.
21028 2018-03-14 Richard Biener <rguenther@suse.de>
21030 * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
21031 that the value-set of ANTIC_IN doesn't grow.
21034 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
21036 (BB_VISITED_WITH_VISITED_SUCCS): New define.
21037 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
21039 2018-03-14 Julia Koval <julia.koval@intel.com>
21041 * config.gcc (icelake-client, icelake-server): New.
21043 * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
21044 (initial_ix86_arch_features): Ditto.
21045 (PTA_SKYLAKE): Add SGX.
21046 (PTA_ICELAKE): Remove.
21047 (PTA_ICELAKE_CLIENT): New.
21048 (PTA_ICELAKE_SERVER): New.
21049 (ix86_option_override_internal): Split up icelake on icelake client and
21051 (get_builtin_code_for_version): Ditto.
21052 (fold_builtin_cpu): Ditto.
21053 * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
21054 * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
21055 * config/i386/i386.h (processor_type): Ditto.
21056 * doc/invoke.texi: Ditto.
21058 2018-03-14 Jakub Jelinek <jakub@redhat.com>
21061 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
21062 INTEGER_CST offset, add it together with bitpos / 8 and
21063 sign extend based on POINTER_SIZE.
21067 2017-04-20 Uros Bizjak <ubizjak@gmail.com>
21070 * config/i386/constraints.md (Yc): New register constraint.
21071 * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
21072 Use Yc constraint for alternative 2 of operand 0. Remove
21073 preferred_for_speed attribute.
21075 2018-03-14 Richard Biener <rguenther@suse.de>
21077 PR tree-optimization/84830
21078 * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
21079 with the old one to avoid oscillations.
21081 2018-03-13 Vladimir Makarov <vmakarov@redhat.com>
21084 * lra-assigns.c (find_all_spills_for): Ignore uninteresting
21086 (assign_by_spills): Return a flag of reload assignment failure.
21087 Do not process the reload assignment failures. Do not spill other
21088 reload pseudos if they has the same reg class. Update n if
21090 (lra_assign): Add a return arg. Set up from the result of
21091 assign_by_spills call.
21092 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
21093 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
21094 usage_insns if it is not NULL.
21095 (spill_hard_reg_in_range): New function.
21096 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
21097 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
21098 function prototypes.
21099 (lra_assign): Change prototype.
21100 * lra.c (lra): Add code to deal with fails by splitting hard reg
21103 2018-03-01 Palmer Dabbelt <palmer@sifive.com>
21105 * config/riscv/riscv.opt (mrelax): New option.
21106 * config/riscv/riscv.c (riscv_file_start): Emit ".option
21107 "norelax" when riscv_mrelax is disabled.
21108 * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
21110 2018-03-13 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
21113 * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
21114 reassociation for int modes.
21116 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
21118 * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
21119 Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
21121 * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
21122 * config/aarch64/aarch64-sve.md
21123 (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
21124 (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
21125 (*extend<mode><Vwide>2): Rename to...
21126 (aarch64_sve_extend<mode><Vwide>2): ...this.
21127 (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
21128 renaming the old pattern to...
21129 (aarch64_sve_punpk<perm_hilo>_<mode>): ...this. Only define
21131 (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
21132 define_expand, renaming the old pattern to...
21133 (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
21134 (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
21135 (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
21136 account when deciding which SVE instruction the optab should use.
21137 (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
21139 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
21141 * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
21142 (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
21143 (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
21144 (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
21145 (tlsdesc_small_<mode>): Turn a define_expand and use
21146 tlsdesc_small_sve_<mode> for SVE. Rename original define_insn to...
21147 (tlsdesc_small_advsimd_<mode>): ...this.
21148 (tlsdesc_small_sve_<mode>): New pattern.
21150 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
21152 * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
21153 (UNSPEC_UMUL_HIGHPART): New constants.
21154 (MUL_HIGHPART): New int iteraor.
21155 (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
21156 * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
21158 (*<su>mul<mode>3_highpart): New define_insn.
21160 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
21163 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
21166 2018-03-13 Martin Liska <mliska@suse.cz>
21169 * (sem_item_optimizer::sem_item_optimizer): Initialize new
21171 (sem_item_optimizer::~sem_item_optimizer): Release it.
21172 (sem_item_optimizer::merge_classes): Register variable aliases.
21173 (sem_item_optimizer::fixup_pt_set): New function.
21174 (sem_item_optimizer::fixup_points_to_sets): Likewise.
21175 * ipa-icf.h: Declare new variables and functions.
21177 2018-03-13 Jakub Jelinek <jakub@redhat.com>
21179 PR middle-end/84834
21180 * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
21181 integer_pow2p@2 and test integer_pow2p in condition.
21182 (A < 0 ? C : 0): Similarly for @1.
21184 PR middle-end/84831
21185 * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
21186 characters starting at p contain '\0' character, don't look beyond
21190 * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
21191 pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
21194 * reg-stack.c (change_stack): Change update_end var from int to
21195 rtx_insn *, if non-NULL don't update just BB_END (current_block), but
21196 also call set_block_for_insn on the newly added insns and rescan.
21199 * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
21200 on the last operand.
21203 * tree.c (stabilize_reference_1): Return save_expr (e) for
21204 STATEMENT_LIST even if it doesn't have side-effects.
21206 2018-03-12 Jonathan Wakely <jwakely@redhat.com>
21208 * doc/invoke.texi (-mclflushopt): Fix spelling of option.
21210 2018-03-12 Renlin Li <renlin.li@arm.com>
21212 * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
21213 aarch64_output_scalar_simd_mov_immediate.
21215 2018-03-12 Martin Sebor <msebor@redhat.com>
21217 PR tree-optimization/83456
21218 * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
21219 for perfectly overlapping calls to memcpy.
21220 (gimple_fold_builtin_memory_chk): Same.
21221 (gimple_fold_builtin_strcpy): Handle no-warning.
21222 (gimple_fold_builtin_stxcpy_chk): Same.
21223 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
21225 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
21227 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
21228 parameter. Use it for SFmode.
21229 (rs6000_function_arg_advance_1): Adjust.
21230 (rs6000_function_arg): Adjust.
21231 (rs6000_gimplify_va_arg): Pass false for that new parameter.
21233 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
21235 PR rtl-optimization/84169
21236 PR rtl-optimization/84780
21237 * combine.c (can_combine_p): Check for a 2-insn combination whether
21238 the destination register is used between the two insns, too.
21240 2018-03-12 Richard Biener <rguenther@suse.de>
21242 PR tree-optimization/84803
21243 * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
21244 for refs DR analysis didn't process.
21246 2018-03-12 Richard Biener <rguenther@suse.de>
21248 PR tree-optimization/84777
21249 * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
21250 force-vectorize loops ignore whether we are optimizing for size.
21252 2018-03-12 Chung-Ju Wu <jasonwucj@gmail.com>
21254 * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
21255 (TARGET_MD_ASM_ADJUST): Define.
21257 2018-03-12 Monk Chiang <sh.chiang04@gmail.com>
21258 Kito Cheng <kito.cheng@gmail.com>
21259 Chung-Ju Wu <jasonwucj@gmail.com>
21261 * config/nds32/nds32.c (nds32_compute_stack_frame,
21262 nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
21263 nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
21264 nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
21265 nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
21266 * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
21267 NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
21268 * config/nds32/nds32.md (prologue, epilogue): Use macro
21269 NDS32_V3PUSH_AVAILABLE_P to do checking.
21271 2018-03-11 Jakub Jelinek <jakub@redhat.com>
21274 * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
21275 DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
21276 but on TYPE_SIZE. Don't do anything for ENUM_IS_OPAQUE if not creating
21277 a new die. Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE. Guard
21278 addition of most attributes on !orig_type_die or the attribute not
21279 being present already. Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
21281 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
21282 Chung-Ju Wu <jasonwucj@gmail.com>
21284 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
21285 __NDS32_VH__ macro.
21286 * config/nds32/nds32.opt (mvh): New option.
21288 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
21289 Chung-Ju Wu <jasonwucj@gmail.com>
21291 * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
21293 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
21294 * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
21297 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
21298 Chung-Ju Wu <jasonwucj@gmail.com>
21300 * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
21302 * config/nds32/nds32-multiple.md (strlensi): New pattern.
21303 * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
21305 2018-03-11 Monk Chiang <sh.chiang04@gmail.com>
21306 Kito Cheng <kito.cheng@gmail.com>
21307 Chung-Ju Wu <jasonwucj@gmail.com>
21309 * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
21310 UNSPEC_FFMISM and UNSPEC_FLMISM.
21311 * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
21312 for ffb, ffmism and flmism.
21313 * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
21314 (unspec_ffmism): Ditto.
21315 (unspec_flmism): Ditto.
21316 (nds32_expand_builtin_impl): Check if string extension is available.
21317 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
21318 NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
21320 2018-03-10 Vladimir Makarov <vmakarov@redhat.com>
21323 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
21326 * lra-assigns.c (assign_by_spills): Return a flag of reload
21327 assignment failure. Do not process the reload assignment
21328 failures. Do not spill other reload pseudos if they has the same
21330 (lra_assign): Add a return arg. Set up from the result of
21331 assign_by_spills call.
21332 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
21333 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
21334 usage_insns if it is not NULL.
21335 (spill_hard_reg_in_range): New function.
21336 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
21337 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
21338 function prototypes.
21339 (lra_assign): Change prototype.
21340 * lra.c (lra): Add code to deal with fails by splitting hard reg
21343 2018-03-10 H.J. Lu <hongjiu.lu@intel.com>
21346 * config/i386/i386.opt: Replace Enforcment with Enforcement.
21348 2018-03-10 Alexandre Oliva <aoliva@redhat.com>
21351 * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
21352 (dw_val_node): Add val_symbolic_view.
21353 * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
21354 (symview_upper_bound): New.
21355 (new_line_info_table): Initialize symviews_since_reset.
21356 (dwarf2out_source_line): Count symviews_since_reset and set
21357 symview_upper_bound.
21358 (dw_val_equal_p): Handle symview.
21359 (add_AT_symview): New.
21360 (print_dw_val): Handle symview.
21361 (attr_checksum, attr_checksum_ordered): Likewise.
21362 (same_dw_val_p, size_of_die): Likewise.
21363 (value_format, output_die): Likewise.
21364 (add_high_low_attributes): Use add_AT_symview for entry_view.
21365 (dwarf2out_finish): Reset symview_upper_bound, clear
21368 2018-03-09 Peter Bergner <bergner@vnet.ibm.com>
21371 * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
21372 Add strict argument and use it.
21373 (rs6000_split_multireg_move): Update for new strict argument.
21374 (mem_operand_gpr): Disallow all non-offsettable addresses.
21375 * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
21377 2018-03-09 Jakub Jelinek <jakub@redhat.com>
21380 * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
21381 temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
21382 * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
21385 * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
21386 decl, use remap_type if we want to use the type.
21388 2018-03-09 Martin Sebor <msebor@redhat.com>
21390 PR tree-optimization/84526
21391 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
21393 (builtin_access::generic_overlap): Be prepared to handle non-array
21396 2018-03-09 Alexandre Oliva <aoliva@redhat.com>
21398 PR rtl-optimization/84682
21399 * lra-constraints.c (process_address_1): Check is_address flag
21400 for address constraints.
21401 (process_alt_operands): Likewise.
21402 * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
21403 preprocess_constraints.
21404 * recog.h (preprocess_constraints): Add oploc parameter.
21406 * recog.c (preprocess_constraints): Test address_operand for
21407 CT_ADDRESS constraints.
21409 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
21412 * lra-assigns.c (assign_by_spills): Return a flag of reload
21413 assignment failure. Do not process the reload assignment
21414 failures. Do not spill other reload pseudos if they has the same
21416 (lra_assign): Add a return arg. Set up from the result of
21417 assign_by_spills call.
21418 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
21419 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
21420 usage_insns if it is not NULL.
21421 (spill_hard_reg_in_range): New function.
21422 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
21423 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
21424 function prototypes.
21425 (lra_assign): Change prototype.
21426 * lra.c (lra): Add code to deal with fails by splitting hard reg
21429 2018-03-09 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
21432 * common/config/arm/arm-common.c (arm_parse_arch_option_name):
21433 Accept complain bool parameter. Only emit errors if it is true.
21434 (arm_parse_cpu_option_name): Likewise.
21435 (arm_target_thumb_only): Adjust callers of the above.
21436 * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
21437 prototype to take a default true bool parameter.
21438 (arm_parse_arch_option_name): Likewise.
21440 2018-03-09 David Malcolm <dmalcolm@redhat.com>
21441 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
21445 * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
21446 * configure: Regenerate.
21447 * configure.ac ("linker --version-script option"): New.
21448 ("linker soname option"): New.
21450 2018-03-09 Richard Biener <rguenther@suse.de>
21452 PR tree-optimization/84775
21453 * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
21454 immediate uses of predicate stmts and mark them modified.
21457 PR tree-optimization/84178
21458 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
21460 (version_loop_for_if_conversion): Delay update_ssa call.
21461 (tree_if_conversion): Delay update_ssa until after predicate
21464 2018-03-09 Eric Botcazou <ebotcazou@adacore.com>
21467 * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
21468 when the function accesses prior frames.
21470 2018-03-08 Jakub Jelinek <jakub@redhat.com>
21473 * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
21474 gen_llsym, otherwise call maybe_gen_llsym.
21476 PR inline-asm/84742
21477 * recog.c (asm_operand_ok): Return 0 if multi-character constraint
21478 has ',' character inside of it.
21480 2018-03-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
21483 * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
21484 as clobbering CC_REGNUM.
21486 2018-03-08 Richard Biener <rguenther@suse.de>
21488 PR middle-end/84552
21489 * tree-scalar-evolution.c: Include tree-into-ssa.h.
21490 (follow_copies_to_constant): Do not follow SSA names registered
21493 2018-03-08 Richard Biener <rguenther@suse.de>
21495 PR tree-optimization/84178
21496 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
21498 (version_loop_for_if_conversion): Delay update_ssa call.
21499 (tree_if_conversion): Delay update_ssa until after predicate
21502 2018-03-08 David Malcolm <dmalcolm@redhat.com>
21504 PR tree-optimization/84178
21505 * tree-if-conv.c (release_bb_predicate): Remove the
21506 the assertion that the stmts have NULL use_ops.
21507 Discard the statements, asserting that they haven't
21508 yet been added to a BB.
21510 2018-03-08 Richard Biener <rguenther@suse.de>
21512 PR tree-optimization/84746
21513 * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
21514 (phi_translate): Pass in destination ANTIC_OUT set.
21515 (phi_translate_1): Likewise. For a simplified result lookup
21516 a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
21517 (phi_translate_set): Adjust.
21518 (do_pre_regular_insertion): Likewise.
21519 (do_pre_partial_partial_insertion): Likewise.
21521 2018-03-08 Martin Liska <mliska@suse.cz>
21523 PR gcov-profile/84735
21524 * doc/gcov.texi: Document usage of profile files.
21525 * gcov-io.h: Document changes in the format.
21527 2018-03-08 Alexandre Oliva <aoliva@redhat.com>
21531 * dwarf2out.c (struct dw_line_info_table): Update comments for
21533 (FORCE_RESET_NEXT_VIEW): New.
21534 (FORCE_RESETTING_VIEW_P): New.
21535 (RESETTING_VIEW_P): Check for -1 too.
21536 (ZERO_VIEW_P): Likewise.
21537 (new_line_info_table): Force-reset next view.
21538 (dwarf2out_begin_function): Likewise.
21539 (dwarf2out_source_line): Simplify zero_view_p initialization.
21540 Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
21541 view directly. Omit view when omitting .loc at line 0.
21543 2018-03-08 Jakub Jelinek <jakub@redhat.com>
21545 PR tree-optimization/84740
21546 * tree-switch-conversion.c (process_switch): Call build_constructors
21547 only if info.phi_count is non-zero.
21549 PR tree-optimization/84739
21550 * tree-tailcall.c (find_tail_calls): Check call arguments against
21551 DECL_ARGUMENTS (current_function_decl) rather than
21552 DECL_ARGUMENTS (func) when checking for tail recursion.
21554 2018-03-07 Jakub Jelinek <jakub@redhat.com>
21556 * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
21557 Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
21558 Volker Reichelt's entry and add entries for people that perform
21559 GCC fuzzy testing and report numerous bugs.
21561 2018-03-07 Segher Boessenkool <segher@kernel.crashing.org>
21564 * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
21565 readonly data in sdata, if that is disabled.
21566 * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
21567 * doc/invoke.texi (RS/6000 and PowerPC Options): Document
21568 -mreadonly-in-sdata option.
21570 2018-03-07 Martin Sebor <msebor@redhat.com>
21572 PR tree-optimization/84468
21573 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
21574 basic block when looking for nul assignment.
21576 2018-03-07 Eric Botcazou <ebotcazou@adacore.com>
21579 * except.h (output_function_exception_table): Adjust prototype.
21580 * except.c (output_function_exception_table): Remove FNNAME parameter
21581 and add SECTION parameter. Ouput one part of the table at a time.
21582 * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
21583 the first part of the exception table and emit unwind directives.
21584 * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
21585 (i386_pe_seh_cold_init): Likewise.
21586 * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
21587 (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
21588 * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
21589 (ix86_output_call_insn): Emit a nop in one more case for SEH.
21590 * config/i386/winnt.c: Include except.h.
21591 (struct seh_frame_state): Add reg_offset, after_prologue and
21592 in_cold_section fields.
21593 (i386_pe_seh_end_prologue): Set seh->after_prologue.
21594 (i386_pe_seh_cold_init): New function.
21595 (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
21596 to seh->in_cold_section.
21597 (seh_emit_push): Record the offset of the push.
21598 (seh_emit_save): Record the offet of the save.
21599 (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
21600 Test seh->after_prologue to disregard the epilogue.
21601 (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
21602 (i386_pe_end_cold_function): New function.
21604 2018-03-07 Jakub Jelinek <jakub@redhat.com>
21607 * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
21608 aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
21611 * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
21613 * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
21614 don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
21616 PR middle-end/84723
21617 * multiple_target.c: Include tree-inline.h and intl.h.
21618 (expand_target_clones): Diagnose and fail if node->definition and
21619 !tree_versionable_function_p (node->decl).
21621 2018-03-06 John David Anglin <danglin@gcc.gnu.org>
21623 * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
21625 (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
21626 (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
21627 * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
21629 2018-03-06 Jakub Jelinek <jakub@redhat.com>
21632 * combine.c (try_combine): Use reg_or_subregno instead of handling
21633 just paradoxical SUBREGs and REGs.
21635 2018-03-06 Claudiu Zissulescu <claziss@synopsys.com>
21637 * config/arc/arc.c (arc_finalize_pic): Remove function.
21638 (arc_must_save_register): We use single base PIC register, remove
21639 checks to save/restore the PIC register.
21640 (arc_expand_prologue): Likewise.
21641 * config/arc/arc-protos.h (arc_set_default_type_attributes):
21643 (arc_verify_short): Likewise.
21644 (arc_attr_type): Likewise.
21645 * config/arc/arc.c (arc_set_default_type_attributes): Remove.
21646 (walk_stores): Likewise.
21647 (arc_address_cost): Make it static.
21648 (arc_verify_short): Likewise.
21649 (branch_dest): Likewise.
21650 (arc_attr_type): Likewise.
21651 * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
21652 (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
21653 (arc_final_prescan_insn): Remove inserting the nops due to
21654 hardware hazards. It is done in reorg step.
21655 (insn_length_variant_t): Remove.
21656 (insn_length_parameters_t): Likewise.
21657 (arc_insn_length_parameters): Likewise.
21658 (arc_get_insn_variants): Likewise.
21659 * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
21661 2018-03-06 Jakub Jelinek <jakub@redhat.com>
21663 PR inline-asm/84683
21664 * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
21667 PR tree-optimization/84687
21668 * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
21670 * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
21672 2018-03-05 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
21674 * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
21675 Rename to ppc_speculation_barrier.
21676 * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
21677 __builtin_ppc_speculation_barrier.
21679 2018-03-05 Jakub Jelinek <jakub@redhat.com>
21682 * combine.c (combine_simplify_rtx): Don't try to simplify if
21683 if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
21686 2018-03-05 Segher Boessenkool <segher@kernel.crashing.org>
21688 * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
21689 to 32 bytes when compiling for POWER9.
21691 2018-03-05 Jakub Jelinek <jakub@redhat.com>
21694 * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
21695 regparm >= 3 with no arg reg available also for calls with
21696 flag_force_indirect_call. Pass decl to ix86_function_regparm.
21699 * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
21701 (*<plusminus_insn><mode>3): Likewise. Remove <mask_operand3> uses.
21703 2018-03-05 Peter Bergner <bergner@vnet.ibm.com>
21706 * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
21708 2018-03-05 Richard Biener <rguenther@suse.de>
21710 PR tree-optimization/84486
21711 * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
21712 When inserting a __builtin_assume_aligned call set the LHS
21713 SSA name alignment info accordingly.
21715 2018-03-05 Wilco Dijkstra <wdijkstr@arm.com>
21717 PR tree-optimization/84114
21718 * config/aarch64/aarch64.c (aarch64_reassociation_width)
21719 Avoid reassociation of FLOAT_MODE addition.
21721 2018-03-05 Olga Makhotina <olga.makhotina@intel.com>
21723 * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
21724 OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
21725 OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
21726 (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
21727 * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
21728 * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
21729 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
21731 * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
21732 __builtin_ia32_wbinvd): New builtins.
21733 (SPECIAL_ARGS2): New.
21734 * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
21735 (SPECIAL_ARGS2): New.
21736 * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
21737 (ix86_valid_target_attribute_inner_p): Ditto.
21738 (ix86_init_mmx_sse_builtins): Add special_args2.
21739 * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
21740 TARGET_WBNOINVD_P): New.
21741 * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
21742 (define_insn "wbinvd", define_insn "wbnoinvd"): New.
21743 * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
21744 * config/i386/immintrin.h (_wbinvd): New intrinsic.
21745 * config/i386/pconfigintrin.h: New file.
21746 * config/i386/wbnoinvdintrin.h: Ditto.
21747 * config/i386/x86intrin.h: Add headers pconfigintrin.h and
21749 * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
21751 2018-03-05 Richard Biener <rguenther@suse.de>
21753 PR tree-optimization/84670
21754 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
21756 (BB_VISITED_WITH_VISITED_SUCCS): New define.
21757 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
21758 (compute_antic_aux): Only assert the number of values in ANTIC_IN
21759 doesn't grow if all successors (recursively) were visited at least
21762 2018-03-05 Richard Biener <rguenther@suse.de>
21764 PR tree-optimization/84650
21765 * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
21766 if executed in the loop pipeline.
21768 2018-03-05 Sandra Loosemore <sandra@codesourcery.com>
21770 * doc/configfiles.texi (Configuration Files): Move info about
21771 conditionalizing $target-protos.h to...
21772 * doc/sourcebuild.texi (Back End): Here. Explain how $target.h
21773 differs from $target-protos.h.
21775 2018-03-05 Kito Cheng <kito.cheng@gmail.com>
21776 Chung-Ju Wu <jasonwucj@gmail.com>
21778 * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
21779 * config/nds32/nds32-multiple.md (setmemsi): Define.
21780 * config/nds32/nds32-memory-manipulation.c
21781 (nds32_gen_dup_4_byte_to_word_value): New.
21782 (emit_setmem_word_loop): New.
21783 (emit_setmem_byte_loop): New.
21784 (nds32_expand_setmem_loop): New.
21785 (nds32_expand_setmem_loop_v3m): New.
21786 (nds32_expand_setmem_unroll): New.
21787 (nds32_expand_setmem): New.
21789 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
21790 Chung-Ju Wu <jasonwucj@gmail.com>
21792 * config/nds32/nds32-memory-manipulation.c
21793 (nds32_emit_load_store): New.
21794 (nds32_emit_post_inc_load_store): New.
21795 (nds32_emit_mem_move): New.
21796 (nds32_emit_mem_move_block): New.
21797 (nds32_expand_movmemsi_loop_unknown_size): New.
21798 (nds32_expand_movmemsi_loop_known_size): New.
21799 (nds32_expand_movmemsi_loop): New.
21800 (nds32_expand_movmemsi_unroll): New.
21801 (nds32_expand_movmemqi): Rename ...
21802 (nds32_expand_movmemsi): ... to this.
21803 * config/nds32/nds32-multiple.md (movmemqi): Rename ...
21804 (movmemsi): ... to this.
21805 * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
21806 (nds32_expand_movmemsi): ... to this.
21808 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
21809 Monk Chiang <sh.chiang04@gmail.com>
21810 Chung-Ju Wu <jasonwucj@gmail.com>
21812 * config/nds32/nds32-protos.h
21813 (nds32_expand_load_multiple): New arguments.
21814 (nds32_expand_store_multiple): Ditto.
21815 (nds32_valid_multiple_load_store): Rename ...
21816 (nds32_valid_multiple_load_store_p): ... to this.
21817 * config/nds32/nds32-memory-manipulation.c
21818 (nds32_expand_load_multiple): Refine implementation.
21819 (nds32_expand_store_multiple): Ditto.
21820 * config/nds32/nds32-multiple.md
21821 (load_multiple): Update nds32_expand_load_multiple interface.
21822 (store_multiple): Update nds32_expand_store_multiple interface.
21823 * config/nds32/nds32-predicates.c
21824 (nds32_valid_multiple_load_store): Rename ...
21825 (nds32_valid_multiple_load_store_p): ... to this and refine
21827 * config/nds32/predicates.md
21828 (nds32_load_multiple_and_update_address_operation): New predicate.
21829 (nds32_store_multiple_and_update_address_operation): New predicate.
21831 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
21832 Chung-Ju Wu <jasonwucj@gmail.com>
21834 * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
21835 (combo): New attribute.
21836 * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
21838 2018-03-03 Chung-Ju Wu <jasonwucj@gmail.com>
21840 * config/nds32/nds32.opt: Change -mcmodel= default value.
21842 2018-03-03 Kito Cheng <kito.cheng@gmail.com>
21843 Monk Chiang <sh.chiang04@gmail.com>
21844 Chung-Ju Wu <jasonwucj@gmail.com>
21846 * config/nds32/constants.md (unspec_element): New enum.
21847 * config/nds32/constraints.md (Umw): New constraint.
21848 * config/nds32/nds32-intrinsic.c: Add more builtin functions.
21849 * config/nds32/nds32-intrinsic.md: Likewise.
21850 * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
21851 (nds32_valid_smw_lwm_base_p): New.
21852 (nds32_output_smw_single_word): New.
21853 (nds32_output_lmw_single_word): New.
21854 (nds32_expand_unaligned_load): New.
21855 (nds32_expand_unaligned_store): New.
21856 * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
21857 (nds32_output_smw_single_word): Declare.
21858 (nds32_output_lmw_single_word): Declare.
21859 (nds32_expand_unaligned_load): Declare.
21860 (nds32_expand_unaligned_store): Declare.
21861 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
21862 NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
21863 NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
21864 NDS32_BUILTIN_UASTORE_DW.
21865 * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
21868 2018-03-03 Monk Chiang <sh.chiang04@gmail.com>
21869 Kito Cheng <kito.cheng@gmail.com>
21870 Chung-Ju Wu <jasonwucj@gmail.com>
21872 * config/nds32/nds32-intrinsic.c
21873 (nds32_expand_builtin_null_ftype_reg): Delete.
21874 (nds32_expand_builtin_reg_ftype_imm): Ditto.
21875 (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
21876 (nds32_read_argument): New.
21877 (nds32_legitimize_target): Ditto.
21878 (nds32_legitimize_argument): Ditto.
21879 (nds32_check_constant_argument): Ditto.
21880 (nds32_expand_unop_builtin): Ditto.
21881 (nds32_expand_unopimm_builtin): Ditto.
21882 (nds32_expand_binop_builtin): Ditto.
21883 (nds32_builtin_decl_impl): Ditto.
21884 (builtin_description): Ditto.
21885 (nds32_expand_builtin_impl): Rewrite with new infrastructure.
21886 (nds32_init_builtins_impl): Ditto.
21887 * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
21888 (nds32_builtin_decl): New.
21889 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
21890 * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
21892 2018-03-02 Jeff Law <law@redhat.com>
21894 * reorg.c (stop_search_p): Handle DEBUG_INSN.
21895 (redundant_insn, fill_simple_delay_slots): Likewise.
21896 (fill_slots_from_thread): Likewise.
21897 * resource.c (mark_referenced_resources): Likewise.
21898 (mark_set_resources, find_dead_or_set_registers): Likewise.
21900 2018-03-02 Jakub Jelinek <jakub@redhat.com>
21902 * substring-locations.h (format_warning_va): Formatting fix for
21903 ATTRIBUTE_GCC_DIAG.
21904 (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
21906 (format_warning_n_va, format_warning_at_substring_n): New prototypes.
21907 * substring-locations.c: Include intl.h.
21908 (format_warning_va): Turned into small wrapper around
21909 format_warning_n_va, renamed to ...
21910 (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
21911 rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
21913 (format_warning_at_substring_n): New function.
21914 * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
21915 (fmtwarn): Add ATTRIBUTE_GCC_DIAG. Turn into a copy of
21916 format_warning_at_substring with just a shorter name instead of
21917 const function pointer.
21918 (fmtwarn_n): New function.
21919 (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
21920 appropriate, get rid of all the fmtstr temporaries, move conditionals
21921 with G_() wrapped string literals directly into fmtwarn arguments,
21922 cast dir.len to (int), formatting fixes.
21924 2018-03-02 Thomas Schwinge <thomas@codesourcery.com>
21926 * doc/invoke.texi: Remove "Cilk Plus" references.
21928 2018-03-02 Jakub Jelinek <jakub@redhat.com>
21929 Richard Biener <rguenther@suse.de>
21932 * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
21933 for error or warning attributes if CALL_FROM_THUNK_P is set.
21936 2018-03-02 Jakub Jelinek <jakub@redhat.com>
21939 * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
21940 __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
21943 * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
21944 __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
21946 * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
21947 instead of -1U in last predictors element's probability member.
21949 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
21952 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
21953 arguments if they are comparable.
21955 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
21957 PR tree-optimization/84634
21958 * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
21959 masks and masked_loop_p with a single loop_masks, making sure it's
21960 null for bb vectorization.
21962 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
21964 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
21965 (vect_analyze_data_ref_access): Use loop->safe_len rather than
21966 loop->force_vectorize to check whether there is no alias.
21968 2018-03-02 Jakub Jelinek <jakub@redhat.com>
21971 * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
21973 * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
21975 (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
21976 * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
21977 instead of a loop around prev_real_insn.
21978 * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
21981 PR inline-asm/84625
21982 * config/i386/i386.c (ix86_print_operand): Use conditional
21983 output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
21986 2018-03-02 Richard Biener <rguenther@suse.de>
21988 PR tree-optimization/84427
21989 * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
21990 (bitmap_set_subtract_values): Rewrite to handle multiple
21993 (prune_clobbered_mems): Likewise.
21994 (phi_translate): Take edge instead of pred/phiblock.
21995 (phi_translate_1): Likewise.
21996 (phi_translate_set): Likewise. Insert all translated
21997 exprs for a value into the set, keeping possibly multiple
21998 expressions per value.
21999 (compute_antic_aux): Adjust for phi_translate changes.
22000 When intersecting union the expressions and prune those
22001 not in the final value set, keeping possibly multiple
22002 expressions per value. Do not use value-insertion
22003 for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
22004 all expressions. Add verification that the value-sets
22005 only shrink during iteration.
22006 (compute_partial_antic_aux): Adjust for the phi_translate changes.
22007 (do_pre_regular_insertion): Likewise.
22008 (do_pre_partial_partial_insertion): Likewise.
22010 2018-03-02 Richard Biener <rguenther@suse.de>
22013 * config/darwin.c (saved_debug_info_level): New static global.
22014 (darwin_asm_lto_start): Disable debug info generation for LTO out.
22015 (darwin_asm_lto_end): Restore debug info generation settings.
22017 2018-03-01 Martin Liska <mliska@suse.cz>
22020 * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
22021 volatile arguments.
22023 2018-03-01 Richard Biener <rguenther@suse.de>
22026 * dwarf2out.c (gen_variable_die): Properly handle late VLA
22027 type annotation with LTO when debug was disabled at compile-time.
22029 2018-03-01 Matthew Fortune <mfortune@gmail.com>
22031 * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
22033 (mips_final_postscan_insn): Likewise.
22035 2018-03-01 Richard Sandiford <richard.sandiford@linaro.org>
22037 PR rtl-optimization/84528
22038 * alias.c (init_alias_target): Add commentary.
22039 (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
22040 a unique base value if the frame pointer is not eliminated
22041 to the stack pointer.
22043 2018-03-01 Tom de Vries <tom@codesourcery.com>
22045 PR rtl-optimization/83327
22046 * lra-int.h (hard_regs_spilled_into): Declare.
22047 * lra.c (hard_regs_spilled_into): Define.
22048 (init_reg_info): Init hard_regs_spilled_into.
22049 * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
22050 * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
22051 (process_bb_lives): Handle hard_regs_spilled_into.
22052 (lra_create_live_ranges_1): Before doing liveness propagation, clear
22053 regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
22055 2018-02-28 David Edelsohn <dje.gcc@gmail.com>
22057 * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
22058 (powerpc-ibm-aix[789]*): Default to AIX 7.2.
22059 * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
22060 * config/rs6000/aix72.h: New file.
22062 2018-02-28 Jakub Jelinek <jakub@redhat.com>
22064 * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
22065 instead of warning_at with conditional singular and plural messages
22069 * stor-layout.c (update_alignment_for_field): For
22070 targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
22071 && !DECL_PACKED (field), do the alignment update, just use
22072 only desired_align instead of MAX (type_align, desired_align)
22074 (place_field): Don't do known_align < desired_align handling
22075 early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
22076 is non-NULL, instead do it after rli->prev_field handling and
22077 only if not within a bitfield word. For DECL_PACKED (field)
22078 use type_align of BITS_PER_UNIT.
22080 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
22082 * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
22083 superfluous parentheses and trailing spaces.
22085 2018-02-28 Richard Biener <rguenther@suse.de>
22087 PR tree-optimization/84584
22088 * graphite-scop-detection.c (scop_detection::add_scop): Discard
22089 SCoPs with fake exit edge.
22091 2018-02-28 Martin Liska <mliska@suse.cz>
22094 * timevar.c (timer::print): Fix format to properly print 100%
22097 2018-02-28 Richard Biener <rguenther@suse.de>
22099 PR middle-end/84607
22100 * genmatch.c (capture_info::walk_match): Do not mark
22101 captured expressions without operands as expr_p given
22102 they act more like predicates and should be subject to
22103 "lost tail" side-effect preserving.
22105 2018-02-28 Alexandre Oliva <aoliva@redhat.com>
22107 PR rtl-optimization/81611
22108 * auto-inc-dec.c (attempt_change): Move dead note from
22109 mem_insn if it's the next use of regno
22110 (find_address): Take address use of reg holding
22111 non-incremented value. Add parm to limit search to the named
22113 (merge_in_block): Attempt to use a mem insn that is the next
22114 use of the original regno.
22116 2018-02-27 Martin Sebor <msebor@redhat.com>
22119 * doc/invoke.texi (-Wmissing-attributes): New option.
22120 * print-tree.c (print_node): Handle DECL_UNINLINABLE.
22122 2018-02-27 Martin Sebor <msebor@redhat.com>
22124 PR translation/84207
22125 * diagnostic-core.h (warning_n, error_n, inform_n): Change
22126 n argument to unsigned HOST_WIDE_INT.
22127 * diagnostic.c (warning_n, error_n, inform_n): Ditto.
22128 (diagnostic_n_impl): Ditto. Handle arguments in excess of LONG_MAX.
22129 * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
22130 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
22132 2018-02-27 Richard Biener <rguenther@suse.de>
22134 PR tree-optimization/84512
22135 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
22136 Do not use the estimate returned from record_stmt_cost for
22137 the scalar iteration cost but sum properly using add_stmt_cost.
22139 2018-02-27 Richard Biener <rguenther@suse.de>
22141 PR tree-optimization/84466
22142 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
22143 Adjust last change to less strictly validate use operands.
22145 2018-02-27 Martin Liska <mliska@suse.cz>
22147 PR gcov-profile/84548
22148 * gcov.c (process_file): Allow partial overlap and consider it
22149 also as group functions.
22150 (output_lines): Properly calculate range of lines for a group.
22152 2018-02-27 Martin Liska <mliska@suse.cz>
22154 * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
22155 'ggc' suffixes. Change first column width.
22156 (timer::print): Fix formatting of the column.
22158 2018-02-27 Alexandre Oliva <aoliva@redhat.com>
22160 * tree-ssa-live.c (remove_unused_scope_block_p): Do not
22161 preserve inline entry blocks for the sake of debug inline
22162 entry point markers alone.
22163 (remove_unused_locals): Suggest in comments a better place to
22164 force the preservation of inline entry blocks that are
22165 otherwise unused, but do not preserve them.
22167 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
22169 * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
22171 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
22174 * config/i386/constraints.md (Bs): Replace
22175 ix86_indirect_branch_register with
22176 TARGET_INDIRECT_BRANCH_REGISTER.
22178 * config/i386/i386.md (indirect_jump): Likewise.
22179 (tablejump): Likewise.
22180 (*sibcall_memory): Likewise.
22181 (*sibcall_value_memory): Likewise.
22182 Peepholes of indirect call and jump via memory: Likewise.
22183 (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
22184 (*sibcall_value_GOT_32): Likewise.
22185 * config/i386/predicates.md (indirect_branch_operand): Likewise.
22186 (GOT_memory_operand): Likewise.
22187 (call_insn_operand): Likewise.
22188 (sibcall_insn_operand): Likewise.
22189 (GOT32_symbol_operand): Likewise.
22190 * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
22192 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
22194 PR rtl-optimization/83496
22195 * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
22196 booleans to RTXes. Call fix_reg_dead_note on every non-null element.
22197 (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
22198 redundant insn, if any.
22199 (relax_delay_slots): Likewise.
22200 (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
22202 2018-02-26 Richard Sandiford <richard.sandiford@linaro.org>
22204 PR tree-optimization/83965
22205 * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
22206 that grouped statements are part of a reduction chain. Return
22207 true if the statement is not marked as a reduction itself but
22208 is part of a group.
22209 (vect_recog_dot_prod_pattern): Don't check whether the statement
22210 is part of a group here.
22211 (vect_recog_sad_pattern): Likewise.
22212 (vect_recog_widen_sum_pattern): Likewise.
22214 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
22217 * final.c (rest_of_clean_state): Also look for calls inside sequences.
22219 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
22222 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
22224 (ix86_output_indirect_function_return): New prototype.
22225 (ix86_split_simple_return_pop_internal): Likewise.
22226 * config/i386/i386.c (indirect_return_via_cx): New.
22227 (indirect_return_via_cx_bnd): Likewise.
22228 (indirect_thunk_name): Handle return va CX_REG.
22229 (output_indirect_thunk_function): Create alias for
22230 __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
22231 (ix86_output_indirect_jmp): Remove the bool argument.
22232 (ix86_output_indirect_function_return): New function.
22233 (ix86_split_simple_return_pop_internal): Likewise.
22234 * config/i386/i386.md (*indirect_jump): Don't pass false
22235 to ix86_output_indirect_jmp.
22236 (*tablejump_1): Likewise.
22237 (simple_return_pop_internal): Change it to define_insn_and_split.
22238 Call ix86_split_simple_return_pop_internal to split it for
22239 -mfunction-return=.
22240 (simple_return_indirect_internal): Call
22241 ix86_output_indirect_function_return instead of
22242 ix86_output_indirect_jmp.
22244 2018-02-26 Jakub Jelinek <jakub@redhat.com>
22247 * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
22248 memset and value initialization afterwards.
22250 2018-02-26 Christophe Lyon <christophe.lyon@linaro.org>
22252 * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
22254 2018-02-26 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
22257 * common/config/aarch64/aarch64-common.c
22258 (aarch_option_optimization_table[]): Switch
22259 off fomit-frame-pointer
22261 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
22262 Chung-Ju Wu <jasonwucj@gmail.com>
22264 * config/nds32/nds32-multiple.md (load_multiple): Disallow
22266 (store_multiple): Ditto.
22268 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
22270 * config.gcc: Add --with-cpu support for nds32 target.
22271 * config/nds32/nds32-opts.h (nds32_cpu_type): New.
22272 * config/nds32/nds32.opt: Add -mcpu= option.
22274 2018-02-25 Segher Boessenkool <segher@kernel.crashing.org>
22276 * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
22277 isel=yes): Warn for these deprecated options.
22279 2018-02-23 David Edelsohn <dje.gcc@gmail.com>
22281 * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
22282 ISA_2_5_MASKS_EMBEDDED.
22284 2018-02-23 Jakub Jelinek <jakub@redhat.com>
22286 * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
22287 p->max as pointers rather than using iterative_hash_expr.
22289 2018-02-23 Carl Love <cel@us.ibm.com>
22291 * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
22292 macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
22294 * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
22295 P8V_BUILTIN_VEC_VSIGNED2. Change VSX_BUILTIN_VEC_VUNSIGNED2 to
22296 P8V_BUILTIN_VEC_VUNSIGNED2.
22298 2018-02-22 Vladimir Makarov <vmakarov@redhat.com>
22301 * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
22302 * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
22304 * lra-constraints.c (curr_insn_transform): Set up
22305 LRA_NON_CLOBBERED_ALT for moves processed on the fast path. Use
22307 (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
22308 * lra-eliminations.c (spill_pseudos): Ditto.
22309 (process_insn_for_elimination): Ditto.
22310 * lra-lives.c (reg_early_clobber_p): Use the new macros.
22311 * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
22312 LRA_NON_CLOBBERED_ALT.
22314 2018-02-22 Martin Sebor <msebor@redhat.com>
22316 PR tree-optimization/84480
22317 * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
22318 to maybe_diag_stxncpy_trunc. Call it.
22319 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
22320 from gimple_fold_builtin_strcpy. Print inlining stack.
22321 (handle_builtin_stxncpy): Print inlining stack.
22322 * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
22324 2018-02-22 H.J. Lu <hongjiu.lu@intel.com>
22327 * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
22328 error when -mindirect-branch=thunk-extern, -fcf-protection=branch
22329 and -fcheck-pointer-bounds are used together.
22330 (indirect_thunk_prefix): New enum.
22331 (indirect_thunk_need_prefix): New function.
22332 (indirect_thunk_name): Replace need_bnd_p with need_prefix. Use
22333 "_nt" instead of "_bnd" for NOTRACK prefix.
22334 (output_indirect_thunk): Replace need_bnd_p with need_prefix.
22335 (output_indirect_thunk_function): Likewise.
22337 (ix86_code_end): Update output_indirect_thunk_function calls.
22338 (ix86_output_indirect_branch_via_reg): Replace
22339 ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
22340 (ix86_output_indirect_branch_via_push): Likewise.
22341 (ix86_output_function_return): Likewise.
22342 * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
22343 incompatible with -fcf-protection=branch and
22344 -fcheck-pointer-bounds.
22346 2018-02-22 Steve Ellcey <sellcey@cavium.com>
22349 * config/aarch64/aarch64.c (aarch64_print_address_internal):
22350 Change gcc_assert call to output_operand_lossage.
22352 2018-02-22 Steve Ellcey <sellcey@cavium.com>
22354 * doc/extend.texi (__builtin_extend_pointer): Document builtin.
22356 2018-02-22 DJ Delorie <dj@redhat.com>
22357 Sebastian Perta <sebastian.perta@renesas.com>
22358 Oleg Endo <olegendo@gcc.gnu.org>
22360 * config/rx/rx.c (rx_rtx_costs): New function.
22361 (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
22363 2018-02-22 Thomas Preud'homme <thomas.preudhomme@arm.com>
22365 * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
22367 2018-02-22 Martin Liska <mliska@suse.cz>
22370 * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
22371 Add "native" as a possible value.
22373 2018-02-22 Martin Liska <mliska@suse.cz>
22376 * config/i386/i386.c (ix86_option_override_internal):
22377 Add "native" as a possible value for -march and -mtune.
22379 2018-02-22 Jakub Jelinek <jakub@redhat.com>
22382 * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
22383 to all type variants.
22385 PR tree-optimization/84503
22386 * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
22387 width as info->bitpos + info->bitsize - start.
22388 (merged_store_group::merge_overlapping): Simplify width computation.
22389 (check_no_overlap): New function.
22390 (imm_store_chain_info::try_coalesce_bswap): Compute expected
22391 start + width and last_order of the group, fail if check_no_overlap
22393 (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
22394 to group if check_no_overlap fails.
22396 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
22398 * config/rs6000/altivec.md: Delete contraint arguments to
22399 define_expand, define_split, and define_peephole2, and in
22400 define_insn_and_split if always unused.
22401 * config/rs6000/darwin.md: Ditto.
22402 * config/rs6000/dfp.md: Ditto.
22403 * config/rs6000/rs6000.md: Ditto.
22404 * config/rs6000/sync.md: Ditto.
22405 * config/rs6000/vector.md: Ditto.
22406 * config/rs6000/vsx.md: Ditto.
22408 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
22410 * config/rs6000/altivec.md: Write output control strings as braced
22411 blocks instead of double-quoted strings.
22412 * config/rs6000/darwin.md: Ditto.
22413 * config/rs6000/rs6000.md: Ditto.
22414 * config/rs6000/vector.md: Ditto.
22415 * config/rs6000/vsx.md: Ditto.
22417 2018-02-21 Jason Merrill <jason@redhat.com>
22419 PR c++/84314 - ICE with templates and fastcall attribute.
22420 * attribs.c (build_type_attribute_qual_variant): Remove assert.
22422 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
22424 * ipa-cp.c (determine_versionability): Fix comment typos.
22426 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
22429 * ipa-cp.c (determine_versionability): Do not version functions caling
22432 2018-02-21 Martin Liska <mliska@suse.cz>
22435 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
22436 Add "native" as a possible value.
22437 * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT): Define
22438 the macro when native cpu detection is available.
22440 2018-02-21 Martin Liska <mliska@suse.cz>
22443 * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
22444 Add "native" as a possible value.
22445 * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
22446 when native cpu detection is available.
22448 2018-02-21 Jakub Jelinek <jakub@redhat.com>
22449 Martin Sebor <msebor@redhat.com>
22451 PR tree-optimization/84478
22452 * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
22454 * gimple-fold.c (get_range_strlen): Make minlen const and assume it
22455 can't be NULL. Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
22456 support which is conservatively correct, for 2 only stay conservative
22457 for maxlen. Formatting and comment capitalization fixes. Add STRICT
22458 argument to the 2 argument get_range_strlen, adjust 6 arg
22459 get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
22461 (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
22462 (gimple_fold_builtin_strlen): Pass true as last argument to
22465 2018-02-20 Martin Sebor <msebor@redhat.com>
22467 PR middle-end/84095
22468 * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
22469 (builtin_memref::set_base_and_offset): Same. Handle inner references.
22470 (builtin_memref::builtin_memref): Factor out parts into
22471 set_base_and_offset and call it.
22473 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
22475 PR middle-end/84406
22476 * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
22477 is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
22478 greater precision. If to_mode is a MODE_PARTIAL_INT, stop the
22479 search at the associated MODE_INT.
22481 2018-02-20 Jeff Law <law@redhat.com>
22483 PR middle-end/82123
22484 PR tree-optimization/81592
22485 PR middle-end/79257
22486 * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
22487 for range data rather than using global data.
22488 * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
22489 range data rather than using global data.
22490 * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
22491 pass it to children as needed.
22492 (struct directive::fmtresult): Similarly.
22493 (struct directive::set_width): Similarly.
22494 (struct directive::set_precision): Similarly.
22495 (format_integer, format_directive, parse_directive): Similarly.
22496 (format_none): Accept unnamed vr_values parameter.
22497 (format_percent, format_floating, format_character): Similarly.
22498 (format_string, format_plain): Similarly.
22499 * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
22500 the EVRP range analyzer for range data rather than using global data.
22501 * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
22502 gimple-ssa-evrp-analyze.h
22503 (class sprintf_dom_walker): Add after_dom_children member function.
22504 Add evrp_range_analyzer member.
22505 (sprintf_dom_walker::before_dom_children): Call into the EVRP
22506 range analyzer as needed.
22507 (sprintf_dom_walker::after_dom_children): New member function.
22508 * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
22510 (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
22511 (evrp_range_analyzer::pop_to_marker): Likewise.
22513 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
22515 PR tree-optimization/84419
22516 * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
22517 with the required type if its current type is compatible but
22520 2018-02-20 Jakub Jelinek <jakub@redhat.com>
22522 PR middle-end/82004
22523 * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
22524 after vectorization.
22526 2018-02-20 Martin Liska <mliska@suse.cz>
22529 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
22530 possible values if we don't have a hint.
22532 2018-02-20 Martin Liska <mliska@suse.cz>
22536 * final.c (shorten_branches): Build align_tab array with one
22538 * opts.c (finish_options): Add alignment option limit check.
22539 (MAX_CODE_ALIGN): Likewise.
22540 (MAX_CODE_ALIGN_VALUE): Likewise.
22541 * doc/invoke.texi: Document maximum allowed option value for
22542 all -falign-* options.
22544 2018-02-19 Jakub Jelinek <jakub@redhat.com>
22547 * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
22548 * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
22549 * var-tracking.c (emit_note_insn_var_location): Remove all references
22550 to NOTE_INSN_CALL_ARG_LOCATION.
22551 (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
22552 the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
22553 Use copy_rtx_if_shared.
22554 * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
22555 NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
22556 (dwarf2out_var_location): Remove handling of
22557 NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
22559 * final.c (final_scan_insn): Remove all references to
22560 NOTE_INSN_CALL_ARG_LOCATION.
22561 (rest_of_clean_state): Likewise. Remove REG_CALL_ARG_LOCATION notes
22562 before dumping final insns.
22563 * except.c (emit_note_eh_region_end): Remove all references to
22564 NOTE_INSN_CALL_ARG_LOCATION.
22565 * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
22566 * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
22567 * config/arc/arc.c (hwloop_optimize): Likewise.
22568 * config/arm/arm.c (create_fix_barrier): Likewise.
22569 * config/s390/s390.c (s390_chunkify_start): Likewise.
22570 * config/sh/sh.c (find_barrier): Likewise.
22571 * config/i386/i386.c (rest_of_insert_endbranch,
22572 ix86_seh_fixup_eh_fallthru): Likewise.
22573 * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
22574 * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
22575 * config/frv/frv.c (frv_function_prologue): Likewise.
22576 * emit-rtl.c (try_split): Likewise. Copy over REG_CALL_ARG_LOCATION
22578 (note_outside_basic_block_p): Remove all references to
22579 NOTE_INSN_CALL_ARG_LOCATION.
22580 * gengtype.c (adjust_field_rtx_def): Likewise.
22581 * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
22583 * jump.c (cleanup_barriers, delete_related_insns): Likewise.
22584 * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
22587 * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
22590 PR tree-optimization/84452
22591 * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
22592 expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
22595 2018-02-19 Martin Liska <mliska@suse.cz>
22598 * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
22600 2018-02-19 Martin Liska <mliska@suse.cz>
22601 Richard Sandiford <richard.sandiford@linaro.org>
22603 PR tree-optimization/82491
22604 * gimple-fold.c (get_base_constructor): Make earlier bail out
22607 2018-02-19 Carl Love <cel@us.ibm.com>
22609 * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
22610 BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
22612 * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
22613 P8V_BUILTIN_VEC_NEG.
22615 2018-02-19 Sebastian Perta <sebastian.perta@renesas.com>
22617 * config/rl78/rl78.md (movdf): New define expand.
22619 2018-02-19 Martin Liska <mliska@suse.cz>
22622 * doc/invoke.texi: Fix typo.
22623 * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
22625 2018-02-18 Segher Boessenkool <segher@kernel.crashing.org>
22627 * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
22628 handle rs6000_single_float and rs6000_double_float specially for
22631 2018-02-16 Jeff Law <law@redhat.com>
22633 * config/rx/rx.c (add_pop_cfi_notes): New function.;
22634 (pop_regs): Use it.
22636 2018-02-16 Jakub Jelinek <jakub@redhat.com>
22639 * ipa-inline.c (inline_small_functions): Fix a typo.
22641 2018-02-16 Nathan Sidwell <nathan@acm.org>
22643 * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
22645 2018-02-16 Carl Love <cel@us.ibm.com>
22647 * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
22648 Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
22649 from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
22650 * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
22651 expansion to P8V_BUILTIN_VEC_FLOAT2.
22653 2018-02-16 Vladimir Makarov <vmakarov@redhat.com>
22655 PR rtl-optimization/70023
22656 * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
22657 src_regno into account.
22659 2018-02-16 Carl Love <cel@us.ibm.com>
22661 * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
22662 * config/rs6000/rs6000-builtin.def: Remove macro expansion for
22663 VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
22664 * config/rs6000/rs6000.c: Remove case statements for
22665 P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
22666 P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
22667 and P9V_BUILTIN_VEC_VINSERT4B.
22668 * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
22669 P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
22670 * config/rs6000/vsx.md:
22671 * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
22674 2018-02-16 Carl Love <cel@us.ibm.com>
22676 * config/rs6000/altivec.h: Add builtin names vec_extract4b
22678 * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
22680 * config/rs6000/rs6000-c.c: Add the definitions for
22681 P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
22682 * config/rs6000/rs6000.c (altivec_expand_builtin): Add
22683 P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
22684 * config/rs6000/vsx.md: Add define_insn extract4b. Add define_expand
22685 definition for insert4b and define insn *insert3b_internal.
22686 * doc/extend.texi: Add documentation for vec_extract4b.
22688 2018-02-16 Nathan Sidwell <nathan@acm.org>
22690 * doc/extend.texi (Backwards Compatibility): Mention friend
22691 injection. Note for-scope is deprecated.
22692 * doc/invoke.texi (-ffriend-injection): Deprecate.
22694 2018-02-16 Segher Boessenkool <segher@kernel.crashing.org>
22696 * combine.c (try_combine): When adjusting LOG_LINKS for the destination
22697 that moved to I2, also allow destinations that are a paradoxical
22698 subreg (instead of a normal reg).
22700 2018-02-16 Oleg Endo <olegendo@gcc.gnu.org>
22703 * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
22706 2018-02-16 Richard Biener <rguenther@suse.de>
22708 PR tree-optimization/84037
22709 PR tree-optimization/84016
22711 * config/i386/i386.c (ix86_builtin_vectorization_cost):
22712 Adjust vec_construct for the fact we need additional higher latency
22713 128bit inserts for AVX256 and AVX512 vector builds.
22714 (ix86_add_stmt_cost): Scale vector construction cost for
22717 2018-02-16 Richard Biener <rguenther@suse.de>
22719 PR tree-optimization/84417
22720 * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
22721 the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
22722 (non_rewritable_lvalue_p): Likewise, use poly-ints.
22724 2018-02-16 Martin Liska <mliska@suse.cz>
22727 * internal-fn.def (ASAN_CHECK): Set proper flags.
22728 (ASAN_MARK): Likewise.
22730 2018-02-16 Julia Koval <julia.koval@intel.com>
22732 * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
22733 from PTA_CANNONLAKE.
22735 2018-02-16 Jakub Jelinek <jakub@redhat.com>
22738 * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
22739 Use ++iter rather than iter++ for std::list iterators.
22740 (func_fma_steering::dfs): Likewise. Don't delete nodes right away,
22741 defer deleting them until all nodes in the forest are processed. Do
22742 free even leaf nodes. Change to_process into auto_vec.
22745 * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
22746 * vec.h (vec_default_construct): Use memset instead of placement new
22747 if BROKEN_VALUE_INITIALIZATION is defined.
22748 * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
22749 memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
22752 PR rtl-optimization/83723
22753 * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
22754 * lra.c (lra_substitute_pseudo): Likewise. If true, use
22755 gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG. Pass DEBUG_P to
22757 (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
22759 * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
22761 2018-02-16 Eric Botcazou <ebotcazou@adacore.com>
22763 PR rtl-optimization/81443
22764 * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
22765 from inner REGs to paradoxical SUBREGs.
22767 2018-02-16 Richard Biener <rguenther@suse.de>
22769 PR tree-optimization/84399
22770 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
22771 For operands we can analyze at their definition make sure we can
22772 analyze them at each use as well.
22774 2018-02-16 Richard Biener <rguenther@suse.de>
22776 PR tree-optimization/84190
22777 * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
22778 volatile accesses if the decl isn't volatile.
22780 2018-02-15 Jason Merrill <jason@redhat.com>
22782 PR c++/84314 - ICE with templates and fastcall attribute.
22783 * attribs.c (build_type_attribute_qual_variant): Don't clobber
22784 TYPE_CANONICAL on an existing type.
22786 2018-02-15 Jakub Jelinek <jakub@redhat.com>
22788 PR tree-optimization/84383
22789 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
22790 dstoff nor call operand_equal_p if dstbase is NULL.
22792 PR tree-optimization/84334
22793 * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
22794 also a CONSTANT_CLASS_P, punt.
22796 2018-02-14 Jim Wilson <jimw@sifive.com>
22798 * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
22799 first SMALL_OPERAND check. New local min_second_step. Move assert
22800 to where locals are set. Add TARGET_RVC support.
22801 * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
22803 2018-02-14 Indu Bhagat <indu.bhagat@oracle.com>
22805 * doc/invoke.texi: Correct -Wformat-overflow code sample.
22807 2018-02-14 Martin Sebor <msebor@redhat.com>
22809 PR tree-optimization/83698
22810 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
22811 arrays constrain the offset range to their bounds.
22812 (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
22813 (builtin_access::overlap): Avoid setting the size of overlap if it's
22815 (maybe_diag_overlap): Also consider arrays when deciding what values
22816 of offsets to include in diagnostics.
22818 2018-02-14 Martin Sebor <msebor@redhat.com>
22821 * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
22822 that correspond to the kind of a declaration.
22824 2018-02-14 John David Anglin <danglin@gcc.gnu.org>
22827 * config/pa/pa.md: Load address of PIC label using the linkage table
22828 if the label is nonlocal.
22830 2018-02-14 Kelvin Nilsen <kelvin@gcc.gnu.org>
22832 * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
22833 warning message if user requests -maltivec=be.
22834 * doc/invoke.texi: Document deprecation of -maltivec=be.
22836 2018-02-14 Will Schmidt <will_schmidt@vnet.ibm.com>
22839 * config/rs6000/rs6000-c.c: Update definitions for
22840 ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
22841 VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
22843 2018-02-14 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
22846 * config/i386/cetintrin.h: Remove _rdssp[d|q] and
22847 add _get_ssp intrinsics. Remove argument from
22848 __builtin_ia32_rdssp[d|q].
22849 * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
22850 * config/i386/i386-builtin.def: Remove argument from
22851 __builtin_ia32_rdssp[d|q].
22852 * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
22853 ix86_expand_special_args_builtin for _rdssp[d|q].
22854 * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
22855 Clear register before usage.
22856 * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
22857 Add documentation for new _get_ssp and _inc_ssp intrinsics.
22859 2018-02-14 Richard Sandiford <richard.sandiford@linaro.org>
22861 PR tree-optimization/84357
22862 * tree-data-ref.c (object_address_invariant_in_loop_p): Check
22863 operand 1 of an ARRAY_REF too.
22865 2018-02-14 Oleg Endo <olegendo@gcc.gnu.org>
22868 * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
22869 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
22871 (set_of_reg): New struct.
22872 (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
22873 * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
22874 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
22876 * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
22877 Split into bitclr, bitset, bitinvert patterns if appropriate.
22878 (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
22879 use rx_fuse_in_memory_bitop.
22880 (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
22881 to named insn, correct maximum insn length.
22883 2018-02-14 Jozef Lawrynowicz <jozefl.gcc@gmail.com>
22886 * machmode.def: Define a complex mode for PARTIAL_INT.
22887 * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
22889 * doc/rtl.texi: Document CSPImode.
22890 * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
22892 (msp430_hard_regno_nregs_with_padding): Likewise.
22894 2018-02-13 Peter Bergner <bergner@vnet.ibm.com>
22897 * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
22899 2018-02-13 Segher Boessenkool <segher@kernel.crashing.org>
22901 PR rtl-optimization/84169
22902 * combine.c (try_combine): New variable split_i2i3. Set it to true if
22903 we generated a parallel as new i3 and we split that to new i2 and i3
22904 instructions. Handle split_i2i3 similar to swap_i2i3: scan the
22905 LOG_LINKs of i3 to see which of those need to link to i2 now. Link
22906 those to i2, not i1. Partially rewrite this scan code.
22908 2018-02-13 Jakub Jelinek <jakub@redhat.com>
22911 * stor-layout.c (place_field): For variable length fields, adjust
22912 offset_align afterwards not just based on the field's alignment,
22913 but also on the size.
22915 PR middle-end/84309
22916 * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
22917 of exps and logs in the use_exp2 case.
22919 2018-02-13 Jeff Law <law@redhat.com>
22921 * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
22922 entry for "vector".
22924 * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
22927 2018-02-13 Alexandre Oliva <aoliva@redhat.com>
22931 * common.opt (gas-loc-support, gas-locview-support): New.
22932 (ginline-points, ginternal-reset-location-views): New.
22933 * doc/invoke.texi: Document them. Use @itemx where intended.
22934 (gvariable-location-views): Adjust.
22935 * target.def (reset_location_view): New.
22936 * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
22937 (TARGET_RESET_LOCATION_VIEW): New.
22938 * doc/tm.texi: Rebuilt.
22939 * dwarf2out.c (dwarf2out_default_as_loc_support): New.
22940 (dwarf2out_default_as_locview_support): New.
22941 (output_asm_line_debug_info): Use option variables.
22942 (dwarf2out_maybe_output_loclist_view_pair): Likewise.
22943 (output_loc_list): Likewise.
22944 (add_high_low_attributes): Check option variables.
22945 Don't output entry view attribute in strict mode.
22946 (gen_inlined_subroutine_die): Check option variables.
22947 (dwarf2out_inline_entry): Likewise.
22948 (init_sections_and_labels): Likewise.
22949 (dwarf2out_early_finish): Likewise.
22950 (maybe_reset_location_view): New, from...
22951 (dwarf2out_var_location): ... here. Call it.
22952 * debug.h (dwarf2out_default_as_loc_support): Declare.
22953 (dwarf2out_default_as_locview_support): Declare.
22954 * hooks.c (hook_int_rtx_insn_0): New.
22955 * hooks.h (hook_int_rtx_insn_0): Declare.
22956 * toplev.c (process_options): Take -gas-loc-support and
22957 -gas-locview-support from dwarf2out. Enable
22958 -gvariable-location-views by default only with locview
22959 assembler support. Enable -ginternal-reset-location-views by
22960 default only if the target defines the corresponding hook.
22961 Enable -ginline-points by default if location views are
22962 enabled; force it disabled if statement frontiers are
22964 * tree-inline.c (expand_call_inline): Check option variables.
22965 * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
22967 2018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
22969 PR tree-optimization/84321
22970 * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
22971 handling. Also check whether the anti-range contains any values
22972 that satisfy the mask; switch to a VR_RANGE if not.
22974 2018-02-13 Paolo Bonzini <bonzini@gnu.org>
22977 * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
22979 2018-02-13 Martin Jambor <mjambor@suse.cz>
22982 * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
22983 of call statements, also set location of a load to a temporary.
22985 2018-02-13 Sebastian Perta <sebastian.perta@renesas.com>
22987 * config/rl78/rl78.c (add_vector_labels): New function.
22988 * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
22989 * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
22990 * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
22991 which checks that no arguments are passed.
22992 * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
22993 * doc/extend.texi: Documentation for the new attribute.
22995 2018-02-13 Andreas Schwab <schwab@suse.de>
22997 * config/riscv/linux.h (CPP_SPEC): Define.
22999 2018-02-13 Jakub Jelinek <jakub@redhat.com>
23002 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
23003 OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
23004 OPTION_MASK_ISA_AES as first argument to def_builtin_const
23005 for AES builtins. Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
23006 instead of OPTION_MASK_ISA_PCLMUL as first argument to
23007 def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
23008 * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
23009 temporarily for AES and PCLMUL builtins.
23011 PR tree-optimization/84339
23012 * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
23013 ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
23016 PR middle-end/84309
23017 * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
23018 exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
23019 * generic-match-head.c (canonicalize_math_after_vectorization_p): New
23021 * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
23023 * omp-simd-clone.h: New file.
23024 * omp-simd-clone.c: Include omp-simd-clone.h.
23025 (expand_simd_clones): No longer static.
23026 * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
23027 cgraph.h and omp-simd-clone.h.
23028 (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
23029 (vect_recog_widen_shift_pattern): Formatting fix.
23030 (vect_pattern_recog_1): Don't check optab for calls.
23033 * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
23034 operands[2] into a REG before using gen_lowpart on it.
23036 2018-02-12 Jeff Law <law@redhat.com>
23039 * config/sh/sh.c (find_barrier): Consider a sibling call
23042 * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
23043 successfully back substituting a reg.
23045 2018-02-12 Richard Biener <rguenther@suse.de>
23047 PR tree-optimization/84037
23048 * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
23049 parameter, move visited init to caller.
23050 (vect_slp_analyze_operations): Separate cost from validity
23051 check, initialize visited once for all instances.
23052 (vect_schedule_slp): Analyze map to CSE vectorized nodes once
23054 * tree-vect-stmts.c (vect_model_simple_cost): Make early
23056 (vect_model_promotion_demotion_cost): Likewise.
23057 (vectorizable_bswap): Guard cost modeling with !slp_node
23058 instead of !PURE_SLP_STMT to avoid double-counting on hybrid
23060 (vectorizable_call): Likewise.
23061 (vectorizable_conversion): Likewise.
23062 (vectorizable_assignment): Likewise.
23063 (vectorizable_shift): Likewise.
23064 (vectorizable_operation): Likewise.
23065 (vectorizable_store): Likewise.
23066 (vectorizable_load): Likewise.
23067 (vectorizable_condition): Likewise.
23068 (vectorizable_comparison): Likewise.
23070 2018-02-12 Paolo Bonzini <bonzini@gnu.org>
23073 * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
23074 (ASAN_MARK): Fix fnspec to account for return value, change pointer
23075 argument from 'R' to 'W' so that the pointed-to datum is clobbered.
23077 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
23079 PR middle-end/83665
23080 * params.def (inline-min-speedup): Increase from 8 to 15.
23081 (max-inline-insns-auto): Decrease from 40 to 30.
23082 * ipa-split.c (consider_split): Add some buffer for function to
23083 be considered inlining candidate.
23084 * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
23087 2018-02-12 Richard Biener <rguenther@suse.de>
23089 PR tree-optimization/84037
23090 * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
23091 matched stmts if we cannot swap the non-matched ones.
23093 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
23095 * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
23096 _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
23097 _mm_maskz_scalef_round_ss): New intrinsics.
23098 (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
23099 * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
23100 __builtin_ia32_scalefss_round): Remove.
23101 (__builtin_ia32_scalefsd_mask_round,
23102 __builtin_ia32_scalefss_mask_round): New intrinsics.
23103 * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
23104 (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
23105 ((match_operand:VF_128 2 "<round_nimm_predicate>"
23106 "<round_constraint>")): Changed to ...
23107 ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
23108 "<round_scalar_constraint>")): ... this.
23109 ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
23110 %0, %1, %2<round_op3>}"): Changed to ...
23111 ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
23112 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
23113 %2<round_scalar_mask_op3>}"): ... this.
23114 * config/i386/subst.md (round_scalar_nimm_predicate): New.
23116 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
23118 * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
23119 (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
23120 (_mm_maskz_sqrt_round_ss): New intrinsics.
23121 (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
23122 (__builtin_ia32_sqrtsd_mask_round)
23123 (__builtin_ia32_sqrtss_mask_round): New builtins.
23124 * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
23125 (__builtin_ia32_sqrtss_round): Remove.
23126 (__builtin_ia32_sqrtsd_mask_round)
23127 (__builtin_ia32_sqrtss_mask_round): New builtins.
23128 * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
23129 (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
23130 ((match_operand:VF_128 1 "vector_operand"
23131 "xBm,<round_constraint>")): Changed to ...
23132 ((match_operand:VF_128 1 "vector_operand"
23133 "xBm,<round_scalar_constraint>")): ... this.
23134 (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
23135 %0, %2, %<iptr>1<round_op3>}): Changed to ...
23136 (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
23137 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
23138 %<iptr>1<round_scalar_mask_op3>}): ... this.
23139 ((set_attr "prefix" "<round_prefix>")): Changed to ...
23140 ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
23142 2018-02-11 Steven Munroe <munroesj@gcc.gnu.org>
23145 * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
23146 Cast vec_cmpeq result to correct type.
23147 * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
23148 Cast vec_cmpgt result to correct type.
23150 2018-02-11 Alexandre Oliva <aoliva@redhat.com>
23152 * final.c (final_scan_insn_1): Renamed from...
23153 (final_scan_insn): ... this. New wrapper, to recover
23154 seen from the outermost call in recursive ones.
23155 * config/sparc/sparc.c (output_return): Drop seen from call.
23156 (output_sibcall): Likewise.
23157 * config/visium/visium.c (output_branch): Likewise.
23159 2018-02-10 John David Anglin <danglin@gcc.gnu.org>
23161 * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
23164 2018-02-10 Alan Modra <amodra@gmail.com>
23167 * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
23168 Specify LR as an input.
23170 2018-02-10 Jakub Jelinek <jakub@redhat.com>
23173 * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
23174 remove_member_access_dummy_vars): New functions.
23175 (lower_omp_for, lower_omp_taskreg, lower_omp_target,
23176 lower_omp_1, execute_lower_omp): Use them.
23178 PR rtl-optimization/84308
23179 * shrink-wrap.c (spread_components): Release todo vector.
23181 2018-02-09 Vladimir Makarov <vmakarov@redhat.com>
23183 PR rtl-optimization/57193
23184 * ira-color.c (struct allocno_color_data): Add member
23185 conflict_allocno_hard_prefs.
23186 (update_conflict_allocno_hard_prefs): New.
23187 (bucket_allocno_compare_func): Add a preference based on
23188 conflict_allocno_hard_prefs.
23189 (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
23190 (color_allocnos): Remove a dead code. Initiate
23191 conflict_allocno_hard_prefs. Call update_costs_from_prefs.
23193 2018-02-09 Jakub Jelinek <jakub@redhat.com>
23196 * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
23197 constraint from =wa to wa. Avoid a subreg on the output operand,
23198 instead use a pseudo and subreg it in a move.
23199 (p9_xxbrd_<mode>): Changed to ...
23200 (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
23201 (p9_xxbrd_v2df): New expander.
23202 (p9_xxbrw_<mode>): Changed to ...
23203 (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
23204 (p9_xxbrw_v4sf): New expander.
23206 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
23208 * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
23210 2018-02-09 Peter Bergner <bergner@vnet.ibm.com>
23213 * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
23214 multiply in 32-bit mode.
23215 (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
23216 (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
23219 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
23221 * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
23222 to allow or block "symbol_ref" depending on the value of TARGET_JSR.
23223 * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
23224 * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
23226 2018-02-09 Pierre-Marie de Rodat <derodat@adacore.com>
23229 * dwarf2out.c (is_trivial_indirect_ref): New function.
23230 (dwarf2out_late_global_decl): Do not generate a location
23231 attribute for variables that have a non-trivial DECL_VALUE_EXPR
23232 and that are not defined in the current unit.
23234 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
23236 * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
23237 instead of a libcall for UNORDERED.
23239 2018-02-09 Tamar Christina <tamar.christina@arm.com>
23242 * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
23243 __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
23245 2018-02-09 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
23248 * config/s390/s390.c (s390_set_current_function): Invoke
23249 s390_indirect_branch_settings also if fndecl didn't change.
23251 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
23253 * config/rs6000/rs6000.md (blockage): Set length to zero.
23255 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
23257 * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
23259 2018-02-09 Jakub Jelinek <jakub@redhat.com>
23262 * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
23263 STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
23267 * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
23268 PARALLEL incoming that failed vt_get_decl_and_offset check.
23270 PR middle-end/84237
23271 * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
23272 * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
23274 (get_variable_section): For decls in named .bss* sections pass true as
23275 second argument to bss_initializer_p.
23277 2018-02-09 Marek Polacek <polacek@redhat.com>
23278 Jakub Jelinek <jakub@redhat.com>
23281 * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
23282 Formatting fixes. Verify first that tree_fits_poly_int64_p (op01).
23283 Sync some changes from cxx_fold_indirect_ref.
23285 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
23287 * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
23289 * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
23290 (BLOCK_INLINE_ENTRY_LABEL): New.
23291 (dwarf2out_var_location): Disregard inline entry markers.
23292 (inline_entry_data): New struct.
23293 (inline_entry_data_hasher): New hashtable type.
23294 (inline_entry_data_hasher::hash): New.
23295 (inline_entry_data_hasher::equal): New.
23296 (inline_entry_data_table): New variable.
23297 (add_high_low_attributes): Add DW_AT_entry_pc and
23298 DW_AT_GNU_entry_view attributes if a pending entry is found
23299 in inline_entry_data_table. Add old entry_pc attribute only
23300 if debug nonbinding markers are disabled.
23301 (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
23302 markers are enabled.
23303 (block_within_block_p, dwarf2out_inline_entry): New.
23304 (dwarf2out_finish): Check that no entries remained in
23305 inline_entry_data_table.
23306 * final.c (reemit_insn_block_notes): Handle inline entry notes.
23307 (final_scan_insn, notice_source_line): Likewise.
23308 (rest_of_clean_state): Skip inline entry markers.
23309 * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
23311 * gimple.c (gimple_build_debug_inline_entry): New.
23312 * gimple.h (enum gimple_debug_subcode): Add
23313 GIMPLE_DEBUG_INLINE_ENTRY.
23314 (gimple_build_debug_inline_entry): Declare.
23315 (gimple_debug_inline_entry_p): New.
23316 (gimple_debug_nonbind_marker_p): Adjust.
23317 * insn-notes.def (INLINE_ENTRY): New.
23318 * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
23319 inline entry marker notes.
23320 (print_insn): Likewise.
23321 * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
23322 (INSN_DEBUG_MARKER_KIND): Likewise.
23323 (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
23324 * tree-inline.c (expand_call_inline): Build and insert
23325 debug_inline_entry stmt.
23326 * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
23327 inline entry blocks early, if nonbind markers are enabled.
23328 (dump_scope_block): Dump fragment info.
23329 * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
23330 * doc/gimple.texi (gimple_debug_inline_entry_p): New.
23331 (gimple_build_debug_inline_entry): New.
23332 * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
23333 Enable/disable inline entry points too.
23334 * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
23335 (DEBUG_INSN): Describe inline entry markers.
23337 * common.opt (gvariable-location-views): New.
23338 (gvariable-location-views=incompat5): New.
23339 * config.in: Rebuilt.
23340 * configure: Rebuilt.
23341 * configure.ac: Test assembler for view support.
23342 * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
23343 * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
23344 * dwarf2out.c (var_loc_view): New typedef.
23345 (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
23346 (dwarf2out_locviews_in_attribute): New.
23347 (dwarf2out_locviews_in_loclist): New.
23348 (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
23349 (enum dw_line_info_opcode): Add LI_adv_address.
23350 (struct dw_line_info_table): Add view.
23351 (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
23352 (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
23353 (zero_view_p): New variable.
23354 (ZERO_VIEW_P): New macro.
23355 (output_asm_line_debug_info): New.
23356 (struct var_loc_node): Add view.
23357 (add_AT_view_list, AT_loc_list): New.
23358 (add_var_loc_to_decl): Add view param. Test it against last.
23359 (new_loc_list): Add view params. Record them.
23360 (AT_loc_list_ptr): Handle loc and view lists.
23361 (view_list_to_loc_list_val_node): New.
23362 (print_dw_val): Handle dw_val_class_view_list.
23363 (size_of_die): Likewise.
23364 (value_format): Likewise.
23365 (loc_list_has_views): New.
23366 (gen_llsym): Set vl_symbol too.
23367 (maybe_gen_llsym, skip_loc_list_entry): New.
23368 (dwarf2out_maybe_output_loclist_view_pair): New.
23369 (output_loc_list): Output view list or entries too.
23370 (output_view_list_offset): New.
23371 (output_die): Handle dw_val_class_view_list.
23372 (output_dwarf_version): New.
23373 (output_compilation_unit_header): Use it.
23374 (output_skeleton_debug_sections): Likewise.
23375 (output_rnglists, output_line_info): Likewise.
23376 (output_pubnames, output_aranges): Update version comments.
23377 (output_one_line_info_table): Output view numbers in asm comments.
23378 (dw_loc_list): Determine current endview, pass it to new_loc_list.
23379 Call maybe_gen_llsym.
23380 (loc_list_from_tree_1): Adjust.
23381 (add_AT_location_description): Create view list attribute if
23382 needed, check it's absent otherwise.
23383 (convert_cfa_to_fb_loc_list): Adjust.
23384 (maybe_emit_file): Call output_asm_line_debug_info for test.
23385 (dwarf2out_var_location): Reset views as needed. Precompute
23386 add_var_loc_to_decl args. Call get_attr_min_length only if we have the
23387 attribute. Set view.
23388 (new_line_info_table): Reset next view.
23389 (set_cur_line_info_table): Call output_asm_line_debug_info for test.
23390 (dwarf2out_source_line): Likewise. Output view resets and labels to
23391 the assembler, or select appropriate line info opcodes.
23392 (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
23393 (optimize_string_length): Catch it. Adjust.
23394 (resolve_addr): Copy vl_symbol along with ll_symbol. Handle
23395 dw_val_class_view_list, and remove it if no longer needed.
23396 (hash_loc_list): Hash view numbers.
23397 (loc_list_hasher::equal): Compare them.
23398 (optimize_location_lists): Check whether a view list symbol is
23399 needed, and whether the locview attribute is present, and
23400 whether they match. Remove the locview attribute if no longer
23402 (index_location_lists): Call skip_loc_list_entry for test.
23403 (dwarf2out_finish): Call output_asm_line_debug_info for test.
23404 Use output_dwarf_version.
23405 * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
23406 (struct dw_val_node): Add val_view_list.
23407 * final.c (SEEN_NEXT_VIEW): New.
23408 (set_next_view_needed): New.
23409 (clear_next_view_needed): New.
23410 (maybe_output_next_view): New.
23411 (final_start_function): Rename to...
23412 (final_start_function_1): ... this. Take pointer to FIRST,
23413 add SEEN parameter. Emit param bindings in the initial view.
23414 (final_start_function): Reintroduce SEEN-less interface.
23415 (final): Rename to...
23416 (final_1): ... this. Take SEEN parameter. Output final pending
23417 next view at the end.
23418 (final): Reintroduce seen-less interface.
23419 (final_scan_insn): Output pending next view before switching
23420 sections or ending a block. Mark the next view as needed when
23421 outputting variable locations. Notify debug backend of section
23422 changes, and of location view changes.
23423 (rest_of_handle_final): Adjust.
23424 * toplev.c (process_options): Autodetect value for debug variable
23425 location views option. Warn on incompat5 without -gdwarf-5.
23426 * doc/invoke.texi (gvariable-location-views): New.
23427 (gvariable-location-views=incompat5): New.
23428 (gno-variable-location-views): New.
23430 2018-02-08 David Malcolm <dmalcolm@redhat.com>
23432 PR tree-optimization/84136
23433 * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
23434 that the result of find_edge is non-NULL.
23436 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
23439 * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
23440 storing integer register in SImode. Fix cost of 256 and 512
23441 byte aligned SSE register store.
23443 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
23445 * config/i386/i386.c (ix86_multiplication_cost): Fix
23446 multiplication cost for TARGET_AVX512DQ.
23448 2018-02-08 Marek Polacek <polacek@redhat.com>
23450 PR tree-optimization/84238
23451 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
23454 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
23456 PR tree-optimization/84265
23457 * tree-vect-stmts.c (vectorizable_store): Don't treat
23458 VMAT_CONTIGUOUS accesses as grouped.
23459 (vectorizable_load): Likewise.
23461 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
23463 PR tree-optimization/81635
23464 * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
23465 * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
23466 (test_round_for_mask): New functions.
23467 (wide_int_cc_tests): Call test_round_for_mask.
23468 * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
23469 * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
23470 * tree-data-ref.c (split_constant_offset_1): Use it to refine the
23471 range returned by get_range_info.
23473 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
23476 * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
23477 * symtab.c: Include builtins.h
23478 (symtab_node::output_to_lto_symbol_table_p): Move here
23479 from lto-streamer-out.c:output_symbol_p.
23480 * lto-streamer-out.c (write_symbol): Turn early exit to assert.
23481 (output_symbol_p): Move all logic to symtab.c
23482 (produce_symtab): Update.
23484 2018-02-08 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
23486 * config/s390/s390-opts.h (enum indirect_branch): Define.
23487 * config/s390/s390-protos.h (s390_return_addr_from_memory)
23488 (s390_indirect_branch_via_thunk)
23489 (s390_indirect_branch_via_inline_thunk): Add function prototypes.
23490 (enum s390_indirect_branch_type): Define.
23491 * config/s390/s390.c (struct s390_frame_layout, struct
23492 machine_function): Remove.
23493 (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
23494 (indirect_branch_table_label_no, indirect_branch_table_name):
23496 (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
23497 (enum s390_indirect_branch_option): Define.
23498 (s390_return_addr_from_memory): New function.
23499 (s390_handle_string_attribute): New function.
23500 (s390_attribute_table): Add new attribute handler.
23501 (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
23502 (s390_indirect_branch_via_thunk): New function.
23503 (s390_indirect_branch_via_inline_thunk): New function.
23504 (s390_function_ok_for_sibcall): When jumping via thunk disallow
23505 sibling call optimization for non z10 compiles.
23506 (s390_emit_call): Force indirect branch target to be a single
23507 register. Add r1 clobber for non-z10 compiles.
23508 (s390_emit_epilogue): Emit return jump via return_use expander.
23509 (s390_reorg): Handle JUMP_INSNs as execute targets.
23510 (s390_option_override_internal): Perform validity checks for the
23511 new command line options.
23512 (s390_indirect_branch_attrvalue): New function.
23513 (s390_indirect_branch_settings): New function.
23514 (s390_set_current_function): Invoke s390_indirect_branch_settings.
23515 (s390_output_indirect_thunk_function): New function.
23516 (s390_code_end): Implement target hook.
23517 (s390_case_values_threshold): Implement target hook.
23518 (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
23520 * config/s390/s390.h (struct s390_frame_layout)
23521 (struct machine_function): Move here from s390.c.
23522 (TARGET_INDIRECT_BRANCH_NOBP_RET)
23523 (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
23524 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
23525 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
23526 (TARGET_INDIRECT_BRANCH_NOBP_CALL)
23527 (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
23528 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
23529 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
23530 (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
23531 * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
23532 (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
23533 (mnemonic attribute): Add values which aren't recognized
23535 ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
23536 pattern for branch conversion. Fix mnemonic attribute.
23537 ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
23538 indirect branch via thunk if requested.
23539 ("indirect_jump", "<code>"): Expand patterns for branch conversion.
23540 ("*indirect_jump"): Disable for branch conversion using out of
23542 ("indirect_jump_via_thunk<mode>_z10")
23543 ("indirect_jump_via_thunk<mode>")
23544 ("indirect_jump_via_inlinethunk<mode>_z10")
23545 ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
23546 ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
23547 ("casesi_jump_via_inlinethunk<mode>_z10")
23548 ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
23549 ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
23550 ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
23551 ("*indirect2_jump"): Disable for branch conversion.
23552 ("casesi_jump"): Turn into expander and expand patterns for branch
23554 ("return_use"): New expander.
23555 ("*return"): Emit return via thunk and rename it to ...
23556 ("*return<mode>"): ... this one.
23557 * config/s390/s390.opt: Add new options and and enum for the
23560 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
23562 * lra-constraints.c (match_reload): Unconditionally use
23563 gen_lowpart_SUBREG, rather than selecting between that
23564 and equivalent gen_rtx_SUBREG code.
23566 2018-02-08 Richard Biener <rguenther@suse.de>
23568 PR tree-optimization/84233
23569 * tree-ssa-phiprop.c (propagate_with_phi): Use separate
23570 changed flag instead of boguously re-using phi_inserted.
23572 2018-02-08 Martin Jambor <mjambor@suse.cz>
23574 * hsa-gen.c (get_symbol_for_decl): Set program allocation for
23575 static local variables.
23577 2018-02-08 Richard Biener <rguenther@suse.de>
23579 PR tree-optimization/84278
23580 * tree-vect-stmts.c (vectorizable_store): When looking for
23581 smaller vector types to perform grouped strided loads/stores
23582 make sure the mode is supported by the target.
23583 (vectorizable_load): Likewise.
23585 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
23587 * config/aarch64/aarch64.c (aarch64_components_for_bb):
23588 Increase LDP/STP opportunities by adding adjacent callee-saves.
23590 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
23592 PR rtl-optimization/84068
23593 PR rtl-optimization/83459
23594 * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
23596 2018-02-08 Aldy Hernandez <aldyh@redhat.com>
23598 PR tree-optimization/84224
23599 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
23600 * calls.c (gimple_alloca_call_p): Only return TRUE when we have
23601 non-zero arguments.
23603 2018-02-07 Iain Sandoe <iain@codesourcery.com>
23606 * config/rs6000/altivec.md (*restore_world): Remove LR use.
23607 * config/rs6000/predicates.md (restore_world_operation): Adjust op
23608 count, remove one USE.
23610 2018-02-07 Michael Meissner <meissner@linux.vnet.ibm.com>
23612 * doc/install.texi (Configuration): Document the
23613 --with-long-double-format={ibm,ieee} PowerPC configuration
23617 * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
23618 Convert from define_expand to be define_insn_and_split. Rework
23619 float/double/_Float128 conversions to QI/HI/SImode to work with
23620 both ISA 2.07 (power8) or ISA 3.0 (power9). Fix regression where
23621 conversions to QI/HImode types did a store and then a load to
23622 truncate the value. For conversions to VSX registers, don't split
23623 the insn, instead emit the code directly. Use the code iterator
23624 any_fix to combine signed and unsigned conversions.
23625 (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
23626 (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
23627 (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
23628 (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
23629 (fix_<mode>di2_hw): Likewise.
23630 (fixuns_<mode>di2_hw): Likewise.
23631 (fix_<mode>si2_hw): Likewise.
23632 (fixuns_<mode>si2_hw): Likewise.
23633 (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
23634 (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
23635 (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
23636 fix<uns>_trunc<SFDF:mode>si2_p8.
23637 (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer used.
23638 (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
23639 (fix<uns>_<mode>_mem): Likewise.
23640 (fctiw<u>z_<mode>_mem): Likewise.
23641 (fix<uns>_<mode>_mem): Likewise.
23642 (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
23643 the register allocator from doing a direct move to the GPRs to do
23644 a store, and instead use the ISA 3.0 store byte/half-word from
23645 vector register instruction. For IEEE 128-bit floating point,
23646 also optimize stores of 32-bit ints.
23647 (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
23649 2018-02-07 Alan Hayward <alan.hayward@arm.com>
23651 * genextract.c (push_pathstr_operand): New function to support
23653 (walk_rtx): Call push_pathstr_operand.
23654 (print_path): Support [a-zA-Z].
23656 2018-02-07 Richard Biener <rguenther@suse.de>
23658 PR tree-optimization/84037
23659 * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
23660 (cse_and_gimplify_to_preheader): Declare.
23661 (vect_get_place_in_interleaving_chain): Likewise.
23662 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
23664 (_loop_vec_info::~_loop_vec_info): Delete it.
23665 (cse_and_gimplify_to_preheader): New function.
23666 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
23667 * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
23668 (vectorizable_load): Likewise. For grouped stores always base
23669 the IV on the first element.
23670 * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
23671 condition before gimplifying.
23673 2018-02-07 Jakub Jelinek <jakub@redhat.com>
23675 * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
23676 *DIV_EXPR and *MOD_EXPR.
23678 2018-02-07 H.J. Lu <hongjiu.lu@intel.com>
23681 * config/i386/i386.c (ix86_option_override_internal): Mask out
23682 the CF_SET bit when checking -fcf-protection.
23684 2018-02-07 Tom de Vries <tom@codesourcery.com>
23687 * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
23690 2018-02-07 Richard Biener <rguenther@suse.de>
23692 PR tree-optimization/84204
23693 * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
23696 PR tree-optimization/84205
23697 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
23698 special-case isl_ast_op_zdiv_r.
23700 PR tree-optimization/84223
23701 * graphite-scop-detection.c (gather_bbs::before_dom_children):
23702 Only add conditions from within the region.
23703 (gather_bbs::after_dom_children): Adjust.
23705 2018-02-07 Georg-Johann Lay <avr@gjlay.de>
23708 * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
23709 * config/avr/avr.md: Only post-reload split REG-REG moves if
23710 either register is GENERAL_REG_P.
23712 2018-02-07 Jakub Jelinek <jakub@redhat.com>
23714 PR tree-optimization/84235
23715 * tree-ssa-scopedtables.c
23716 (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
23717 if the subtraction is performed in floating point type where NaNs are
23718 honored. For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
23719 build 1. Formatting fix.
23721 2018-02-06 Jakub Jelinek <jakub@redhat.com>
23724 * config/i386/i386.c (rest_of_insert_endbranch): Only skip
23725 NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
23726 and skip it regardless of bb boundaries. Use CALL_P macro,
23727 don't test INSN_P (insn) together with CALL_P or JUMP_P check
23728 unnecessarily, formatting fix.
23730 2018-02-06 Michael Collison <michael.collison@arm.com>
23732 * config/arm/thumb2.md:
23733 (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
23734 (*thumb_mov_notscc): Ditto.
23736 2018-02-06 Michael Meissner <meissner@linux.vnet.ibm.com>
23739 * config/rs6000/rs6000.md (su code attribute): Use "u" for
23740 unsigned_fix, not "s".
23742 2018-02-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
23744 * configure.ac (gcc_fn_eh_frame_ro): New function.
23745 (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
23746 correct .eh_frame permissions.
23747 * configure: Regenerate.
23749 2018-02-06 Andrew Jenner <andrew@codeourcery.com>
23751 * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
23752 irrelevant options.
23754 2018-02-06 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
23756 * config/rs6000/rs6000.c (rs6000_option_override_internal):
23757 Display warning message for -mno-speculate-indirect-jumps.
23759 2018-02-06 Andrew Jenner <andrew@codesourcery.com>
23761 * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
23763 * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
23765 2018-02-06 Aldy Hernandez <aldyh@redhat.com>
23767 PR tree-optimization/84225
23768 * tree-eh.c (find_trapping_overflow): Only call
23769 operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
23771 2018-02-06 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
23774 * config/i386/i386.c: Reimplement the check of possible options
23775 -mibt/-mshstk conbination. Change error messages.
23776 * doc/invoke.texi: Fix a typo: remove extra '='.
23778 2018-02-06 Marek Polacek <polacek@redhat.com>
23780 PR tree-optimization/84228
23781 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
23783 2018-02-06 Tamar Christina <tamar.christina@arm.com>
23786 * config/arm/arm.c (arm_print_asm_arch_directives): Record already
23787 emitted arch directives.
23788 * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
23789 __ARM_FEATURE_COPROC before changing architectures.
23791 2018-02-06 Richard Biener <rguenther@suse.de>
23793 * config/i386/i386.c (print_reg): Fix typo.
23794 (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
23796 2018-02-06 Eric Botcazou <ebotcazou@adacore.com>
23798 * configure: Regenerate.
23800 2018-02-05 Martin Sebor <msebor@redhat.com>
23802 PR tree-optimization/83369
23803 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
23806 2018-02-05 Martin Liska <mliska@suse.cz>
23808 * doc/invoke.texi: Cherry-pick upstream r323995.
23810 2018-02-05 Richard Sandiford <richard.sandiford@linaro.org>
23812 * ira.c (ira_init_register_move_cost): Adjust comment.
23814 2018-02-05 Martin Liska <mliska@suse.cz>
23816 PR gcov-profile/84137
23817 * doc/gcov.texi: Fix typo in documentation.
23819 2018-02-05 Martin Liska <mliska@suse.cz>
23821 PR gcov-profile/83879
23822 * doc/gcov.texi: Document necessity of --dynamic-list-data when
23823 using dlopen functionality.
23825 2018-02-05 Olga Makhotina <olga.makhotina@intel.com>
23827 * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
23828 _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
23829 _mm_maskz_range_ss, _mm_mask_range_round_ss,
23830 _mm_maskz_range_round_ss): New intrinsics.
23831 (__builtin_ia32_rangesd128_round)
23832 (__builtin_ia32_rangess128_round): Remove.
23833 (__builtin_ia32_rangesd128_mask_round,
23834 __builtin_ia32_rangess128_mask_round): New builtins.
23835 * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
23836 __builtin_ia32_rangess128_round): Remove.
23837 (__builtin_ia32_rangesd128_mask_round,
23838 __builtin_ia32_rangess128_mask_round): New builtins.
23839 * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
23840 (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
23841 ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
23842 "<round_saeonly_constraint>")): Changed to ...
23843 ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
23844 "<round_saeonly_scalar_constraint>")): ... this.
23845 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
23846 %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
23847 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
23848 %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
23849 %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
23851 2018-02-02 Andrew Jenner <andrew@codesourcery.com>
23853 * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
23855 * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
23856 Remove all values except native, 8540 and 8548.
23858 2018-02-02 H.J. Lu <hongjiu.lu@intel.com>
23860 * config/i386/i386.c (ix86_output_function_return): Pass
23861 INVALID_REGNUM, instead of -1, as invalid register number to
23862 indirect_thunk_name and output_indirect_thunk.
23864 2018-02-02 Julia Koval <julia.koval@intel.com>
23866 * config.gcc: Add -march=icelake.
23867 * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
23868 * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
23869 * config/i386/i386.c (processor_costs): Add m_ICELAKE.
23870 (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
23871 PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
23872 (processor_target_table): Add icelake.
23873 (ix86_option_override_internal): Handle new PTAs.
23874 (get_builtin_code_for_version): Handle icelake.
23875 (M_INTEL_COREI7_ICELAKE): New.
23876 (fold_builtin_cpu): Handle icelake.
23877 * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
23878 * doc/invoke.texi: Add -march=icelake.
23880 2018-02-02 Julia Koval <julia.koval@intel.com>
23882 * config/i386/i386.c (ix86_option_override_internal): Change flags type
23883 to wide_int_bitmask.
23884 * wide-int-bitmask.h: New.
23886 2018-02-02 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
23889 * config/i386/i386.md: Replace Pmode with word_mode in
23890 builtin_setjmp_setup and builtin_longjmp to support x32.
23892 2018-02-01 Peter Bergner <bergner@vnet.ibm.com>
23896 * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
23898 (rs6000_supported_cpu_names): New static variable.
23899 (linux_cpu_translation_table): Likewise.
23900 (elf_platform) <cpu>: Define new static variable and use it.
23901 Translate kernel AT_PLATFORM name to canonical name if needed.
23902 Error if platform name is unknown.
23904 2018-02-01 Aldy Hernandez <aldyh@redhat.com>
23907 * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
23909 2018-02-01 Jeff Law <law@redhat.com>
23912 * config/i386/i386.c (release_scratch_register_on_entry): Add new
23913 OFFSET and RELEASE_VIA_POP arguments. Use SP+OFFSET to restore
23914 the scratch if RELEASE_VIA_POP is false.
23915 (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
23916 If we have to save a temporary register, decrement SIZE appropriately.
23917 Pass new arguments to release_scratch_register_on_entry.
23918 (ix86_adjust_stack_and_probe): Likewise.
23919 (ix86_emit_probe_stack_range): Pass new arguments to
23920 release_scratch_register_on_entry.
23922 2018-02-01 Uros Bizjak <ubizjak@gmail.com>
23924 PR rtl-optimization/84157
23925 * combine.c (change_zero_ext): Use REG_P predicate in
23926 front of HARD_REGISTER_P predicate.
23928 2018-02-01 Georg-Johann Lay <avr@gjlay.de>
23930 * config/avr/avr.c (avr_option_override): Move disabling of
23931 -fdelete-null-pointer-checks to...
23932 * common/config/avr/avr-common.c (avr_option_optimization_table):
23935 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
23937 PR tree-optimization/81635
23938 * tree-data-ref.c (split_constant_offset_1): For types that
23939 wrap on overflow, try to use range info to prove that wrapping
23942 2018-02-01 Renlin Li <renlin.li@arm.com>
23945 * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
23946 TAILCALL_ADDR_REGS.
23947 (aarch64_register_move_cost): Likewise.
23948 * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
23949 TAILCALL_ADDR_REGS.
23950 (REG_CLASS_NAMES): Likewise.
23951 (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
23952 TAILCALL_ADDR_REGS. Remove IP registers.
23953 * config/aarch64/aarch64.md (Ucs): Update register constraint.
23955 2018-02-01 Richard Biener <rguenther@suse.de>
23957 * domwalk.h (dom_walker::dom_walker): Add additional constructor
23958 for specifying RPO order and allow NULL for that.
23959 * domwalk.c (dom_walker::dom_walker): Likewise.
23960 (dom_walker::walk): Handle NULL RPO order.
23961 * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
23963 (rewrite_update_dom_walker): Likewise.
23964 (mark_def_dom_walker): Likewise.
23966 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
23968 * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
23969 (aarch64_maybe_expand_sve_subreg_move): Declare.
23970 * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
23971 * config/aarch64/predicates.md (aarch64_any_register_operand): New
23973 * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
23974 that are semantically a reverse operation.
23975 (*aarch64_sve_mov<mode>_subreg_be): New pattern.
23976 * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
23977 (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
23979 (aarch64_can_change_mode_class): For big-endian, forbid changes
23980 between two SVE modes if they have different element sizes.
23982 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
23984 * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
23985 the TImode handling for big-endian targets.
23987 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
23989 * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
23990 (*sve_ld1rq<Vesize>): ... this new pattern. Handle all element sizes,
23992 * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
23993 Remove BSWAP handing for big-endian targets and use the form of
23994 LD1RQ appropariate for the mode.
23996 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
23998 * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
23999 all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
24000 duplicated element.
24002 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
24005 * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
24006 check for operands that need to go through aarch64_sve_reload_be.
24008 2018-02-01 Jakub Jelinek <jakub@redhat.com>
24010 PR tree-optimization/81661
24011 PR tree-optimization/84117
24012 * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
24013 * tree-eh.c: Include gimplify.h.
24014 (find_trapping_overflow, replace_trapping_overflow,
24015 rewrite_to_non_trapping_overflow): New functions.
24016 * tree-vect-loop.c: Include tree-eh.h.
24017 (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
24018 * tree-data-ref.c: Include tree-eh.h.
24019 (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
24021 2018-01-31 Uros Bizjak <ubizjak@gmail.com>
24023 PR rtl-optimization/84123
24024 * combine.c (change_zero_ext): Check if hard register satisfies
24025 can_change_dest_mode before calling gen_lowpart_SUBREG.
24027 2018-01-31 Vladimir Makarov <vmakarov@redhat.com>
24030 * ira.c (ira_init_register_move_cost): Remove assert.
24032 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
24034 PR rtl-optimization/84071
24035 * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
24036 * doc/tm.texi: Regenerate.
24038 2018-01-31 Richard Biener <rguenther@suse.de>
24040 PR tree-optimization/84132
24041 * tree-data-ref.c (analyze_miv_subscript): Properly
24042 check whether evolution_function_is_affine_multivariate_p
24043 before calling gcd_of_steps_may_divide_p.
24045 2018-01-31 Julia Koval <julia.koval@intel.com>
24048 * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
24049 * config/i386/i386.md (rdpid_rex64) New.
24050 (rdpid): Make 32bit only.
24052 2018-01-29 Aldy Hernandez <aldyh@redhat.com>
24055 * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
24056 an IDENTIFIER_NODE for FUNCTION_TYPE's.
24058 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
24061 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
24063 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
24065 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
24067 PR rtl-optimization/84071
24068 * combine.c (record_dead_and_set_regs_1): Record the source unmodified
24069 for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
24071 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
24073 * config/arc/arc.c (arc_handle_aux_attribute): New function.
24074 (arc_attribute_table): Add 'aux' attribute.
24075 (arc_in_small_data_p): Consider aux like variables.
24076 (arc_is_aux_reg_p): New function.
24077 (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
24078 (arc_get_aux_arg): New function.
24079 (prepare_move_operands): Handle aux-register access.
24080 (arc_handle_aux_attribute): New function.
24081 * doc/extend.texi (ARC Variable attributes): Add subsection.
24083 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
24085 * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
24086 * config/arc/arc.c (arc_handle_uncached_attribute): New function.
24087 (arc_attribute_table): Add 'uncached' attribute.
24088 (arc_print_operand): Print '.di' flag for uncached memory
24090 (arc_in_small_data_p): Do not consider for small data the uncached
24092 (arc_is_uncached_mem_p): New function.
24093 * config/arc/predicates.md (compact_store_memory_operand): Check
24094 for uncached memory accesses.
24095 (nonvol_nonimm_operand): Likewise.
24096 * doc/extend.texi (ARC Type Attribute): New subsection.
24098 2018-01-31 Jakub Jelinek <jakub@redhat.com>
24101 * common.opt (falign-functions=, falign-jumps=, falign-labels=,
24102 falign-loops=): Add Optimization flag.
24104 2018-01-30 Jeff Law <law@redhat.com>
24107 * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
24108 INT_REGISTERS_SAVED. Check it prior to calling
24109 get_scratch_register_on_entry.
24110 (ix86_adjust_stack_and_probe): Similarly.
24111 (ix86_emit_probe_stack_range): Similarly.
24112 (ix86_expand_prologue): Corresponding changes.
24114 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
24117 * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
24118 -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
24120 2018-01-30 Vladimir Makarov <vmakarov@redhat.com>
24123 * lra-constraints.c (curr_insn_transform): Process AND in the
24126 2018-01-30 Jakub Jelinek <jakub@redhat.com>
24128 PR rtl-optimization/83986
24129 * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
24130 dependence against last_pending_memory_flush in addition to
24131 pending_jump_insns.
24133 2018-01-30 Alexandre Oliva <aoliva@redhat.com>
24135 PR tree-optimization/81611
24136 * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
24139 2018-01-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
24142 * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
24145 2018-01-30 Richard Biener <rguenther@suse.de>
24146 Jakub Jelinek <jakub@redhat.com>
24148 PR tree-optimization/84111
24149 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
24150 inner loops added during recursion, as they don't have up-to-date
24153 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
24156 * ipa-inline.c (can_inline_edge_p): Break out late tests to...
24157 (can_inline_edge_by_limits_p): ... here.
24158 (can_early_inline_edge_p, check_callers,
24159 update_caller_keys, update_callee_keys, recursive_inlining,
24160 add_new_edges_to_heap, speculation_useful_p,
24161 inline_small_functions,
24162 inline_small_functions, flatten_function,
24163 inline_to_all_callers_1): Update.
24165 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
24167 * profile-count.c (profile_count::combine_with_ipa_count): Handle
24170 2018-01-30 Richard Biener <rguenther@suse.de>
24172 PR tree-optimization/83008
24173 * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
24174 invariant and constant vector uses in stmts when they need
24175 more than one stmt.
24177 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
24180 * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
24181 * configure: Regenerate.
24183 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
24185 * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
24187 (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
24188 Use gen_rtx_REG rather than gen_lowpart.
24190 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
24192 * lra-constraints.c (match_reload): Use subreg_lowpart_offset
24193 rather than 0 when creating partial subregs.
24195 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
24197 * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
24200 2018-01-29 Michael Meissner <meissner@linux.vnet.ibm.com>
24203 * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
24204 and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
24205 -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
24206 flags. This restores the settings used before the 2017-07-24.
24207 Turning off pre increment/decrement/modify allows IVOPTS to
24208 optimize DF/SF loops where the index is an int.
24210 2018-01-29 Richard Biener <rguenther@suse.de>
24211 Kelvin Nilsen <kelvin@gcc.gnu.org>
24214 * tree-vect-stmts.c (vectorizable_call): Don't call
24215 targetm.vectorize_builtin_md_vectorized_function if callee is
24218 2018-01-22 Carl Love <cel@us.ibm.com>
24220 * doc/extend.tex: Fix typo in second arg in
24221 __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
24223 2018-01-29 Richard Biener <rguenther@suse.de>
24225 PR tree-optimization/84086
24226 * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
24227 (flush_ssaname_freelist): When SSA names were released reset
24228 the SCEV hash table.
24230 2018-01-29 Richard Biener <rguenther@suse.de>
24232 PR tree-optimization/84057
24233 * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
24234 removed paths when removing edges.
24236 2018-01-27 H.J. Lu <hongjiu.lu@intel.com>
24238 * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
24239 -mfunction-return=@var{choice}.
24241 2018-01-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
24243 PR diagnostic/84034
24244 * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
24245 Handle CR like TAB.
24246 (layout::print_source_line): Likewise.
24247 (test_get_line_width_without_trailing_whitespace): Add test cases.
24249 2018-01-27 Jakub Jelinek <jakub@redhat.com>
24251 PR middle-end/84040
24252 * sched-deps.c (sched_macro_fuse_insns): Return immediately for
24255 2018-01-26 Jim Wilson <jimw@sifive.com>
24257 * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
24259 * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
24262 2018-01-26 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
24264 * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
24265 and CMP + SUB-immediate -> SUBS.
24267 2018-01-26 Martin Sebor <msebor@redhat.com>
24269 PR tree-optimization/83896
24270 * tree-ssa-strlen.c (get_string_len): Rename...
24271 (get_string_cst_length): ...to this. Return HOST_WIDE_INT.
24272 Avoid assuming length is constant.
24273 (handle_char_store): Use HOST_WIDE_INT for string length.
24275 2018-01-26 Uros Bizjak <ubizjak@gmail.com>
24278 * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
24279 to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
24281 2018-01-26 Richard Biener <rguenther@suse.de>
24283 PR rtl-optimization/84003
24284 * dse.c (record_store): Only record redundant stores when
24285 the earlier store aliases at least all accesses the later one does.
24287 2018-01-26 Jakub Jelinek <jakub@redhat.com>
24289 PR rtl-optimization/83985
24290 * dce.c (deletable_insn_p): Return false for separate shrink wrapping
24291 REG_CFA_RESTORE insns.
24292 (delete_unmarked_insns): Don't ignore separate shrink wrapping
24293 REG_CFA_RESTORE insns here.
24296 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
24297 use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
24299 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
24301 * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
24302 * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
24303 (arc_init): Likewise.
24304 (arc_override_options): Likewise.
24305 (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
24307 (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
24309 * config/arc/arc.h (TARGET_DBNZ): Define.
24310 * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
24311 properly set the tune attribute.
24312 (dbnz): Use TARGET_DBNZ guard.
24313 * config/arc/arc.opt (mtune): Add core3 option.
24315 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
24317 * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
24318 recognize new pic like addresses.
24319 (arc_delegitimize_address): Clean up.
24321 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
24323 * config/arc/arc-arches.def: Option mrf16 valid for all
24325 * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
24326 * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
24327 * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
24328 * config/arc/arc-tables.opt: Regenerate.
24329 * config/arc/arc.c (arc_conditional_register_usage): Handle
24330 reduced register file case.
24331 (arc_file_start): Set must have build attributes.
24332 * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
24333 mrf16 option value.
24334 * config/arc/arc.opt (mrf16): Add new option.
24335 * config/arc/elf.h (ATTRIBUTE_PCS): Define.
24336 * config/arc/genmultilib.awk: Handle new mrf16 option.
24337 * config/arc/linux.h (ATTRIBUTE_PCS): Define.
24338 * config/arc/t-multilib: Regenerate.
24339 * doc/invoke.texi (ARC Options): Document mrf16 option.
24341 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
24343 * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
24344 * config/arc/arc.c (arc_handle_secure_attribute): New function.
24345 (arc_attribute_table): Add 'secure_call' attribute.
24346 (arc_print_operand): Print secure call operand.
24347 (arc_function_ok_for_sibcall): Don't optimize tail calls when
24349 (arc_is_secure_call_p): New function. * config/arc/arc.md
24350 (call_i): Add support for sjli instruction.
24351 (call_value_i): Likewise.
24352 * config/arc/constraints.md (Csc): New constraint.
24354 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
24355 John Eric Martin <John.Martin@emmicro-us.com>
24357 * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
24358 * config/arc/arc.c (_arc_jli_section): New struct.
24359 (arc_jli_section): New type.
24360 (rc_jli_sections): New static variable.
24361 (arc_handle_jli_attribute): New function.
24362 (arc_attribute_table): Add jli_always and jli_fixed attribute.
24363 (arc_file_end): New function.
24364 (TARGET_ASM_FILE_END): Define.
24365 (arc_print_operand): Reuse 'S' letter for JLI output instruction.
24366 (arc_add_jli_section): New function.
24367 (jli_call_scan): Likewise.
24368 (arc_reorg): Call jli_call_scan.
24369 (arc_output_addsi): Remove 'S' from printing asm operand.
24370 (arc_is_jli_call_p): New function.
24371 * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
24373 (movhi_insn): Likewise.
24374 (movsi_insn): Likewise.
24375 (movsi_set_cc_insn): Likewise.
24376 (loadqi_update): Likewise.
24377 (load_zeroextendqisi_update): Likewise.
24378 (load_signextendqisi_update): Likewise.
24379 (loadhi_update): Likewise.
24380 (load_zeroextendhisi_update): Likewise.
24381 (load_signextendhisi_update): Likewise.
24382 (loadsi_update): Likewise.
24383 (loadsf_update): Likewise.
24384 (movsicc_insn): Likewise.
24385 (bset_insn): Likewise.
24386 (bxor_insn): Likewise.
24387 (bclr_insn): Likewise.
24388 (bmsk_insn): Likewise.
24389 (bicsi3_insn): Likewise.
24390 (cmpsi_cc_c_insn): Likewise.
24391 (movsi_ne): Likewise.
24392 (movsi_cond_exec): Likewise.
24393 (clrsbsi2): Likewise.
24394 (norm_f): Likewise.
24404 (call_i): Remove 'S' asm letter, add jli instruction.
24405 (call_value_i): Likewise.
24406 * config/arc/arc.op (mjli-always): New option.
24407 * config/arc/constraints.md (Cji): New constraint.
24408 * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
24410 (subsf3_fpx): Likewise.
24411 (mulsf3_fpx): Likewise.
24412 * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
24414 * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
24415 function attrbutes.
24416 * doc/invoke.texi (ARC): Document mjli-always option.
24418 2018-01-26 Sebastian Perta <sebastian.perta@renesas.com>
24420 * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
24421 avoid addition with 0 and use incw and decw where possible.
24423 2018-01-26 Richard Biener <rguenther@suse.de>
24425 PR tree-optimization/81082
24426 * fold-const.c (fold_plusminus_mult_expr): Do not perform the
24427 association if it requires casting to unsigned.
24428 * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
24429 from fold_plusminus_mult_expr to catch important cases late when
24430 range info is available.
24432 2018-01-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
24434 * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
24435 * configure.ac (hidden_linkonce): New test.
24436 * configure: Regenerate.
24437 * config.in: Regenerate.
24439 2018-01-26 Julia Koval <julia.koval@intel.com>
24441 * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
24442 _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
24443 _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
24444 _mm_mask_bitshuffle_epi64_mask): Fix type.
24445 * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
24446 USI_FTYPE_V4DI_V4DI_USI): Remove.
24447 * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
24448 __builtin_ia32_vpshufbitqmb256_mask,
24449 __builtin_ia32_vpshufbitqmb128_mask): Fix types.
24450 * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
24451 * config/i386/sse.md (VI1_AVX512VLBW): Change types.
24453 2018-01-26 Alan Modra <amodra@gmail.com>
24456 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
24457 UNSPEC_VBPERMQ. Sort other unspecs.
24459 2018-01-25 David Edelsohn <dje.gcc@gmail.com>
24461 * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
24463 2018-01-25 Jan Hubicka <hubicka@ucw.cz>
24465 PR middle-end/83055
24466 * predict.c (drop_profile): Do not push/pop cfun; update also
24468 (handle_missing_profiles): Fix logic looking for zero profiles.
24470 2018-01-25 Jakub Jelinek <jakub@redhat.com>
24472 PR middle-end/83977
24473 * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
24474 on functions with #pragma omp declare simd or functions with simd
24476 * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
24477 * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
24478 Remove trailing \n from warning_at calls.
24480 2018-01-25 Tom de Vries <tom@codesourcery.com>
24483 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
24484 for neutered workers.
24486 2018-01-24 Joseph Myers <joseph@codesourcery.com>
24489 * config/m68k/m68k.c (m68k_promote_function_mode): New function.
24490 (TARGET_PROMOTE_FUNCTION_MODE): New macro.
24492 2018-01-24 Jeff Law <law@redhat.com>
24495 * i386.c (get_probe_interval): Move to earlier point.
24496 (ix86_compute_frame_layout): If -fstack-clash-protection and
24497 the frame is larger than the probe interval, then use pushes
24498 to save registers rather than reg->mem moves.
24499 (ix86_expand_prologue): Remove conditional for int_registers_saved
24502 2018-01-24 Vladimir Makarov <vmakarov@redhat.com>
24505 * ira-build.c (setup_min_max_allocno_live_range_point): Set up
24506 min/max for never referenced object.
24508 2018-01-24 Jakub Jelinek <jakub@redhat.com>
24510 PR middle-end/83977
24511 * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
24513 * omp-low.c (create_omp_child_function): Remove "omp declare simd"
24514 attributes from DECL_ATTRIBUTES (decl) without affecting
24515 DECL_ATTRIBUTES (current_function_decl).
24516 * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
24517 functions with non-NULL DECL_ABSTRACT_ORIGIN.
24519 2018-01-24 Richard Sandiford <richard.sandiford@linaro.org>
24521 PR tree-optimization/83979
24522 * fold-const.c (fold_comparison): Use constant_boolean_node
24523 instead of boolean_{true,false}_node.
24525 2018-01-24 Jan Hubicka <hubicka@ucw.cz>
24527 * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
24530 2018-01-24 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
24532 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
24533 Simplify the clause that sets the length attribute.
24534 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
24535 (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
24536 clause that sets the length attribute.
24537 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
24539 2018-01-24 Tom de Vries <tom@codesourcery.com>
24542 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
24543 (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
24544 Add strict parameter.
24545 (prevent_branch_around_nothing): Insert dummy insn between branch to
24546 label and label with no ptx insn inbetween.
24547 * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
24549 2018-01-24 Tom de Vries <tom@codesourcery.com>
24552 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
24553 for neutered threads in warp.
24554 * config/nvptx/nvptx.md (define_insn "exit"): New insn.
24556 2018-01-24 Richard Biener <rguenther@suse.de>
24558 PR tree-optimization/83176
24559 * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
24562 2018-01-24 Richard Biener <rguenther@suse.de>
24564 PR tree-optimization/82819
24565 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
24566 code generating pluses that are no-ops in the target precision.
24568 2018-01-24 Richard Biener <rguenther@suse.de>
24570 PR middle-end/84000
24571 * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
24573 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
24575 * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
24576 to merge probabilities.
24577 * predict.c (probably_never_executed): Also mark as cold functions
24578 with global 0 profile and guessed local profile.
24579 * profile-count.c (profile_probability::combine_with_count): New
24581 * profile-count.h (profile_probability::operator*,
24582 profile_probability::operator*=, profile_probability::operator/,
24583 profile_probability::operator/=): Reduce precision to adjusted
24584 and set value to guessed on contradictory divisions.
24585 (profile_probability::combine_with_freq): Remove.
24586 (profile_probability::combine_wiht_count): Declare.
24587 (profile_count::force_nonzero):: Set to adjusted.
24588 (profile_count::probability_in):: Set quality to adjusted.
24589 * tree-ssa-tail-merge.c (replace_block_by): Use
24590 combine_with_count.
24592 2018-01-23 Andrew Waterman <andrew@sifive.com>
24593 Jim Wilson <jimw@sifive.com>
24595 * config/riscv/riscv.c (riscv_stack_boundary): New.
24596 (riscv_option_override): Set riscv_stack_boundary. Handle
24597 riscv_preferred_stack_boundary_arg.
24598 * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
24599 (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
24600 (STACK_BOUNDARY): Set to riscv_stack_boundary.
24601 (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
24602 * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
24603 * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
24605 2018-01-23 H.J. Lu <hongjiu.lu@intel.com>
24608 * config/i386/i386.c (ix86_expand_prologue): Use cost reference
24609 of struct ix86_frame.
24610 (ix86_expand_epilogue): Likewise. Add a local variable for
24611 the reg_save_offset field in struct ix86_frame.
24613 2018-01-23 Bin Cheng <bin.cheng@arm.com>
24615 PR tree-optimization/82604
24616 * tree-loop-distribution.c (enum partition_kind): New enum item
24617 PKIND_PARTIAL_MEMSET.
24618 (partition_builtin_p): Support above new enum item.
24619 (generate_code_for_partition): Ditto.
24620 (compute_access_range): Differentiate cases that equality can be
24621 proven at all loops, the innermost loops or no loops.
24622 (classify_builtin_st, classify_builtin_ldst): Adjust call to above
24623 function. Set PKIND_PARTIAL_MEMSET for partition appropriately.
24624 (finalize_partitions, distribute_loop): Don't fuse partition of
24625 PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
24626 (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
24627 parloop is enabled.
24629 2018-01-23 Martin Liska <mliska@suse.cz>
24631 * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
24632 order to ignore the predictor.
24633 (PRED_POLYMORPHIC_CALL): Likewise.
24634 (PRED_RECURSIVE_CALL): Likewise.
24636 2018-01-23 Martin Liska <mliska@suse.cz>
24638 * tree-profile.c (tree_profiling): Print function header to
24639 aware reader which function we are working on.
24640 * value-prof.c (gimple_find_values_to_profile): Do not print
24641 not interesting value histograms.
24643 2018-01-23 Martin Liska <mliska@suse.cz>
24645 * profile-count.h (enum profile_quality): Add
24646 profile_uninitialized as the first value. Do not number values
24647 as they are zero based.
24648 (profile_count::verify): Update sanity check.
24649 (profile_probability::verify): Likewise.
24651 2018-01-23 Nathan Sidwell <nathan@acm.org>
24653 * doc/invoke.texi (ffor-scope): Deprecate.
24655 2018-01-23 David Malcolm <dmalcolm@redhat.com>
24657 PR tree-optimization/83510
24658 * domwalk.c (set_all_edges_as_executable): New function.
24659 (dom_walker::dom_walker): Convert bool param
24660 "skip_unreachable_blocks" to enum reachability. Move setup of
24661 edge flags to set_all_edges_as_executable and only do it when
24662 reachability is REACHABLE_BLOCKS.
24663 * domwalk.h (enum dom_walker::reachability): New enum.
24664 (dom_walker::dom_walker): Convert bool param
24665 "skip_unreachable_blocks" to enum reachability.
24666 (set_all_edges_as_executable): New decl.
24667 * graphite-scop-detection.c (gather_bbs::gather_bbs): Convert
24668 from false for "skip_unreachable_blocks" to ALL_BLOCKS for
24670 * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
24671 but converting true to REACHABLE_BLOCKS.
24672 * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
24674 (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
24675 Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
24676 (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
24678 (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
24679 if check_all_array_refs will be called.
24681 2018-01-23 David Malcolm <dmalcolm@redhat.com>
24683 * tree.c (selftest::test_location_wrappers): Add more test
24686 2018-01-23 David Malcolm <dmalcolm@redhat.com>
24688 * sbitmap.c (selftest::test_set_range): Fix memory leaks.
24689 (selftest::test_bit_in_range): Likewise.
24691 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
24694 * doc/sourcebuild.texi (vect_float): Say that the selector
24695 only describes the situation when -funsafe-math-optimizations is on.
24696 (vect_float_strict): Document.
24698 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
24700 PR tree-optimization/83965
24701 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
24702 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
24703 instead of checking only for a reduction.
24704 (vect_recog_widen_sum_pattern): Likewise.
24706 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
24708 * predict.c (probably_never_executed): Only use precise profile info.
24709 (compute_function_frequency): Skip after inlining hack since we now
24710 have quality checking.
24712 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
24714 * profile-count.h (profile_probability::very_unlikely,
24715 profile_probability::unlikely, profile_probability::even): Set
24716 precision to guessed.
24718 2018-01-23 Richard Biener <rguenther@suse.de>
24720 PR tree-optimization/83963
24721 * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
24722 Properly terminate dominator walk when crossing the exit edge not
24723 when visiting its source block.
24725 2018-01-23 Jakub Jelinek <jakub@redhat.com>
24728 * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
24729 VIEW_CONVERT_EXPR to wrap CONST_DECLs.
24731 2018-01-22 Jakub Jelinek <jakub@redhat.com>
24733 PR tree-optimization/83957
24734 * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs. Remove
24735 semicolon after for body surrounded by braces.
24737 PR tree-optimization/83081
24738 * profile-count.h (profile_probability::split): New method.
24739 * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
24740 Use profile_probability::split.
24741 (do_compare_rtx_and_jump): Fix adjustment of probabilities
24742 when splitting a single conditional jump into 2.
24744 2018-01-22 David Malcolm <dmalcolm@redhat.com>
24746 PR tree-optimization/69452
24747 * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
24750 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
24752 * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
24753 * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
24754 * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
24756 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
24758 * config/rl78/rl78-protos.h (rl78_split_movdi): New function
24760 * config/rl78/rl78.md (movdi): New define_expand.
24761 * config/rl78/rl78.c (rl78_split_movdi): New function.
24763 2018-01-22 Michael Meissner <meissner@linux.vnet.ibm.com>
24766 * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
24768 * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
24769 * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
24770 128-bit to produce an UNSPEC move to get the double word with the
24771 signbit and then a shift directly to do signbit.
24772 (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
24773 implementation with a new version that just does either a direct
24774 move or a regular move. Move memory interface to separate insns.
24775 Move insns so they are next to the expander.
24776 (signbit<mode>2_dm_mem_be): New combiner insns to combine load
24777 with signbit move. Split big and little endian case.
24778 (signbit<mode>2_dm_mem_le): Likewise.
24779 (signbit<mode>2_dm_<su>ext): Delete, no longer used.
24780 (signbit<mode>2_dm2): Likewise.
24782 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
24784 * config/rl78/rl78.md (anddi3): New define_expand.
24786 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
24788 * config/rl78/rl78.md (umindi3): New define_expand.
24790 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
24792 * config/rl78/rl78.md (smindi3): New define_expand.
24794 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
24796 * config/rl78/rl78.md (smaxdi3): New define_expand.
24798 2018-01-22 Carl Love <cel@us.ibm.com>
24800 * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
24801 LVX_V1TI): Add macro expansion.
24802 * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
24803 definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
24804 VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
24805 * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
24806 Change check to determine if the instruction is a byte reversing
24807 entry. Fix typo in comment.
24808 * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
24809 for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
24810 Add def_builtin calls for new builtins.
24811 * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
24812 Add define_insn expansion.
24814 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
24816 * config/rl78/rl78.md (umaxdi3): New define_expand.
24818 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
24820 * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
24821 for non-QImode registers.
24823 2018-01-22 Richard Biener <rguenther@suse.de>
24825 PR tree-optimization/83963
24826 * graphite-scop-detection.c (scop_detection::get_sese): Delay
24827 including the loop exit block.
24828 (scop_detection::merge_sese): Likewise.
24829 (scop_detection::add_scop): Do it here instead.
24831 2018-01-22 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
24833 * doc/sourcebuild.texi (arm_softfloat): Document.
24835 2018-01-21 John David Anglin <danglin@gcc.gnu.org>
24838 * config/pa/pa.c (pa_function_ok_for_sibcall): Use
24839 targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
24840 Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
24842 2018-01-21 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
24843 David Edelsohn <dje.gcc@gmail.com>
24846 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
24847 Change "crset eq" to "crset 2".
24848 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
24849 (*call_indirect_aix<mode>_nospec): Likewise.
24850 (*call_value_indirect_aix<mode>_nospec): Likewise.
24851 (*call_indirect_elfv2<mode>_nospec): Likewise.
24852 (*call_value_indirect_elfv2<mode>_nospec): Likewise.
24853 (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
24854 change assembly output from . to $.
24855 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
24856 (indirect_jump<mode>_nospec): Change assembly output from . to $.
24857 (*tablejump<mode>_internal1_nospec): Likewise.
24859 2018-01-21 Oleg Endo <olegendo@gcc.gnu.org>
24862 * config/sh/sh_optimize_sett_clrt.cc:
24863 Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
24865 2018-01-20 Richard Sandiford <richard.sandiford@linaro.org>
24867 PR tree-optimization/83940
24868 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
24869 offset_dt to vect_constant_def rather than vect_unknown_def_type.
24870 (vect_check_load_store_mask): Add a mask_dt_out parameter and
24871 use it to pass back the definition type.
24872 (vect_check_store_rhs): Likewise rhs_dt_out.
24873 (vect_build_gather_load_calls): Add a mask_dt argument and use
24874 it instead of a call to vect_is_simple_use.
24875 (vectorizable_store): Update calls to vect_check_load_store_mask
24876 and vect_check_store_rhs. Use the dt returned by the latter instead
24877 of scatter_src_dt. Use the cached mask_dt and gs_info.offset_dt
24878 instead of calls to vect_is_simple_use. Pass the scalar rather
24879 than the vector operand to vect_is_simple_use when handling
24880 second and subsequent copies of an rhs value.
24881 (vectorizable_load): Update calls to vect_check_load_store_mask
24882 and vect_build_gather_load_calls. Use the cached mask_dt and
24883 gs_info.offset_dt instead of calls to vect_is_simple_use.
24885 2018-01-20 Jakub Jelinek <jakub@redhat.com>
24887 PR middle-end/83945
24888 * tree-emutls.c: Include gimplify.h.
24889 (lower_emutls_2): New function.
24890 (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
24891 with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
24892 it before further processing.
24895 * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
24896 UINTVAL (trueop1) instead of INTVAL (op1).
24898 2018-01-19 Jakub Jelinek <jakub@redhat.com>
24902 * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
24903 INCOMING_FRAME_SP_OFFSET if not defined.
24904 (scan_trace): Add ENTRY argument. If true and
24905 DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
24906 emit a note to adjust the CFA offset.
24907 (create_cfi_notes): Adjust scan_trace callers.
24908 (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
24909 INCOMING_FRAME_SP_OFFSET in the CIE.
24910 * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
24911 * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
24913 * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
24914 * doc/tm.texi: Regenerated.
24916 2018-01-19 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
24918 PR rtl-optimization/83147
24919 * lra-constraints.c (remove_inheritance_pseudos): Use
24920 lra_substitute_pseudo_within_insn.
24922 2018-01-19 Tom de Vries <tom@codesourcery.com>
24923 Cesar Philippidis <cesar@codesourcery.com>
24926 * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
24928 2018-01-19 Cesar Philippidis <cesar@codesourcery.com>
24931 * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
24932 spaces for function labels.
24934 2018-01-19 Martin Liska <mliska@suse.cz>
24936 * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
24937 (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
24938 (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
24939 (PRED_OPCODE_POSITIVE): Change from 64 to 59.
24940 (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
24941 (PRED_CONST_RETURN): Change from 69 to 65.
24942 (PRED_NULL_RETURN): Change from 91 to 71.
24943 (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
24944 (PRED_LOOP_GUARD): Change from 66 to 73.
24946 2018-01-19 Martin Liska <mliska@suse.cz>
24948 * predict.c (predict_insn_def): Add new assert.
24949 (struct branch_predictor): Change type to signed integer.
24950 (test_prediction_value_range): Amend test to cover
24951 PROB_UNINITIALIZED.
24952 * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
24953 (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
24954 (PRED_LOOP_ITERATIONS_MAX): Likewise.
24955 (PRED_LOOP_IV_COMPARE): Likewise.
24956 * predict.h (PROB_UNINITIALIZED): Define new constant.
24958 2018-01-19 Martin Liska <mliska@suse.cz>
24960 * predict.c (dump_prediction): Add new format for
24961 analyze_brprob.py script which is enabled with -details
24963 * profile-count.h (precise_p): New function.
24965 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
24967 PR tree-optimization/83922
24968 * tree-vect-loop.c (vect_verify_full_masking): Return false if
24969 there are no statements that need masking.
24970 (vect_active_double_reduction_p): New function.
24971 (vect_analyze_loop_operations): Use it when handling phis that
24972 are not in the loop header.
24974 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
24976 PR tree-optimization/83914
24977 * tree-vect-loop.c (vectorizable_induction): Don't convert
24978 init_expr or apply the peeling adjustment for inductions
24979 that are nested within the vectorized loop.
24981 2018-01-19 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
24983 * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
24986 2018-01-18 Jakub Jelinek <jakub@redhat.com>
24990 * function.h (gimplify_parameters): Add gimple_seq * argument.
24991 * function.c: Include gimple.h and options.h.
24992 (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
24993 for the added local temporaries if needed.
24994 * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
24995 if there are any parameter cleanups, wrap whole body into a
24996 try/finally with the cleanups.
24998 2018-01-18 Wilco Dijkstra <wdijkstr@arm.com>
25001 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
25002 Use GET_MODE_CLASS for scalar floating point.
25004 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
25008 * cgraphclones.c (cgraph_node::create_version_clone_with_body):
25009 Fix call of call_cgraph_insertion_hooks.
25011 2018-01-18 Martin Sebor <msebor@redhat.com>
25013 * doc/invoke.texi (-Wclass-memaccess): Tweak text.
25015 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
25018 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
25021 2018-01-18 Boris Kolpackov <boris@codesynthesis.com>
25024 * common.opt: (-ffile-prefix-map): New option.
25025 * opts.c (common_handle_option): Defer it.
25026 * opts-global.c (handle_common_deferred_options): Handle it.
25027 * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
25028 * file-prefix-map.h: New file.
25029 (remap_debug_filename, add_debug_prefix_map): ...here.
25030 (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
25031 * final.c (debug_prefix_map, add_debug_prefix_map
25032 remap_debug_filename): Move to...
25033 * file-prefix-map.c: New file.
25034 (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
25035 generalize, get rid of alloca(), use strrchr() instead of strchr().
25036 (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
25037 Implement in terms of add_prefix_map().
25038 (remap_macro_filename, remap_debug_filename): Implement in term of
25040 * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
25041 * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
25042 * dbxout.c: Include file-prefix-map.h.
25043 * varasm.c: Likewise.
25044 * vmsdbgout.c: Likewise.
25045 * xcoffout.c: Likewise.
25046 * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
25047 * doc/cppopts.texi (-fmacro-prefix-map): Document.
25048 * doc/invoke.texi (-ffile-prefix-map): Document.
25049 (-fdebug-prefix-map): Update description.
25051 2018-01-18 Martin Liska <mliska@suse.cz>
25053 * config/i386/i386.c (indirect_thunk_name): Document that also
25055 (output_indirect_thunk): Document why both instructions
25056 (pause and lfence) are generated.
25058 2018-01-18 Richard Biener <rguenther@suse.de>
25060 PR tree-optimization/83887
25061 * graphite-scop-detection.c
25062 (scop_detection::get_nearest_dom_with_single_entry): Remove.
25063 (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
25064 (scop_detection::merge_sese): Re-implement with a flood-fill
25065 algorithm that properly finds a SESE region if it exists.
25067 2018-01-18 Jakub Jelinek <jakub@redhat.com>
25070 * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
25071 pointer_diff optimizations use view_convert instead of convert.
25073 2018-01-17 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
25075 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
25076 Generate different code for -mno-speculate-indirect-jumps.
25077 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
25078 (*call_indirect_aix<mode>): Disable for
25079 -mno-speculate-indirect-jumps.
25080 (*call_indirect_aix<mode>_nospec): New define_insn.
25081 (*call_value_indirect_aix<mode>): Disable for
25082 -mno-speculate-indirect-jumps.
25083 (*call_value_indirect_aix<mode>_nospec): New define_insn.
25084 (*sibcall_nonlocal_sysv<mode>): Generate different code for
25085 -mno-speculate-indirect-jumps.
25086 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
25088 2018-01-17 Michael Meissner <meissner@linux.vnet.ibm.com>
25090 * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
25091 long double type, set the flags for noting the default long double
25092 type, even if we don't pass or return a long double type.
25094 2018-01-17 Jan Hubicka <hubicka@ucw.cz>
25097 * ipa-inline.c (flatten_function): Do not overwrite final inlining
25100 2018-01-17 Will Schmidt <will_schmidt@vnet.ibm.com>
25102 * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
25103 support for merge[hl].
25104 (fold_mergehl_helper): New helper function.
25105 (tree-vector-builder.h): New #include for tree_vector_builder usage.
25106 * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
25107 (altivec_vmrglw_direct): Add xxmrglw insn.
25109 2018-01-17 Andrew Waterman <andrew@sifive.com>
25111 * config/riscv/riscv.c (riscv_conditional_register_usage): If
25112 UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
25114 2018-01-17 David Malcolm <dmalcolm@redhat.com>
25117 * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
25118 call the lto_location_cache before reading the
25119 DECL_SOURCE_LOCATION of the types.
25121 2018-01-17 Wilco Dijkstra <wdijkstr@arm.com>
25122 Richard Sandiford <richard.sandiford@linaro.org>
25124 * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
25125 * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
25126 (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
25127 SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
25128 * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
25130 * config/aarch64/constraints.md (aarch64_movti_operand):
25132 * config/aarch64/predicates.md (Uti): Add new constraint.
25134 2018-01-17 Carl Love <cel@us.ibm.com>
25136 * config/rs6000/vsx.md (define_expand xl_len_r,
25137 define_expand stxvl, define_expand *stxvl): Add match_dup argument.
25138 (define_insn): Add, match_dup 1 argument to define_insn stxvll and
25140 (define_expand, define_insn): Move the shift left from the
25141 define_insn to the define_expand for lxvl and stxvl instructions.
25142 * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
25143 and XL_LEN_R definitions to PURE.
25145 2018-01-17 Uros Bizjak <ubizjak@gmail.com>
25147 * config/i386/i386.c (indirect_thunk_name): Declare regno
25148 as unsigned int. Compare regno with INVALID_REGNUM.
25149 (output_indirect_thunk): Ditto.
25150 (output_indirect_thunk_function): Ditto.
25151 (ix86_code_end): Declare regno as unsigned int. Use INVALID_REGNUM
25152 in the call to output_indirect_thunk_function.
25154 2018-01-17 Richard Sandiford <richard.sandiford@linaro.org>
25156 PR middle-end/83884
25157 * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
25158 rather than the size of inner_type to determine the stack slot size
25159 when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
25161 2018-01-16 Sebastian Peryt <sebastian.peryt@intel.com>
25164 * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
25167 2018-01-16 Michael Meissner <meissner@linux.vnet.ibm.com>
25169 * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
25170 endian Linux systems to optionally enable multilibs for selecting
25171 the long double type if the user configured an explicit type.
25172 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
25173 have no long double multilibs if not defined.
25174 * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
25175 warn if the user used -mabi={ieee,ibm}longdouble and we built
25176 multilibs for long double.
25177 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
25178 appropriate multilib option.
25179 (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
25181 * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
25182 for building long double multilibs.
25183 * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
25185 2018-01-16 John David Anglin <danglin@gcc.gnu.org>
25187 * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
25190 * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
25192 * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
25195 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
25198 * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
25201 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
25203 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
25204 ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
25206 2018-01-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
25208 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
25209 different rtl trees depending on TARGET_64BIT.
25210 (rs6000_gen_lvx): Likewise.
25212 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
25214 * config/visium/visium.md (nop): Tweak comment.
25215 (hazard_nop): Likewise.
25217 2018-01-16 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
25219 * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
25220 -mspeculate-indirect-jumps.
25221 * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
25222 for -mno-speculate-indirect-jumps.
25223 (*call_indirect_elfv2<mode>_nospec): New define_insn.
25224 (*call_value_indirect_elfv2<mode>): Disable for
25225 -mno-speculate-indirect-jumps.
25226 (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
25227 (indirect_jump): Emit different RTL for
25228 -mno-speculate-indirect-jumps.
25229 (*indirect_jump<mode>): Disable for
25230 -mno-speculate-indirect-jumps.
25231 (*indirect_jump<mode>_nospec): New define_insn.
25232 (tablejump): Emit different RTL for
25233 -mno-speculate-indirect-jumps.
25234 (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
25235 (tablejumpsi_nospec): New define_expand.
25236 (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
25237 (tablejumpdi_nospec): New define_expand.
25238 (*tablejump<mode>_internal1): Disable for
25239 -mno-speculate-indirect-jumps.
25240 (*tablejump<mode>_internal1_nospec): New define_insn.
25241 * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
25244 2018-01-16 Artyom Skrobov tyomitch@gmail.com
25246 * caller-save.c (insert_save): Drop unnecessary parameter. All
25249 2018-01-16 Jakub Jelinek <jakub@redhat.com>
25250 Richard Biener <rguenth@suse.de>
25253 * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
25254 return early, inline manually is_gimple_sizepos. Make sure if we
25255 call gimplify_expr we don't end up with a gimple constant.
25256 * tree.c (variably_modified_type_p): Don't return true for
25257 is_gimple_constant (_t). Inline manually is_gimple_sizepos.
25258 * gimplify.h (is_gimple_sizepos): Remove.
25260 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
25262 PR tree-optimization/83857
25263 * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
25264 vectorizable_live_operation for pure SLP statements.
25265 (vectorizable_live_operation): Handle PHIs.
25267 2018-01-16 Richard Biener <rguenther@suse.de>
25269 PR tree-optimization/83867
25270 * tree-vect-stmts.c (vect_transform_stmt): Precompute
25271 nested_in_vect_loop_p since the scalar stmt may get invalidated.
25273 2018-01-16 Jakub Jelinek <jakub@redhat.com>
25276 * stor-layout.c (handle_warn_if_not_align): Use byte_position and
25277 multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
25278 If off is not INTEGER_CST, issue a may not be aligned warning
25279 rather than isn't aligned. Use isn%'t rather than isn't.
25280 * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
25282 <case MULT_EXPR>: Improve the case when bottom and one of the
25283 MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
25284 operand, in that case check if the other operand is multiple of
25285 bottom divided by the INTEGER_CST operand.
25287 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
25290 * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
25291 * config/pa/pa-protos.h (pa_function_arg_size): Declare.
25292 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
25293 pa_function_arg_size instead of FUNCTION_ARG_SIZE.
25294 * config/pa/pa.c (pa_function_arg_advance): Likewise.
25295 (pa_function_arg, pa_arg_partial_bytes): Likewise.
25296 (pa_function_arg_size): New function.
25298 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
25300 * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
25301 in a separate statement.
25303 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
25305 PR tree-optimization/83847
25306 * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
25307 group gathers and scatters.
25309 2018-01-16 Jakub Jelinek <jakub@redhat.com>
25311 PR rtl-optimization/86620
25312 * params.def (max-sched-ready-insns): Bump minimum value to 1.
25314 PR rtl-optimization/83213
25315 * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
25316 to last if both are JUMP_INSNs.
25318 PR tree-optimization/83843
25319 * gimple-ssa-store-merging.c
25320 (imm_store_chain_info::output_merged_store): Handle bit_not_p on
25321 store_immediate_info for bswap/nop orig_stores.
25323 2018-01-15 Andrew Waterman <andrew@sifive.com>
25325 * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
25327 <UDIV>: Increase cost if !TARGET_DIV.
25329 2018-01-15 Segher Boessenkool <segher@kernel.crashing.org>
25331 * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
25332 (define_attr "cr_logical_3op"): New.
25333 (cceq_ior_compare): Adjust.
25334 (cceq_ior_compare_complement): Adjust.
25335 (*cceq_rev_compare): Adjust.
25336 * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
25337 (is_cracked_insn): Adjust.
25338 (insn_must_be_first_in_group): Adjust.
25339 * config/rs6000/40x.md: Adjust.
25340 * config/rs6000/440.md: Adjust.
25341 * config/rs6000/476.md: Adjust.
25342 * config/rs6000/601.md: Adjust.
25343 * config/rs6000/603.md: Adjust.
25344 * config/rs6000/6xx.md: Adjust.
25345 * config/rs6000/7450.md: Adjust.
25346 * config/rs6000/7xx.md: Adjust.
25347 * config/rs6000/8540.md: Adjust.
25348 * config/rs6000/cell.md: Adjust.
25349 * config/rs6000/e300c2c3.md: Adjust.
25350 * config/rs6000/e500mc.md: Adjust.
25351 * config/rs6000/e500mc64.md: Adjust.
25352 * config/rs6000/e5500.md: Adjust.
25353 * config/rs6000/e6500.md: Adjust.
25354 * config/rs6000/mpc.md: Adjust.
25355 * config/rs6000/power4.md: Adjust.
25356 * config/rs6000/power5.md: Adjust.
25357 * config/rs6000/power6.md: Adjust.
25358 * config/rs6000/power7.md: Adjust.
25359 * config/rs6000/power8.md: Adjust.
25360 * config/rs6000/power9.md: Adjust.
25361 * config/rs6000/rs64.md: Adjust.
25362 * config/rs6000/titan.md: Adjust.
25364 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
25366 * config/i386/predicates.md (indirect_branch_operand): Rewrite
25367 ix86_indirect_branch_register logic.
25369 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
25371 * config/i386/constraints.md (Bs): Update
25372 ix86_indirect_branch_register check. Don't check
25373 ix86_indirect_branch_register with GOT_memory_operand.
25375 * config/i386/predicates.md (GOT_memory_operand): Don't check
25376 ix86_indirect_branch_register here.
25377 (GOT32_symbol_operand): Likewise.
25379 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
25381 * config/i386/predicates.md (constant_call_address_operand):
25382 Rewrite ix86_indirect_branch_register logic.
25383 (sibcall_insn_operand): Likewise.
25385 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
25387 * config/i386/constraints.md (Bs): Replace
25388 ix86_indirect_branch_thunk_register with
25389 ix86_indirect_branch_register.
25391 * config/i386/i386.md (indirect_jump): Likewise.
25392 (tablejump): Likewise.
25393 (*sibcall_memory): Likewise.
25394 (*sibcall_value_memory): Likewise.
25395 Peepholes of indirect call and jump via memory: Likewise.
25396 * config/i386/i386.opt: Likewise.
25397 * config/i386/predicates.md (indirect_branch_operand): Likewise.
25398 (GOT_memory_operand): Likewise.
25399 (call_insn_operand): Likewise.
25400 (sibcall_insn_operand): Likewise.
25401 (GOT32_symbol_operand): Likewise.
25403 2018-01-15 Jakub Jelinek <jakub@redhat.com>
25405 PR middle-end/83837
25406 * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
25407 type rather than type addr's type points to.
25408 (expand_omp_atomic_mutex): Likewise.
25409 (expand_omp_atomic): Likewise.
25411 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
25414 * config/i386/i386.c (output_indirect_thunk_function): Use
25415 ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
25416 for __x86_return_thunk.
25418 2018-01-15 Richard Biener <rguenther@suse.de>
25420 PR middle-end/83850
25421 * expmed.c (extract_bit_field_1): Fix typo.
25423 2018-01-15 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
25426 * config/arm/iterators.md (VF): New mode iterator.
25427 * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
25428 Remove integer-related logic from pattern.
25429 (neon_vabd<mode>_3): Likewise.
25431 2018-01-15 Jakub Jelinek <jakub@redhat.com>
25433 PR middle-end/82694
25434 * common.opt (fstrict-overflow): No longer an alias.
25435 (fwrapv-pointer): New option.
25436 * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
25437 also for pointer types based on flag_wrapv_pointer.
25438 * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
25439 opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
25440 opts->x_flag_wrapv got set.
25441 * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
25442 changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
25443 POINTER_TYPE_OVERFLOW_UNDEFINED.
25444 * match.pd: Likewise in address comparison pattern.
25445 * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
25447 2018-01-15 Richard Biener <rguenther@suse.de>
25450 * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
25451 from TYPE_FIELDS. Free TYPE_BINFO if not used by devirtualization.
25452 Reset type names to their identifier if their TYPE_DECL doesn't
25453 have linkage (and thus is used for ODR and devirt).
25454 (save_debug_info_for_decl): Remove.
25455 (save_debug_info_for_type): Likewise.
25456 (add_tree_to_fld_list): Adjust.
25457 * tree-pretty-print.c (dump_generic_node): Make dumping of
25458 type names more robust.
25460 2018-01-15 Richard Biener <rguenther@suse.de>
25462 * BASE-VER: Bump to 8.0.1.
25464 2018-01-14 Martin Sebor <msebor@redhat.com>
25467 * builtins.c (check_access): Avoid warning when the no-warning bit
25470 2018-01-14 Cory Fields <cory-nospam-@coryfields.com>
25472 * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
25473 * ira-color (allocno_hard_regs_compare): Likewise.
25475 2018-01-14 Nathan Rossi <nathan@nathanrossi.com>
25478 * config/microblaze/microblaze.c (microblaze_asm_output_ident):
25479 Use .pushsection/.popsection.
25481 2018-01-14 Martin Sebor <msebor@redhat.com>
25484 * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
25486 2018-01-14 Jakub Jelinek <jakub@redhat.com>
25488 * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
25489 entry from extra_headers.
25490 (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
25491 extra_headers, make the list bitwise identical to the i?86-*-* one.
25493 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
25495 * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
25496 -mcmodel=large with -mindirect-branch=thunk,
25497 -mindirect-branch=thunk-extern, -mfunction-return=thunk and
25498 -mfunction-return=thunk-extern.
25499 * doc/invoke.texi: Document -mcmodel=large is incompatible with
25500 -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
25501 -mfunction-return=thunk and -mfunction-return=thunk-extern.
25503 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
25505 * config/i386/i386.c (print_reg): Print the name of the full
25506 integer register without '%'.
25507 (ix86_print_operand): Handle 'V'.
25508 * doc/extend.texi: Document 'V' modifier.
25510 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
25512 * config/i386/constraints.md (Bs): Disallow memory operand for
25513 -mindirect-branch-register.
25515 * config/i386/predicates.md (indirect_branch_operand): Likewise.
25516 (GOT_memory_operand): Likewise.
25517 (call_insn_operand): Likewise.
25518 (sibcall_insn_operand): Likewise.
25519 (GOT32_symbol_operand): Likewise.
25520 * config/i386/i386.md (indirect_jump): Call convert_memory_address
25521 for -mindirect-branch-register.
25522 (tablejump): Likewise.
25523 (*sibcall_memory): Likewise.
25524 (*sibcall_value_memory): Likewise.
25525 Disallow peepholes of indirect call and jump via memory for
25526 -mindirect-branch-register.
25527 (*call_pop): Replace m with Bw.
25528 (*call_value_pop): Likewise.
25529 (*sibcall_pop_memory): Replace m with Bs.
25530 * config/i386/i386.opt (mindirect-branch-register): New option.
25531 * doc/invoke.texi: Document -mindirect-branch-register option.
25533 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
25535 * config/i386/i386-protos.h (ix86_output_function_return): New.
25536 * config/i386/i386.c (ix86_set_indirect_branch_type): Also
25537 set function_return_type.
25538 (indirect_thunk_name): Add ret_p to indicate thunk for function
25540 (output_indirect_thunk_function): Pass false to
25541 indirect_thunk_name.
25542 (ix86_output_indirect_branch_via_reg): Likewise.
25543 (ix86_output_indirect_branch_via_push): Likewise.
25544 (output_indirect_thunk_function): Create alias for function
25545 return thunk if regno < 0.
25546 (ix86_output_function_return): New function.
25547 (ix86_handle_fndecl_attribute): Handle function_return.
25548 (ix86_attribute_table): Add function_return.
25549 * config/i386/i386.h (machine_function): Add
25550 function_return_type.
25551 * config/i386/i386.md (simple_return_internal): Use
25552 ix86_output_function_return.
25553 (simple_return_internal_long): Likewise.
25554 * config/i386/i386.opt (mfunction-return=): New option.
25555 (indirect_branch): Mention -mfunction-return=.
25556 * doc/extend.texi: Document function_return function attribute.
25557 * doc/invoke.texi: Document -mfunction-return= option.
25559 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
25561 * config/i386/i386-opts.h (indirect_branch): New.
25562 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
25563 * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
25564 with local indirect jump when converting indirect call and jump.
25565 (ix86_set_indirect_branch_type): New.
25566 (ix86_set_current_function): Call ix86_set_indirect_branch_type.
25567 (indirectlabelno): New.
25568 (indirect_thunk_needed): Likewise.
25569 (indirect_thunk_bnd_needed): Likewise.
25570 (indirect_thunks_used): Likewise.
25571 (indirect_thunks_bnd_used): Likewise.
25572 (INDIRECT_LABEL): Likewise.
25573 (indirect_thunk_name): Likewise.
25574 (output_indirect_thunk): Likewise.
25575 (output_indirect_thunk_function): Likewise.
25576 (ix86_output_indirect_branch_via_reg): Likewise.
25577 (ix86_output_indirect_branch_via_push): Likewise.
25578 (ix86_output_indirect_branch): Likewise.
25579 (ix86_output_indirect_jmp): Likewise.
25580 (ix86_code_end): Call output_indirect_thunk_function if needed.
25581 (ix86_output_call_insn): Call ix86_output_indirect_branch if
25583 (ix86_handle_fndecl_attribute): Handle indirect_branch.
25584 (ix86_attribute_table): Add indirect_branch.
25585 * config/i386/i386.h (machine_function): Add indirect_branch_type
25586 and has_local_indirect_jump.
25587 * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
25589 (tablejump): Likewise.
25590 (*indirect_jump): Use ix86_output_indirect_jmp.
25591 (*tablejump_1): Likewise.
25592 (simple_return_indirect_internal): Likewise.
25593 * config/i386/i386.opt (mindirect-branch=): New option.
25594 (indirect_branch): New.
25597 (thunk-inline): Likewise.
25598 (thunk-extern): Likewise.
25599 * doc/extend.texi: Document indirect_branch function attribute.
25600 * doc/invoke.texi: Document -mindirect-branch= option.
25602 2018-01-14 Jan Hubicka <hubicka@ucw.cz>
25605 * ipa-inline.c (edge_badness): Tolerate roundoff errors.
25607 2018-01-14 Richard Sandiford <richard.sandiford@linaro.org>
25609 * ipa-inline.c (want_inline_small_function_p): Return false if
25610 inlining has already failed with CIF_FINAL_ERROR.
25611 (update_caller_keys): Call want_inline_small_function_p before
25613 (update_callee_keys): Likewise.
25615 2018-01-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
25617 * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
25619 (rs6000_quadword_masked_address_p): Likewise.
25620 (quad_aligned_load_p): Likewise.
25621 (quad_aligned_store_p): Likewise.
25622 (const_load_sequence_p): Add comment to describe the outer-most loop.
25623 (mimic_memory_attributes_and_flags): New function.
25624 (rs6000_gen_stvx): Likewise.
25625 (replace_swapped_aligned_store): Likewise.
25626 (rs6000_gen_lvx): Likewise.
25627 (replace_swapped_aligned_load): Likewise.
25628 (replace_swapped_load_constant): Capitalize argument name in
25629 comment describing this function.
25630 (rs6000_analyze_swaps): Add a third pass to search for vector loads
25631 and stores that access quad-word aligned addresses and replace
25632 with stvx or lvx instructions when appropriate.
25633 * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
25634 New function prototype.
25635 (rs6000_quadword_masked_address_p): Likewise.
25636 (rs6000_gen_lvx): Likewise.
25637 (rs6000_gen_stvx): Likewise.
25638 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
25639 VSX_D (V2DF, V2DI), modify this split to select lvx instruction
25640 when memory address is aligned.
25641 (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
25642 this split to select lvx instruction when memory address is aligned.
25643 (*vsx_le_perm_load_v8hi): Modify this split to select lvx
25644 instruction when memory address is aligned.
25645 (*vsx_le_perm_load_v16qi): Likewise.
25646 (four unnamed splitters): Modify to select the stvx instruction
25647 when memory is aligned.
25649 2018-01-13 Jan Hubicka <hubicka@ucw.cz>
25651 * predict.c (determine_unlikely_bbs): Handle correctly BBs
25652 which appears in the queue multiple times.
25654 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
25655 Alan Hayward <alan.hayward@arm.com>
25656 David Sherwood <david.sherwood@arm.com>
25658 * tree-vectorizer.h (vec_lower_bound): New structure.
25659 (_loop_vec_info): Add check_nonzero and lower_bounds.
25660 (LOOP_VINFO_CHECK_NONZERO): New macro.
25661 (LOOP_VINFO_LOWER_BOUNDS): Likewise.
25662 (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
25663 * tree-data-ref.h (dr_with_seg_len): Add access_size and align
25664 fields. Make seg_len the distance travelled, not including the
25666 (dr_direction_indicator): Declare.
25667 (dr_zero_step_indicator): Likewise.
25668 (dr_known_forward_stride_p): Likewise.
25669 * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
25671 (runtime_alias_check_p): Allow runtime alias checks with
25673 (operator ==): Compare access_size and align.
25674 (prune_runtime_alias_test_list): Rework for new distinction between
25675 the access_size and seg_len.
25676 (create_intersect_range_checks_index): Likewise. Cope with polynomial
25678 (get_segment_min_max): New function.
25679 (create_intersect_range_checks): Use it.
25680 (dr_step_indicator): New function.
25681 (dr_direction_indicator): Likewise.
25682 (dr_zero_step_indicator): Likewise.
25683 (dr_known_forward_stride_p): Likewise.
25684 * tree-loop-distribution.c (data_ref_segment_size): Return
25685 DR_STEP * (niters - 1).
25686 (compute_alias_check_pairs): Update call to the dr_with_seg_len
25688 * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
25689 (vect_preserves_scalar_order_p): New function, split out from...
25690 (vect_analyze_data_ref_dependence): ...here. Check for zero steps.
25691 (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
25692 (vect_vfa_access_size): New function.
25693 (vect_vfa_align): Likewise.
25694 (vect_compile_time_alias): Take access_size_a and access_b arguments.
25695 (dump_lower_bound): New function.
25696 (vect_check_lower_bound): Likewise.
25697 (vect_small_gap_p): Likewise.
25698 (vectorizable_with_step_bound_p): Likewise.
25699 (vect_prune_runtime_alias_test_list): Ignore cross-iteration
25700 depencies if the vectorization factor is 1. Convert the checks
25701 for nonzero steps into checks on the bounds of DR_STEP. Try using
25702 a bunds check for variable steps if the minimum required step is
25703 relatively small. Update calls to the dr_with_seg_len
25704 constructor and to vect_compile_time_alias.
25705 * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
25707 (vect_loop_versioning): Call it.
25708 * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
25710 (vect_estimate_min_profitable_iters): Account for any bounds checks.
25712 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
25713 Alan Hayward <alan.hayward@arm.com>
25714 David Sherwood <david.sherwood@arm.com>
25716 * doc/sourcebuild.texi (vect_scatter_store): Document.
25717 * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
25719 * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
25721 * genopinit.c (main): Add supports_vec_scatter_store and
25722 supports_vec_scatter_store_cached to target_optabs.
25723 * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
25724 IFN_MASK_SCATTER_STORE.
25725 * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
25727 * internal-fn.h (internal_store_fn_p): Declare.
25728 (internal_fn_stored_value_index): Likewise.
25729 * internal-fn.c (scatter_store_direct): New macro.
25730 (expand_scatter_store_optab_fn): New function.
25731 (direct_scatter_store_optab_supported_p): New macro.
25732 (internal_store_fn_p): New function.
25733 (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
25734 IFN_MASK_SCATTER_STORE.
25735 (internal_fn_mask_index): Likewise.
25736 (internal_fn_stored_value_index): New function.
25737 (internal_gather_scatter_fn_supported_p): Adjust operand numbers
25738 for scatter stores.
25739 * optabs-query.h (supports_vec_scatter_store_p): Declare.
25740 * optabs-query.c (supports_vec_scatter_store_p): New function.
25741 * tree-vectorizer.h (vect_get_store_rhs): Declare.
25742 * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
25743 true for scatter stores.
25744 (vect_gather_scatter_fn_p): Handle scatter stores too.
25745 (vect_check_gather_scatter): Consider using scatter stores if
25746 supports_vec_scatter_store_p.
25747 * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
25748 scatter stores too.
25749 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
25750 internal_fn_stored_value_index.
25751 (check_load_store_masking): Handle scatter stores too.
25752 (vect_get_store_rhs): Make public.
25753 (vectorizable_call): Use internal_store_fn_p.
25754 (vectorizable_store): Handle scatter store internal functions.
25755 (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
25756 when deciding whether the end of the group has been reached.
25757 * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
25758 * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
25759 (mask_scatter_store<mode>): New insns.
25761 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
25762 Alan Hayward <alan.hayward@arm.com>
25763 David Sherwood <david.sherwood@arm.com>
25765 * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
25766 * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
25767 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
25769 (vect_use_strided_gather_scatters_p): Take a masked_p argument.
25770 Use vect_truncate_gather_scatter_offset if we can't treat the
25771 operation as a normal gather load or scatter store.
25772 (get_group_load_store_type): Take the gather_scatter_info
25773 as argument. Try using a gather load or scatter store for
25774 single-element groups.
25775 (get_load_store_type): Update calls to get_group_load_store_type
25776 and vect_use_strided_gather_scatters_p.
25778 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
25779 Alan Hayward <alan.hayward@arm.com>
25780 David Sherwood <david.sherwood@arm.com>
25782 * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
25783 optional tree argument.
25784 * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
25786 (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
25787 but continue to use the current value as a fallback.
25788 (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
25789 to compare the updates.
25790 * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
25791 (get_load_store_type): Use it when handling a strided access.
25792 (vect_get_strided_load_store_ops): New function.
25793 (vect_get_data_ptr_increment): Likewise.
25794 (vectorizable_load): Handle strided gather loads. Always pass
25795 a step to vect_create_data_ref_ptr and bump_vector_ptr.
25797 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
25798 Alan Hayward <alan.hayward@arm.com>
25799 David Sherwood <david.sherwood@arm.com>
25801 * doc/md.texi (gather_load@var{m}): Document.
25802 (mask_gather_load@var{m}): Likewise.
25803 * genopinit.c (main): Add supports_vec_gather_load and
25804 supports_vec_gather_load_cached to target_optabs.
25805 * optabs-tree.c (init_tree_optimization_optabs): Use
25806 ggc_cleared_alloc to allocate target_optabs.
25807 * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
25808 * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
25810 * internal-fn.h (internal_load_fn_p): Declare.
25811 (internal_gather_scatter_fn_p): Likewise.
25812 (internal_fn_mask_index): Likewise.
25813 (internal_gather_scatter_fn_supported_p): Likewise.
25814 * internal-fn.c (gather_load_direct): New macro.
25815 (expand_gather_load_optab_fn): New function.
25816 (direct_gather_load_optab_supported_p): New macro.
25817 (direct_internal_fn_optab): New function.
25818 (internal_load_fn_p): Likewise.
25819 (internal_gather_scatter_fn_p): Likewise.
25820 (internal_fn_mask_index): Likewise.
25821 (internal_gather_scatter_fn_supported_p): Likewise.
25822 * optabs-query.c (supports_at_least_one_mode_p): New function.
25823 (supports_vec_gather_load_p): Likewise.
25824 * optabs-query.h (supports_vec_gather_load_p): Declare.
25825 * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
25826 and memory_type field.
25827 (NUM_PATTERNS): Bump to 15.
25828 * tree-vect-data-refs.c: Include internal-fn.h.
25829 (vect_gather_scatter_fn_p): New function.
25830 (vect_describe_gather_scatter_call): Likewise.
25831 (vect_check_gather_scatter): Try using internal functions for
25832 gather loads. Recognize existing calls to a gather load function.
25833 (vect_analyze_data_refs): Consider using gather loads if
25834 supports_vec_gather_load_p.
25835 * tree-vect-patterns.c (vect_get_load_store_mask): New function.
25836 (vect_get_gather_scatter_offset_type): Likewise.
25837 (vect_convert_mask_for_vectype): Likewise.
25838 (vect_add_conversion_to_patterm): Likewise.
25839 (vect_try_gather_scatter_pattern): Likewise.
25840 (vect_recog_gather_scatter_pattern): New pattern recognizer.
25841 (vect_vect_recog_func_ptrs): Add it.
25842 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
25843 internal_fn_mask_index and internal_gather_scatter_fn_p.
25844 (check_load_store_masking): Take the gather_scatter_info as an
25845 argument and handle gather loads.
25846 (vect_get_gather_scatter_ops): New function.
25847 (vectorizable_call): Check internal_load_fn_p.
25848 (vectorizable_load): Likewise. Handle gather load internal
25850 (vectorizable_store): Update call to check_load_store_masking.
25851 * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
25852 * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
25853 * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
25854 (aarch64_gather_scale_operand_d): New predicates.
25855 * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
25856 (mask_gather_load<mode>): New insns.
25858 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
25859 Alan Hayward <alan.hayward@arm.com>
25860 David Sherwood <david.sherwood@arm.com>
25862 * optabs.def (fold_left_plus_optab): New optab.
25863 * doc/md.texi (fold_left_plus_@var{m}): Document.
25864 * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
25865 * internal-fn.c (fold_left_direct): Define.
25866 (expand_fold_left_optab_fn): Likewise.
25867 (direct_fold_left_optab_supported_p): Likewise.
25868 * fold-const-call.c (fold_const_fold_left): New function.
25869 (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
25870 * tree-parloops.c (valid_reduction_p): New function.
25871 (gather_scalar_reductions): Use it.
25872 * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
25873 (vect_finish_replace_stmt): Declare.
25874 * tree-vect-loop.c (fold_left_reduction_fn): New function.
25875 (needs_fold_left_reduction_p): New function, split out from...
25876 (vect_is_simple_reduction): ...here. Accept reductions that
25877 forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
25878 (vect_force_simple_reduction): Also store the reduction type in
25879 the assignment's STMT_VINFO_REDUC_TYPE.
25880 (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
25881 (merge_with_identity): New function.
25882 (vect_expand_fold_left): Likewise.
25883 (vectorize_fold_left_reduction): Likewise.
25884 (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION. Leave the
25885 scalar phi in place for it. Check for target support and reject
25886 cases that would reassociate the operation. Defer the transform
25887 phase to vectorize_fold_left_reduction.
25888 * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
25889 * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
25890 (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
25892 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
25894 * tree-if-conv.c (predicate_mem_writes): Remove redundant
25895 call to ifc_temp_var.
25897 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
25898 Alan Hayward <alan.hayward@arm.com>
25899 David Sherwood <david.sherwood@arm.com>
25901 * target.def (legitimize_address_displacement): Take the original
25902 offset as a poly_int.
25903 * targhooks.h (default_legitimize_address_displacement): Update
25905 * targhooks.c (default_legitimize_address_displacement): Likewise.
25906 * doc/tm.texi: Regenerate.
25907 * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
25908 as an argument, moving assert of ad->disp == ad->disp_term to...
25909 (process_address_1): ...here. Update calls to base_plus_disp_to_reg.
25910 Try calling targetm.legitimize_address_displacement before expanding
25911 the address rather than afterwards, and adjust for the new interface.
25912 * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
25913 Match the new hook interface. Handle SVE addresses.
25914 * config/sh/sh.c (sh_legitimize_address_displacement): Make the
25915 new hook interface.
25917 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
25919 * Makefile.in (OBJS): Add early-remat.o.
25920 * target.def (select_early_remat_modes): New hook.
25921 * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
25922 * doc/tm.texi: Regenerate.
25923 * targhooks.h (default_select_early_remat_modes): Declare.
25924 * targhooks.c (default_select_early_remat_modes): New function.
25925 * timevar.def (TV_EARLY_REMAT): New timevar.
25926 * passes.def (pass_early_remat): New pass.
25927 * tree-pass.h (make_pass_early_remat): Declare.
25928 * early-remat.c: New file.
25929 * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
25931 (TARGET_SELECT_EARLY_REMAT_MODES): Define.
25933 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
25934 Alan Hayward <alan.hayward@arm.com>
25935 David Sherwood <david.sherwood@arm.com>
25937 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
25938 vfm1 with a bound_epilog parameter.
25939 (vect_do_peeling): Update calls accordingly, and move the prologue
25940 call earlier in the function. Treat the base bound_epilog as 0 for
25941 fully-masked loops and retain vf - 1 for other loops. Add 1 to
25942 this base when peeling for gaps.
25943 * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
25944 with fully-masked loops.
25945 (vect_estimate_min_profitable_iters): Handle the single peeled
25946 iteration in that case.
25948 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
25949 Alan Hayward <alan.hayward@arm.com>
25950 David Sherwood <david.sherwood@arm.com>
25952 * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
25953 single-element interleaving even if the size is not a power of 2.
25954 * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
25955 accesses for single-element interleaving if the group size is
25958 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
25959 Alan Hayward <alan.hayward@arm.com>
25960 David Sherwood <david.sherwood@arm.com>
25962 * doc/md.texi (fold_extract_last_@var{m}): Document.
25963 * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
25964 * optabs.def (fold_extract_last_optab): New optab.
25965 * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
25966 * internal-fn.c (fold_extract_direct): New macro.
25967 (expand_fold_extract_optab_fn): Likewise.
25968 (direct_fold_extract_optab_supported_p): Likewise.
25969 * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
25970 * tree-vect-loop.c (vect_model_reduction_cost): Handle
25971 EXTRACT_LAST_REDUCTION.
25972 (get_initial_def_for_reduction): Do not create an initial vector
25973 for EXTRACT_LAST_REDUCTION reductions.
25974 (vectorizable_reduction): Leave the scalar phi in place for
25975 EXTRACT_LAST_REDUCTIONs. Try using EXTRACT_LAST_REDUCTION
25976 ahead of INTEGER_INDUC_COND_REDUCTION. Do not check for an
25977 epilogue code for EXTRACT_LAST_REDUCTION and defer the
25978 transform phase to vectorizable_condition.
25979 * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
25981 (vect_finish_stmt_generation): ...here.
25982 (vect_finish_replace_stmt): New function.
25983 (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
25984 * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
25986 * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
25988 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
25989 Alan Hayward <alan.hayward@arm.com>
25990 David Sherwood <david.sherwood@arm.com>
25992 * doc/md.texi (extract_last_@var{m}): Document.
25993 * optabs.def (extract_last_optab): New optab.
25994 * internal-fn.def (EXTRACT_LAST): New internal function.
25995 * internal-fn.c (cond_unary_direct): New macro.
25996 (expand_cond_unary_optab_fn): Likewise.
25997 (direct_cond_unary_optab_supported_p): Likewise.
25998 * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
25999 loops using EXTRACT_LAST.
26000 * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
26001 (extract_last_<mode>): ...this optab.
26002 (vec_extract<mode><Vel>): Update accordingly.
26004 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26005 Alan Hayward <alan.hayward@arm.com>
26006 David Sherwood <david.sherwood@arm.com>
26008 * target.def (empty_mask_is_expensive): New hook.
26009 * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
26010 * doc/tm.texi: Regenerate.
26011 * targhooks.h (default_empty_mask_is_expensive): Declare.
26012 * targhooks.c (default_empty_mask_is_expensive): New function.
26013 * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
26014 if the target says that empty masks are expensive.
26015 * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
26017 (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
26019 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26020 Alan Hayward <alan.hayward@arm.com>
26021 David Sherwood <david.sherwood@arm.com>
26023 * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
26024 (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
26025 (vect_use_loop_mask_for_alignment_p): New function.
26026 (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
26027 * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
26028 niters_skip argument. Make sure that the first niters_skip elements
26029 of the first iteration are inactive.
26030 (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
26031 Update call to vect_set_loop_masks_directly.
26032 (get_misalign_in_elems): New function, split out from...
26033 (vect_gen_prolog_loop_niters): ...here.
26034 (vect_update_init_of_dr): Take a code argument that specifies whether
26035 the adjustment should be added or subtracted.
26036 (vect_update_init_of_drs): Likewise.
26037 (vect_prepare_for_masked_peels): New function.
26038 (vect_do_peeling): Skip prologue peeling if we're using a mask
26039 instead. Update call to vect_update_inits_of_drs.
26040 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
26042 (vect_analyze_loop_2): Allow fully-masked loops with peeling for
26043 alignment. Do not include the number of peeled iterations in
26044 the minimum threshold in that case.
26045 (vectorizable_induction): Adjust the start value down by
26046 LOOP_VINFO_MASK_SKIP_NITERS iterations.
26047 (vect_transform_loop): Call vect_prepare_for_masked_peels.
26048 Take the number of skipped iterations into account when calculating
26050 * tree-vect-stmts.c (vect_gen_while_not): New function.
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/sourcebuild.texi (vect_fully_masked): Document.
26057 * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
26058 default value to 0.
26059 * tree-vect-loop.c (vect_analyze_loop_costing): New function,
26061 (vect_analyze_loop_2): ...here. Don't check the vectorization
26062 factor against the number of loop iterations if the loop is
26065 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26066 Alan Hayward <alan.hayward@arm.com>
26067 David Sherwood <david.sherwood@arm.com>
26069 * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
26070 (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
26071 (dump_groups): Update accordingly.
26072 (iv_use::mem_type): New member variable.
26073 (address_p): New function.
26074 (record_use): Add a mem_type argument and initialize the new
26076 (record_group_use): Add a mem_type argument. Use address_p.
26077 Remove obsolete null checks of base_object. Update call to record_use.
26078 (find_interesting_uses_op): Update call to record_group_use.
26079 (find_interesting_uses_cond): Likewise.
26080 (find_interesting_uses_address): Likewise.
26081 (get_mem_type_for_internal_fn): New function.
26082 (find_address_like_use): Likewise.
26083 (find_interesting_uses_stmt): Try find_address_like_use before
26084 calling find_interesting_uses_op.
26085 (addr_offset_valid_p): Use the iv mem_type field as the type
26086 of the addressed memory.
26087 (add_autoinc_candidates): Likewise.
26088 (get_address_cost): Likewise.
26089 (split_small_address_groups_p): Use address_p.
26090 (split_address_groups): Likewise.
26091 (add_iv_candidate_for_use): Likewise.
26092 (autoinc_possible_for_pair): Likewise.
26093 (rewrite_groups): Likewise.
26094 (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
26095 (determine_group_iv_cost): Update after split of USE_ADDRESS.
26096 (get_alias_ptr_type_for_ptr_address): New function.
26097 (rewrite_use_address): Rewrite address uses in calls that were
26098 identified by find_address_like_use.
26100 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26101 Alan Hayward <alan.hayward@arm.com>
26102 David Sherwood <david.sherwood@arm.com>
26104 * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
26106 * gimple-expr.h (is_gimple_addressable: Likewise.
26107 * gimple-expr.c (is_gimple_address): Likewise.
26108 * internal-fn.c (expand_call_mem_ref): New function.
26109 (expand_mask_load_optab_fn): Use it.
26110 (expand_mask_store_optab_fn): Likewise.
26112 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26113 Alan Hayward <alan.hayward@arm.com>
26114 David Sherwood <david.sherwood@arm.com>
26116 * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
26117 (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
26118 (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
26119 (cond_umax@var{mode}): Document.
26120 * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
26121 (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
26122 (cond_umin_optab, cond_umax_optab): New optabs.
26123 * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
26124 (COND_IOR, COND_XOR): New internal functions.
26125 * internal-fn.h (get_conditional_internal_fn): Declare.
26126 * internal-fn.c (cond_binary_direct): New macro.
26127 (expand_cond_binary_optab_fn): Likewise.
26128 (direct_cond_binary_optab_supported_p): Likewise.
26129 (get_conditional_internal_fn): New function.
26130 * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
26131 Cope with reduction statements that are vectorized as calls rather
26133 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
26134 * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
26135 (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
26136 (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
26137 (UNSPEC_COND_EOR): New unspecs.
26138 (optab): Add mappings for them.
26139 (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
26140 (sve_int_op, sve_fp_op): New int attributes.
26142 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26143 Alan Hayward <alan.hayward@arm.com>
26144 David Sherwood <david.sherwood@arm.com>
26146 * optabs.def (while_ult_optab): New optab.
26147 * doc/md.texi (while_ult@var{m}@var{n}): Document.
26148 * internal-fn.def (WHILE_ULT): New internal function.
26149 * internal-fn.h (direct_internal_fn_supported_p): New override
26150 that takes two types as argument.
26151 * internal-fn.c (while_direct): New macro.
26152 (expand_while_optab_fn): New function.
26153 (convert_optab_supported_p): Likewise.
26154 (direct_while_optab_supported_p): New macro.
26155 * wide-int.h (wi::udiv_ceil): New function.
26156 * tree-vectorizer.h (rgroup_masks): New structure.
26157 (vec_loop_masks): New typedef.
26158 (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
26159 and fully_masked_p.
26160 (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
26161 (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
26162 (vect_max_vf): New function.
26163 (slpeel_make_loop_iterate_ntimes): Delete.
26164 (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
26165 (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
26166 (vect_record_loop_mask, vect_get_loop_mask): Likewise.
26167 * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
26168 internal-fn.h, stor-layout.h and optabs-query.h.
26169 (vect_set_loop_mask): New function.
26170 (add_preheader_seq): Likewise.
26171 (add_header_seq): Likewise.
26172 (interleave_supported_p): Likewise.
26173 (vect_maybe_permute_loop_masks): Likewise.
26174 (vect_set_loop_masks_directly): Likewise.
26175 (vect_set_loop_condition_masked): Likewise.
26176 (vect_set_loop_condition_unmasked): New function, split out from
26177 slpeel_make_loop_iterate_ntimes.
26178 (slpeel_make_loop_iterate_ntimes): Rename to..
26179 (vect_set_loop_condition): ...this. Use vect_set_loop_condition_masked
26180 for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
26181 (vect_do_peeling): Update call accordingly.
26182 (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
26184 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
26185 mask_compare_type, can_fully_mask_p and fully_masked_p.
26186 (release_vec_loop_masks): New function.
26187 (_loop_vec_info): Use it to free the loop masks.
26188 (can_produce_all_loop_masks_p): New function.
26189 (vect_get_max_nscalars_per_iter): Likewise.
26190 (vect_verify_full_masking): Likewise.
26191 (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
26192 retries, and free the mask rgroups before retrying. Check loop-wide
26193 reasons for disallowing fully-masked loops. Make the final decision
26194 about whether use a fully-masked loop or not.
26195 (vect_estimate_min_profitable_iters): Do not assume that peeling
26196 for the number of iterations will be needed for fully-masked loops.
26197 (vectorizable_reduction): Disable fully-masked loops.
26198 (vectorizable_live_operation): Likewise.
26199 (vect_halve_mask_nunits): New function.
26200 (vect_double_mask_nunits): Likewise.
26201 (vect_record_loop_mask): Likewise.
26202 (vect_get_loop_mask): Likewise.
26203 (vect_transform_loop): Handle the case in which the final loop
26204 iteration might handle a partial vector. Call vect_set_loop_condition
26205 instead of slpeel_make_loop_iterate_ntimes.
26206 * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
26207 (check_load_store_masking): New function.
26208 (prepare_load_store_mask): Likewise.
26209 (vectorizable_store): Handle fully-masked loops.
26210 (vectorizable_load): Likewise.
26211 (supportable_widening_operation): Use vect_halve_mask_nunits for
26213 (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
26214 (vect_gen_while): New function.
26215 * config/aarch64/aarch64.md (umax<mode>3): New expander.
26216 (aarch64_uqdec<mode>): New insn.
26218 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26219 Alan Hayward <alan.hayward@arm.com>
26220 David Sherwood <david.sherwood@arm.com>
26222 * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
26223 (reduc_xor_scal_optab): New optabs.
26224 * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
26225 (reduc_xor_scal_@var{m}): Document.
26226 * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
26227 * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
26228 internal functions.
26229 * fold-const-call.c (fold_const_call): Handle them.
26230 * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
26231 internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
26232 * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
26233 (*reduc_<bit_reduc>_scal_<mode>): New patterns.
26234 * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
26235 (UNSPEC_XORV): New unspecs.
26236 (optab): Add entries for them.
26237 (BITWISEV): New int iterator.
26238 (bit_reduc_op): New int attributes.
26240 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26241 Alan Hayward <alan.hayward@arm.com>
26242 David Sherwood <david.sherwood@arm.com>
26244 * doc/md.texi (vec_shl_insert_@var{m}): New optab.
26245 * internal-fn.def (VEC_SHL_INSERT): New internal function.
26246 * optabs.def (vec_shl_insert_optab): New optab.
26247 * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
26248 (duplicate_and_interleave): Likewise.
26249 * tree-vect-loop.c: Include internal-fn.h.
26250 (neutral_op_for_slp_reduction): New function, split out from
26251 get_initial_defs_for_reduction.
26252 (get_initial_def_for_reduction): Handle option 2 for variable-length
26253 vectors by loading the neutral value into a vector and then shifting
26254 the initial value into element 0.
26255 (get_initial_defs_for_reduction): Replace the code argument with
26256 the neutral value calculated by neutral_op_for_slp_reduction.
26257 Use gimple_build_vector for constant-length vectors.
26258 Use IFN_VEC_SHL_INSERT for variable-length vectors if all
26259 but the first group_size elements have a neutral value.
26260 Use duplicate_and_interleave otherwise.
26261 (vect_create_epilog_for_reduction): Take a neutral_op parameter.
26262 Update call to get_initial_defs_for_reduction. Handle SLP
26263 reductions for variable-length vectors by creating one vector
26264 result for each scalar result, with the elements associated
26265 with other scalar results stubbed out with the neutral value.
26266 (vectorizable_reduction): Call neutral_op_for_slp_reduction.
26267 Require IFN_VEC_SHL_INSERT for double reductions on
26268 variable-length vectors, or SLP reductions that have
26269 a neutral value. Require can_duplicate_and_interleave_p
26270 support for variable-length unchained SLP reductions if there
26271 is no neutral value, such as for MIN/MAX reductions. Also require
26272 the number of vector elements to be a multiple of the number of
26273 SLP statements when doing variable-length unchained SLP reductions.
26274 Update call to vect_create_epilog_for_reduction.
26275 * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
26276 and remove initial values.
26277 (duplicate_and_interleave): Make public.
26278 * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
26279 * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
26281 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26282 Alan Hayward <alan.hayward@arm.com>
26283 David Sherwood <david.sherwood@arm.com>
26285 * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
26286 (can_duplicate_and_interleave_p): New function.
26287 (vect_get_and_check_slp_defs): Take the vector of statements
26288 rather than just the current one. Remove excess parentheses.
26289 Restriction rejectinon of vect_constant_def and vect_external_def
26290 for variable-length vectors to boolean types, or types for which
26291 can_duplicate_and_interleave_p is false.
26292 (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
26293 (duplicate_and_interleave): New function.
26294 (vect_get_constant_vectors): Use gimple_build_vector for
26295 constant-length vectors and suitable variable-length constant
26296 vectors. Use duplicate_and_interleave for other variable-length
26297 vectors. Don't defer the update when inserting new statements.
26299 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26300 Alan Hayward <alan.hayward@arm.com>
26301 David Sherwood <david.sherwood@arm.com>
26303 * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
26304 min_profitable_iters doesn't go negative.
26306 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26307 Alan Hayward <alan.hayward@arm.com>
26308 David Sherwood <david.sherwood@arm.com>
26310 * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
26311 (vec_mask_store_lanes@var{m}@var{n}): Likewise.
26312 * optabs.def (vec_mask_load_lanes_optab): New optab.
26313 (vec_mask_store_lanes_optab): Likewise.
26314 * internal-fn.def (MASK_LOAD_LANES): New internal function.
26315 (MASK_STORE_LANES): Likewise.
26316 * internal-fn.c (mask_load_lanes_direct): New macro.
26317 (mask_store_lanes_direct): Likewise.
26318 (expand_mask_load_optab_fn): Handle masked operations.
26319 (expand_mask_load_lanes_optab_fn): New macro.
26320 (expand_mask_store_optab_fn): Handle masked operations.
26321 (expand_mask_store_lanes_optab_fn): New macro.
26322 (direct_mask_load_lanes_optab_supported_p): Likewise.
26323 (direct_mask_store_lanes_optab_supported_p): Likewise.
26324 * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
26326 (vect_load_lanes_supported): Likewise.
26327 * tree-vect-data-refs.c (strip_conversion): New function.
26328 (can_group_stmts_p): Likewise.
26329 (vect_analyze_data_ref_accesses): Use it instead of checking
26330 for a pair of assignments.
26331 (vect_store_lanes_supported): Take a masked_p parameter.
26332 (vect_load_lanes_supported): Likewise.
26333 * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
26334 vect_store_lanes_supported and vect_load_lanes_supported.
26335 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
26336 * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
26337 parameter. Don't allow gaps for masked accesses.
26338 Use vect_get_store_rhs. Update calls to vect_store_lanes_supported
26339 and vect_load_lanes_supported.
26340 (get_load_store_type): Take a masked_p parameter and update
26341 call to get_group_load_store_type.
26342 (vectorizable_store): Update call to get_load_store_type.
26343 Handle IFN_MASK_STORE_LANES.
26344 (vectorizable_load): Update call to get_load_store_type.
26345 Handle IFN_MASK_LOAD_LANES.
26347 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26348 Alan Hayward <alan.hayward@arm.com>
26349 David Sherwood <david.sherwood@arm.com>
26351 * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
26353 * config/aarch64/aarch64-protos.h
26354 (aarch64_sve_struct_memory_operand_p): Declare.
26355 * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
26356 (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
26357 (VPRED, vpred): Handle SVE structure modes.
26358 * config/aarch64/constraints.md (Utx): New constraint.
26359 * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
26360 (aarch64_sve_struct_nonimmediate_operand): New predicates.
26361 * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
26362 * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
26363 (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
26364 structure modes. Split into pieces after RA.
26365 (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
26366 (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
26368 * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
26369 SVE structure modes.
26370 (aarch64_classify_address): Likewise.
26371 (sizetochar): Move earlier in file.
26372 (aarch64_print_operand): Handle SVE register lists.
26373 (aarch64_array_mode): New function.
26374 (aarch64_sve_struct_memory_operand_p): Likewise.
26375 (TARGET_ARRAY_MODE): Redefine.
26377 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26378 Alan Hayward <alan.hayward@arm.com>
26379 David Sherwood <david.sherwood@arm.com>
26381 * target.def (array_mode): New target hook.
26382 * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
26383 * doc/tm.texi: Regenerate.
26384 * hooks.h (hook_optmode_mode_uhwi_none): Declare.
26385 * hooks.c (hook_optmode_mode_uhwi_none): New function.
26386 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
26387 targetm.array_mode.
26388 * stor-layout.c (mode_for_array): Likewise. Support polynomial
26391 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26392 Alan Hayward <alan.hayward@arm.com>
26393 David Sherwood <david.sherwood@arm.com>
26395 * fold-const.c (fold_binary_loc): Check the argument types
26396 rather than the result type when testing for a vector operation.
26398 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26400 * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
26401 * doc/tm.texi: Regenerate.
26403 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26404 Alan Hayward <alan.hayward@arm.com>
26405 David Sherwood <david.sherwood@arm.com>
26407 * doc/invoke.texi (-msve-vector-bits=): Document new option.
26408 (sve): Document new AArch64 extension.
26409 * doc/md.texi (w): Extend the description of the AArch64
26410 constraint to include SVE vectors.
26411 (Upl, Upa): Document new AArch64 predicate constraints.
26412 * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
26414 * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
26415 (msve-vector-bits=): New option.
26416 * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
26417 SVE when these are disabled.
26418 (sve): New extension.
26419 * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
26420 modes. Adjust their number of units based on aarch64_sve_vg.
26421 (MAX_BITSIZE_MODE_ANY_MODE): Define.
26422 * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
26423 aarch64_addr_query_type.
26424 (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
26425 (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
26426 (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
26427 (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
26428 (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
26429 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
26430 (aarch64_simd_imm_zero_p): Delete.
26431 (aarch64_check_zero_based_sve_index_immediate): Declare.
26432 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
26433 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
26434 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
26435 (aarch64_sve_float_mul_immediate_p): Likewise.
26436 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
26437 rather than an rtx.
26438 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
26439 (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
26440 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
26441 (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
26442 (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
26443 (aarch64_regmode_natural_size): Likewise.
26444 * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
26445 (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
26447 (AARCH64_ISA_SVE, TARGET_SVE): New macros.
26448 (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
26449 for VG and the SVE predicate registers.
26450 (V_ALIASES): Add a "z"-prefixed alias.
26451 (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
26452 (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
26453 (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
26454 (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
26455 (REG_CLASS_NAMES): Add entries for them.
26456 (REG_CLASS_CONTENTS): Likewise. Update ALL_REGS to include VG
26457 and the predicate registers.
26458 (aarch64_sve_vg): Declare.
26459 (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
26460 (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
26461 (REGMODE_NATURAL_SIZE): Define.
26462 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
26464 * config/aarch64/aarch64.c: Include cfgrtl.h.
26465 (simd_immediate_info): Add a constructor for series vectors,
26466 and an associated step field.
26467 (aarch64_sve_vg): New variable.
26468 (aarch64_dbx_register_number): Handle VG and the predicate registers.
26469 (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
26470 (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
26471 (VEC_ANY_DATA, VEC_STRUCT): New constants.
26472 (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
26473 (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
26474 (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
26475 (aarch64_get_mask_mode): New functions.
26476 (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
26477 and FP_LO_REGS. Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
26478 (aarch64_hard_regno_mode_ok): Handle VG. Also handle the SVE
26479 predicate modes and predicate registers. Explicitly restrict
26480 GPRs to modes of 16 bytes or smaller. Only allow FP registers
26481 to store a vector mode if it is recognized by
26482 aarch64_classify_vector_mode.
26483 (aarch64_regmode_natural_size): New function.
26484 (aarch64_hard_regno_caller_save_mode): Return the original mode
26486 (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
26487 (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
26488 (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
26489 (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
26491 (aarch64_add_offset): Add a temp2 parameter. Assert that temp1
26492 does not overlap dest if the function is frame-related. Handle
26494 (aarch64_split_add_offset): New function.
26495 (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
26496 them aarch64_add_offset.
26497 (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
26498 and update call to aarch64_sub_sp.
26499 (aarch64_add_cfa_expression): New function.
26500 (aarch64_expand_prologue): Pass extra temporary registers to the
26501 functions above. Handle the case in which we need to emit new
26502 DW_CFA_expressions for registers that were originally saved
26503 relative to the stack pointer, but now have to be expressed
26504 relative to the frame pointer.
26505 (aarch64_output_mi_thunk): Pass extra temporary registers to the
26507 (aarch64_expand_epilogue): Likewise. Prevent inheritance of
26508 IP0 and IP1 values for SVE frames.
26509 (aarch64_expand_vec_series): New function.
26510 (aarch64_expand_sve_widened_duplicate): Likewise.
26511 (aarch64_expand_sve_const_vector): Likewise.
26512 (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
26513 Handle SVE constants. Use emit_move_insn to move a force_const_mem
26514 into the register, rather than emitting a SET directly.
26515 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
26516 (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
26517 (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
26518 (offset_9bit_signed_scaled_p): New functions.
26519 (aarch64_replicate_bitmask_imm): New function.
26520 (aarch64_bitmask_imm): Use it.
26521 (aarch64_cannot_force_const_mem): Reject expressions involving
26522 a CONST_POLY_INT. Update call to aarch64_classify_symbol.
26523 (aarch64_classify_index): Handle SVE indices, by requiring
26524 a plain register index with a scale that matches the element size.
26525 (aarch64_classify_address): Handle SVE addresses. Assert that
26526 the mode of the address is VOIDmode or an integer mode.
26527 Update call to aarch64_classify_symbol.
26528 (aarch64_classify_symbolic_expression): Update call to
26529 aarch64_classify_symbol.
26530 (aarch64_const_vec_all_in_range_p): New function.
26531 (aarch64_print_vector_float_operand): Likewise.
26532 (aarch64_print_operand): Handle 'N' and 'C'. Use "zN" rather than
26533 "vN" for FP registers with SVE modes. Handle (const ...) vectors
26534 and the FP immediates 1.0 and 0.5.
26535 (aarch64_print_address_internal): Handle SVE addresses.
26536 (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
26537 (aarch64_regno_regclass): Handle predicate registers.
26538 (aarch64_secondary_reload): Handle big-endian reloads of SVE
26540 (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
26541 (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
26542 (aarch64_convert_sve_vector_bits): New function.
26543 (aarch64_override_options): Use it to handle -msve-vector-bits=.
26544 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
26545 rather than an rtx.
26546 (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
26547 Handle SVE vector and predicate modes. Accept VL-based constants
26548 that need only one temporary register, and VL offsets that require
26549 no temporary registers.
26550 (aarch64_conditional_register_usage): Mark the predicate registers
26551 as fixed if SVE isn't available.
26552 (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
26553 Return true for SVE vector and predicate modes.
26554 (aarch64_simd_container_mode): Take the number of bits as a poly_int64
26555 rather than an unsigned int. Handle SVE modes.
26556 (aarch64_preferred_simd_mode): Update call accordingly. Handle
26558 (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
26560 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
26561 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
26562 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
26563 (aarch64_sve_float_mul_immediate_p): New functions.
26564 (aarch64_sve_valid_immediate): New function.
26565 (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
26566 Explicitly reject structure modes. Check for INDEX constants.
26567 Handle PTRUE and PFALSE constants.
26568 (aarch64_check_zero_based_sve_index_immediate): New function.
26569 (aarch64_simd_imm_zero_p): Delete.
26570 (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
26571 vector modes. Accept constants in the range of CNT[BHWD].
26572 (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
26573 ask for an Advanced SIMD mode.
26574 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
26575 (aarch64_simd_vector_alignment): Handle SVE predicates.
26576 (aarch64_vectorize_preferred_vector_alignment): New function.
26577 (aarch64_simd_vector_alignment_reachable): Use it instead of
26579 (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
26580 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
26582 (MAX_VECT_LEN): Delete.
26583 (expand_vec_perm_d): Add a vec_flags field.
26584 (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
26585 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
26586 (aarch64_evpc_ext): Don't apply a big-endian lane correction
26588 (aarch64_evpc_rev): Rename to...
26589 (aarch64_evpc_rev_local): ...this. Use a predicated operation for SVE.
26590 (aarch64_evpc_rev_global): New function.
26591 (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
26592 (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
26594 (aarch64_evpc_sve_tbl): New function.
26595 (aarch64_expand_vec_perm_const_1): Update after rename of
26596 aarch64_evpc_rev. Handle SVE permutes too, trying
26597 aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
26598 than aarch64_evpc_tbl.
26599 (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
26600 (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
26601 (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
26602 (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
26603 (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
26604 (aarch64_expand_sve_vcond): New functions.
26605 (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
26606 of aarch64_vector_mode_p.
26607 (aarch64_dwarf_poly_indeterminate_value): New function.
26608 (aarch64_compute_pressure_classes): Likewise.
26609 (aarch64_can_change_mode_class): Likewise.
26610 (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
26611 (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
26612 (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
26613 (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
26614 (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
26615 (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
26616 * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
26617 (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
26619 (Dn, Dl, Dr): Accept const as well as const_vector.
26620 (Dz): Likewise. Compare against CONST0_RTX.
26621 * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
26622 of "vector" where appropriate.
26623 (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
26624 (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
26625 (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
26626 (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
26627 (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
26628 (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
26629 (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
26630 (v_int_equiv): Extend to SVE modes.
26631 (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
26633 (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
26634 (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
26635 (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
26636 (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
26637 (SVE_COND_FP_CMP): New int iterators.
26638 (perm_hilo): Handle the new unpack unspecs.
26639 (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
26641 * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
26642 (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
26643 (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
26644 (aarch64_equality_operator, aarch64_constant_vector_operand)
26645 (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
26646 (aarch64_sve_nonimmediate_operand): Likewise.
26647 (aarch64_sve_general_operand): Likewise.
26648 (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
26649 (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
26650 (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
26651 (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
26652 (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
26653 (aarch64_sve_float_arith_immediate): Likewise.
26654 (aarch64_sve_float_arith_with_sub_immediate): Likewise.
26655 (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
26656 (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
26657 (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
26658 (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
26659 (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
26660 (aarch64_sve_float_arith_operand): Likewise.
26661 (aarch64_sve_float_arith_with_sub_operand): Likewise.
26662 (aarch64_sve_float_mul_operand): Likewise.
26663 (aarch64_sve_vec_perm_operand): Likewise.
26664 (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
26665 (aarch64_mov_operand): Accept const_poly_int and const_vector.
26666 (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
26667 as well as const_vector.
26668 (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
26669 in file. Use CONST0_RTX and CONSTM1_RTX.
26670 (aarch64_simd_or_scalar_imm_zero): Likewise. Add match_codes.
26671 (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
26672 Use aarch64_simd_imm_zero.
26673 * config/aarch64/aarch64-sve.md: New file.
26674 * config/aarch64/aarch64.md: Include it.
26675 (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
26676 (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
26677 (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
26678 (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
26679 (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
26680 (sve): New attribute.
26681 (enabled): Disable instructions with the sve attribute unless
26683 (movqi, movhi): Pass CONST_POLY_INT operaneds through
26684 aarch64_expand_mov_immediate.
26685 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
26686 CNT[BHSD] immediates.
26687 (movti): Split CONST_POLY_INT moves into two halves.
26688 (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
26689 Split additions that need a temporary here if the destination
26690 is the stack pointer.
26691 (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
26692 (*add<mode>3_poly_1): New instruction.
26693 (set_clobber_cc): New expander.
26695 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26697 * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
26698 parameter and use it instead of GET_MODE_SIZE (innermode). Use
26699 inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
26700 Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
26701 GET_MODE_NUNITS (innermode). Also add a first_elem parameter.
26702 Change innermode from fixed_mode_size to machine_mode.
26703 (simplify_subreg): Update call accordingly. Handle a constant-sized
26704 subreg of a variable-length CONST_VECTOR.
26706 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26707 Alan Hayward <alan.hayward@arm.com>
26708 David Sherwood <david.sherwood@arm.com>
26710 * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
26711 (add_offset_to_base): New function, split out from...
26712 (create_mem_ref): ...here. When handling a scale other than 1,
26713 check first whether the address is valid without the offset.
26714 Add it into the base if so, leaving the index and scale as-is.
26716 2018-01-12 Jakub Jelinek <jakub@redhat.com>
26719 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
26720 fold_for_warn before checking if arg2 is INTEGER_CST.
26722 2018-01-12 Segher Boessenkool <segher@kernel.crashing.org>
26724 * config/rs6000/predicates.md (load_multiple_operation): Delete.
26725 (store_multiple_operation): Delete.
26726 * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
26727 * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
26728 * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
26729 guarded by TARGET_STRING.
26730 (rs6000_output_load_multiple): Delete.
26731 * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
26732 OPTION_MASK_STRING / TARGET_STRING handling.
26733 (print_operand) <'N', 'O'>: Add comment that these are unused now.
26734 (const rs6000_opt_masks) <"string">: Change mask to 0.
26735 * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
26736 (MASK_STRING): Delete.
26737 * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
26739 (load_multiple): Delete.
26746 (store_multiple): Delete.
26753 (movmemsi_8reg): Delete.
26754 (corresponding unnamed define_insn): Delete.
26755 (movmemsi_6reg): Delete.
26756 (corresponding unnamed define_insn): Delete.
26757 (movmemsi_4reg): Delete.
26758 (corresponding unnamed define_insn): Delete.
26759 (movmemsi_2reg): Delete.
26760 (corresponding unnamed define_insn): Delete.
26761 (movmemsi_1reg): Delete.
26762 (corresponding unnamed define_insn): Delete.
26763 * config/rs6000/rs6000.opt (mno-string): New.
26764 (mstring): Replace by deprecation warning stub.
26765 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
26767 2018-01-12 Jakub Jelinek <jakub@redhat.com>
26769 * regrename.c (regrename_do_replace): If replacing the same
26770 reg multiple times, try to reuse last created gen_raw_REG.
26773 * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
26774 main to workaround a bug in GDB.
26776 2018-01-12 Tom de Vries <tom@codesourcery.com>
26779 * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
26781 2018-01-12 Vladimir Makarov <vmakarov@redhat.com>
26783 PR rtl-optimization/80481
26784 * ira-color.c (get_cap_member): New function.
26785 (allocnos_conflict_by_live_ranges_p): Use it.
26786 (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
26787 (setup_slot_coalesced_allocno_live_ranges): Ditto.
26789 2018-01-12 Uros Bizjak <ubizjak@gmail.com>
26792 * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
26793 (*saddl_se_1): Ditto.
26794 (*ssubsi_1): Ditto.
26795 (*ssubl_se_1): Ditto.
26797 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
26799 * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
26800 rather than wi::to_widest for DR_INITs.
26801 * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
26802 wi::to_poly_offset rather than wi::to_offset for DR_INIT.
26803 (vect_analyze_data_ref_accesses): Require both DR_INITs to be
26805 (vect_analyze_group_access_1): Note that here.
26807 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
26809 * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
26810 polynomial type sizes.
26812 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
26814 * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
26815 poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
26816 (gimple_add_tmp_var): Likewise.
26818 2018-01-12 Martin Liska <mliska@suse.cz>
26820 * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
26821 (gimple_alloc_sizes): Likewise.
26822 (dump_gimple_statistics): Use PRIu64 in printf format.
26823 * gimple.h: Change uint64_t to int.
26825 2018-01-12 Martin Liska <mliska@suse.cz>
26827 * tree-core.h: Use uint64_t instead of int.
26828 * tree.c (tree_node_counts): Likewise.
26829 (tree_node_sizes): Likewise.
26830 (dump_tree_statistics): Use PRIu64 in printf format.
26832 2018-01-12 Martin Liska <mliska@suse.cz>
26834 * Makefile.in: As qsort_chk is implemented in vec.c, add
26835 vec.o to linkage of gencfn-macros.
26836 * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
26837 passing the info to record_node_allocation_statistics.
26838 (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
26840 * ggc-common.c (struct ggc_usage): Add operator== and use
26841 it in operator< and compare function.
26842 * mem-stats.h (struct mem_usage): Likewise.
26843 * vec.c (struct vec_usage): Remove operator< and compare
26844 function. Can be simply inherited.
26846 2018-01-12 Martin Jambor <mjambor@suse.cz>
26849 * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
26850 * tree-ssa-math-opts.c: Include domwalk.h.
26851 (convert_mult_to_fma_1): New function.
26852 (fma_transformation_info): New type.
26853 (fma_deferring_state): Likewise.
26854 (cancel_fma_deferring): New function.
26855 (result_of_phi): Likewise.
26856 (last_fma_candidate_feeds_initial_phi): Likewise.
26857 (convert_mult_to_fma): Added deferring logic, split actual
26858 transformation to convert_mult_to_fma_1.
26859 (math_opts_dom_walker): New type.
26860 (math_opts_dom_walker::after_dom_children): New method, body moved
26861 here from pass_optimize_widening_mul::execute, added deferring logic
26863 (pass_optimize_widening_mul::execute): Moved most of code to
26864 math_opts_dom_walker::after_dom_children.
26865 * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
26866 * config/i386/i386.c (ix86_option_override_internal): Added
26867 maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
26869 2018-01-12 Richard Biener <rguenther@suse.de>
26872 * dwarf2out.c (gen_variable_die): Do not reset old_die for
26873 inline instance vars.
26875 2018-01-12 Oleg Endo <olegendo@gcc.gnu.org>
26878 * config/rx/rx.c (rx_is_restricted_memory_address):
26879 Handle SUBREG case.
26881 2018-01-12 Richard Biener <rguenther@suse.de>
26883 PR tree-optimization/80846
26884 * target.def (split_reduction): New target hook.
26885 * targhooks.c (default_split_reduction): New function.
26886 * targhooks.h (default_split_reduction): Declare.
26887 * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
26888 target requests first reduce vectors by combining low and high
26890 * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
26891 (get_vectype_for_scalar_type_and_size): Export.
26892 * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
26893 * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
26894 * doc/tm.texi: Regenerate.
26895 * config/i386/i386.c (ix86_split_reduction): Implement
26896 TARGET_VECTORIZE_SPLIT_REDUCTION.
26898 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
26901 * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
26902 in PIC mode except for TARGET_VXWORKS_RTP.
26903 * config/sparc/sparc.c: Include cfgrtl.h.
26904 (TARGET_INIT_PIC_REG): Define.
26905 (TARGET_USE_PSEUDO_PIC_REG): Likewise.
26906 (sparc_pic_register_p): New predicate.
26907 (sparc_legitimate_address_p): Use it.
26908 (sparc_legitimize_pic_address): Likewise.
26909 (sparc_delegitimize_address): Likewise.
26910 (sparc_mode_dependent_address_p): Likewise.
26911 (gen_load_pcrel_sym): Remove 4th parameter.
26912 (load_got_register): Adjust call to above. Remove obsolete stuff.
26913 (sparc_expand_prologue): Do not call load_got_register here.
26914 (sparc_flat_expand_prologue): Likewise.
26915 (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
26916 (sparc_use_pseudo_pic_reg): New function.
26917 (sparc_init_pic_reg): Likewise.
26918 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
26919 (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
26921 2018-01-12 Christophe Lyon <christophe.lyon@linaro.org>
26923 * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
26924 Add item for branch_cost.
26926 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
26928 PR rtl-optimization/83565
26929 * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
26930 not extend the result to a larger mode for rotate operations.
26931 (num_sign_bit_copies1): Likewise.
26933 2018-01-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
26936 * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
26938 Use values-Xc.o for -pedantic.
26939 Link with values-xpg4.o for C90, values-xpg6.o otherwise.
26941 2018-01-12 Martin Liska <mliska@suse.cz>
26944 * ipa-devirt.c (final_warning_record::grow_type_warnings):
26946 (possible_polymorphic_call_targets): Use it.
26947 (ipa_devirt): Likewise.
26949 2018-01-12 Martin Liska <mliska@suse.cz>
26951 * profile-count.h (enum profile_quality): Use 0 as invalid
26952 enum value of profile_quality.
26954 2018-01-12 Chung-Ju Wu <jasonwucj@gmail.com>
26956 * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
26957 -mext-string options.
26959 2018-01-12 Richard Biener <rguenther@suse.de>
26961 * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
26962 DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
26963 * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
26965 * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
26967 2018-01-11 Michael Meissner <meissner@linux.vnet.ibm.com>
26969 * configure.ac (--with-long-double-format): Add support for the
26970 configuration option to change the default long double format on
26972 * config.gcc (powerpc*-linux*-*): Likewise.
26973 * configure: Regenerate.
26974 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
26975 double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
26976 used without modification.
26978 2018-01-11 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
26980 * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
26981 (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
26982 * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
26983 MISC_BUILTIN_SPEC_BARRIER.
26984 (rs6000_init_builtins): Likewise.
26985 * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
26987 (speculation_barrier): New define_insn.
26988 * doc/extend.texi: Document __builtin_speculation_barrier.
26990 2018-01-11 Jakub Jelinek <jakub@redhat.com>
26993 * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
26994 is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
26995 * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
26997 (ssescalarmodesuffix): Add 512-bit vectors. Use "d" or "q" for
26998 integral modes instead of "ss" and "sd".
26999 (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
27000 vectors with 32-bit and 64-bit elements.
27001 (vecdupssescalarmodesuffix): New mode attribute.
27002 (vec_dup<mode>): Use it.
27004 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
27007 * config/i386/i386.c (ix86_compute_frame_layout): Align stack
27008 frame if argument is passed on stack.
27010 2018-01-11 Jakub Jelinek <jakub@redhat.com>
27013 * ree.c (combine_reaching_defs): Optimize also
27014 reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
27015 reg2=any_extend(exp); reg1=reg2;, formatting fix.
27017 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
27019 PR middle-end/83189
27020 * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
27022 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
27024 PR middle-end/83718
27025 * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
27026 after they are computed.
27028 2018-01-11 Bin Cheng <bin.cheng@arm.com>
27030 PR tree-optimization/83695
27031 * gimple-loop-linterchange.cc
27032 (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
27033 reset cached scev information after interchange.
27034 (pass_linterchange::execute): Remove call to scev_reset_htab.
27036 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
27038 * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
27039 vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
27040 vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
27041 vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
27042 vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
27043 vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
27044 * config/arm/arm_neon_builtins.def (vfmal_lane_low,
27045 vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
27046 vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
27047 vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
27048 vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
27049 * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
27050 (V_lane_reg): Likewise.
27051 * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
27053 (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
27054 (vfmal_lane_low<mode>_intrinsic,
27055 vfmal_lane_low<vfmlsel2><mode>_intrinsic,
27056 vfmal_lane_high<vfmlsel2><mode>_intrinsic,
27057 vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
27058 vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
27059 vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
27060 vfmsl_lane_high<mode>_intrinsic): New define_insns.
27062 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
27064 * config/arm/arm-cpus.in (fp16fml): New feature.
27065 (ALL_SIMD): Add fp16fml.
27066 (armv8.2-a): Add fp16fml as an option.
27067 (armv8.3-a): Likewise.
27068 (armv8.4-a): Add fp16fml as part of fp16.
27069 * config/arm/arm.h (TARGET_FP16FML): Define.
27070 * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
27072 * config/arm/arm-modes.def (V2HF): Define.
27073 * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
27074 vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
27075 vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
27076 * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
27077 vfmsl_low, vfmsl_high): New set of builtins.
27078 * config/arm/iterators.md (PLUSMINUS): New code iterator.
27079 (vfml_op): New code attribute.
27080 (VFMLHALVES): New int iterator.
27081 (VFML, VFMLSEL): New mode attributes.
27082 (V_reg): Define mapping for V2HF.
27083 (V_hi, V_lo): New mode attributes.
27084 (VF_constraint): Likewise.
27085 (vfml_half, vfml_half_selector): New int attributes.
27086 * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
27088 (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
27089 vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
27091 * config/arm/t-arm-elf (v8_fps): Add fp16fml.
27092 * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
27093 * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
27094 * doc/invoke.texi (ARM Options): Document fp16fml. Update armv8.4-a
27096 * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
27097 Document new effective target and option set.
27099 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
27101 * config/arm/arm-cpus.in (armv8_4): New feature.
27102 (ARMv8_4a): New fgroup.
27103 (armv8.4-a): New arch.
27104 * config/arm/arm-tables.opt: Regenerate.
27105 * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
27106 * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
27107 * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
27108 Add matching rules for -march=armv8.4-a and extensions.
27109 * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
27111 2018-01-11 Oleg Endo <olegendo@gcc.gnu.org>
27114 * config/rx/rx.md (BW): New mode attribute.
27115 (sync_lock_test_and_setsi): Add mode suffix to insn output.
27117 2018-01-11 Richard Biener <rguenther@suse.de>
27119 PR tree-optimization/83435
27120 * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
27121 * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
27122 * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
27124 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
27125 Alan Hayward <alan.hayward@arm.com>
27126 David Sherwood <david.sherwood@arm.com>
27128 * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
27130 (aarch64_classify_address): Initialize it. Track polynomial offsets.
27131 (aarch64_print_address_internal): Use it to check for a zero offset.
27133 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
27134 Alan Hayward <alan.hayward@arm.com>
27135 David Sherwood <david.sherwood@arm.com>
27137 * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
27138 * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
27139 Return a poly_int64 rather than a HOST_WIDE_INT.
27140 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
27141 rather than a HOST_WIDE_INT.
27142 * config/aarch64/aarch64.h (aarch64_frame): Protect with
27143 HAVE_POLY_INT_H rather than HOST_WIDE_INT. Change locals_offset,
27144 hard_fp_offset, frame_size, initial_adjust, callee_offset and
27145 final_offset from HOST_WIDE_INT to poly_int64.
27146 * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
27147 to_constant when getting the number of units in an Advanced SIMD
27149 (aarch64_builtin_vectorized_function): Check for a constant number
27151 * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
27153 (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
27154 attribute instead of GET_MODE_NUNITS.
27155 * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
27156 (aarch64_class_max_nregs): Use the constant_lowest_bound of the
27157 GET_MODE_SIZE for fixed-size registers.
27158 (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
27159 (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
27160 (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
27161 (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
27162 (aarch64_print_operand, aarch64_print_address_internal)
27163 (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
27164 (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
27165 (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
27166 Handle polynomial GET_MODE_SIZE.
27167 (aarch64_hard_regno_caller_save_mode): Likewise. Return modes
27168 wider than SImode without modification.
27169 (tls_symbolic_operand_type): Use strip_offset instead of split_const.
27170 (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
27171 (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
27172 passing and returning SVE modes.
27173 (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
27174 rather than GEN_INT.
27175 (aarch64_emit_probe_stack_range): Take the size as a poly_int64
27176 rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
27177 (aarch64_allocate_and_probe_stack_space): Likewise.
27178 (aarch64_layout_frame): Cope with polynomial offsets.
27179 (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
27180 start_offset as a poly_int64 rather than a HOST_WIDE_INT. Track
27181 polynomial offsets.
27182 (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
27183 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
27184 poly_int64 rather than a HOST_WIDE_INT.
27185 (aarch64_get_separate_components, aarch64_process_components)
27186 (aarch64_expand_prologue, aarch64_expand_epilogue)
27187 (aarch64_use_return_insn_p): Handle polynomial frame offsets.
27188 (aarch64_anchor_offset): New function, split out from...
27189 (aarch64_legitimize_address): ...here.
27190 (aarch64_builtin_vectorization_cost): Handle polynomial
27191 TYPE_VECTOR_SUBPARTS.
27192 (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
27194 (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
27195 number of elements from the PARALLEL rather than the mode.
27196 (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
27197 rather than GET_MODE_BITSIZE.
27198 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
27199 (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
27200 (aarch64_expand_vec_perm_const_1): Handle polynomial
27201 d->perm.length () and d->perm elements.
27202 (aarch64_evpc_tbl): Likewise. Use nelt rather than GET_MODE_NUNITS.
27203 Apply to_constant to d->perm elements.
27204 (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
27205 polynomial CONST_VECTOR_NUNITS.
27206 (aarch64_move_pointer): Take amount as a poly_int64 rather
27208 (aarch64_progress_pointer): Avoid temporary variable.
27209 * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
27210 the mode attribute instead of GET_MODE.
27212 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
27213 Alan Hayward <alan.hayward@arm.com>
27214 David Sherwood <david.sherwood@arm.com>
27216 * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
27217 x exists before using it.
27218 (aarch64_add_constant_internal): Rename to...
27219 (aarch64_add_offset_1): ...this. Replace regnum with separate
27220 src and dest rtxes. Handle the case in which they're different,
27221 including when the offset is zero. Replace scratchreg with an rtx.
27222 Use 2 additions if there is no spare register into which we can
27223 move a 16-bit constant.
27224 (aarch64_add_constant): Delete.
27225 (aarch64_add_offset): Replace reg with separate src and dest
27226 rtxes. Take a poly_int64 offset instead of a HOST_WIDE_INT.
27227 Use aarch64_add_offset_1.
27228 (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
27229 an rtx rather than an int. Take the delta as a poly_int64
27230 rather than a HOST_WIDE_INT. Use aarch64_add_offset.
27231 (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
27232 (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
27233 aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
27234 (aarch64_expand_epilogue): Update calls to aarch64_add_offset
27235 and aarch64_add_sp.
27236 (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
27237 aarch64_add_constant.
27239 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
27241 * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
27242 Use scalar_float_mode.
27244 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
27246 * config/aarch64/aarch64-simd.md
27247 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
27248 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
27249 (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
27250 (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
27251 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
27252 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
27253 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
27254 (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
27255 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
27256 (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
27258 2018-01-11 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
27261 * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
27262 targ_options->x_arm_arch_string is non NULL.
27264 2018-01-11 Tamar Christina <tamar.christina@arm.com>
27266 * config/aarch64/aarch64.h
27267 (AARCH64_FL_FOR_ARCH8_4): Add AARCH64_FL_DOTPROD.
27269 2018-01-11 Sudakshina Das <sudi.das@arm.com>
27272 * expmed.c (emit_store_flag_force): Swap if const op0
27273 and change VOIDmode to mode of op0.
27275 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
27277 PR rtl-optimization/83761
27278 * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
27279 than bytes to mode_for_size.
27281 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
27283 PR middle-end/83189
27284 * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
27285 * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
27288 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
27290 PR middle-end/83575
27291 * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
27292 when in layout mode.
27293 (cfg_layout_finalize): Do not verify cfg before we are out of layout.
27294 * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
27297 2018-01-10 Michael Collison <michael.collison@arm.com>
27299 * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
27300 * config/aarch64/aarch64-option-extension.def: Add
27301 AARCH64_OPT_EXTENSION of 'fp16fml'.
27302 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
27303 (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
27304 * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
27305 * config/aarch64/constraints.md (Ui7): New constraint.
27306 * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
27307 (VFMLA_SEL_W): Ditto.
27310 (VFMLA16_LOW): New int iterator.
27311 (VFMLA16_HIGH): Ditto.
27312 (UNSPEC_FMLAL): New unspec.
27313 (UNSPEC_FMLSL): Ditto.
27314 (UNSPEC_FMLAL2): Ditto.
27315 (UNSPEC_FMLSL2): Ditto.
27316 (f16mac): New code attribute.
27317 * config/aarch64/aarch64-simd-builtins.def
27318 (aarch64_fmlal_lowv2sf): Ditto.
27319 (aarch64_fmlsl_lowv2sf): Ditto.
27320 (aarch64_fmlalq_lowv4sf): Ditto.
27321 (aarch64_fmlslq_lowv4sf): Ditto.
27322 (aarch64_fmlal_highv2sf): Ditto.
27323 (aarch64_fmlsl_highv2sf): Ditto.
27324 (aarch64_fmlalq_highv4sf): Ditto.
27325 (aarch64_fmlslq_highv4sf): Ditto.
27326 (aarch64_fmlal_lane_lowv2sf): Ditto.
27327 (aarch64_fmlsl_lane_lowv2sf): Ditto.
27328 (aarch64_fmlal_laneq_lowv2sf): Ditto.
27329 (aarch64_fmlsl_laneq_lowv2sf): Ditto.
27330 (aarch64_fmlalq_lane_lowv4sf): Ditto.
27331 (aarch64_fmlsl_lane_lowv4sf): Ditto.
27332 (aarch64_fmlalq_laneq_lowv4sf): Ditto.
27333 (aarch64_fmlsl_laneq_lowv4sf): Ditto.
27334 (aarch64_fmlal_lane_highv2sf): Ditto.
27335 (aarch64_fmlsl_lane_highv2sf): Ditto.
27336 (aarch64_fmlal_laneq_highv2sf): Ditto.
27337 (aarch64_fmlsl_laneq_highv2sf): Ditto.
27338 (aarch64_fmlalq_lane_highv4sf): Ditto.
27339 (aarch64_fmlsl_lane_highv4sf): Ditto.
27340 (aarch64_fmlalq_laneq_highv4sf): Ditto.
27341 (aarch64_fmlsl_laneq_highv4sf): Ditto.
27342 * config/aarch64/aarch64-simd.md:
27343 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
27344 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
27345 (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
27346 (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
27347 (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
27348 (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
27349 (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
27350 (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
27351 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
27352 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
27353 (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
27354 (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
27355 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
27356 (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
27357 (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
27358 (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
27359 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
27360 (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
27361 (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
27362 (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
27363 * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
27364 (vfmlsl_low_u32): Ditto.
27365 (vfmlalq_low_u32): Ditto.
27366 (vfmlslq_low_u32): Ditto.
27367 (vfmlal_high_u32): Ditto.
27368 (vfmlsl_high_u32): Ditto.
27369 (vfmlalq_high_u32): Ditto.
27370 (vfmlslq_high_u32): Ditto.
27371 (vfmlal_lane_low_u32): Ditto.
27372 (vfmlsl_lane_low_u32): Ditto.
27373 (vfmlal_laneq_low_u32): Ditto.
27374 (vfmlsl_laneq_low_u32): Ditto.
27375 (vfmlalq_lane_low_u32): Ditto.
27376 (vfmlslq_lane_low_u32): Ditto.
27377 (vfmlalq_laneq_low_u32): Ditto.
27378 (vfmlslq_laneq_low_u32): Ditto.
27379 (vfmlal_lane_high_u32): Ditto.
27380 (vfmlsl_lane_high_u32): Ditto.
27381 (vfmlal_laneq_high_u32): Ditto.
27382 (vfmlsl_laneq_high_u32): Ditto.
27383 (vfmlalq_lane_high_u32): Ditto.
27384 (vfmlslq_lane_high_u32): Ditto.
27385 (vfmlalq_laneq_high_u32): Ditto.
27386 (vfmlslq_laneq_high_u32): Ditto.
27387 * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
27388 (AARCH64_FL_FOR_ARCH8_4): New.
27389 (AARCH64_ISA_F16FML): New ISA flag.
27390 (TARGET_F16FML): New feature flag for fp16fml.
27391 (doc/invoke.texi): Document new fp16fml option.
27393 2018-01-10 Michael Collison <michael.collison@arm.com>
27395 * config/aarch64/aarch64-builtins.c:
27396 (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
27397 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
27398 (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
27399 * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
27400 (AARCH64_ISA_SHA3): New ISA flag.
27401 (TARGET_SHA3): New feature flag for sha3.
27402 * config/aarch64/iterators.md (sha512_op): New int attribute.
27403 (CRYPTO_SHA512): New int iterator.
27404 (UNSPEC_SHA512H): New unspec.
27405 (UNSPEC_SHA512H2): Ditto.
27406 (UNSPEC_SHA512SU0): Ditto.
27407 (UNSPEC_SHA512SU1): Ditto.
27408 * config/aarch64/aarch64-simd-builtins.def
27409 (aarch64_crypto_sha512hqv2di): New builtin.
27410 (aarch64_crypto_sha512h2qv2di): Ditto.
27411 (aarch64_crypto_sha512su0qv2di): Ditto.
27412 (aarch64_crypto_sha512su1qv2di): Ditto.
27413 (aarch64_eor3qv8hi): Ditto.
27414 (aarch64_rax1qv2di): Ditto.
27415 (aarch64_xarqv2di): Ditto.
27416 (aarch64_bcaxqv8hi): Ditto.
27417 * config/aarch64/aarch64-simd.md:
27418 (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
27419 (aarch64_crypto_sha512su0qv2di): Ditto.
27420 (aarch64_crypto_sha512su1qv2di): Ditto.
27421 (aarch64_eor3qv8hi): Ditto.
27422 (aarch64_rax1qv2di): Ditto.
27423 (aarch64_xarqv2di): Ditto.
27424 (aarch64_bcaxqv8hi): Ditto.
27425 * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
27426 (vsha512h2q_u64): Ditto.
27427 (vsha512su0q_u64): Ditto.
27428 (vsha512su1q_u64): Ditto.
27429 (veor3q_u16): Ditto.
27430 (vrax1q_u64): Ditto.
27431 (vxarq_u64): Ditto.
27432 (vbcaxq_u16): Ditto.
27433 * config/arm/types.md (crypto_sha512): New type attribute.
27434 (crypto_sha3): Ditto.
27435 (doc/invoke.texi): Document new sha3 option.
27437 2018-01-10 Michael Collison <michael.collison@arm.com>
27439 * config/aarch64/aarch64-builtins.c:
27440 (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
27441 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
27442 (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
27443 (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
27444 * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
27445 (AARCH64_ISA_SM4): New ISA flag.
27446 (TARGET_SM4): New feature flag for sm4.
27447 * config/aarch64/aarch64-simd-builtins.def
27448 (aarch64_sm3ss1qv4si): Ditto.
27449 (aarch64_sm3tt1aq4si): Ditto.
27450 (aarch64_sm3tt1bq4si): Ditto.
27451 (aarch64_sm3tt2aq4si): Ditto.
27452 (aarch64_sm3tt2bq4si): Ditto.
27453 (aarch64_sm3partw1qv4si): Ditto.
27454 (aarch64_sm3partw2qv4si): Ditto.
27455 (aarch64_sm4eqv4si): Ditto.
27456 (aarch64_sm4ekeyqv4si): Ditto.
27457 * config/aarch64/aarch64-simd.md:
27458 (aarch64_sm3ss1qv4si): Ditto.
27459 (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
27460 (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
27461 (aarch64_sm4eqv4si): Ditto.
27462 (aarch64_sm4ekeyqv4si): Ditto.
27463 * config/aarch64/iterators.md (sm3tt_op): New int iterator.
27464 (sm3part_op): Ditto.
27465 (CRYPTO_SM3TT): Ditto.
27466 (CRYPTO_SM3PART): Ditto.
27467 (UNSPEC_SM3SS1): New unspec.
27468 (UNSPEC_SM3TT1A): Ditto.
27469 (UNSPEC_SM3TT1B): Ditto.
27470 (UNSPEC_SM3TT2A): Ditto.
27471 (UNSPEC_SM3TT2B): Ditto.
27472 (UNSPEC_SM3PARTW1): Ditto.
27473 (UNSPEC_SM3PARTW2): Ditto.
27474 (UNSPEC_SM4E): Ditto.
27475 (UNSPEC_SM4EKEY): Ditto.
27476 * config/aarch64/constraints.md (Ui2): New constraint.
27477 * config/aarch64/predicates.md (aarch64_imm2): New predicate.
27478 * config/arm/types.md (crypto_sm3): New type attribute.
27479 (crypto_sm4): Ditto.
27480 * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
27481 (vsm3tt1aq_u32): Ditto.
27482 (vsm3tt1bq_u32): Ditto.
27483 (vsm3tt2aq_u32): Ditto.
27484 (vsm3tt2bq_u32): Ditto.
27485 (vsm3partw1q_u32): Ditto.
27486 (vsm3partw2q_u32): Ditto.
27487 (vsm4eq_u32): Ditto.
27488 (vsm4ekeyq_u32): Ditto.
27489 (doc/invoke.texi): Document new sm4 option.
27491 2018-01-10 Michael Collison <michael.collison@arm.com>
27493 * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
27494 * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
27495 (AARCH64_FL_FOR_ARCH8_4): New.
27496 (AARCH64_FL_V8_4): New flag.
27497 (doc/invoke.texi): Document new armv8.4-a option.
27499 2018-01-10 Michael Collison <michael.collison@arm.com>
27501 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
27502 (__ARM_FEATURE_AES): Define if TARGET_AES is true.
27503 (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
27504 * config/aarch64/aarch64-option-extension.def: Add
27505 AARCH64_OPT_EXTENSION of 'sha2'.
27506 (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
27507 (crypto): Disable sha2 and aes if crypto disabled.
27508 (crypto): Enable aes and sha2 if enabled.
27509 (simd): Disable sha2 and aes if simd disabled.
27510 * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
27512 (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
27513 (TARGET_SHA2): New feature flag for sha2.
27514 (TARGET_AES): New feature flag for aes.
27515 * config/aarch64/aarch64-simd.md:
27516 (aarch64_crypto_aes<aes_op>v16qi): Make pattern
27517 conditional on TARGET_AES.
27518 (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
27519 (aarch64_crypto_sha1hsi): Make pattern conditional
27521 (aarch64_crypto_sha1hv4si): Ditto.
27522 (aarch64_be_crypto_sha1hv4si): Ditto.
27523 (aarch64_crypto_sha1su1v4si): Ditto.
27524 (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
27525 (aarch64_crypto_sha1su0v4si): Ditto.
27526 (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
27527 (aarch64_crypto_sha256su0v4si): Ditto.
27528 (aarch64_crypto_sha256su1v4si): Ditto.
27529 (doc/invoke.texi): Document new aes and sha2 options.
27531 2018-01-10 Martin Sebor <msebor@redhat.com>
27533 PR tree-optimization/83781
27534 * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
27537 2018-01-11 Martin Sebor <msebor@gmail.com>
27538 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
27540 PR tree-optimization/83501
27541 PR tree-optimization/81703
27543 * tree-ssa-strlen.c (get_string_cst): Rename...
27544 (get_string_len): ...to this. Handle global constants.
27545 (handle_char_store): Adjust.
27547 2018-01-10 Kito Cheng <kito.cheng@gmail.com>
27548 Jim Wilson <jimw@sifive.com>
27550 * config/riscv/riscv-protos.h (riscv_output_return): New.
27551 * config/riscv/riscv.c (struct machine_function): New naked_p field.
27552 (riscv_attribute_table, riscv_output_return),
27553 (riscv_handle_fndecl_attribute, riscv_naked_function_p),
27554 (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
27555 (riscv_compute_frame_info): Only compute frame->mask if not a naked
27557 (riscv_expand_prologue): Add early return for naked function.
27558 (riscv_expand_epilogue): Likewise.
27559 (riscv_function_ok_for_sibcall): Return false for naked function.
27560 (riscv_set_current_function): New.
27561 (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
27562 (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
27563 * config/riscv/riscv.md (simple_return): Call riscv_output_return.
27564 * doc/extend.texi (RISC-V Function Attributes): New.
27566 2018-01-10 Michael Meissner <meissner@linux.vnet.ibm.com>
27568 * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
27569 check for 128-bit long double before checking TCmode.
27570 * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
27571 128-bit long doubles before checking TFmode or TCmode.
27572 (FLOAT128_IBM_P): Likewise.
27574 2018-01-10 Martin Sebor <msebor@redhat.com>
27576 PR tree-optimization/83671
27577 * builtins.c (c_strlen): Unconditionally return zero for the empty
27579 Use -Warray-bounds for warnings.
27580 * gimple-fold.c (get_range_strlen): Handle non-constant lengths
27581 for non-constant array indices with COMPONENT_REF, arrays of
27582 arrays, and pointers to arrays.
27583 (gimple_fold_builtin_strlen): Determine and set length range for
27584 non-constant character arrays.
27586 2018-01-10 Aldy Hernandez <aldyh@redhat.com>
27588 PR middle-end/81897
27589 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
27592 2018-01-10 Eric Botcazou <ebotcazou@adacore.com>
27594 * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
27596 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
27599 * config/rs6000/rs6000.c (print_operand) <'y'>: Use
27600 VECTOR_MEM_ALTIVEC_OR_VSX_P.
27601 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
27602 indexed_or_indirect_operand predicate.
27603 (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
27604 (*vsx_le_perm_load_v8hi): Likewise.
27605 (*vsx_le_perm_load_v16qi): Likewise.
27606 (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
27607 (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
27608 (*vsx_le_perm_store_v8hi): Likewise.
27609 (*vsx_le_perm_store_v16qi): Likewise.
27610 (eight unnamed splitters): Likewise.
27612 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
27614 * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
27615 * config/rs6000/emmintrin.h: Likewise.
27616 * config/rs6000/mmintrin.h: Likewise.
27617 * config/rs6000/xmmintrin.h: Likewise.
27619 2018-01-10 David Malcolm <dmalcolm@redhat.com>
27622 * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
27624 * tree.c (tree_nop_conversion): Return true for location wrapper
27626 (maybe_wrap_with_location): New function.
27627 (selftest::check_strip_nops): New function.
27628 (selftest::test_location_wrappers): New function.
27629 (selftest::tree_c_tests): Call it.
27630 * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
27631 (maybe_wrap_with_location): New decl.
27632 (EXPR_LOCATION_WRAPPER_P): New macro.
27633 (location_wrapper_p): New inline function.
27634 (tree_strip_any_location_wrapper): New inline function.
27636 2018-01-10 H.J. Lu <hongjiu.lu@intel.com>
27639 * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
27640 stack_realign_offset for the largest alignment of stack slot
27642 (ix86_find_max_used_stack_alignment): New function.
27643 (ix86_finalize_stack_frame_flags): Use it. Set
27644 max_used_stack_alignment if we don't realign stack.
27645 * config/i386/i386.h (machine_function): Add
27646 max_used_stack_alignment.
27648 2018-01-10 Christophe Lyon <christophe.lyon@linaro.org>
27650 * config/arm/arm.opt (-mbranch-cost): New option.
27651 * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
27654 2018-01-10 Segher Boessenkool <segher@kernel.crashing.org>
27657 * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
27658 load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
27660 2018-01-10 Richard Biener <rguenther@suse.de>
27663 * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
27664 early out so it also covers the case where we have a non-NULL
27667 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
27669 PR tree-optimization/83753
27670 * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
27671 for non-strided grouped accesses if the number of elements is 1.
27673 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
27676 * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
27677 * i386.h (TARGET_USE_GATHER): Define.
27678 * x86-tune.def (X86_TUNE_USE_GATHER): New.
27680 2018-01-10 Martin Liska <mliska@suse.cz>
27683 * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
27684 * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
27686 * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
27687 CLEANUP_NO_PARTITIONING is not set.
27689 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
27691 * doc/rtl.texi: Remove documentation of (const ...) wrappers
27692 for vectors, as a partial revert of r254296.
27693 * rtl.h (const_vec_p): Delete.
27694 (const_vec_duplicate_p): Don't test for vector CONSTs.
27695 (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
27696 * expmed.c (make_tree): Likewise.
27699 * common.md (E, F): Use CONSTANT_P instead of checking for
27701 * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
27702 checking for CONST_VECTOR.
27704 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
27706 PR middle-end/83575
27707 * predict.c (force_edge_cold): Handle in more sane way edges
27708 with no prediction.
27710 2018-01-09 Carl Love <cel@us.ibm.com>
27712 * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
27714 (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
27715 * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
27716 VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
27717 VMRGOW_V2DI, VMRGOW_V2DF. Remove definition for VMRGOW.
27718 * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
27719 P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW): Add definitions.
27720 * config/rs6000/rs6000-protos.h: Add extern defition for
27721 rs6000_generate_float2_double_code.
27722 * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
27724 * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
27725 (float2_v2df): Add define_expand.
27727 2018-01-09 Uros Bizjak <ubizjak@gmail.com>
27730 * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
27731 op_mode in the force_to_mode call.
27733 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
27735 * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
27736 instead of checking each element individually.
27737 (aarch64_evpc_uzp): Likewise.
27738 (aarch64_evpc_zip): Likewise.
27739 (aarch64_evpc_ext): Likewise.
27740 (aarch64_evpc_rev): Likewise.
27741 (aarch64_evpc_dup): Test the encoding for a single duplicated element,
27742 instead of checking each element individually. Return true without
27744 (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
27745 whether all selected elements come from the same input, instead of
27746 checking each element individually. Remove calls to gen_rtx_REG,
27747 start_sequence and end_sequence and instead assert that no rtl is
27750 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
27752 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
27753 order of HIGH and CONST checks.
27755 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
27757 * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
27758 if the destination isn't an SSA_NAME.
27760 2018-01-09 Richard Biener <rguenther@suse.de>
27762 PR tree-optimization/83668
27763 * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
27765 (canonicalize_loop_form): ... here, renamed from ...
27766 (canonicalize_loop_closed_ssa_form): ... this and amended to
27767 swap successor edges for loop exit blocks to make us use
27768 the RPO order we need for initial schedule generation.
27770 2018-01-09 Joseph Myers <joseph@codesourcery.com>
27772 PR tree-optimization/64811
27773 * match.pd: When optimizing comparisons with Inf, avoid
27774 introducing or losing exceptions from comparisons with NaN.
27776 2018-01-09 Martin Liska <mliska@suse.cz>
27779 * asan.c (shadow_mem_size): Add gcc_assert.
27781 2018-01-09 Georg-Johann Lay <avr@gjlay.de>
27783 Don't save registers in main().
27786 * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
27787 * config/avr/avr.opt (-mmain-is-OS_task): New target option.
27788 * config/avr/avr.c (avr_set_current_function): Don't error if
27789 naked, OS_task or OS_main are specified at the same time.
27790 (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
27792 (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
27794 * common/config/avr/avr-common.c (avr_option_optimization_table):
27795 Switch on -mmain-is-OS_task for optimizing compilations.
27797 2018-01-09 Richard Biener <rguenther@suse.de>
27799 PR tree-optimization/83572
27800 * graphite.c: Include cfganal.h.
27801 (graphite_transform_loops): Connect infinite loops to exit
27802 and remove fake edges at the end.
27804 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
27806 * ipa-inline.c (edge_badness): Revert accidental checkin.
27808 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
27811 * ipa-comdats.c (set_comdat_group): Only set comdat group of real
27812 symbols; not inline clones.
27814 2018-01-09 Jakub Jelinek <jakub@redhat.com>
27817 * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
27818 hard registers. Formatting fixes.
27820 PR preprocessor/83722
27821 * gcc.c (try_generate_repro): Pass
27822 &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
27823 &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
27826 2018-01-08 Monk Chiang <sh.chiang04@gmail.com>
27827 Kito Cheng <kito.cheng@gmail.com>
27829 * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
27830 (riscv_leaf_function_p): Delete.
27831 (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
27833 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
27835 * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
27837 (do_ifelse): New function.
27838 (do_isel): New function.
27839 (do_sub3): New function.
27840 (do_add3): New function.
27841 (do_load_mask_compare): New function.
27842 (do_overlap_load_compare): New function.
27843 (expand_compare_loop): New function.
27844 (expand_block_compare): Call expand_compare_loop() when appropriate.
27845 * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
27846 option description.
27847 (-mblock-compare-inline-loop-limit): New option.
27849 2018-01-08 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
27852 * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
27853 Reverse order of second and third operands in first alternative.
27854 * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
27855 of first and second elements in UNSPEC_VPERMR vector.
27856 (altivec_expand_vec_perm_le): Likewise.
27858 2018-01-08 Jeff Law <law@redhat.com>
27860 PR rtl-optimizatin/81308
27861 * tree-switch-conversion.c (cfg_altered): New file scoped static.
27862 (process_switch): If group_case_labels makes a change, then set
27864 (pass_convert_switch::execute): If a switch is converted, then
27865 set cfg_altered. Return TODO_cfg_cleanup if cfg_altered is true.
27867 PR rtl-optimization/81308
27868 * recog.c (split_all_insns): Conditionally cleanup the CFG after
27871 2018-01-08 Vidya Praveen <vidyapraveen@arm.com>
27873 PR target/83663 - Revert r255946
27874 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
27875 generation for cases where splatting a value is not useful.
27876 * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
27877 across a vec_duplicate and a paradoxical subreg forming a vector
27878 mode to a vec_concat.
27880 2018-01-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
27882 * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
27883 -march=armv8.3-a variants.
27884 * config/arm/t-multilib: Likewise.
27885 * config/arm/t-arm-elf: Likewise. Handle dotprod extension.
27887 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
27889 * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
27891 (cceq_ior_compare_complement): Give it a name so I can use it, and
27892 change boolean_or_operator predicate to boolean_operator so it can
27893 be used to generate a crand.
27894 (eqne): New code iterator.
27895 (bd/bd_neg): New code_attrs.
27896 (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
27897 a single define_insn.
27898 (<bd>tf_<mode>): A new insn pattern for the conditional form branch
27899 decrement (bdnzt/bdnzf/bdzt/bdzf).
27900 * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
27901 with the new names of the branch decrement patterns, and added the
27902 names of the branch decrement conditional patterns.
27904 2018-01-08 Richard Biener <rguenther@suse.de>
27906 PR tree-optimization/83563
27907 * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
27910 2018-01-08 Richard Biener <rguenther@suse.de>
27912 PR middle-end/83713
27913 * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
27915 2018-01-08 Richard Biener <rguenther@suse.de>
27917 PR tree-optimization/83685
27918 * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
27919 references to abnormals.
27921 2018-01-08 Richard Biener <rguenther@suse.de>
27924 * dwarf2out.c (output_indirect_strings): Handle empty
27925 skeleton_debug_str_hash.
27926 (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
27928 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
27930 * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
27931 (emit_store_direct): Likewise.
27932 (arc_trampoline_adjust_address): Likewise.
27933 (arc_asm_trampoline_template): New function.
27934 (arc_initialize_trampoline): Use asm_trampoline_template.
27935 (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
27936 * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
27937 * config/arc/arc.md (flush_icache): Delete pattern.
27939 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
27941 * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
27942 * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
27945 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
27948 * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
27949 by not USED_FOR_TARGET.
27950 (make_pass_resolve_sw_modes): Likewise.
27952 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
27954 * config/nios2/nios2.h (nios2_section_threshold): Guard by not
27957 2018-01-08 Richard Biener <rguenther@suse.de>
27959 PR middle-end/83580
27960 * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
27962 2018-01-08 Richard Biener <rguenther@suse.de>
27964 PR middle-end/83517
27965 * match.pd ((t * 2) / 2) -> t): Add missing :c.
27967 2018-01-06 Aldy Hernandez <aldyh@redhat.com>
27969 PR middle-end/81897
27970 * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
27971 basic blocks with a small number of successors.
27972 (convert_control_dep_chain_into_preds): Improve handling of
27974 (dump_predicates): Split apart into...
27975 (dump_pred_chain): ...here...
27976 (dump_pred_info): ...and here.
27977 (can_one_predicate_be_invalidated_p): Add debugging printfs.
27978 (can_chain_union_be_invalidated_p): Improve check for invalidation
27980 (uninit_uses_cannot_happen): Avoid unnecessary if
27981 convert_control_dep_chain_into_preds yielded nothing.
27983 2018-01-06 Martin Sebor <msebor@redhat.com>
27985 PR tree-optimization/83640
27986 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
27987 subtracting negative offset from size.
27988 (builtin_access::overlap): Adjust offset bounds of the access to fall
27989 within the size of the object if possible.
27991 2018-01-06 Richard Sandiford <richard.sandiford@linaro.org>
27993 PR rtl-optimization/83699
27994 * expmed.c (extract_bit_field_1): Restrict the vector usage of
27995 extract_bit_field_as_subreg to cases in which the extracted
27996 value is also a vector.
27998 * lra-constraints.c (process_alt_operands): Test for the equivalence
27999 substitutions when detecting a possible reload cycle.
28001 2018-01-06 Jakub Jelinek <jakub@redhat.com>
28004 * toplev.c (process_options): Don't enable debug_nonbind_markers_p
28005 by default if flag_selective_schedling{,2}. Formatting fixes.
28007 PR rtl-optimization/83682
28008 * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
28009 if it has non-VECTOR_MODE element mode.
28010 (vec_duplicate_p): Likewise.
28012 PR middle-end/83694
28013 * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
28014 and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
28016 2018-01-05 Jakub Jelinek <jakub@redhat.com>
28019 * config/i386/i386-builtin.def
28020 (__builtin_ia32_vgf2p8affineinvqb_v64qi,
28021 __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
28022 Require also OPTION_MASK_ISA_AVX512F in addition to
28023 OPTION_MASK_ISA_GFNI.
28024 (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
28025 __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
28026 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
28027 to OPTION_MASK_ISA_GFNI.
28028 (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
28029 OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
28030 OPTION_MASK_ISA_AVX512BW.
28031 (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
28032 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
28033 addition to OPTION_MASK_ISA_GFNI.
28034 (__builtin_ia32_vgf2p8affineinvqb_v16qi,
28035 __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
28036 Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
28037 to OPTION_MASK_ISA_GFNI.
28038 * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
28039 a requirement for all ISAs rather than any of them with a few
28041 (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
28043 (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
28044 bitmasks to be enabled with 3 exceptions, instead of requiring any
28045 enabled ISA with lots of exceptions.
28046 * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
28047 vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
28048 Change avx512bw in isa attribute to avx512f.
28049 * config/i386/sgxintrin.h: Add license boilerplate.
28050 * config/i386/vaesintrin.h: Likewise. Fix macro spelling __AVX512F
28051 to __AVX512F__ and __AVX512VL to __AVX512VL__.
28052 (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
28053 _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
28055 * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
28056 _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
28057 temporarily sse2 rather than sse if not enabled already.
28060 * config/i386/sse.md (VI248_VLBW): Rename to ...
28061 (VI248_AVX512VL): ... this. Don't guard V32HI with TARGET_AVX512BW.
28062 (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
28063 vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
28064 vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
28065 vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
28066 mode iterator instead of VI248_VLBW.
28068 2018-01-05 Jan Hubicka <hubicka@ucw.cz>
28070 * ipa-fnsummary.c (record_modified_bb_info): Add OP.
28071 (record_modified): Skip clobbers; add debug output.
28072 (param_change_prob): Use sreal frequencies.
28074 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
28076 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
28077 punt for user-aligned variables.
28079 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
28081 * tree-chrec.c (chrec_contains_symbols): Return true for
28084 2018-01-05 Sudakshina Das <sudi.das@arm.com>
28087 * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
28088 of (x|y) == x for BICS pattern.
28090 2018-01-05 Jakub Jelinek <jakub@redhat.com>
28092 PR tree-optimization/83605
28093 * gimple-ssa-strength-reduction.c: Include tree-eh.h.
28094 (find_candidates_dom_walker::before_dom_children): Ignore stmts that
28097 2018-01-05 Sebastian Huber <sebastian.huber@embedded-brains.de>
28099 * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
28100 * config/epiphany/rtems.h: New file.
28102 2018-01-04 Jakub Jelinek <jakub@redhat.com>
28103 Uros Bizjak <ubizjak@gmail.com>
28106 * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
28107 QIreg_operand instead of register_operand predicate.
28108 * config/i386/i386.c (ix86_rop_should_change_byte_p,
28109 set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
28110 comments instead of -fmitigate[-_]rop.
28112 2018-01-04 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
28115 * cgraphunit.c (symbol_table::compile): Switch to text_section
28116 before calling assembly_start debug hook.
28117 * run-rtl-passes.c (run_rtl_passes): Likewise.
28120 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
28122 * tree-vrp.c (extract_range_from_binary_expr_1): Check
28123 range_int_cst_p rather than !symbolic_range_p before calling
28124 extract_range_from_multiplicative_op_1.
28126 2018-01-04 Jeff Law <law@redhat.com>
28128 * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
28129 redundant test in assertion.
28131 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
28133 * doc/rtl.texi: Document machine_mode wrapper classes.
28135 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
28137 * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
28138 using tree_to_uhwi.
28140 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
28142 * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
28143 the VEC_PERM_EXPR fold to fail.
28145 2018-01-04 Jakub Jelinek <jakub@redhat.com>
28148 * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
28149 to switched_sections.
28151 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
28154 * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
28155 test for d.testing.
28157 2018-01-04 Peter Bergner <bergner@vnet.ibm.com>
28160 * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
28161 allow arguments in FP registers if TARGET_HARD_FLOAT is false.
28163 2018-01-04 Jakub Jelinek <jakub@redhat.com>
28166 * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
28167 is BLKmode and bitpos not zero or mode change is needed.
28169 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
28172 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
28175 2018-01-04 Uros Bizjak <ubizjak@gmail.com>
28178 * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
28179 instead of MULT rtx. Update all corresponding splitters.
28180 (*saddl_se): Ditto.
28181 (*ssub<modesuffix>): Ditto.
28182 (*ssubl_se): Ditto.
28183 (*cmp_sadd_di): Update split patterns.
28184 (*cmp_sadd_si): Ditto.
28185 (*cmp_sadd_sidi): Ditto.
28186 (*cmp_ssub_di): Ditto.
28187 (*cmp_ssub_si): Ditto.
28188 (*cmp_ssub_sidi): Ditto.
28189 * config/alpha/predicates.md (const23_operand): New predicate.
28190 * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
28191 Look for ASHIFT, not MULT inner operand.
28192 (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
28194 2018-01-04 Martin Liska <mliska@suse.cz>
28196 PR gcov-profile/83669
28197 * gcov.c (output_intermediate_file): Add version to intermediate
28199 * doc/gcov.texi: Document new field 'version' in intermediate
28200 file format. Fix location of '-k' option of gcov command.
28202 2018-01-04 Martin Liska <mliska@suse.cz>
28205 * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
28207 2018-01-04 Jakub Jelinek <jakub@redhat.com>
28209 * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
28211 2018-01-03 Martin Sebor <msebor@redhat.com>
28213 PR tree-optimization/83655
28214 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
28215 checking calls with invalid arguments.
28217 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28219 * tree-vect-stmts.c (vect_get_store_rhs): New function.
28220 (vectorizable_mask_load_store): Delete.
28221 (vectorizable_call): Return false for masked loads and stores.
28222 (vectorizable_store): Handle IFN_MASK_STORE. Use vect_get_store_rhs
28223 instead of gimple_assign_rhs1.
28224 (vectorizable_load): Handle IFN_MASK_LOAD.
28225 (vect_transform_stmt): Don't set is_store for call_vec_info_type.
28227 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28229 * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
28231 (vectorizable_mask_load_store): ...here.
28232 (vectorizable_load): ...and here.
28234 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28236 * tree-vect-stmts.c (vect_build_all_ones_mask)
28237 (vect_build_zero_merge_argument): New functions, split out from...
28238 (vectorizable_load): ...here.
28240 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28242 * tree-vect-stmts.c (vect_check_store_rhs): New function,
28244 (vectorizable_mask_load_store): ...here.
28245 (vectorizable_store): ...and here.
28247 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28249 * tree-vect-stmts.c (vect_check_load_store_mask): New function,
28251 (vectorizable_mask_load_store): ...here.
28253 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28255 * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
28256 (vect_model_store_cost): Take a vec_load_store_type instead of a
28258 * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
28259 (vect_model_store_cost): Take a vec_load_store_type instead of a
28261 (vectorizable_mask_load_store): Update accordingly.
28262 (vectorizable_store): Likewise.
28263 * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
28265 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28267 * tree-vect-loop.c (vect_transform_loop): Stub out scalar
28268 IFN_MASK_LOAD calls here rather than...
28269 * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
28271 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28272 Alan Hayward <alan.hayward@arm.com>
28273 David Sherwood <david.sherwood@arm.com>
28275 * expmed.c (extract_bit_field_1): For vector extracts,
28276 fall back to extract_bit_field_as_subreg if vec_extract
28279 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28280 Alan Hayward <alan.hayward@arm.com>
28281 David Sherwood <david.sherwood@arm.com>
28283 * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
28284 they are variable or constant sized.
28285 (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
28286 slots for constant-sized data.
28288 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28289 Alan Hayward <alan.hayward@arm.com>
28290 David Sherwood <david.sherwood@arm.com>
28292 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
28293 handling COND_EXPRs with boolean comparisons, try to find a better
28294 basis for the mask type than the boolean itself.
28296 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28298 * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
28299 is calculated and how it can be overridden.
28300 * genmodes.c (max_bitsize_mode_any_mode): New variable.
28301 (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
28303 (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
28306 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28307 Alan Hayward <alan.hayward@arm.com>
28308 David Sherwood <david.sherwood@arm.com>
28310 * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
28311 Remove the mode argument.
28312 (aarch64_simd_valid_immediate): Remove the mode and inverse
28314 * config/aarch64/iterators.md (bitsize): New iterator.
28315 * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
28316 (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
28317 * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
28318 aarch64_simd_valid_immediate.
28319 * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
28320 (aarch64_reg_or_bic_imm): Likewise.
28321 * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
28322 with an insn_type enum and msl with a modifier_type enum.
28323 Replace element_width with a scalar_mode. Change the shift
28324 to unsigned int. Add constructors for scalar_float_mode and
28325 scalar_int_mode elements.
28326 (aarch64_vect_float_const_representable_p): Delete.
28327 (aarch64_can_const_movi_rtx_p)
28328 (aarch64_simd_scalar_immediate_valid_for_move)
28329 (aarch64_simd_make_constant): Update call to
28330 aarch64_simd_valid_immediate.
28331 (aarch64_advsimd_valid_immediate_hs): New function.
28332 (aarch64_advsimd_valid_immediate): Likewise.
28333 (aarch64_simd_valid_immediate): Remove mode and inverse
28334 arguments. Rewrite to use the above. Use const_vec_duplicate_p
28335 to detect duplicated constants and use aarch64_float_const_zero_rtx_p
28336 and aarch64_float_const_representable_p on the result.
28337 (aarch64_output_simd_mov_immediate): Remove mode argument.
28338 Update call to aarch64_simd_valid_immediate and use of
28339 simd_immediate_info.
28340 (aarch64_output_scalar_simd_mov_immediate): Update call
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 * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
28348 (mode_nunits): Likewise CONST_MODE_NUNITS.
28349 * machmode.def (ADJUST_NUNITS): Document.
28350 * genmodes.c (mode_data::need_nunits_adj): New field.
28351 (blank_mode): Update accordingly.
28352 (adj_nunits): New variable.
28353 (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
28355 (emit_mode_size_inline): Set need_bytesize_adj for all modes
28356 listed in adj_nunits.
28357 (emit_mode_nunits_inline): Set need_nunits_adj for all modes
28358 listed in adj_nunits. Don't emit case statements for such modes.
28359 (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
28360 and CONST_MODE_PRECISION. Make CONST_MODE_SIZE expand to
28361 nothing if adj_nunits is nonnull.
28362 (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
28363 (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
28364 (emit_mode_fbit): Update use of print_maybe_const_decl.
28365 (emit_move_size): Likewise. Treat the array as non-const
28367 (emit_mode_adjustments): Handle adj_nunits.
28369 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28371 * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
28372 * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
28373 (VECTOR_MODES): Use it.
28374 (make_vector_modes): Take the prefix as an argument.
28376 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28377 Alan Hayward <alan.hayward@arm.com>
28378 David Sherwood <david.sherwood@arm.com>
28380 * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
28381 * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
28382 for MODE_VECTOR_BOOL.
28383 * machmode.def (VECTOR_BOOL_MODE): Document.
28384 * genmodes.c (VECTOR_BOOL_MODE): New macro.
28385 (make_vector_bool_mode): New function.
28386 (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
28388 * lto-streamer-in.c (lto_input_mode_table): Likewise.
28389 * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
28391 * stor-layout.c (int_mode_for_mode): Likewise.
28392 * tree.c (build_vector_type_for_mode): Likewise.
28393 * varasm.c (output_constant_pool_2): Likewise.
28394 * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
28395 CONSTM1_RTX (BImode) are the same thing. Initialize const_tiny_rtx
28396 for MODE_VECTOR_BOOL.
28397 * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
28398 of mode class checks.
28399 * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
28400 instead of a list of mode class checks.
28401 (expand_vector_scalar_condition): Likewise.
28402 (type_for_widest_vector_mode): Handle BImode as an inner mode.
28404 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28405 Alan Hayward <alan.hayward@arm.com>
28406 David Sherwood <david.sherwood@arm.com>
28408 * machmode.h (mode_size): Change from unsigned short to
28410 (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
28411 (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
28412 or if measurement_type is not polynomial.
28413 (fixed_size_mode::includes_p): Check for constant-sized modes.
28414 * genmodes.c (emit_mode_size_inline): Make mode_size_inline
28415 return a poly_uint16 rather than an unsigned short.
28416 (emit_mode_size): Change the type of mode_size from unsigned short
28417 to poly_uint16_pod. Use ZERO_COEFFS for the initializer.
28418 (emit_mode_adjustments): Cope with polynomial vector sizes.
28419 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
28421 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
28423 * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
28424 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
28425 * caller-save.c (setup_save_areas): Likewise.
28426 (replace_reg_with_saved_mem): Likewise.
28427 * calls.c (emit_library_call_value_1): Likewise.
28428 * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
28429 * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
28430 (gen_lowpart_for_combine): Likewise.
28431 * convert.c (convert_to_integer_1): Likewise.
28432 * cse.c (equiv_constant, cse_insn): Likewise.
28433 * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
28434 (cselib_subst_to_values): Likewise.
28435 * dce.c (word_dce_process_block): Likewise.
28436 * df-problems.c (df_word_lr_mark_ref): Likewise.
28437 * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
28438 * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
28439 (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
28440 (rtl_for_decl_location): Likewise.
28441 * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
28442 * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
28443 * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
28444 (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
28445 (expand_expr_real_1): Likewise.
28446 * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
28447 (pad_below): Likewise.
28448 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
28449 * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
28450 * ira.c (get_subreg_tracking_sizes): Likewise.
28451 * ira-build.c (ira_create_allocno_objects): Likewise.
28452 * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
28453 (ira_sort_regnos_for_alter_reg): Likewise.
28454 * ira-costs.c (record_operand_costs): Likewise.
28455 * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
28456 (resolve_simple_move): Likewise.
28457 * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
28458 (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
28459 (lra_constraints): Likewise.
28460 (CONST_POOL_OK_P): Reject variable-sized modes.
28461 * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
28462 (add_pseudo_to_slot, lra_spill): Likewise.
28463 * omp-low.c (omp_clause_aligned_alignment): Likewise.
28464 * optabs-query.c (get_best_extraction_insn): Likewise.
28465 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
28466 * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
28467 (expand_mult_highpart, valid_multiword_target_p): Likewise.
28468 * recog.c (offsettable_address_addr_space_p): Likewise.
28469 * regcprop.c (maybe_mode_change): Likewise.
28470 * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
28471 * regrename.c (build_def_use): Likewise.
28472 * regstat.c (dump_reg_info): Likewise.
28473 * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
28474 (find_reloads, find_reloads_subreg_address): Likewise.
28475 * reload1.c (eliminate_regs_1): Likewise.
28476 * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
28477 * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
28478 (simplify_binary_operation_1, simplify_subreg): Likewise.
28479 * targhooks.c (default_function_arg_padding): Likewise.
28480 (default_hard_regno_nregs, default_class_max_nregs): Likewise.
28481 * tree-cfg.c (verify_gimple_assign_binary): Likewise.
28482 (verify_gimple_assign_ternary): Likewise.
28483 * tree-inline.c (estimate_move_cost): Likewise.
28484 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
28485 * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
28486 (get_address_cost_ainc): Likewise.
28487 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
28488 (vect_supportable_dr_alignment): Likewise.
28489 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
28490 (vectorizable_reduction): Likewise.
28491 * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
28492 (vectorizable_operation, vectorizable_load): Likewise.
28493 * tree.c (build_same_sized_truth_vector_type): Likewise.
28494 * valtrack.c (cleanup_auto_inc_dec): Likewise.
28495 * var-tracking.c (emit_note_insn_var_location): Likewise.
28496 * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
28497 (ADDR_VEC_ALIGN): Likewise.
28499 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28500 Alan Hayward <alan.hayward@arm.com>
28501 David Sherwood <david.sherwood@arm.com>
28503 * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
28505 (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
28506 or if measurement_type is polynomial.
28507 * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
28508 * combine.c (make_extraction): Likewise.
28509 * dse.c (find_shift_sequence): Likewise.
28510 * dwarf2out.c (mem_loc_descriptor): Likewise.
28511 * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
28512 (extract_bit_field, extract_low_bits): Likewise.
28513 * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
28514 (optimize_bitfield_assignment_op, expand_assignment): Likewise.
28515 (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
28516 * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
28517 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
28518 * reload.c (find_reloads): Likewise.
28519 * reload1.c (alter_reg): Likewise.
28520 * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
28521 * targhooks.c (default_secondary_memory_needed_mode): Likewise.
28522 * tree-if-conv.c (predicate_mem_writes): Likewise.
28523 * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
28524 * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
28525 * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
28526 * valtrack.c (dead_debug_insert_temp): Likewise.
28527 * varasm.c (mergeable_constant_section): Likewise.
28528 * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
28530 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28531 Alan Hayward <alan.hayward@arm.com>
28532 David Sherwood <david.sherwood@arm.com>
28534 * expr.c (expand_assignment): Cope with polynomial mode sizes
28535 when assigning to a CONCAT.
28537 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28538 Alan Hayward <alan.hayward@arm.com>
28539 David Sherwood <david.sherwood@arm.com>
28541 * machmode.h (mode_precision): Change from unsigned short to
28543 (mode_to_precision): Return a poly_uint16 rather than an unsigned
28545 (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
28546 or if measurement_type is not polynomial.
28547 (HWI_COMPUTABLE_MODE_P): Turn into a function. Optimize the case
28548 in which the mode is already known to be a scalar_int_mode.
28549 * genmodes.c (emit_mode_precision): Change the type of mode_precision
28550 from unsigned short to poly_uint16_pod. Use ZERO_COEFFS for the
28552 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
28553 for GET_MODE_PRECISION.
28554 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
28555 for GET_MODE_PRECISION.
28556 * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
28558 (try_combine, find_split_point, combine_simplify_rtx): Likewise.
28559 (expand_field_assignment, make_extraction): Likewise.
28560 (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
28561 (get_last_value): Likewise.
28562 * convert.c (convert_to_integer_1): Likewise.
28563 * cse.c (cse_insn): Likewise.
28564 * expr.c (expand_expr_real_1): Likewise.
28565 * lra-constraints.c (simplify_operand_subreg): Likewise.
28566 * optabs-query.c (can_atomic_load_p): Likewise.
28567 * optabs.c (expand_atomic_load): Likewise.
28568 (expand_atomic_store): Likewise.
28569 * ree.c (combine_reaching_defs): Likewise.
28570 * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
28571 * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
28572 * tree.h (type_has_mode_precision_p): Likewise.
28573 * ubsan.c (instrument_si_overflow): Likewise.
28575 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28576 Alan Hayward <alan.hayward@arm.com>
28577 David Sherwood <david.sherwood@arm.com>
28579 * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
28580 polynomial numbers of units.
28581 (SET_TYPE_VECTOR_SUBPARTS): Likewise.
28582 (valid_vector_subparts_p): New function.
28583 (build_vector_type): Remove temporary shim and take the number
28584 of units as a poly_uint64 rather than an int.
28585 (build_opaque_vector_type): Take the number of units as a
28586 poly_uint64 rather than an int.
28587 * tree.c (build_vector_from_ctor): Handle polynomial
28588 TYPE_VECTOR_SUBPARTS.
28589 (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
28590 (uniform_vector_p, vector_type_mode, build_vector): Likewise.
28591 (build_vector_from_val): If the number of units is variable,
28592 use build_vec_duplicate_cst for constant operands and
28593 VEC_DUPLICATE_EXPR otherwise.
28594 (make_vector_type): Remove temporary is_constant ().
28595 (build_vector_type, build_opaque_vector_type): Take the number of
28596 units as a poly_uint64 rather than an int.
28597 (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
28599 * cfgexpand.c (expand_debug_expr): Likewise.
28600 * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
28601 (store_constructor, expand_expr_real_1): Likewise.
28602 (const_scalar_mask_from_tree): Likewise.
28603 * fold-const-call.c (fold_const_reduction): Likewise.
28604 * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
28605 (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
28606 (native_encode_vector, vec_cst_ctor_to_array): Likewise.
28607 (fold_relational_const): Likewise.
28608 (native_interpret_vector): Likewise. Change the size from an
28609 int to an unsigned int.
28610 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
28611 TYPE_VECTOR_SUBPARTS.
28612 (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
28613 (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
28614 duplicating a non-constant operand into a variable-length vector.
28615 * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
28616 TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
28617 * ipa-icf.c (sem_variable::equals): Likewise.
28618 * match.pd: Likewise.
28619 * omp-simd-clone.c (simd_clone_subparts): Likewise.
28620 * print-tree.c (print_node): Likewise.
28621 * stor-layout.c (layout_type): Likewise.
28622 * targhooks.c (default_builtin_vectorization_cost): Likewise.
28623 * tree-cfg.c (verify_gimple_comparison): Likewise.
28624 (verify_gimple_assign_binary): Likewise.
28625 (verify_gimple_assign_ternary): Likewise.
28626 (verify_gimple_assign_single): Likewise.
28627 * tree-pretty-print.c (dump_generic_node): Likewise.
28628 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
28629 (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
28630 * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
28631 (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
28632 (vect_shift_permute_load_chain): Likewise.
28633 * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
28634 (expand_vector_condition, optimize_vector_constructor): Likewise.
28635 (lower_vec_perm, get_compute_type): Likewise.
28636 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
28637 (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
28638 * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
28639 (vect_recog_mask_conversion_pattern): Likewise.
28640 * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
28641 (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
28642 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
28643 (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
28644 (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
28645 (vectorizable_shift, vectorizable_operation, vectorizable_store)
28646 (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
28647 (supportable_widening_operation): Likewise.
28648 (supportable_narrowing_operation): Likewise.
28649 * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
28651 * varasm.c (output_constant): Likewise.
28653 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28654 Alan Hayward <alan.hayward@arm.com>
28655 David Sherwood <david.sherwood@arm.com>
28657 * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
28658 so that both the length == 3 and length != 3 cases set up their
28659 own permute vectors. Add comments explaining why we know the
28660 number of elements is constant.
28661 (vect_permute_load_chain): Likewise.
28663 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28664 Alan Hayward <alan.hayward@arm.com>
28665 David Sherwood <david.sherwood@arm.com>
28667 * machmode.h (mode_nunits): Change from unsigned char to
28669 (ONLY_FIXED_SIZE_MODES): New macro.
28670 (pod_mode::measurement_type, scalar_int_mode::measurement_type)
28671 (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
28672 (complex_mode::measurement_type, fixed_size_mode::measurement_type):
28674 (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
28675 (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
28676 or if measurement_type is not polynomial.
28677 * genmodes.c (ZERO_COEFFS): New macro.
28678 (emit_mode_nunits_inline): Make mode_nunits_inline return a
28680 (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
28681 Use ZERO_COEFFS when emitting initializers.
28682 * data-streamer.h (bp_pack_poly_value): New function.
28683 (bp_unpack_poly_value): Likewise.
28684 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
28685 for GET_MODE_NUNITS.
28686 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
28687 for GET_MODE_NUNITS.
28688 * tree.c (make_vector_type): Remove temporary shim and make
28689 the real function take the number of units as a poly_uint64
28690 rather than an int.
28691 (build_vector_type_for_mode): Handle polynomial nunits.
28692 * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
28693 * emit-rtl.c (const_vec_series_p_1): Likewise.
28694 (gen_rtx_CONST_VECTOR): Likewise.
28695 * fold-const.c (test_vec_duplicate_folding): Likewise.
28696 * genrecog.c (validate_pattern): Likewise.
28697 * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
28698 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
28699 * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
28700 (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
28701 (expand_vec_cond_expr, expand_mult_highpart): Likewise.
28702 * rtlanal.c (subreg_get_info): Likewise.
28703 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
28704 (vect_grouped_load_supported): Likewise.
28705 * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
28706 * tree-vect-loop.c (have_whole_vector_shift): Likewise.
28707 * simplify-rtx.c (simplify_unary_operation_1): Likewise.
28708 (simplify_const_unary_operation, simplify_binary_operation_1)
28709 (simplify_const_binary_operation, simplify_ternary_operation)
28710 (test_vector_ops_duplicate, test_vector_ops): Likewise.
28711 (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
28712 instead of CONST_VECTOR_NUNITS.
28713 * varasm.c (output_constant_pool_2): Likewise.
28714 * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
28715 explicit-encoded elements in the XVEC for variable-length vectors.
28717 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28719 * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
28721 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28722 Alan Hayward <alan.hayward@arm.com>
28723 David Sherwood <david.sherwood@arm.com>
28725 * coretypes.h (fixed_size_mode): Declare.
28726 (fixed_size_mode_pod): New typedef.
28727 * builtins.h (target_builtins::x_apply_args_mode)
28728 (target_builtins::x_apply_result_mode): Change type to
28729 fixed_size_mode_pod.
28730 * builtins.c (apply_args_size, apply_result_size, result_vector)
28731 (expand_builtin_apply_args_1, expand_builtin_apply)
28732 (expand_builtin_return): Update accordingly.
28734 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28736 * cse.c (hash_rtx_cb): Hash only the encoded elements.
28737 * cselib.c (cselib_hash_rtx): Likewise.
28738 * expmed.c (make_tree): Build VECTOR_CSTs directly from the
28739 CONST_VECTOR encoding.
28741 2018-01-03 Jakub Jelinek <jakub@redhat.com>
28742 Jeff Law <law@redhat.com>
28745 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
28746 noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
28747 only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
28748 and add REG_CFA_ADJUST_CFA notes in that case to both insns.
28751 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
28752 explicitly probe *sp in a noreturn function if there were any callee
28753 register saves or frame pointer is needed.
28755 2018-01-03 Jakub Jelinek <jakub@redhat.com>
28758 * cfgexpand.c (expand_debug_expr): Return NULL if mode is
28759 BLKmode for ternary, binary or unary expressions.
28762 * var-tracking.c (delete_vta_debug_insn): New inline function.
28763 (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
28764 insns from get_insns () to NULL instead of each bb separately.
28765 Use delete_vta_debug_insn. No longer static.
28766 (vt_debug_insns_local, variable_tracking_main_1): Adjust
28767 delete_vta_debug_insns callers.
28768 * rtl.h (delete_vta_debug_insns): Declare.
28769 * final.c (rest_of_handle_final): Call delete_vta_debug_insns
28770 instead of variable_tracking_main.
28772 2018-01-03 Martin Sebor <msebor@redhat.com>
28774 PR tree-optimization/83603
28775 * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
28776 arguments past the endof the argument list in functions declared
28777 without a prototype.
28778 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
28779 Avoid checking when arguments are null.
28781 2018-01-03 Martin Sebor <msebor@redhat.com>
28784 * doc/extend.texi (attribute const): Fix a typo.
28785 * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
28786 issuing -Wsuggest-attribute for void functions.
28788 2018-01-03 Martin Sebor <msebor@redhat.com>
28790 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
28791 offset_int::from instead of wide_int::to_shwi.
28792 (maybe_diag_overlap): Remove assertion.
28793 Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
28794 * gimple-ssa-sprintf.c (format_directive): Same.
28795 (parse_directive): Same.
28796 (sprintf_dom_walker::compute_format_length): Same.
28797 (try_substitute_return_value): Same.
28799 2018-01-03 Jeff Law <law@redhat.com>
28801 PR middle-end/83654
28802 * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
28803 non-constant residual for zero at runtime and avoid probing in
28804 that case. Reorganize code for trailing problem to mirror handling
28807 2018-01-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
28809 PR tree-optimization/83501
28810 * tree-ssa-strlen.c (get_string_cst): New.
28811 (handle_char_store): Call get_string_cst.
28813 2018-01-03 Martin Liska <mliska@suse.cz>
28815 PR tree-optimization/83593
28816 * tree-ssa-strlen.c: Include tree-cfg.h.
28817 (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
28818 (strlen_dom_walker): Add new member variable m_cleanup_cfg.
28819 (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
28821 (strlen_dom_walker::before_dom_children): Call
28822 gimple_purge_dead_eh_edges. Dump tranformation with details
28824 (strlen_dom_walker::before_dom_children): Update call by adding
28825 new argument cleanup_eh.
28826 (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
28828 2018-01-03 Martin Liska <mliska@suse.cz>
28831 * cif-code.def (VARIADIC_THUNK): New enum value.
28832 * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
28835 2018-01-03 Jan Beulich <jbeulich@suse.com>
28837 * sse.md (mov<mode>_internal): Tighten condition for when to use
28838 vmovdqu<ssescalarsize> for TI and OI modes.
28840 2018-01-03 Jakub Jelinek <jakub@redhat.com>
28842 Update copyright years.
28844 2018-01-03 Martin Liska <mliska@suse.cz>
28847 * ipa-visibility.c (function_and_variable_visibility): Skip
28848 functions with noipa attribure.
28850 2018-01-03 Jakub Jelinek <jakub@redhat.com>
28852 * gcc.c (process_command): Update copyright notice dates.
28853 * gcov-dump.c (print_version): Ditto.
28854 * gcov.c (print_version): Ditto.
28855 * gcov-tool.c (print_version): Ditto.
28856 * gengtype.c (create_file): Ditto.
28857 * doc/cpp.texi: Bump @copying's copyright year.
28858 * doc/cppinternals.texi: Ditto.
28859 * doc/gcc.texi: Ditto.
28860 * doc/gccint.texi: Ditto.
28861 * doc/gcov.texi: Ditto.
28862 * doc/install.texi: Ditto.
28863 * doc/invoke.texi: Ditto.
28865 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28867 * vector-builder.h (vector_builder::m_full_nelts): Change from
28868 unsigned int to poly_uint64.
28869 (vector_builder::full_nelts): Update prototype accordingly.
28870 (vector_builder::new_vector): Likewise.
28871 (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
28872 (vector_builder::operator ==): Likewise.
28873 (vector_builder::finalize): Likewise.
28874 * int-vector-builder.h (int_vector_builder::int_vector_builder):
28875 Take the number of elements as a poly_uint64 rather than an
28877 * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
28878 from unsigned int to poly_uint64.
28879 (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
28880 (vec_perm_indices::new_vector): Likewise.
28881 (vec_perm_indices::length): Likewise.
28882 (vec_perm_indices::nelts_per_input): Likewise.
28883 (vec_perm_indices::input_nelts): Likewise.
28884 * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
28885 number of elements per input as a poly_uint64 rather than an
28886 unsigned int. Use the original encoding for variable-length
28887 vectors, rather than clamping each individual element.
28888 For the second and subsequent elements in each pattern,
28889 clamp the step and base before clamping their sum.
28890 (vec_perm_indices::series_p): Handle polynomial element counts.
28891 (vec_perm_indices::all_in_range_p): Likewise.
28892 (vec_perm_indices_to_tree): Likewise.
28893 (vec_perm_indices_to_rtx): Likewise.
28894 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
28895 * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
28896 (tree_vector_builder::new_binary_operation): Handle polynomial
28897 element counts. Return false if we need to know the number
28898 of elements at compile time.
28899 * fold-const.c (fold_vec_perm): Punt if the number of elements
28900 isn't known at compile time.
28902 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28904 * vec-perm-indices.h (vec_perm_builder): Change element type
28905 from HOST_WIDE_INT to poly_int64.
28906 (vec_perm_indices::element_type): Update accordingly.
28907 (vec_perm_indices::clamp): Handle polynomial element_types.
28908 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
28909 (vec_perm_indices::all_in_range_p): Likewise.
28910 (tree_to_vec_perm_builder): Check for poly_int64 trees rather
28912 * vector-builder.h (vector_builder::stepped_sequence_p): Handle
28913 polynomial vec_perm_indices element types.
28914 * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
28915 * fold-const.c (fold_vec_perm): Likewise.
28916 * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
28917 * tree-vect-generic.c (lower_vec_perm): Likewise.
28918 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
28919 * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
28920 element type to HOST_WIDE_INT.
28922 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28923 Alan Hayward <alan.hayward@arm.com>
28924 David Sherwood <david.sherwood@arm.com>
28926 * alias.c (addr_side_effect_eval): Take the size as a poly_int64
28927 rather than an int. Use plus_constant.
28928 (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
28929 Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
28931 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28932 Alan Hayward <alan.hayward@arm.com>
28933 David Sherwood <david.sherwood@arm.com>
28935 * calls.c (emit_call_1, expand_call): Change struct_value_size from
28936 a HOST_WIDE_INT to a poly_int64.
28938 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28939 Alan Hayward <alan.hayward@arm.com>
28940 David Sherwood <david.sherwood@arm.com>
28942 * calls.c (load_register_parameters): Cope with polynomial
28943 mode sizes. Require a constant size for BLKmode parameters
28944 that aren't described by a PARALLEL. If BLOCK_REG_PADDING
28945 forces a parameter to be padded at the lsb end in order to
28946 fill a complete number of words, require the parameter size
28947 to be ordered wrt UNITS_PER_WORD.
28949 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28950 Alan Hayward <alan.hayward@arm.com>
28951 David Sherwood <david.sherwood@arm.com>
28953 * reload1.c (spill_stack_slot_width): Change element type
28954 from unsigned int to poly_uint64_pod.
28955 (alter_reg): Treat mode sizes as polynomial.
28957 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28958 Alan Hayward <alan.hayward@arm.com>
28959 David Sherwood <david.sherwood@arm.com>
28961 * reload.c (complex_word_subreg_p): New function.
28962 (reload_inner_reg_of_subreg, push_reload): Use it.
28964 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28965 Alan Hayward <alan.hayward@arm.com>
28966 David Sherwood <david.sherwood@arm.com>
28968 * lra-constraints.c (process_alt_operands): Reject matched
28969 operands whose sizes aren't ordered.
28970 (match_reload): Refer to this check here.
28972 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28973 Alan Hayward <alan.hayward@arm.com>
28974 David Sherwood <david.sherwood@arm.com>
28976 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
28977 that the mode size is in the set {1, 2, 4, 8, 16}.
28979 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28980 Alan Hayward <alan.hayward@arm.com>
28981 David Sherwood <david.sherwood@arm.com>
28983 * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
28984 Use plus_constant instead of gen_rtx_PLUS.
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 * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
28991 * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
28992 * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
28993 * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
28994 * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
28995 * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
28996 * config/i386/i386-protos.h (ix86_push_rounding): Declare.
28997 * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
28998 * config/i386/i386.c (ix86_push_rounding): ...this new function.
28999 * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
29001 * config/m32c/m32c.c (m32c_push_rounding): Likewise.
29002 * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
29003 * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
29004 * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
29005 * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
29006 * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
29007 * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
29008 * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
29009 * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
29010 * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
29012 * expr.c (emit_move_resolve_push): Treat the input and result
29013 of PUSH_ROUNDING as a poly_int64.
29014 (emit_move_complex_push, emit_single_push_insn_1): Likewise.
29015 (emit_push_insn): Likewise.
29016 * lra-eliminations.c (mark_not_eliminable): Likewise.
29017 * recog.c (push_operand): Likewise.
29018 * reload1.c (elimination_effects): Likewise.
29019 * rtlanal.c (nonzero_bits1): Likewise.
29020 * calls.c (store_one_arg): Likewise. Require the padding to be
29021 known at compile time.
29023 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29024 Alan Hayward <alan.hayward@arm.com>
29025 David Sherwood <david.sherwood@arm.com>
29027 * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
29028 Use plus_constant instead of gen_rtx_PLUS.
29030 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29031 Alan Hayward <alan.hayward@arm.com>
29032 David Sherwood <david.sherwood@arm.com>
29034 * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
29035 rather than an int.
29037 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29038 Alan Hayward <alan.hayward@arm.com>
29039 David Sherwood <david.sherwood@arm.com>
29041 * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
29042 instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
29043 via stack temporaries. Treat the mode size as polynomial too.
29045 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29046 Alan Hayward <alan.hayward@arm.com>
29047 David Sherwood <david.sherwood@arm.com>
29049 * expr.c (expand_expr_real_2): When handling conversions involving
29050 unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
29051 multiplying int_size_in_bytes by BITS_PER_UNIT. Treat GET_MODE_BISIZE
29052 as a poly_uint64 too.
29054 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29055 Alan Hayward <alan.hayward@arm.com>
29056 David Sherwood <david.sherwood@arm.com>
29058 * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
29060 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29061 Alan Hayward <alan.hayward@arm.com>
29062 David Sherwood <david.sherwood@arm.com>
29064 * combine.c (can_change_dest_mode): Handle polynomial
29065 REGMODE_NATURAL_SIZE.
29066 * expmed.c (store_bit_field_1): Likewise.
29067 * expr.c (store_constructor): Likewise.
29068 * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
29069 and polynomial REGMODE_NATURAL_SIZE.
29070 (gen_lowpart_common): Likewise.
29071 * reginfo.c (record_subregs_of_mode): Likewise.
29072 * rtlanal.c (read_modify_subreg_p): Likewise.
29074 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29075 Alan Hayward <alan.hayward@arm.com>
29076 David Sherwood <david.sherwood@arm.com>
29078 * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
29079 numbers of elements.
29081 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29082 Alan Hayward <alan.hayward@arm.com>
29083 David Sherwood <david.sherwood@arm.com>
29085 * match.pd: Cope with polynomial numbers of vector elements.
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 * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
29092 in a POINTER_PLUS_EXPR.
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 * omp-simd-clone.c (simd_clone_subparts): New function.
29099 (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
29100 (ipa_simd_modify_function_body): Likewise.
29102 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29103 Alan Hayward <alan.hayward@arm.com>
29104 David Sherwood <david.sherwood@arm.com>
29106 * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
29107 (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
29108 (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
29109 (expand_vector_condition, vector_element): Likewise.
29110 (subparts_gt): New function.
29111 (get_compute_type): Use subparts_gt.
29112 (count_type_subparts): Delete.
29113 (expand_vector_operations_1): Use subparts_gt instead of
29114 count_type_subparts.
29116 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29117 Alan Hayward <alan.hayward@arm.com>
29118 David Sherwood <david.sherwood@arm.com>
29120 * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
29121 (vect_compile_time_alias): ...this new function. Do the calculation
29122 on poly_ints rather than trees.
29123 (vect_prune_runtime_alias_test_list): Update call accordingly.
29125 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29126 Alan Hayward <alan.hayward@arm.com>
29127 David Sherwood <david.sherwood@arm.com>
29129 * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
29131 (vect_schedule_slp_instance): Likewise.
29133 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29134 Alan Hayward <alan.hayward@arm.com>
29135 David Sherwood <david.sherwood@arm.com>
29137 * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
29138 constant and extern definitions for variable-length vectors.
29139 (vect_get_constant_vectors): Note that the number of units
29140 is known to be constant.
29142 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29143 Alan Hayward <alan.hayward@arm.com>
29144 David Sherwood <david.sherwood@arm.com>
29146 * tree-vect-stmts.c (vectorizable_conversion): Treat the number
29147 of units as polynomial. Choose between WIDE and NARROW based
29150 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29151 Alan Hayward <alan.hayward@arm.com>
29152 David Sherwood <david.sherwood@arm.com>
29154 * tree-vect-stmts.c (simd_clone_subparts): New function.
29155 (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
29157 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29158 Alan Hayward <alan.hayward@arm.com>
29159 David Sherwood <david.sherwood@arm.com>
29161 * tree-vect-stmts.c (vectorizable_call): Treat the number of
29162 vectors as polynomial. Use build_index_vector for
29163 IFN_GOMP_SIMD_LANE.
29165 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29166 Alan Hayward <alan.hayward@arm.com>
29167 David Sherwood <david.sherwood@arm.com>
29169 * tree-vect-stmts.c (get_load_store_type): Treat the number of
29170 units as polynomial. Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
29171 for variable-length vectors.
29172 (vectorizable_mask_load_store): Treat the number of units as
29173 polynomial, asserting that it is constant if the condition has
29174 already been enforced.
29175 (vectorizable_store, vectorizable_load): Likewise.
29177 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29178 Alan Hayward <alan.hayward@arm.com>
29179 David Sherwood <david.sherwood@arm.com>
29181 * tree-vect-loop.c (vectorizable_live_operation): Treat the number
29182 of units as polynomial. Punt if we can't tell at compile time
29183 which vector contains the final result.
29185 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29186 Alan Hayward <alan.hayward@arm.com>
29187 David Sherwood <david.sherwood@arm.com>
29189 * tree-vect-loop.c (vectorizable_induction): Treat the number
29190 of units as polynomial. Punt on SLP inductions. Use an integer
29191 VEC_SERIES_EXPR for variable-length integer reductions. Use a
29192 cast of such a series for variable-length floating-point
29195 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29196 Alan Hayward <alan.hayward@arm.com>
29197 David Sherwood <david.sherwood@arm.com>
29199 * tree.h (build_index_vector): Declare.
29200 * tree.c (build_index_vector): New function.
29201 * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
29202 of units as polynomial, forcibly converting it to a constant if
29203 vectorizable_reduction has already enforced the condition.
29204 (vect_create_epilog_for_reduction): Likewise. Use build_index_vector
29205 to create a {1,2,3,...} vector.
29206 (vectorizable_reduction): Treat the number of units as polynomial.
29207 Choose vectype_in based on the largest scalar element size rather
29208 than the smallest number of units. Enforce the restrictions
29211 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29212 Alan Hayward <alan.hayward@arm.com>
29213 David Sherwood <david.sherwood@arm.com>
29215 * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
29216 number of units as polynomial.
29218 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29219 Alan Hayward <alan.hayward@arm.com>
29220 David Sherwood <david.sherwood@arm.com>
29222 * target.h (vector_sizes, auto_vector_sizes): New typedefs.
29223 * target.def (autovectorize_vector_sizes): Return the vector sizes
29224 by pointer, using vector_sizes rather than a bitmask.
29225 * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
29226 * targhooks.c (default_autovectorize_vector_sizes): Likewise.
29227 * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
29229 * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
29230 * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
29231 * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
29232 * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
29233 * omp-general.c (omp_max_vf): Likewise.
29234 * omp-low.c (omp_clause_aligned_alignment): Likewise.
29235 * optabs-query.c (can_vec_mask_load_store_p): Likewise.
29236 * tree-vect-loop.c (vect_analyze_loop): Likewise.
29237 * tree-vect-slp.c (vect_slp_bb): Likewise.
29238 * doc/tm.texi: Regenerate.
29239 * tree-vectorizer.h (current_vector_size): Change from an unsigned int
29241 * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
29242 the vector size as a poly_uint64 rather than an unsigned int.
29243 (current_vector_size): Change from an unsigned int to a poly_uint64.
29244 (get_vectype_for_scalar_type): Update accordingly.
29245 * tree.h (build_truth_vector_type): Take the size and number of
29246 units as a poly_uint64 rather than an unsigned int.
29247 (build_vector_type): Add a temporary overload that takes
29248 the number of units as a poly_uint64 rather than an unsigned int.
29249 * tree.c (make_vector_type): Likewise.
29250 (build_truth_vector_type): Take the number of units as a poly_uint64
29251 rather than an unsigned int.
29253 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29254 Alan Hayward <alan.hayward@arm.com>
29255 David Sherwood <david.sherwood@arm.com>
29257 * target.def (get_mask_mode): Take the number of units and length
29258 as poly_uint64s rather than unsigned ints.
29259 * targhooks.h (default_get_mask_mode): Update accordingly.
29260 * targhooks.c (default_get_mask_mode): Likewise.
29261 * config/i386/i386.c (ix86_get_mask_mode): Likewise.
29262 * doc/tm.texi: Regenerate.
29264 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29265 Alan Hayward <alan.hayward@arm.com>
29266 David Sherwood <david.sherwood@arm.com>
29268 * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
29269 * omp-general.c (omp_max_vf): Likewise.
29270 * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
29271 (expand_omp_simd): Handle polynomial safelen.
29272 * omp-low.c (omplow_simd_context): Add a default constructor.
29273 (omplow_simd_context::max_vf): Change from int to poly_uint64.
29274 (lower_rec_simd_input_clauses): Update accordingly.
29275 (lower_rec_input_clauses): Likewise.
29277 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29278 Alan Hayward <alan.hayward@arm.com>
29279 David Sherwood <david.sherwood@arm.com>
29281 * tree-vectorizer.h (vect_nunits_for_cost): New function.
29282 * tree-vect-loop.c (vect_model_reduction_cost): Use it.
29283 * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
29284 (vect_analyze_slp_cost): Likewise.
29285 * tree-vect-stmts.c (vect_model_store_cost): Likewise.
29286 (vect_model_load_cost): Likewise.
29288 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29289 Alan Hayward <alan.hayward@arm.com>
29290 David Sherwood <david.sherwood@arm.com>
29292 * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
29293 (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
29294 from an unsigned int * to a poly_uint64_pod *.
29295 (calculate_unrolling_factor): New function.
29296 (vect_analyze_slp_instance): Use it. Track polynomial max_nunits.
29298 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29299 Alan Hayward <alan.hayward@arm.com>
29300 David Sherwood <david.sherwood@arm.com>
29302 * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
29303 from an unsigned int to a poly_uint64.
29304 (_loop_vec_info::slp_unrolling_factor): Likewise.
29305 (_loop_vec_info::vectorization_factor): Change from an int
29307 (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
29308 (vect_get_num_vectors): New function.
29309 (vect_update_max_nunits, vect_vf_for_cost): Likewise.
29310 (vect_get_num_copies): Use vect_get_num_vectors.
29311 (vect_analyze_data_ref_dependences): Change max_vf from an int *
29312 to an unsigned int *.
29313 (vect_analyze_data_refs): Change min_vf from an int * to a
29315 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
29316 than an unsigned HOST_WIDE_INT.
29317 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
29318 (vect_analyze_data_ref_dependence): Change max_vf from an int *
29319 to an unsigned int *.
29320 (vect_analyze_data_ref_dependences): Likewise.
29321 (vect_compute_data_ref_alignment): Handle polynomial vf.
29322 (vect_enhance_data_refs_alignment): Likewise.
29323 (vect_prune_runtime_alias_test_list): Likewise.
29324 (vect_shift_permute_load_chain): Likewise.
29325 (vect_supportable_dr_alignment): Likewise.
29326 (dependence_distance_ge_vf): Take the vectorization factor as a
29327 poly_uint64 rather than an unsigned HOST_WIDE_INT.
29328 (vect_analyze_data_refs): Change min_vf from an int * to a
29330 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
29331 vfm1 as a poly_uint64 rather than an int. Make the same change
29332 for the returned bound_scalar.
29333 (vect_gen_vector_loop_niters): Handle polynomial vf.
29334 (vect_do_peeling): Likewise. Update call to
29335 vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
29336 (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
29338 * tree-vect-loop.c (vect_determine_vectorization_factor)
29339 (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
29340 (vect_get_known_peeling_cost): Likewise.
29341 (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
29342 (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
29343 (vect_transform_loop): Likewise. Use the lowest possible VF when
29344 updating the upper bounds of the loop.
29345 (vect_min_worthwhile_factor): Make static. Return an unsigned int
29346 rather than an int.
29347 * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
29348 polynomial unroll factors.
29349 (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
29350 (vect_make_slp_decision): Likewise.
29351 (vect_supported_load_permutation_p): Likewise, and polynomial
29353 (vect_analyze_slp_cost): Handle polynomial vf.
29354 (vect_slp_analyze_node_operations): Likewise.
29355 (vect_slp_analyze_bb_1): Likewise.
29356 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
29357 than an unsigned HOST_WIDE_INT.
29358 * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
29359 (vectorizable_load): Handle polynomial vf.
29360 * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
29362 (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
29364 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29365 Alan Hayward <alan.hayward@arm.com>
29366 David Sherwood <david.sherwood@arm.com>
29368 * match.pd: Handle bit operations involving three constants
29369 and try to fold one pair.
29371 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29373 * tree-vect-loop-manip.c: Include gimple-fold.h.
29374 (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
29375 niters_maybe_zero parameters. Handle other cases besides a step of 1.
29376 (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
29377 Add a path that uses a step of VF instead of 1, but disable it
29379 (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
29380 and niters_no_overflow parameters. Update calls to
29381 slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
29382 Create a new SSA name if the latter choses to use a ste other
29383 than zero, and return it via niters_vector_mult_vf_var.
29384 * tree-vect-loop.c (vect_transform_loop): Update calls to
29385 vect_do_peeling, vect_gen_vector_loop_niters and
29386 slpeel_make_loop_iterate_ntimes.
29387 * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
29388 (vect_gen_vector_loop_niters): Update declarations after above changes.
29390 2018-01-02 Michael Meissner <meissner@linux.vnet.ibm.com>
29392 * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
29393 128-bit round to integer instructions.
29394 (ceil<mode>2): Likewise.
29395 (btrunc<mode>2): Likewise.
29396 (round<mode>2): Likewise.
29398 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
29400 * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
29401 unaligned VSX load/store on P8/P9.
29402 (expand_block_clear): Allow the use of unaligned VSX
29403 load/store on P8/P9.
29405 2018-01-02 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
29407 * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
29409 (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
29410 swap associated with both a load and a store.
29412 2018-01-02 Andrew Waterman <andrew@sifive.com>
29414 * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
29415 * config/riscv/riscv.md (clear_cache): Use it.
29417 2018-01-02 Artyom Skrobov <tyomitch@gmail.com>
29419 * web.c: Remove out-of-date comment.
29421 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
29423 * expr.c (fixup_args_size_notes): Check that any existing
29424 REG_ARGS_SIZE notes are correct, and don't try to re-add them.
29425 (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
29426 (emit_single_push_insn): ...here.
29428 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
29430 * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
29431 (const_vector_encoded_nelts): New function.
29432 (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
29433 (const_vector_int_elt, const_vector_elt): Declare.
29434 * emit-rtl.c (const_vector_int_elt_1): New function.
29435 (const_vector_elt): Likewise.
29436 * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
29437 of CONST_VECTOR_ELT.
29439 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
29441 * expr.c: Include rtx-vector-builder.h.
29442 (const_vector_mask_from_tree): Use rtx_vector_builder and operate
29443 directly on the tree encoding.
29444 (const_vector_from_tree): Likewise.
29445 * optabs.c: Include rtx-vector-builder.h.
29446 (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
29447 sequence of "u" values.
29448 * vec-perm-indices.c: Include rtx-vector-builder.h.
29449 (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
29450 directly on the vec_perm_indices encoding.
29452 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
29454 * doc/rtl.texi (const_vector): Describe new encoding scheme.
29455 * Makefile.in (OBJS): Add rtx-vector-builder.o.
29456 * rtx-vector-builder.h: New file.
29457 * rtx-vector-builder.c: Likewise.
29458 * rtl.h (rtx_def::u2): Add a const_vector field.
29459 (CONST_VECTOR_NPATTERNS): New macro.
29460 (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
29461 (CONST_VECTOR_DUPLICATE_P): Likewise.
29462 (CONST_VECTOR_STEPPED_P): Likewise.
29463 (CONST_VECTOR_ENCODED_ELT): Likewise.
29464 (const_vec_duplicate_p): Check for a duplicated vector encoding.
29465 (unwrap_const_vec_duplicate): Likewise.
29466 (const_vec_series_p): Check for a non-duplicated vector encoding.
29467 Say that the function only returns true for integer vectors.
29468 * emit-rtl.c: Include rtx-vector-builder.h.
29469 (gen_const_vec_duplicate_1): Delete.
29470 (gen_const_vector): Call gen_const_vec_duplicate instead of
29471 gen_const_vec_duplicate_1.
29472 (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
29473 (gen_const_vec_duplicate): Use rtx_vector_builder.
29474 (gen_const_vec_series): Likewise.
29475 (gen_rtx_CONST_VECTOR): Likewise.
29476 * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
29477 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
29478 Build a new vector rather than modifying a CONST_VECTOR in-place.
29479 (handle_special_swappables): Update call accordingly.
29480 * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
29481 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
29482 Build a new vector rather than modifying a CONST_VECTOR in-place.
29483 (handle_special_swappables): Update call accordingly.
29485 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
29487 * simplify-rtx.c (simplify_const_binary_operation): Use
29488 CONST_VECTOR_ELT instead of XVECEXP.
29490 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
29492 * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
29493 the selector elements to be different from the data elements
29494 if the selector is a VECTOR_CST.
29495 * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
29496 ssizetype for the selector.
29498 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
29500 * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
29501 before testing each element individually.
29502 * tree-vect-generic.c (lower_vec_perm): Likewise.
29504 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
29506 * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
29507 * selftest-run-tests.c (selftest::run_tests): Call it.
29508 * vector-builder.h (vector_builder::operator ==): New function.
29509 (vector_builder::operator !=): Likewise.
29510 * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
29511 (vec_perm_indices::all_from_input_p): New function.
29512 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
29513 (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
29514 * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
29515 instead of reading the VECTOR_CST directly. Detect whether both
29516 vector inputs are the same before constructing the vec_perm_indices,
29517 and update the number of inputs argument accordingly. Use the
29518 utility functions added above. Only construct sel2 if we need to.
29520 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
29522 * optabs.c (expand_vec_perm_var): Use an explicit encoding for
29523 the broadcast of the low byte.
29524 (expand_mult_highpart): Use an explicit encoding for the permutes.
29525 * optabs-query.c (can_mult_highpart_p): Likewise.
29526 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
29527 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
29528 (vectorizable_bswap): Likewise.
29529 * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
29530 explicit encoding for the power-of-2 permutes.
29531 (vect_permute_store_chain): Likewise.
29532 (vect_grouped_load_supported): Likewise.
29533 (vect_permute_load_chain): Likewise.
29535 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
29537 * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
29538 * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
29539 * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
29540 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
29541 * tree-vect-stmts.c (vectorizable_bswap): Likewise.
29542 (vect_gen_perm_mask_any): Likewise.
29544 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
29546 * int-vector-builder.h: New file.
29547 * vec-perm-indices.h: Include int-vector-builder.h.
29548 (vec_perm_indices): Redefine as an int_vector_builder.
29549 (auto_vec_perm_indices): Delete.
29550 (vec_perm_builder): Redefine as a stand-alone class.
29551 (vec_perm_indices::vec_perm_indices): New function.
29552 (vec_perm_indices::clamp): Likewise.
29553 * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
29554 (vec_perm_indices::new_vector): New function.
29555 (vec_perm_indices::new_expanded_vector): Update for new
29556 vec_perm_indices class.
29557 (vec_perm_indices::rotate_inputs): New function.
29558 (vec_perm_indices::all_in_range_p): Operate directly on the
29559 encoded form, without computing elided elements.
29560 (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
29561 encoding. Update for new vec_perm_indices class.
29562 * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
29563 the given vec_perm_builder.
29564 (expand_vec_perm_var): Update vec_perm_builder constructor.
29565 (expand_mult_highpart): Use vec_perm_builder instead of
29566 auto_vec_perm_indices.
29567 * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
29568 vec_perm_indices instead of auto_vec_perm_indices. Use a single
29569 or double series encoding as appropriate.
29570 * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
29571 vec_perm_indices instead of auto_vec_perm_indices.
29572 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
29573 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
29574 (vect_permute_store_chain): Likewise.
29575 (vect_grouped_load_supported): Likewise.
29576 (vect_permute_load_chain): Likewise.
29577 (vect_shift_permute_load_chain): Likewise.
29578 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
29579 (vect_transform_slp_perm_load): Likewise.
29580 (vect_schedule_slp_instance): Likewise.
29581 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
29582 (vectorizable_mask_load_store): Likewise.
29583 (vectorizable_bswap): Likewise.
29584 (vectorizable_store): Likewise.
29585 (vectorizable_load): Likewise.
29586 * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
29587 vec_perm_indices instead of auto_vec_perm_indices. Use
29588 tree_to_vec_perm_builder to read the vector from a tree.
29589 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
29590 vec_perm_builder instead of a vec_perm_indices.
29591 (have_whole_vector_shift): Use vec_perm_builder and
29592 vec_perm_indices instead of auto_vec_perm_indices. Leave the
29593 truncation to calc_vec_perm_mask_for_shift.
29594 (vect_create_epilog_for_reduction): Likewise.
29595 * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
29596 from auto_vec_perm_indices to vec_perm_indices.
29597 (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
29598 instead of changing individual elements.
29599 (aarch64_vectorize_vec_perm_const): Use new_vector to install
29600 the vector in d.perm.
29601 * config/arm/arm.c (expand_vec_perm_d::perm): Change
29602 from auto_vec_perm_indices to vec_perm_indices.
29603 (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
29604 instead of changing individual elements.
29605 (arm_vectorize_vec_perm_const): Use new_vector to install
29606 the vector in d.perm.
29607 * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
29608 Update vec_perm_builder constructor.
29609 (rs6000_expand_interleave): Likewise.
29610 * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
29611 (rs6000_expand_interleave): Likewise.
29613 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
29615 * optabs-query.c (can_vec_perm_var_p): Check whether lowering
29616 to qimode could truncate the indices.
29617 * optabs.c (expand_vec_perm_var): Likewise.
29619 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
29621 * Makefile.in (OBJS): Add vec-perm-indices.o.
29622 * vec-perm-indices.h: New file.
29623 * vec-perm-indices.c: Likewise.
29624 * target.h (vec_perm_indices): Replace with a forward class
29626 (auto_vec_perm_indices): Move to vec-perm-indices.h.
29627 * optabs.h: Include vec-perm-indices.h.
29628 (expand_vec_perm): Delete.
29629 (selector_fits_mode_p, expand_vec_perm_var): Declare.
29630 (expand_vec_perm_const): Declare.
29631 * target.def (vec_perm_const_ok): Replace with...
29632 (vec_perm_const): ...this new hook.
29633 * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
29634 (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
29635 * doc/tm.texi: Regenerate.
29636 * optabs.def (vec_perm_const): Delete.
29637 * doc/md.texi (vec_perm_const): Likewise.
29638 (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
29639 * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
29640 expand_vec_perm for constant permutation vectors. Assert that
29641 the mode of variable permutation vectors is the integer equivalent
29642 of the mode that is being permuted.
29643 * optabs-query.h (selector_fits_mode_p): Declare.
29644 * optabs-query.c: Include vec-perm-indices.h.
29645 (selector_fits_mode_p): New function.
29646 (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
29647 is defined, instead of checking whether the vec_perm_const_optab
29648 exists. Use targetm.vectorize.vec_perm_const instead of
29649 targetm.vectorize.vec_perm_const_ok. Check whether the indices
29650 fit in the vector mode before using a variable permute.
29651 * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
29652 vec_perm_indices instead of an rtx.
29653 (expand_vec_perm): Replace with...
29654 (expand_vec_perm_const): ...this new function. Take the selector
29655 as a vec_perm_indices rather than an rtx. Also take the mode of
29656 the selector. Update call to shift_amt_for_vec_perm_mask.
29657 Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
29658 Use vec_perm_indices::new_expanded_vector to expand the original
29659 selector into bytes. Check whether the indices fit in the vector
29660 mode before using a variable permute.
29661 (expand_vec_perm_var): Make global.
29662 (expand_mult_highpart): Use expand_vec_perm_const.
29663 * fold-const.c: Includes vec-perm-indices.h.
29664 * tree-ssa-forwprop.c: Likewise.
29665 * tree-vect-data-refs.c: Likewise.
29666 * tree-vect-generic.c: Likewise.
29667 * tree-vect-loop.c: Likewise.
29668 * tree-vect-slp.c: Likewise.
29669 * tree-vect-stmts.c: Likewise.
29670 * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
29672 * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
29673 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
29674 (aarch64_vectorize_vec_perm_const_ok): Fuse into...
29675 (aarch64_vectorize_vec_perm_const): ...this new function.
29676 (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
29677 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
29678 * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
29679 * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
29680 * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
29681 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
29682 (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
29684 (arm_vectorize_vec_perm_const): ...this new function. Explicitly
29685 check for NEON modes.
29686 * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
29687 * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
29688 * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
29689 (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
29691 (ix86_vectorize_vec_perm_const): ...this new function. Incorporate
29692 the old VEC_PERM_CONST conditions.
29693 * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
29694 * config/ia64/vect.md (vec_perm_const<mode>): Delete.
29695 * config/ia64/ia64.c (ia64_expand_vec_perm_const)
29696 (ia64_vectorize_vec_perm_const_ok): Merge into...
29697 (ia64_vectorize_vec_perm_const): ...this new function.
29698 * config/mips/loongson.md (vec_perm_const<mode>): Delete.
29699 * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
29700 * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
29701 * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
29702 * config/mips/mips.c (mips_expand_vec_perm_const)
29703 (mips_vectorize_vec_perm_const_ok): Merge into...
29704 (mips_vectorize_vec_perm_const): ...this new function.
29705 * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
29706 * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
29707 * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
29708 * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
29709 * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
29710 (rs6000_expand_vec_perm_const): Delete.
29711 * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
29713 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
29714 (altivec_expand_vec_perm_const_le): Take each operand individually.
29715 Operate on constant selectors rather than rtxes.
29716 (altivec_expand_vec_perm_const): Likewise. Update call to
29717 altivec_expand_vec_perm_const_le.
29718 (rs6000_expand_vec_perm_const): Delete.
29719 (rs6000_vectorize_vec_perm_const_ok): Delete.
29720 (rs6000_vectorize_vec_perm_const): New function.
29721 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
29722 an element count and rtx array.
29723 (rs6000_expand_extract_even): Update call accordingly.
29724 (rs6000_expand_interleave): Likewise.
29725 * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
29726 * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
29727 * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
29728 * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
29729 (rs6000_expand_vec_perm_const): Delete.
29730 * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
29731 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
29732 (altivec_expand_vec_perm_const_le): Take each operand individually.
29733 Operate on constant selectors rather than rtxes.
29734 (altivec_expand_vec_perm_const): Likewise. Update call to
29735 altivec_expand_vec_perm_const_le.
29736 (rs6000_expand_vec_perm_const): Delete.
29737 (rs6000_vectorize_vec_perm_const_ok): Delete.
29738 (rs6000_vectorize_vec_perm_const): New function. Remove stray
29739 reference to the SPE evmerge intructions.
29740 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
29741 an element count and rtx array.
29742 (rs6000_expand_extract_even): Update call accordingly.
29743 (rs6000_expand_interleave): Likewise.
29744 * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
29745 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
29747 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
29749 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
29751 * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
29752 vector mode and that that mode matches the mode of the data
29754 (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
29755 out into expand_vec_perm_var. Do all CONST_VECTOR handling here,
29756 directly using expand_vec_perm_1 when forcing selectors into
29758 (expand_vec_perm_var): New function, split out from expand_vec_perm.
29760 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
29762 * optabs-query.h (can_vec_perm_p): Delete.
29763 (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
29764 * optabs-query.c (can_vec_perm_p): Split into...
29765 (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
29766 (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
29767 particular selector is valid.
29768 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
29769 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
29770 (vect_grouped_load_supported): Likewise.
29771 (vect_shift_permute_load_chain): Likewise.
29772 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
29773 (vect_transform_slp_perm_load): Likewise.
29774 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
29775 (vectorizable_bswap): Likewise.
29776 (vect_gen_perm_mask_checked): Likewise.
29777 * fold-const.c (fold_ternary_loc): Likewise. Don't take
29778 implementations of variable permutation vectors into account
29779 when deciding which selector to use.
29780 * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
29781 vec_perm_const_optab is supported; instead use can_vec_perm_const_p
29782 with a false third argument.
29783 * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
29784 to test whether the constant selector is valid and can_vec_perm_var_p
29785 to test whether a variable selector is valid.
29787 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
29789 * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
29790 * optabs-query.c (can_vec_perm_p): Likewise.
29791 * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
29792 instead of vec_perm_indices.
29793 * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
29794 (vect_gen_perm_mask_checked): Likewise,
29795 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
29796 (vect_gen_perm_mask_checked): Likewise,
29798 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
29800 * optabs-query.h (qimode_for_vec_perm): Declare.
29801 * optabs-query.c (can_vec_perm_p): Split out qimode search to...
29802 (qimode_for_vec_perm): ...this new function.
29803 * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
29805 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
29807 * rtlanal.c (canonicalize_condition): Return 0 if final rtx
29808 does not have a conditional at the top.
29810 2018-01-02 Richard Biener <rguenther@suse.de>
29812 * ipa-inline.c (big_speedup_p): Fix expression.
29814 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
29817 * config/i386/x86-tune-costs.h: Increase cost of integer load costs
29820 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
29824 * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
29825 cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
29826 and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
29827 cond_taken_branch_cost 3->4.
29829 2018-01-01 Jakub Jelinek <jakub@redhat.com>
29831 PR tree-optimization/83581
29832 * tree-loop-distribution.c (pass_loop_distribution::execute): Return
29833 TODO_cleanup_cfg if any changes have been made.
29835 PR middle-end/83608
29836 * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
29837 convert_modes if target mode has the right side, but different mode
29840 PR middle-end/83609
29841 * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
29842 last argument when extracting from CONCAT. If either from_real or
29843 from_imag is NULL, use expansion through memory. If result is not
29844 a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
29845 the parts directly to inner mode, if even that fails, use expansion
29848 PR middle-end/83623
29849 * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
29850 check for bswap in mode rather than HImode and use that in expand_unop
29853 Copyright (C) 2018 Free Software Foundation, Inc.
29855 Copying and distribution of this file, with or without modification,
29856 are permitted in any medium without royalty provided the copyright
29857 notice and this notice are preserved.